TrinityCore/TrinityCore — Issue #3719: [Quest/FIX] Areatrigger Warsong Farms
Author: Discover-
Created: 2011-10-26 22:17:17+00:00
State: open

Introducing to you: the first areatrigger SAI ever made! Thanks a lot to Kaelima for noticing it was actually already scripted.. :P
This one is just a convertion to test the work and possibilites of this amazing new (old) feature. :)
https://github.com/TrinityCore/TrinityCore/blob/master/src/server/scripts/World/areatrigger_scripts.cpp#L178

```sql
-- Areatrigger Warsong Farms SAI
SET @AT_SLAUGHTERHOUSE := 4873;
SET @AT_GRAINERY := 4871;
SET @AT_TORP_FARM := 4872;
SET @NPC_SLAUGHTERHOUSE := 25672;
SET @NPC_GRAINERY := 25669;
SET @NPC_TORP_FARM := 25671;
UPDATE `areatrigger_scripts` SET `ScriptName`='SmartTrigger' WHERE `entry` IN (@AT_SLAUGHTERHOUSE,@AT_GRAINERY,@AT_TORP_FARM);
DELETE FROM `smart_scripts` WHERE `entryorguid`=@AREATRIGGER AND `source_type`=2;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@AT_SLAUGHTERHOUSE,2,0,0,46,0,100,0,@AT_SLAUGHTERHOUSE,0,0,0,33,@NPC_SLAUGHTERHOUSE,0,0,0,0,0,7,0,0,0,0,0,0,0,"Areatrigger Slaughterhouse - On Trigger - Quest Credit"),
(@AT_GRAINERY,2,0,0,46,0,100,0,@AT_GRAINERY,0,0,0,33,@NPC_GRAINERY,0,0,0,0,0,7,0,0,0,0,0,0,0,"Areatrigger Grainery - On Trigger - Quest Credit"),
(@AT_TORP_FARM,2,0,0,46,0,100,0,@AT_TORP_FARM,0,0,0,33,@NPC_TORP_FARM,0,0,0,0,0,7,0,0,0,0,0,0,0,"Areatrigger Torp Farm - On Trigger - Quest Credit");
```