Forums WoW Modding Support Archives WoWModding Threads [DiscordArchive] In AC (TC may be very similar here) is there a ...

[DiscordArchive] In AC (TC may be very similar here) is there a ...

[DiscordArchive] In AC (TC may be very similar here) is there a ...

Pages (2): Previous 1 2
rektbyfaith
Administrator
0
11-03-2024, 11:42 PM
#11
Archived author: Go'Vic.Ϻέψ • Posted: 2024-11-03T23:42:05.243000+00:00
Original source

and this would be an extension into the waypoints table

```sql
SELECT w.*
FROM waypoints w
WHERE
w.position_x BETWEEN @positionx_min AND @positionx_max AND
w.position_y BETWEEN @positiony_min AND @positiony_max AND
EXISTS (
SELECT 1
FROM creature_addon
INNER JOIN creature ON creature_addon.guid = creature.guid
INNER JOIN creature_template ON creature.id1 = creature_template.entry
INNER JOIN waypoint_data ON creature_addon.path_id = waypoint_data.id
WHERE
creature.map = @map_id
#AND creature_addon.path_id > 0
AND creature_template.entry = w.entry
AND waypoint_data.point = w.pointid
);
```
rektbyfaith
11-03-2024, 11:42 PM #11

Archived author: Go'Vic.Ϻέψ • Posted: 2024-11-03T23:42:05.243000+00:00
Original source

and this would be an extension into the waypoints table

```sql
SELECT w.*
FROM waypoints w
WHERE
w.position_x BETWEEN @positionx_min AND @positionx_max AND
w.position_y BETWEEN @positiony_min AND @positiony_max AND
EXISTS (
SELECT 1
FROM creature_addon
INNER JOIN creature ON creature_addon.guid = creature.guid
INNER JOIN creature_template ON creature.id1 = creature_template.entry
INNER JOIN waypoint_data ON creature_addon.path_id = waypoint_data.id
WHERE
creature.map = @map_id
#AND creature_addon.path_id > 0
AND creature_template.entry = w.entry
AND waypoint_data.point = w.pointid
);
```

rektbyfaith
Administrator
0
11-03-2024, 11:56 PM
#12
Archived author: Degen • Posted: 2024-11-03T23:56:26.254000+00:00
Original source

waypoints table is used in a different way so gotta do it like this
```sql
SET @map_id = 530;
SET @positionx_min = 3750;
SET @positionx_max = 11460;
SET @positiony_min = -8500;
SET @positiony_max = -3200;

SELECT w.*, cr.guid
FROM waypoints w
INNER JOIN creature_template ct ON w.entry = ct.entry
INNER JOIN creature cr ON ct.entry = cr.id1
WHERE w.position_x BETWEEN @positionx_min AND @positionx_max
AND w.position_y BETWEEN @positiony_min AND @positiony_max
AND cr.map = @map_id;
```
rektbyfaith
11-03-2024, 11:56 PM #12

Archived author: Degen • Posted: 2024-11-03T23:56:26.254000+00:00
Original source

waypoints table is used in a different way so gotta do it like this
```sql
SET @map_id = 530;
SET @positionx_min = 3750;
SET @positionx_max = 11460;
SET @positiony_min = -8500;
SET @positiony_max = -3200;

SELECT w.*, cr.guid
FROM waypoints w
INNER JOIN creature_template ct ON w.entry = ct.entry
INNER JOIN creature cr ON ct.entry = cr.id1
WHERE w.position_x BETWEEN @positionx_min AND @positionx_max
AND w.position_y BETWEEN @positiony_min AND @positiony_max
AND cr.map = @map_id;
```

rektbyfaith
Administrator
0
11-04-2024, 12:03 AM
#13
Archived author: Go'Vic.Ϻέψ • Posted: 2024-11-04T00:03:56.504000+00:00
Original source

Thanks again, one last question. Any idea how to link the points_of_interest table to map id?
rektbyfaith
11-04-2024, 12:03 AM #13

Archived author: Go'Vic.Ϻέψ • Posted: 2024-11-04T00:03:56.504000+00:00
Original source

Thanks again, one last question. Any idea how to link the points_of_interest table to map id?

rektbyfaith
Administrator
0
11-04-2024, 12:08 AM
#14
Archived author: Degen • Posted: 2024-11-04T00:08:30.092000+00:00
Original source

```sql
SET @positionx_min = 3750;
SET @positionx_max = 11460;
SET @positiony_min = -8500;
SET @positiony_max = -3200;

SELECT * FROM points_of_interest poi
WHERE poi.positionx BETWEEN @positionx_min AND @positionx_max
AND poi.positiony BETWEEN @positiony_min AND @positiony_max;
``` could do it this way
rektbyfaith
11-04-2024, 12:08 AM #14

Archived author: Degen • Posted: 2024-11-04T00:08:30.092000+00:00
Original source

```sql
SET @positionx_min = 3750;
SET @positionx_max = 11460;
SET @positiony_min = -8500;
SET @positiony_max = -3200;

SELECT * FROM points_of_interest poi
WHERE poi.positionx BETWEEN @positionx_min AND @positionx_max
AND poi.positiony BETWEEN @positiony_min AND @positiony_max;
``` could do it this way

rektbyfaith
Administrator
0
11-04-2024, 12:11 AM
#15
Archived author: Go'Vic.Ϻέψ • Posted: 2024-11-04T00:11:54.123000+00:00
Original source

Yea, Thats how I have it right now. Just didnt know if there was a more robust method than just assuming the x and y position ranges
rektbyfaith
11-04-2024, 12:11 AM #15

Archived author: Go'Vic.Ϻέψ • Posted: 2024-11-04T00:11:54.123000+00:00
Original source

Yea, Thats how I have it right now. Just didnt know if there was a more robust method than just assuming the x and y position ranges

rektbyfaith
Administrator
0
11-04-2024, 12:12 AM
#16
Archived author: Go'Vic.Ϻέψ • Posted: 2024-11-04T00:12:32.207000+00:00
Original source

I also have a method with an array, but it isnt that elegent

```sql
SET @Points_of_Interest_list = JSON_ARRAY('Silvermoon City, Weapon Master', 'Silvermoon City, Warlock Trainers', 'Silvermoon City, Tailoring',
'Silvermoon City, Stable Master', 'Silvermoon City, Skinning', 'Silvermoon City, Rogue Trainer',
'Silvermoon City, Priest Trainer', 'Silvermoon City, Paladin Trainer', 'Silvermoon City, Mining',
'Silvermoon City, Mana Loom', 'Silvermoon City, Mailbox', 'Silvermoon City, Mage Trainer',
'Silvermoon City, Leatherworking', 'Silvermoon City, Jewelcrafting', 'Silvermoon City, Inn',
'Silvermoon City, Hunter Trainer', 'Silvermoon City, Herbalism', 'Silvermoon City, Guild House',
'Silvermoon City, Flight Master', 'Silvermoon City, Fishing', 'Silvermoon City, First Aid',
'Silvermoon City, Engineering', 'Silvermoon City, Enchanting', 'Silvermoon City, Druid Trainer',
'Silvermoon City, Cooking', 'Silvermoon City, Blacksmithing', 'Silvermoon City, Battlemasters',
'Silvermoon City, Bank', 'Silvermoon City, Auction House', 'Silvermoon City, Alchemy',
'Silvermoon City Inscription', 'Saltheril\'s Haven, Tailor', 'Saltheril\'s Haven, Herbalist',
'Saltheril\'s Haven, Enchanter', 'Saltheril\'s Haven, Alchemist', 'Farstrider Retreat, Blacksmith',
'Falconwing Square, Warlock Trainer', 'Falconwing Square, Stable Master', 'Falconwing Square, Rogue Trainer',
'Falconwing Square, Priest Trainer', 'Falconwing Square, Paladin Trainer', 'Falconwing Square, Mage Trainer',
'Falconwing Square, Jewelcrafter', 'Falconwing Square, Innkeeper', 'Falconwing Square, Hunter Trainer',
'Falconwing Square, First Aid Trainer', 'Falconwing Square, Cook', 'Eversong Woods, Skinner',
'Eversong Woods, Leatherworker');
```
rektbyfaith
11-04-2024, 12:12 AM #16

Archived author: Go'Vic.Ϻέψ • Posted: 2024-11-04T00:12:32.207000+00:00
Original source

I also have a method with an array, but it isnt that elegent

```sql
SET @Points_of_Interest_list = JSON_ARRAY('Silvermoon City, Weapon Master', 'Silvermoon City, Warlock Trainers', 'Silvermoon City, Tailoring',
'Silvermoon City, Stable Master', 'Silvermoon City, Skinning', 'Silvermoon City, Rogue Trainer',
'Silvermoon City, Priest Trainer', 'Silvermoon City, Paladin Trainer', 'Silvermoon City, Mining',
'Silvermoon City, Mana Loom', 'Silvermoon City, Mailbox', 'Silvermoon City, Mage Trainer',
'Silvermoon City, Leatherworking', 'Silvermoon City, Jewelcrafting', 'Silvermoon City, Inn',
'Silvermoon City, Hunter Trainer', 'Silvermoon City, Herbalism', 'Silvermoon City, Guild House',
'Silvermoon City, Flight Master', 'Silvermoon City, Fishing', 'Silvermoon City, First Aid',
'Silvermoon City, Engineering', 'Silvermoon City, Enchanting', 'Silvermoon City, Druid Trainer',
'Silvermoon City, Cooking', 'Silvermoon City, Blacksmithing', 'Silvermoon City, Battlemasters',
'Silvermoon City, Bank', 'Silvermoon City, Auction House', 'Silvermoon City, Alchemy',
'Silvermoon City Inscription', 'Saltheril\'s Haven, Tailor', 'Saltheril\'s Haven, Herbalist',
'Saltheril\'s Haven, Enchanter', 'Saltheril\'s Haven, Alchemist', 'Farstrider Retreat, Blacksmith',
'Falconwing Square, Warlock Trainer', 'Falconwing Square, Stable Master', 'Falconwing Square, Rogue Trainer',
'Falconwing Square, Priest Trainer', 'Falconwing Square, Paladin Trainer', 'Falconwing Square, Mage Trainer',
'Falconwing Square, Jewelcrafter', 'Falconwing Square, Innkeeper', 'Falconwing Square, Hunter Trainer',
'Falconwing Square, First Aid Trainer', 'Falconwing Square, Cook', 'Eversong Woods, Skinner',
'Eversong Woods, Leatherworker');
```

rektbyfaith
Administrator
0
11-04-2024, 12:13 AM
#17
Archived author: Degen • Posted: 2024-11-04T00:13:21.743000+00:00
Original source

the way the maps are made those coords should only show up for stuff in quelthalas
rektbyfaith
11-04-2024, 12:13 AM #17

Archived author: Degen • Posted: 2024-11-04T00:13:21.743000+00:00
Original source

the way the maps are made those coords should only show up for stuff in quelthalas

rektbyfaith
Administrator
0
11-04-2024, 12:25 AM
#18
Archived author: Degen • Posted: 2024-11-04T00:25:53.213000+00:00
Original source

also if you want to post with syntax highlighting you can wrap it like this
\```sql
codestuff
\```
rektbyfaith
11-04-2024, 12:25 AM #18

Archived author: Degen • Posted: 2024-11-04T00:25:53.213000+00:00
Original source

also if you want to post with syntax highlighting you can wrap it like this
\```sql
codestuff
\```

Pages (2): Previous 1 2
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)