What's new

[EXECUTED] Patch Commoners with v10.1 Emucoach

Titesusy

Veteran User
Veteran User
Joined
Jul 26, 2016
Messages
134
Reaction score
2
Location
France
Commoners
(patch)


Because they are active in many events, i make this "patch" separately to take care only to Commoners.
In the script, the quests are sorted like in my visitor page (the order i made the scripts)

To comments my "setups" template in this script: Because I have done a deletion of all Commoners in the table, i can add new event of each of them. That's why the delete in the setups isn't repeated. :) After there is maybe a simple way to factorize the records, but i don't have yet the knownledge to do it, maybe in a future update :)


Known bug : about Halloween templates, we can't be rewarded because the npc aren't yet implemented. They will be in the next update of hallow's end script.
 
Last edited:

Titesusy

Veteran User
Veteran User
Joined
Jul 26, 2016
Messages
134
Reaction score
2
Location
France
Here the code :)

Code:
-- Last Revision 2019.02.24 by Titesusy
-- Tested with v10.1 Cataclysm Emucaoch
-- Modifiable STARTING HERE

SET @my_guid = 675000; -- my_guid => my_guid+100 must be free


-- Non modifiable STARTING HERE

SET @npc_A_Hum = 18927;
SET @npc_A_Nain = 19148;
SET @npc_A_Dra = 19171;
SET @npc_A_Gno = 19172;
SET @npc_A_NElf = 19173;
SET @npc_H_BElf = 19169;
SET @npc_H_Orc = 19175;
SET @npc_H_Tau = 19176;
SET @npc_H_Tro = 19177;
SET @npc_H_UnD = 19178;
SET @npc_AH_Gob = 20102; -- mixte


DELETE FROM creature WHERE ( id IN (@npc_A_Hum, @npc_A_Nain, @npc_A_Dra, @npc_A_Gno, @npc_A_NElf, @npc_H_BElf, @npc_H_Orc, @npc_H_Tau, @npc_H_Tro, @npc_H_UnD, @npc_AH_Gob ));

INSERT INTO creature 
(guid, id, map, zone, area, spawnMask, phaseMask, modelid, equipment_id, position_x, position_y, position_z, orientation, spawntimesecs, spawndist, currentwaypoint, curhealth, curmana, MovementType, npcflag, unit_flags, dynamicflags, walkmode, saiscriptflag) VALUES
(@my_guid, @npc_A_Hum,'0','1519','5148','1','3969','0','0','-8855.39','639.83','96.5045','1.87903','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+1, @npc_A_Hum,'0','1519','5148','1','3969','0','0','-8864.83','655.75','96.3786','4.92088','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+2, @npc_A_Nain,'0','1537','5719','1','1','0','0','-4908.06','-958.842','501.477','5.12816','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+3, @npc_A_Nain,'0','1537','5719','1','1','0','0','-4898.47','-964.18','501.448','2.86857','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+4, @npc_A_Nain,'0','1537','5719','1','1','0','0','-4928.81','-971.971','501.493','5.35985','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+5, @npc_A_Nain,'0','1537','5719','1','1','0','0','-4897.04','-955.052','501.457','3.89587','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+6, @npc_A_Nain,'0','1537','5719','1','1','0','0','-4915.92','-976.909','501.454','2.99187','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+7, @npc_A_Nain,'0','1537','5719','1','1','0','0','-4926.18','-985.016','501.458','1.71324','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+8, @npc_H_BElf,'571','4395','4395','1','1','0','0','5881.69','483.712','641.543','1.71305','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+9, @npc_H_BElf,'571','4395','4395','1','1','0','0','5880.75','489.656','641.553','4.92611','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+10, @npc_H_BElf,'530','3430','3430','1','1','0','0','9345.24','-7268.94','14.6764','4.42623','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+11, @npc_H_BElf,'530','3430','3430','1','1','0','0','9344.68','-7284.32','14.7731','1.59409','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+12, @npc_H_BElf,'530','3430','3430','1','1','0','0','9337.21','-7283.95','13.8398','0.563647','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+13, @npc_A_Dra,'530','3557','3557','1','1','0','0','-3907.12','-11606.5','-138.137','4.22701','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+14, @npc_A_Dra,'530','3557','3557','1','1','0','0','-3908.48','-11615.8','-138.16','1.47104','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+15, @npc_A_Dra,'530','3557','3557','1','1','0','0','-3914.06','-11611.3','-138.31','0.168853','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+16, @npc_A_Gno,'0','1537','5342','1','1','0','0','-4839.18','-1169.76','502.195','0.514736','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+17, @npc_A_Gno,'0','1537','5342','1','1','0','0','-4828.8','-1174.71','502.193','1.0221','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+18, @npc_A_Gno,'0','1537','5342','1','1','0','0','-4814.15','-1176.44','502.198','2.18371','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+19, @npc_A_Gno,'0','1537','5342','1','1','0','0','-4833.28','-1166.59','502.2','4.51555','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+20, @npc_A_Gno,'0','1537','5342','1','1','0','0','-4816.84','-1173.57','502.199','5.42426','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+21, @npc_A_NElf,'1','1657','1657','1','1','0','0','9960.9','2483.49','1315.6','1.14819','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+22, @npc_A_NElf,'1','1657','1657','1','1','0','0','9964.69','2489.25','1315.88','3.98662','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+23, @npc_A_NElf,'1','1657','1657','1','1','0','0','9957.29','2487.96','1316.27','5.94855','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+24, @npc_H_Orc,'1','1637','5170','1','3969','0','0','1632.78','-4406.24','15.5852','6.19506','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+25, @npc_H_Orc,'1','1637','5170','1','3969','0','0','1641.57','-4406.42','16.2384','3.26553','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+26, @npc_H_Orc,'1','1637','5170','1','3969','0','0','1633.94','-4418.09','15.6765','1.27297','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+27, @npc_H_Orc,'1','1637','5168','1','3969','0','0','1906.1','-4664.33','34.7913','5.02484','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+28, @npc_H_Orc,'1','1637','5168','1','3969','0','0','1909.88','-4671.38','35.1088','2.10473','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+29, @npc_H_Tau,'1','1637','5171','1','3969','0','0','1948.51','-4218.07','37.0406','2.18011','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+30, @npc_H_Tau,'1','1637','5171','1','3969','0','0','1941.39','-4207.98','37.0851','5.34763','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+31, @npc_H_Tau,'1','1637','5171','1','3969','0','0','1939.1','-4219.48','36.9885','0.861432','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+32, @npc_H_Tau,'1','1638','5345','1','1','0','0','-1270.76','110.538','128.895','0.174981','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+33, @npc_H_Tau,'1','1638','5345','1','1','0','0','-1261.98','110.92','127.997','3.12651','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+34, @npc_H_Tro,'1','1637','1637','1','3969','0','0','1740.07','-4309.11','102.093','5.86442','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+35, @npc_H_Tro,'1','1637','1637','1','3969','0','0','1744.02','-4316.47','102.095','1.25806','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+36, @npc_H_Tro,'1','1637','1637','1','3969','0','0','1755.92','-4310.26','101.451','2.91525','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+37, @npc_H_Tro,'1','1637','1637','1','3969','0','0','1749.08','-4301.23','101.829','4.39494','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+38, @npc_H_Tro,'1','1637','5169','1','3969','0','0','1620.59','-4140.3','48.9571','5.45209','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+39, @npc_H_Tro,'1','1637','5169','1','3969','0','0','1627.92','-4150.47','49.1577','2.10943','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+40, @npc_H_UnD,'0','1497','1497','1','1','0','0','1584.74','244.709','-62.0788','4.47852','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+41, @npc_H_UnD,'0','1497','1497','1','1','0','0','1583.81','237.94','-62.0788','1.63537','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+42, @npc_H_UnD,'0','1497','1497','1','1','0','0','1578.67','242.236','-62.0785','6.08701','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+43, @npc_H_UnD,'0','1497','1497','1','1','0','0','1602.15','251.651','-62.09','2.83939','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+44, @npc_H_UnD,'0','1497','1497','1','1','0','0','1591.49','252.135','-62.0922','6.27551','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+45, @npc_H_UnD,'0','1497','1497','1','1','0','0','1607.22','235.572','-62.0784','1.45316','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+46, @npc_H_UnD,'0','1497','1497','1','1','0','0','1607.16','244.185','-62.0784','4.78875','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+47, @npc_AH_Gob,'0','5287','35','1','1','0','0','-14300.9','537.138','8.68499','4.52819','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+48, @npc_AH_Gob,'0','5287','35','1','1','0','0','-14304','529.611','8.66972','1.17926','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+49, @npc_AH_Gob,'0','5287','35','1','1','0','0','-14290.2','535.399','8.93004','3.15532','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+50, @npc_AH_Gob,'0','5287','35','1','1','0','0','-14290.7','529.19','8.93706','2.66131','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+51, @npc_AH_Gob,'1','618','2255','1','1','0','0','6719.88','-4636.51','721.363','5.06151','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+52, @npc_AH_Gob,'1','618','2255','1','1','0','0','6731.59','-4642.31','722.104','3.4593','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+53, @npc_AH_Gob,'1','618','2255','1','1','0','0','6724.75','-4647.43','721.057','1.39842','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+54, @npc_AH_Gob,'1','440','976','1','1','0','0','-7179.97','-3827.39','9.10284','5.78978','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+55, @npc_AH_Gob,'1','440','976','1','1','0','0','-7171.46','-3829.66','8.44251','2.91601','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+56, @npc_AH_Gob,'1','440','976','1','1','0','0','-7173.33','-3822.25','8.97892','4.05091','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+57, @npc_AH_Gob,'1','17','392','1','1','0','0','-1015.98','-3672.86','22.0287','2.6914','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+58, @npc_AH_Gob,'1','17','392','1','1','0','0','-1026.25','-3670.85','22.9129','6.03798','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+59, @npc_AH_Gob,'1','17','392','1','1','0','0','-1022.43','-3679.85','22.9784','1.39314','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+60, @npc_AH_Gob,'530','3523','3712','1','1','0','0','3045.83','3680.12','143.13','1.33535','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+61, @npc_AH_Gob,'530','3523','3712','1','1','0','0','3039.91','3690.49','143.224','5.28198','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+62, @npc_AH_Gob,'530','3523','3712','1','1','0','0','3049.52','3690.4','142.672','4.10702','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+63, @npc_AH_Gob,'530','3703','3703','1','1','0','0','-1909.52','5452.03','-12.4277','4.18141','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+64, @npc_AH_Gob,'530','3703','3703','1','1','0','0','-1914.44','5440.19','-12.4277','1.12857','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+65, @npc_AH_Gob,'571','67','4418','1','1','0','0','6137.6','-1071.42','402.642','2.99807','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+66, @npc_AH_Gob,'571','67','4418','1','1','0','0','6130.72','-1070.79','402.789','6.17422','300','0','0','42','0','0','0','0','0','0','0');




-- MANAGEMENT RELATIVE TO EVENTS

-- Deletion of all quests started from the commoners. (to let each particular event to add them properly below with the different setups)
DELETE FROM creature_questrelation WHERE ( id IN ( @npc_A_Hum, @npc_A_Nain, @npc_A_Dra, @npc_A_Gno, @npc_A_NElf, @npc_H_BElf, @npc_H_Orc, @npc_H_Tau, @npc_H_Tro, @npc_H_UnD, @npc_AH_Gob ));
DELETE FROM game_event_creature_quest WHERE ( id IN ( @npc_A_Hum, @npc_A_Nain, @npc_A_Dra, @npc_A_Gno, @npc_A_NElf, @npc_H_BElf, @npc_H_Orc, @npc_H_Tau, @npc_H_Tro, @npc_H_UnD, @npc_AH_Gob ));

-- Preparation of the event table to let the properly insert of our communers team with correct events.
DELETE FROM game_event_creature WHERE game_event_creature.guid IN (
SELECT creature.guid
FROM creature WHERE ( id IN ( @npc_A_Hum, @npc_A_Nain, @npc_A_Dra, @npc_A_Gno, @npc_A_NElf, @npc_H_BElf, @npc_H_Orc, @npc_H_Tau, @npc_H_Tro, @npc_H_UnD, @npc_AH_Gob )));



-- SETUP FOR MIDSUMMER

SET @event_id = 1; SET @questA = 11970; SET @questH = 11971; 

INSERT INTO game_event_creature_quest (eventEntry, id, quest) VALUES 
(@event_id, @npc_A_Hum, @questA),
(@event_id, @npc_A_Nain, @questA),
(@event_id, @npc_A_Dra , @questA),
(@event_id, @npc_A_Gno , @questA),
(@event_id, @npc_A_NElf , @questA),
(@event_id, @npc_AH_Gob , @questA),
(@event_id, @npc_AH_Gob , @questH),
(@event_id, @npc_H_BElf , @questH),
(@event_id, @npc_H_Orc , @questH),
(@event_id, @npc_H_Tau , @questH),
(@event_id, @npc_H_Tro , @questH),
(@event_id, @npc_H_UnD , @questH);


INSERT INTO `game_event_creature` (eventEntry, guid)
SELECT @event_id , creature.guid
FROM creature WHERE ( id IN ( @npc_A_Hum, @npc_A_Nain, @npc_A_Dra, @npc_A_Gno, @npc_A_NElf, @npc_H_BElf, @npc_H_Orc, @npc_H_Tau, @npc_H_Tro, @npc_H_UnD, @npc_AH_Gob ));




-- SETUP FOR HALLOWEEN

SET @event_id = 12; SET @questA = 29074; SET @questH = 29400; 

INSERT INTO game_event_creature_quest (eventEntry, id, quest) VALUES 
(@event_id, @npc_A_Hum, @questA),
(@event_id, @npc_A_Nain, @questA),
(@event_id, @npc_A_Dra , @questA),
(@event_id, @npc_A_Gno , @questA),
(@event_id, @npc_A_NElf , @questA),
(@event_id, @npc_AH_Gob , @questA),
(@event_id, @npc_AH_Gob , @questH),
(@event_id, @npc_H_BElf , @questH),
(@event_id, @npc_H_Orc , @questH),
(@event_id, @npc_H_Tau , @questH),
(@event_id, @npc_H_Tro , @questH),
(@event_id, @npc_H_UnD , @questH);


INSERT INTO `game_event_creature` (eventEntry, guid)
SELECT @event_id , creature.guid
FROM creature WHERE ( id IN ( @npc_A_Hum, @npc_A_Nain, @npc_A_Dra, @npc_A_Gno, @npc_A_NElf, @npc_H_BElf, @npc_H_Orc, @npc_H_Tau, @npc_H_Tro, @npc_H_UnD, @npc_AH_Gob ));




-- SETUP FOR BREWFEST

SET @event_id = 24; SET @questA = 11441; SET @questH = 11446; 

INSERT INTO game_event_creature_quest (eventEntry, id, quest) VALUES 
(@event_id, @npc_A_Hum, @questA),
(@event_id, @npc_A_Nain, @questA),
(@event_id, @npc_A_Dra , @questA),
(@event_id, @npc_A_Gno , @questA),
(@event_id, @npc_A_NElf , @questA),
(@event_id, @npc_AH_Gob , @questA),
(@event_id, @npc_AH_Gob , @questH),
(@event_id, @npc_H_BElf , @questH),
(@event_id, @npc_H_Orc , @questH),
(@event_id, @npc_H_Tau , @questH),
(@event_id, @npc_H_Tro , @questH),
(@event_id, @npc_H_UnD , @questH);


INSERT INTO `game_event_creature` (eventEntry, guid)
SELECT @event_id , creature.guid
FROM creature WHERE ( id IN ( @npc_A_Hum, @npc_A_Nain, @npc_A_Dra, @npc_A_Gno, @npc_A_NElf, @npc_H_BElf, @npc_H_Orc, @npc_H_Tau, @npc_H_Tro, @npc_H_UnD, @npc_AH_Gob ));




-- SETUP FOR NOBLEGARDEN

SET @event_id = 9; SET @questA = 13484; SET @questH = 13483;

INSERT INTO game_event_creature_quest (eventEntry, id, quest) VALUES 
(@event_id, @npc_A_Hum, @questA),
(@event_id, @npc_A_Nain, @questA),
(@event_id, @npc_A_Dra , @questA),
(@event_id, @npc_A_Gno , @questA),
(@event_id, @npc_A_NElf , @questA),
(@event_id, @npc_AH_Gob , @questA),
(@event_id, @npc_AH_Gob , @questH),
(@event_id, @npc_H_BElf , @questH),
(@event_id, @npc_H_Orc , @questH),
(@event_id, @npc_H_Tau , @questH),
(@event_id, @npc_H_Tro , @questH),
(@event_id, @npc_H_UnD , @questH);


INSERT INTO `game_event_creature` (eventEntry, guid)
SELECT @event_id , creature.guid
FROM creature WHERE ( id IN ( @npc_A_Hum, @npc_A_Nain, @npc_A_Dra, @npc_A_Gno, @npc_A_NElf, @npc_H_BElf, @npc_H_Orc, @npc_H_Tau, @npc_H_Tro, @npc_H_UnD, @npc_AH_Gob ));
 

ExO

Administrator
Staff Member
Admin
Mythical User
Joined
Mar 29, 2014
Messages
4,707
Reaction score
518
Executed to the DB.

Thanks for your contribution!
 

joca

Registered User
Registered User
Member
Joined
Jul 5, 2020
Messages
29
Reaction score
1
Location
brasil
Gender
Male
Here the code :)

Code:
-- Last Revision 2019.02.24 by Titesusy
-- Tested with v10.1 Cataclysm Emucaoch
-- Modifiable STARTING HERE

SET @my_guid = 675000; -- my_guid => my_guid+100 must be free


-- Non modifiable STARTING HERE

SET @npc_A_Hum = 18927;
SET @npc_A_Nain = 19148;
SET @npc_A_Dra = 19171;
SET @npc_A_Gno = 19172;
SET @npc_A_NElf = 19173;
SET @npc_H_BElf = 19169;
SET @npc_H_Orc = 19175;
SET @npc_H_Tau = 19176;
SET @npc_H_Tro = 19177;
SET @npc_H_UnD = 19178;
SET @npc_AH_Gob = 20102; -- mixte


DELETE FROM creature WHERE ( id IN (@npc_A_Hum, @npc_A_Nain, @npc_A_Dra, @npc_A_Gno, @npc_A_NElf, @npc_H_BElf, @npc_H_Orc, @npc_H_Tau, @npc_H_Tro, @npc_H_UnD, @npc_AH_Gob ));

INSERT INTO creature
(guid, id, map, zone, area, spawnMask, phaseMask, modelid, equipment_id, position_x, position_y, position_z, orientation, spawntimesecs, spawndist, currentwaypoint, curhealth, curmana, MovementType, npcflag, unit_flags, dynamicflags, walkmode, saiscriptflag) VALUES
(@my_guid, @npc_A_Hum,'0','1519','5148','1','3969','0','0','-8855.39','639.83','96.5045','1.87903','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+1, @npc_A_Hum,'0','1519','5148','1','3969','0','0','-8864.83','655.75','96.3786','4.92088','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+2, @npc_A_Nain,'0','1537','5719','1','1','0','0','-4908.06','-958.842','501.477','5.12816','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+3, @npc_A_Nain,'0','1537','5719','1','1','0','0','-4898.47','-964.18','501.448','2.86857','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+4, @npc_A_Nain,'0','1537','5719','1','1','0','0','-4928.81','-971.971','501.493','5.35985','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+5, @npc_A_Nain,'0','1537','5719','1','1','0','0','-4897.04','-955.052','501.457','3.89587','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+6, @npc_A_Nain,'0','1537','5719','1','1','0','0','-4915.92','-976.909','501.454','2.99187','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+7, @npc_A_Nain,'0','1537','5719','1','1','0','0','-4926.18','-985.016','501.458','1.71324','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+8, @npc_H_BElf,'571','4395','4395','1','1','0','0','5881.69','483.712','641.543','1.71305','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+9, @npc_H_BElf,'571','4395','4395','1','1','0','0','5880.75','489.656','641.553','4.92611','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+10, @npc_H_BElf,'530','3430','3430','1','1','0','0','9345.24','-7268.94','14.6764','4.42623','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+11, @npc_H_BElf,'530','3430','3430','1','1','0','0','9344.68','-7284.32','14.7731','1.59409','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+12, @npc_H_BElf,'530','3430','3430','1','1','0','0','9337.21','-7283.95','13.8398','0.563647','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+13, @npc_A_Dra,'530','3557','3557','1','1','0','0','-3907.12','-11606.5','-138.137','4.22701','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+14, @npc_A_Dra,'530','3557','3557','1','1','0','0','-3908.48','-11615.8','-138.16','1.47104','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+15, @npc_A_Dra,'530','3557','3557','1','1','0','0','-3914.06','-11611.3','-138.31','0.168853','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+16, @npc_A_Gno,'0','1537','5342','1','1','0','0','-4839.18','-1169.76','502.195','0.514736','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+17, @npc_A_Gno,'0','1537','5342','1','1','0','0','-4828.8','-1174.71','502.193','1.0221','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+18, @npc_A_Gno,'0','1537','5342','1','1','0','0','-4814.15','-1176.44','502.198','2.18371','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+19, @npc_A_Gno,'0','1537','5342','1','1','0','0','-4833.28','-1166.59','502.2','4.51555','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+20, @npc_A_Gno,'0','1537','5342','1','1','0','0','-4816.84','-1173.57','502.199','5.42426','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+21, @npc_A_NElf,'1','1657','1657','1','1','0','0','9960.9','2483.49','1315.6','1.14819','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+22, @npc_A_NElf,'1','1657','1657','1','1','0','0','9964.69','2489.25','1315.88','3.98662','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+23, @npc_A_NElf,'1','1657','1657','1','1','0','0','9957.29','2487.96','1316.27','5.94855','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+24, @npc_H_Orc,'1','1637','5170','1','3969','0','0','1632.78','-4406.24','15.5852','6.19506','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+25, @npc_H_Orc,'1','1637','5170','1','3969','0','0','1641.57','-4406.42','16.2384','3.26553','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+26, @npc_H_Orc,'1','1637','5170','1','3969','0','0','1633.94','-4418.09','15.6765','1.27297','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+27, @npc_H_Orc,'1','1637','5168','1','3969','0','0','1906.1','-4664.33','34.7913','5.02484','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+28, @npc_H_Orc,'1','1637','5168','1','3969','0','0','1909.88','-4671.38','35.1088','2.10473','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+29, @npc_H_Tau,'1','1637','5171','1','3969','0','0','1948.51','-4218.07','37.0406','2.18011','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+30, @npc_H_Tau,'1','1637','5171','1','3969','0','0','1941.39','-4207.98','37.0851','5.34763','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+31, @npc_H_Tau,'1','1637','5171','1','3969','0','0','1939.1','-4219.48','36.9885','0.861432','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+32, @npc_H_Tau,'1','1638','5345','1','1','0','0','-1270.76','110.538','128.895','0.174981','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+33, @npc_H_Tau,'1','1638','5345','1','1','0','0','-1261.98','110.92','127.997','3.12651','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+34, @npc_H_Tro,'1','1637','1637','1','3969','0','0','1740.07','-4309.11','102.093','5.86442','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+35, @npc_H_Tro,'1','1637','1637','1','3969','0','0','1744.02','-4316.47','102.095','1.25806','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+36, @npc_H_Tro,'1','1637','1637','1','3969','0','0','1755.92','-4310.26','101.451','2.91525','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+37, @npc_H_Tro,'1','1637','1637','1','3969','0','0','1749.08','-4301.23','101.829','4.39494','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+38, @npc_H_Tro,'1','1637','5169','1','3969','0','0','1620.59','-4140.3','48.9571','5.45209','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+39, @npc_H_Tro,'1','1637','5169','1','3969','0','0','1627.92','-4150.47','49.1577','2.10943','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+40, @npc_H_UnD,'0','1497','1497','1','1','0','0','1584.74','244.709','-62.0788','4.47852','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+41, @npc_H_UnD,'0','1497','1497','1','1','0','0','1583.81','237.94','-62.0788','1.63537','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+42, @npc_H_UnD,'0','1497','1497','1','1','0','0','1578.67','242.236','-62.0785','6.08701','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+43, @npc_H_UnD,'0','1497','1497','1','1','0','0','1602.15','251.651','-62.09','2.83939','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+44, @npc_H_UnD,'0','1497','1497','1','1','0','0','1591.49','252.135','-62.0922','6.27551','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+45, @npc_H_UnD,'0','1497','1497','1','1','0','0','1607.22','235.572','-62.0784','1.45316','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+46, @npc_H_UnD,'0','1497','1497','1','1','0','0','1607.16','244.185','-62.0784','4.78875','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+47, @npc_AH_Gob,'0','5287','35','1','1','0','0','-14300.9','537.138','8.68499','4.52819','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+48, @npc_AH_Gob,'0','5287','35','1','1','0','0','-14304','529.611','8.66972','1.17926','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+49, @npc_AH_Gob,'0','5287','35','1','1','0','0','-14290.2','535.399','8.93004','3.15532','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+50, @npc_AH_Gob,'0','5287','35','1','1','0','0','-14290.7','529.19','8.93706','2.66131','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+51, @npc_AH_Gob,'1','618','2255','1','1','0','0','6719.88','-4636.51','721.363','5.06151','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+52, @npc_AH_Gob,'1','618','2255','1','1','0','0','6731.59','-4642.31','722.104','3.4593','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+53, @npc_AH_Gob,'1','618','2255','1','1','0','0','6724.75','-4647.43','721.057','1.39842','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+54, @npc_AH_Gob,'1','440','976','1','1','0','0','-7179.97','-3827.39','9.10284','5.78978','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+55, @npc_AH_Gob,'1','440','976','1','1','0','0','-7171.46','-3829.66','8.44251','2.91601','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+56, @npc_AH_Gob,'1','440','976','1','1','0','0','-7173.33','-3822.25','8.97892','4.05091','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+57, @npc_AH_Gob,'1','17','392','1','1','0','0','-1015.98','-3672.86','22.0287','2.6914','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+58, @npc_AH_Gob,'1','17','392','1','1','0','0','-1026.25','-3670.85','22.9129','6.03798','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+59, @npc_AH_Gob,'1','17','392','1','1','0','0','-1022.43','-3679.85','22.9784','1.39314','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+60, @npc_AH_Gob,'530','3523','3712','1','1','0','0','3045.83','3680.12','143.13','1.33535','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+61, @npc_AH_Gob,'530','3523','3712','1','1','0','0','3039.91','3690.49','143.224','5.28198','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+62, @npc_AH_Gob,'530','3523','3712','1','1','0','0','3049.52','3690.4','142.672','4.10702','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+63, @npc_AH_Gob,'530','3703','3703','1','1','0','0','-1909.52','5452.03','-12.4277','4.18141','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+64, @npc_AH_Gob,'530','3703','3703','1','1','0','0','-1914.44','5440.19','-12.4277','1.12857','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+65, @npc_AH_Gob,'571','67','4418','1','1','0','0','6137.6','-1071.42','402.642','2.99807','300','0','0','42','0','0','0','0','0','0','0'),
(@my_guid+66, @npc_AH_Gob,'571','67','4418','1','1','0','0','6130.72','-1070.79','402.789','6.17422','300','0','0','42','0','0','0','0','0','0','0');




-- MANAGEMENT RELATIVE TO EVENTS

-- Deletion of all quests started from the commoners. (to let each particular event to add them properly below with the different setups)
DELETE FROM creature_questrelation WHERE ( id IN ( @npc_A_Hum, @npc_A_Nain, @npc_A_Dra, @npc_A_Gno, @npc_A_NElf, @npc_H_BElf, @npc_H_Orc, @npc_H_Tau, @npc_H_Tro, @npc_H_UnD, @npc_AH_Gob ));
DELETE FROM game_event_creature_quest WHERE ( id IN ( @npc_A_Hum, @npc_A_Nain, @npc_A_Dra, @npc_A_Gno, @npc_A_NElf, @npc_H_BElf, @npc_H_Orc, @npc_H_Tau, @npc_H_Tro, @npc_H_UnD, @npc_AH_Gob ));

-- Preparation of the event table to let the properly insert of our communers team with correct events.
DELETE FROM game_event_creature WHERE game_event_creature.guid IN (
SELECT creature.guid
FROM creature WHERE ( id IN ( @npc_A_Hum, @npc_A_Nain, @npc_A_Dra, @npc_A_Gno, @npc_A_NElf, @npc_H_BElf, @npc_H_Orc, @npc_H_Tau, @npc_H_Tro, @npc_H_UnD, @npc_AH_Gob )));



-- SETUP FOR MIDSUMMER

SET @event_id = 1; SET @questA = 11970; SET @questH = 11971;

INSERT INTO game_event_creature_quest (eventEntry, id, quest) VALUES
(@event_id, @npc_A_Hum, @questA),
(@event_id, @npc_A_Nain, @questA),
(@event_id, @npc_A_Dra , @questA),
(@event_id, @npc_A_Gno , @questA),
(@event_id, @npc_A_NElf , @questA),
(@event_id, @npc_AH_Gob , @questA),
(@event_id, @npc_AH_Gob , @questH),
(@event_id, @npc_H_BElf , @questH),
(@event_id, @npc_H_Orc , @questH),
(@event_id, @npc_H_Tau , @questH),
(@event_id, @npc_H_Tro , @questH),
(@event_id, @npc_H_UnD , @questH);


INSERT INTO `game_event_creature` (eventEntry, guid)
SELECT @event_id , creature.guid
FROM creature WHERE ( id IN ( @npc_A_Hum, @npc_A_Nain, @npc_A_Dra, @npc_A_Gno, @npc_A_NElf, @npc_H_BElf, @npc_H_Orc, @npc_H_Tau, @npc_H_Tro, @npc_H_UnD, @npc_AH_Gob ));




-- SETUP FOR HALLOWEEN

SET @event_id = 12; SET @questA = 29074; SET @questH = 29400;

INSERT INTO game_event_creature_quest (eventEntry, id, quest) VALUES
(@event_id, @npc_A_Hum, @questA),
(@event_id, @npc_A_Nain, @questA),
(@event_id, @npc_A_Dra , @questA),
(@event_id, @npc_A_Gno , @questA),
(@event_id, @npc_A_NElf , @questA),
(@event_id, @npc_AH_Gob , @questA),
(@event_id, @npc_AH_Gob , @questH),
(@event_id, @npc_H_BElf , @questH),
(@event_id, @npc_H_Orc , @questH),
(@event_id, @npc_H_Tau , @questH),
(@event_id, @npc_H_Tro , @questH),
(@event_id, @npc_H_UnD , @questH);


INSERT INTO `game_event_creature` (eventEntry, guid)
SELECT @event_id , creature.guid
FROM creature WHERE ( id IN ( @npc_A_Hum, @npc_A_Nain, @npc_A_Dra, @npc_A_Gno, @npc_A_NElf, @npc_H_BElf, @npc_H_Orc, @npc_H_Tau, @npc_H_Tro, @npc_H_UnD, @npc_AH_Gob ));




-- SETUP FOR BREWFEST

SET @event_id = 24; SET @questA = 11441; SET @questH = 11446;

INSERT INTO game_event_creature_quest (eventEntry, id, quest) VALUES
(@event_id, @npc_A_Hum, @questA),
(@event_id, @npc_A_Nain, @questA),
(@event_id, @npc_A_Dra, @questA),
(@event_id, @npc_A_Gno, @questA),
(@event_id, @npc_A_NElf, @questA),
(@event_id, @npc_AH_Gob, @questA),
(@event_id, @npc_AH_Gob, @questH),
(@event_id, @npc_H_BElf, @questH),
(@event_id, @npc_H_Orc, @questH),
(@event_id, @npc_H_Tau, @questH),
(@event_id, @npc_H_Tro, @questH),
(@event_id, @npc_H_UnD, @questH);


INSERT INTO `game_event_creature` (eventEntry, guid)
SELECIONE @event_id, criatura.guid
DA criatura WHERE (id IN (@npc_A_Hum, @npc_A_Nain, @npc_A_Dra, @npc_A_Gno, @npc_A_NElf, @npc_H_BElf, @npc_H_Orc, @npc_H_TauT, @npc_TauT, @npc_np_);




- CONFIGURAÇÃO PARA NOBLEGARDEN

SET @event_id = 9; SET @questA = 13484; SET @questH = 13483;

INSERT INTO game_event_creature_quest (eventEntry, id, quest) VALUES
(@event_id, @npc_A_Hum, @questA),
(@event_id, @npc_A_Nain, @questA),
(@event_id, @npc_A_Dra, @questA),
(@event_id, @npc_A_Gno, @questA),
(@event_id, @npc_A_NElf, @questA),
(@event_id, @npc_AH_Gob, @questA),
(@event_id, @npc_AH_Gob, @questH),
(@event_id, @npc_H_BElf, @questH),
(@event_id, @npc_H_Orc, @questH),
(@event_id, @npc_H_Tau, @questH),
(@event_id, @npc_H_Tro, @questH),
(@event_id, @npc_H_UnD, @questH);


INSERT INTO `game_event_creature` (eventEntry, guid)
SELECIONE @event_id, criatura.guid
DA criatura WHERE (id IN (@npc_A_Hum, @npc_A_Nain, @npc_A_Dra, @npc_A_Gno, @npc_A_NElf, @npc_H_BElf, @npc_H_Orc, @npc_H_TauD, @npc_Tau, @npc_np_, @_GUc_TauT, @np_A_NElf);
[/QUOTE]
Obrigado pela sua contribuição.
 
Top