[WIP] Ursoc, the Bear God

I have tried to fix the Quest “Ursoc, the Bear God”, but i have problems with reseting after wp end.

The tree doesnt heal you when the fight begin and the event stop after the last waypoint.

– Add gossip to creature
UPDATE creature_template SET gossip_menu_id=9496,faction_A=35,faction_H=35,unit_flags=524288, AIName=‘SmartAI’, speed_run=‘1’ WHERE entry=27328;
UPDATE creature_template SET faction_A=2068,faction_H=2068 WHERE entry=26633;
– Gossip insert
DELETE FROM gossip_menu WHERE entry IN (9496,9497);
INSERT INTO gossip_menu (entry,text_id) VALUES
(9496,12785),
(9497,12787);
– Gossip option
DELETE FROM gossip_menu_option WHERE menu_id IN (9496,9497);
INSERT INTO gossip_menu_option (menu_id,id,option_icon,option_text,option_id,npc_option_npcflag,action_menu_id,action_poi_id,box_coded,box_money,box_text) VALUES
(9496,0,0,“We have the purified ashes of Vordrassil’s sapling. If we can subdue Ursoc, we might be able to heal his soul.”,1,1,9497,0,0,0,‘’),
(9497,0,0,“Assume your druidic bear form, Tur.”,1,1,1,0,0,0,‘’),
(9497,1,0,“Help us subdue him.”,1,1,0,0,0,0,‘’),
(9497,2,0,“We could use a healer.”,1,1,0,0,0,0,‘’);
– Smartai
DELETE FROM smart_scripts WHERE entryorguid IN (27328,27328100,27328200,27328300,27328100+1,27328200+1,27328300+1);
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
– Script 00 - On gossip select start Tree form script
(27328,0,0,1,62,0,100,0,9497,2,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tur - On Gossip Select - Set phase 1’),
(27328,0,1,0,61,1,100,0,0,0,0,0,80,27328100,0,0,0,0,0,1,0,0,0,0,0,0,0,“Tur - Linked with event 0 - Run Script”),
(27328
100,9,0,0,0,1,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,“Tur - On Script - Close Gossip”),
(27328100,9,1,0,0,1,100,0,0,0,0,0,83,1,0,0,0,0,0,1,0,0,0,0,0,0,0,“Tur - On Script - Remove npc flag for gossip”),
(27328
100,9,2,0,0,1,100,0,0,0,0,0,11,48371,0,0,0,0,0,1,0,0,0,0,0,0,0,“Tur - On Script - Cast Tree of Life”),
(27328100,9,3,0,0,1,100,0,0,0,0,0,28,34123,0,0,0,0,0,1,0,0,0,0,0,0,0,“Tur - Remove Aura Tree of Life”),
(27328
100,9,4,0,0,1,100,0,0,0,0,0,11,52553,0,0,0,0,0,1,0,0,0,0,0,0,0,“Tur - On Script - Cast Empowered Tree of Life”),
(27328100,9,5,0,0,1,100,0,2000,2000,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,“Tur - On Script - Say text 0”),
(27328
100,9,6,0,0,1,100,0,5000,5000,0,0,53,1,27328,0,0,0,1,1,0,0,0,0,0,0,0,“Tur - On script - Start wp”),
(27328,0,2,0,40,1,100,0,6,27328,0,0,80,27328100+1,0,2,0,0,0,1,0,0,0,0,0,0,0,“Tur - On WP 6 - Run Script”),
(27328
100+1,9,0,0,0,1,100,0,7000,7000,0,0,1,2,0,0,0,0,0,7,0,0,0,0,0,0,0,“Tur - On Script - Say Line 2”),
(27328100+1,9,1,0,0,1,100,0,0,0,0,0,12,26633,1,30000,0,0,0,8,0,0,0,4884.076660,-3842.716553,337.564728,3.162748,“Tur - on script - Summon Ursoc”),
(27328
100+1,9,2,0,0,1,100,0,0,0,0,0,2,290,0,0,0,0,0,1,0,0,0,0,0,0,0,“Tur - on script - Set faction to 290”),
– Script 01 - On gossip select start Moonkin form script
(27328,0,3,4,62,0,100,0,9497,1,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tur - On Gossip Select - Set phase 2’),
(27328,0,4,0,61,2,100,0,0,0,0,0,80,27328200,0,0,0,0,0,1,0,0,0,0,0,0,0,“Tur - Linked with event 3 - Run Script”),
(27328
200,9,1,0,0,2,100,0,0,0,0,0,83,1,0,0,0,0,0,1,0,0,0,0,0,0,0,“Tur - On Script - Remove npc flag for gossip”),
(27328200,9,2,0,0,2,100,0,0,0,0,0,11,48369,0,0,0,0,0,1,0,0,0,0,0,0,0,“Tur - On Script - Cast mondkin”),
(27328
200,9,3,0,0,2,100,0,0,0,0,0,11,52503,0,0,0,0,0,1,0,0,0,0,0,0,0,“Tur - On Script - Cast Empowered Moonkin Aura”),
(27328200,9,4,0,0,2,100,0,2000,2000,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,“Tur - On Script - Say text 0”),
(27328
200,9,5,0,0,2,100,0,5000,5000,0,0,53,1,27328,0,0,0,1,1,0,0,0,0,0,0,0,‘Tur - On script - Start wp’),
(27328,0,5,0,40,2,100,0,6,27328,0,0,80,27328200+1,0,2,0,0,0,1,0,0,0,0,0,0,0,“Kur- On WP 6 - Run Script”),
(27328
200+1,9,0,0,0,2,100,0,7000,7000,0,0,1,2,0,0,0,0,0,7,0,0,0,0,0,0,0,“Tur - On Script - Say Line 2”),
(27328200+1,9,1,0,0,2,100,0,0,0,0,0,12,26633,1,30000,0,0,0,8,0,0,0,4884.076660,-3842.716553,337.564728,3.162748,“Tur - on script - Summon Ursoc”),
(27328
200+1,9,2,0,0,2,100,0,0,0,0,0,2,290,0,0,0,0,0,1,0,0,0,0,0,0,0,“Tur - on script - Set faction to 290”),
– Script 02 - On gossip select start Bear form script
(27328,0,6,7,62,0,100,0,9497,0,0,0,22,3,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Tur - On Gossip Select - Set phase 3’),
(27328,0,7,0,61,4,100,0,0,0,0,0,80,27328300,0,0,0,0,0,1,0,0,0,0,0,0,0,“Tur - Linked with event 6 - Run Script”),
(27328
300,9,0,0,0,4,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,“Tur - On Script - Close Gossip”),
(27328300,9,1,0,0,4,100,0,0,0,0,0,83,1,0,0,0,0,0,1,0,0,0,0,0,0,0,“Tur - On Script - Remove npc flag for gossip”),
(27328
300,9,2,0,0,4,100,0,0,0,0,0,11,48368,0,0,0,0,0,1,0,0,0,0,0,0,0,“Tur - On Script - Cast Bear Form”),
(27328300,9,3,0,0,4,100,0,0,0,0,0,11,52507,0,0,0,0,0,1,0,0,0,0,0,0,0,“Tur - On Script - Cast Ragepaw’s Presence”),
(27328
300,9,4,0,0,4,100,0,2000,2000,0,0,1,1,0,0,0,0,0,7,0,0,0,0,0,0,0,“Tur - On Script - Say text 1”),
(27328300,9,5,0,0,4,100,0,5000,5000,0,0,53,1,27328,0,0,0,1,1,0,0,0,0,0,0,0,‘Tur - On script - Start wp’),
(27328,0,8,0,40,4,100,0,6,27328,0,0,80,27328
300+1,0,2,0,0,0,1,0,0,0,0,0,0,0,“Tur- On WP 6 - Run Script”),
(27328300+1,9,1,0,0,4,100,0,0,0,0,0,8,2,0,0,0,0,0,1,0,0,0,0,0,0,0,“Tur - On Script - Change react state”),
(27328
300+1,9,2,0,0,4,100,0,0,0,0,0,38,0,0,0,0,0,0,1,0,0,0,0,0,0,0,“Tur - On Script - Set in combat with zone”),
(27328300+1,9,3,0,0,4,100,0,7000,7000,0,0,1,2,0,0,0,0,0,7,0,0,0,0,0,0,0,“Tur - On Script - Say Line 2”),
(27328
300+1,9,4,0,0,4,100,0,0,0,0,0,12,26633,1,30000,0,0,0,8,0,0,0,4884.076660,-3842.716553,337.564728,3.162748,“Tur - on script - Summon Ursoc”),
(27328*300+1,9,5,0,0,4,100,0,0,0,0,0,2,290,0,0,0,0,0,1,0,0,0,0,0,0,0,“Tur - on script - Set faction to 290”),
– Continue normal events
(27328,0,9,0,14,1,100,0,1000,20,8000,18000,11,52553,2,0,0,0,0,7,0,0,0,0,0,0,0, ‘Tur - On friednly HP deficit - Cast Nourish on ally’),
(27328,0,10,0,14,1,100,0,1000,20,8000,18000,11,52551,2,0,0,0,0,7,0,0,0,0,0,0,0, ‘Tur - On friednly HP deficit - Cast spell Lifebloom on ally’),
(27328,0,11,0,0,2,100,0,1000,3000,8000,12000,11,52502,2,0,0,0,0,2,0,0,0,0,0,0,0, ‘Tur - IC - Cast Moonfire on victim’),
(27328,0,12,0,0,2,100,0,1000,3000,0,8000,11,52501,2,0,0,0,0,2,0,0,0,0,0,0,0, ‘Tur - IC - Cast spell Wrath on victim’),
(27328,0,13,0,0,4,100,0,1000,2500,13000,15000,11,52504,2,0,0,0,0,2,0,0,0,0,0,0,0, ‘Tur - IC - Cast Lacerate on victim’),
(27328,0,14,0,0,4,100,0,1000,3000,0,8000,11,52506,2,0,0,0,0,2,0,0,0,0,0,0,0, ‘Tur - IC - Cast spell Maul on viction’);
– NPC talk text insert
DELETE FROM creature_text WHERE entry=27328;
INSERT INTO creature_text (entry,groupid,id,text,type,language,probability,emote,duration,sound,comment) VALUES
(27328,0,0,“I will watch over you and your allies, $N.”,12,0,100,0,0,0,“Tur”),
(27328,1,0,“Stay behind me, $N. I will do my best to protect you.”,12,0,100,0,0,0,“Tur”),
(27328,2,0,“Ursoc, brother of Ursol and guardian to the furbolg tribes! Show yourself!”,12,0,100,0,0,0,“Tur”);
– Waypoints
DELETE FROM waypoints WHERE entry=27328;
INSERT INTO waypoints (entry, pointid, position_x, position_y, position_z, point_comment)
VALUES
(27328, 1, 4674.43359, -3865.873535, 329.421, ‘Waypoint1 - Tur’),
(27328, 2, 4682.427734, -3853.283203, 327.037476, ‘Waypoint2 - Tur’),
(27328, 3, 4728.733887, -3846.922607, 330.459930, ‘Waypoint3 - Tur’),
(27328, 4, 4784.553711, -3844.095459, 333.872284, ‘Waypoint4 - Tur’),
(27328, 5, 4832.252441, -3833.182129, 338.159302, ‘Waypoint5 - Tur’),
(27328, 6, 4859.328613, -3846.104004, 338.783295, ‘Waypoint6 - Tur’);
– Conditions for the gossip options
DELETE FROM conditions WHERE SourceTypeOrReferenceId IN (15) AND SourceGroup IN (9496);
INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ElseGroup,ConditionTypeOrReference,ConditionValue1) VALUES
(15,9496,0,0,9,12249), – Allianz
(15,9496,0,1,9,12236); – Horde

Hitox/Drabak

some time ago I made this custom patch for my event… you can use it’s SAI, it worked flawlessly :slight_smile:

-- Quest #28: Ursoc, medvedi buh
-- Variables
SET @NPC_URSOC_ORIG      := 26633;   -- Ursoc
SET @NPC_URSOC           := @CID+82; -- Ursoc
SET @NPC_TUR_ORIG        := 27328;   -- Tur Ragepaw
SET @NPC_TUR_RAGEPAW     := @CID+83; -- Tur Ragepaw
SET @NPC_URSOC_SPIRIT    := 27373;   -- Spirit of Ursoc
SET @NPC_BLOOD_OF_GOD    := 28854;   -- Blood of the Old God
SET @NPC_URSUS_MAULER    := 26644;   -- Ursus Mauler
SET @ITEM_PURIFIED_ASHES := 37307;   -- Purified Ashes of Vordrassil
SET @ITEM_LETTER         := 22972;   -- Letter for Rhonin -- needs adjustments
SET @ITEM_FLASK_SP       := 46376;   -- Flask of the Frost Wyrm
SET @ITEM_FLASK_AP       := 46377;   -- Flask of Endless Rage
SET @ITEM_FLASK_MP5      := 46378;   -- Flask of Pure Mojo
SET @ITEM_FLASK_HP       := 46379;   -- Flask of Stoneblood
SET @ITEM_FLASK_INT      := 13511;   -- Flask of Distilled Wisdom
SET @SPELL_ASHES         := 48549;   -- Ashes of Vordrassil
SET @SPELL_STARFIRE      := 67949;   -- Starfire
SET @GOSSSIP_TUR_RAGEPAW := 7082;
SET @EQUIP_TUR_RAGEPAW   := 7082;
SET @FACTION_FRIENDLY    := 1718;
SET @FACTION_FRI_ASSIST  := 250;
SET @FACTION_ENEMY       := 1720;
-- Templates
DELETE FROM `quest_template` WHERE `Id`=@Q28_URSOC;
INSERT INTO `quest_template` (`Id`, `Method`, `Level`, `RequiredSkillId`, `MinLevel`, `MaxLevel`, `ZoneOrSort`, `Type`, `SuggestedPlayers`, `LimitTime`, `RequiredClasses`, `RequiredRaces`, `RequiredSkillPoints`, `RequiredFactionId1`, `RequiredFactionId2`, `RequiredFactionValue1`, `RequiredFactionValue2`, `RequiredMinRepFaction`, `RequiredMaxRepFaction`, `RequiredMinRepValue`, `RequiredMaxRepValue`, `PrevQuestId`, `NextQuestId`, `ExclusiveGroup`, `NextQuestIdChain`, `RewardXPId`, `RewardOrRequiredMoney`, `RewardMoneyMaxLevel`, `RewardSpell`, `RewardSpellCast`, `RewardHonor`, `RewardHonorMultiplier`, `RewardMailTemplateId`, `RewardMailDelay`, `SourceItemId`, `SourceItemCount`, `SourceSpellId`, `Flags`, `SpecialFlags`, `RewardTitleId`, `RequiredPlayerKills`, `RewardTalents`, `RewardArenaPoints`, `RewardItemId1`, `RewardItemId2`, `RewardItemId3`, `RewardItemId4`, `RewardItemCount1`, `RewardItemCount2`, `RewardItemCount3`, `RewardItemCount4`, `RewardChoiceItemId1`, `RewardChoiceItemId2`, `RewardChoiceItemId3`, `RewardChoiceItemId4`, `RewardChoiceItemId5`, `RewardChoiceItemId6`, `RewardChoiceItemCount1`, `RewardChoiceItemCount2`, `RewardChoiceItemCount3`, `RewardChoiceItemCount4`, `RewardChoiceItemCount5`, `RewardChoiceItemCount6`, `RewardFactionId1`, `RewardFactionId2`, `RewardFactionId3`, `RewardFactionId4`, `RewardFactionId5`, `RewardFactionValueId1`, `RewardFactionValueId2`, `RewardFactionValueId3`, `RewardFactionValueId4`, `RewardFactionValueId5`, `RewardFactionValueIdOverride1`, `RewardFactionValueIdOverride2`, `RewardFactionValueIdOverride3`, `RewardFactionValueIdOverride4`, `RewardFactionValueIdOverride5`, `PointMapId`, `PointX`, `PointY`, `PointOption`, `Title`, `Objectives`, `Details`, `EndText`, `OfferRewardText`, `RequestItemsText`, `CompletedText`, `RequiredNpcOrGo1`, `RequiredNpcOrGo2`, `RequiredNpcOrGo3`, `RequiredNpcOrGo4`, `RequiredNpcOrGoCount1`, `RequiredNpcOrGoCount2`, `RequiredNpcOrGoCount3`, `RequiredNpcOrGoCount4`, `RequiredSourceItemId1`, `RequiredSourceItemId2`, `RequiredSourceItemId3`, `RequiredSourceItemId4`, `RequiredSourceItemCount1`, `RequiredSourceItemCount2`, `RequiredSourceItemCount3`, `RequiredSourceItemCount4`, `RequiredItemId1`, `RequiredItemId2`, `RequiredItemId3`, `RequiredItemId4`, `RequiredItemId5`, `RequiredItemId6`, `RequiredItemCount1`, `RequiredItemCount2`, `RequiredItemCount3`, `RequiredItemCount4`, `RequiredItemCount5`, `RequiredItemCount6`, `RequiredSpellCast1`, `RequiredSpellCast2`, `RequiredSpellCast3`, `RequiredSpellCast4`, `Unknown0`, `ObjectiveText1`, `ObjectiveText2`, `ObjectiveText3`, `ObjectiveText4`, `DetailsEmote1`, `DetailsEmote2`, `DetailsEmote3`, `DetailsEmote4`, `DetailsEmoteDelay1`, `DetailsEmoteDelay2`, `DetailsEmoteDelay3`, `DetailsEmoteDelay4`, `EmoteOnIncomplete`, `EmoteOnComplete`, `OfferRewardEmote1`, `OfferRewardEmote2`, `OfferRewardEmote3`, `OfferRewardEmote4`, `OfferRewardEmoteDelay1`, `OfferRewardEmoteDelay2`, `OfferRewardEmoteDelay3`, `OfferRewardEmoteDelay4`, `StartScript`, `CompleteScript`, `WDBVerified`) VALUES 
(@Q28_URSOC, 2, 80, 0, 77, 80, -284, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @Q27_ZKAZA, 0, 0, 0, 9, 246000, 312000, 0, 0, 0, 0, 0, 0, @ITEM_PURIFIED_ASHES, 1, 0, 0, 2, 0, 0, 0, 0, @ITEM_LETTER, 0, 0, 0, 1, 0, 0, 0, @ITEM_FLASK_SP, @ITEM_FLASK_AP, @ITEM_FLASK_MP5, @ITEM_FLASK_HP, @ITEM_FLASK_INT, 0, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Ursoc, medvedi buh', 'Vyzkousej magickou moc vycisteneho popela Vordrassilu na pomatenem znovuvzkrisenem Ursocovi a pomoz mu tak osvobodit jeho dusi.$B$BPred vlastni konfrontaci nejprve promluv se srstnacem Tur Ragepaw, urcite ti pomuze Ursoca porazit.', 'Podarilo se mi vycistit popel Vordrassilu a je pripraveny k pouziti. O pomatene srstnace se postaraji druidove.$B$BTvym ukolem bude osvobodit ducha Ursoca z jeho tela a nechat ho tak dojit zaslouzenemu klidu velkeho a hrdeho valecnika, jakym byl. Zabalila jsem ti male mnozstvi ocisteneho popelu do uzlicku. Az Ursoca porazis, posypej ho magickym popelem a jeho duch by mel byt svobodny.$B$BPokus se najit Tura Ragepaw, o kterem Kodian mluvila. Veri v zachranu Ursocovy duse a kdyz uslysi, ze ji jdes osvobodit, tak ti urcite pomuze Ursoca porazit.', 'Tur Ragepaw pomohl s porazkou Ursoca', 'Ursoc nam dal odpoved, proc se druidove rozhodli pred davnymi veky Vordrassil strhnout... Jeho koreny se dostaly az prilis blizko Yogg-Saronove vezeni a jakmile si druidove vsimli temneho vlivu, ktery se jimi siri, tak radeji strom znicili, nez aby nechali vsechny v celem Northrendu padnout pod jeho vliv.$B$BNyni - po tisici letech - vycitil prilezitost ovladnout vsechny zive bytosti a jeho pokus o ovladnuti Vordrassilu se mu diky nekdejsimu temnemu vlivu povedl. Nastesti jsme zasahli vcas, nez se jeho nakaza, podobne jako nakaza Pohromy, zacala sirit po kraji.$B$BJe nejvyssi cas, aby si o vsem, co jsi doposud zjistil, informoval Rhonina v Dalaranu, protoze je jasne, ze Pohroma jiz neni jediny nepritel, proti kteremu zde v Northrendu budeme bojovat - Yogg-Saron se probudil.', 'Fungoval magicky popel? Podarilo se ti osvobodit Ursoca?', NULL, @NPC_URSOC, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @ITEM_PURIFIED_ASHES, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, @SPELL_ASHES, 0, 0, 0, 0, 'Ursoc ocisten', NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12340);
-- Relations
DELETE FROM `game_event_creature_quest` WHERE `quest`=@Q28_URSOC;
INSERT INTO `game_event_creature_quest` (`id`, `quest`, `eventEntry`) VALUES 
(@NPC_THERWINA_MOONSTAR, @Q28_URSOC, @UD_EVENT);
DELETE FROM `creature_involvedrelation` WHERE `quest`=@Q28_URSOC;
INSERT INTO `creature_involvedrelation` (`id`, `quest`) VALUES 
(@NPC_THERWINA_MOONSTAR, @Q28_URSOC);
-- Dopis pro Rhonina
DELETE FROM `item_template` WHERE `entry`=@ITEM_LETTER;
INSERT INTO `item_template` (`entry`, `class`, `subclass`, `unk0`, `name`, `displayid`, `Quality`, `Flags`, `FlagsExtra`, `BuyCount`, `BuyPrice`, `SellPrice`, `InventoryType`, `AllowableClass`, `AllowableRace`, `ItemLevel`, `RequiredLevel`, `RequiredSkill`, `RequiredSkillRank`, `requiredspell`, `requiredhonorrank`, `RequiredCityRank`, `RequiredReputationFaction`, `RequiredReputationRank`, `maxcount`, `stackable`, `ContainerSlots`, `StatsCount`, `stat_type1`, `stat_value1`, `stat_type2`, `stat_value2`, `stat_type3`, `stat_value3`, `stat_type4`, `stat_value4`, `stat_type5`, `stat_value5`, `stat_type6`, `stat_value6`, `stat_type7`, `stat_value7`, `stat_type8`, `stat_value8`, `stat_type9`, `stat_value9`, `stat_type10`, `stat_value10`, `ScalingStatDistribution`, `ScalingStatValue`, `dmg_min1`, `dmg_max1`, `dmg_type1`, `dmg_min2`, `dmg_max2`, `dmg_type2`, `armor`, `holy_res`, `fire_res`, `nature_res`, `frost_res`, `shadow_res`, `arcane_res`, `delay`, `ammo_type`, `RangedModRange`, `spellid_1`, `spelltrigger_1`, `spellcharges_1`, `spellppmRate_1`, `spellcooldown_1`, `spellcategory_1`, `spellcategorycooldown_1`, `spellid_2`, `spelltrigger_2`, `spellcharges_2`, `spellppmRate_2`, `spellcooldown_2`, `spellcategory_2`, `spellcategorycooldown_2`, `spellid_3`, `spelltrigger_3`, `spellcharges_3`, `spellppmRate_3`, `spellcooldown_3`, `spellcategory_3`, `spellcategorycooldown_3`, `spellid_4`, `spelltrigger_4`, `spellcharges_4`, `spellppmRate_4`, `spellcooldown_4`, `spellcategory_4`, `spellcategorycooldown_4`, `spellid_5`, `spelltrigger_5`, `spellcharges_5`, `spellppmRate_5`, `spellcooldown_5`, `spellcategory_5`, `spellcategorycooldown_5`, `bonding`, `description`, `PageText`, `LanguageID`, `PageMaterial`, `startquest`, `lockid`, `Material`, `sheath`, `RandomProperty`, `RandomSuffix`, `block`, `itemset`, `MaxDurability`, `area`, `Map`, `BagFamily`, `TotemCategory`, `socketColor_1`, `socketContent_1`, `socketColor_2`, `socketContent_2`, `socketColor_3`, `socketContent_3`, `socketBonus`, `GemProperties`, `RequiredDisenchantSkill`, `ArmorDamageModifier`, `Duration`, `ItemLimitCategory`, `HolidayId`, `ScriptName`, `DisenchantID`, `FoodType`, `minMoneyLoot`, `maxMoneyLoot`, `WDBVerified`) VALUES 
(@ITEM_LETTER, 12, 0, -1, 'Dopis pro Rhonina', 13430, 1, 1, 0, 1, 0, 0, 0, -1, -1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 1, 'Do rukou Rhonina, dalaranskeho vudce Kirin Tor', 0, 0, 1, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, '', 0, 0, 0, 0, 12340);
-- Ursoc
-- variables
SET @SPELL_BLOOD_OF_GOD    := 52560; -- Summon Blood of the Old God - 2
SET @SPELL_GOODS_INFLUENCE := 52583; -- Old God's Influence - 2
SET @SPELL_CRUNCH_ARMOR    := 52581; -- Crunch Armor - 2
-- phase-out original mob and his adds
UPDATE `creature` SET `phaseMask`=1 WHERE `id` IN (@NPC_URSOC_ORIG, @NPC_URSUS_MAULER);
-- template
DELETE FROM `creature_template` WHERE `entry`=@NPC_URSOC;
INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid1`, `modelid2`, `modelid3`, `modelid4`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `exp`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `speed_run`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `Health_mod`, `Mana_mod`, `Armor_mod`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `WDBVerified`) VALUES 
(@NPC_URSOC, 0, 0, 0, 0, 0, 23964, 0, 0, 0, 'Ursoc', '', '', 0, 83, 83, 2, @FACTION_ENEMY, @FACTION_ENEMY, 0, 1, 2, 1, 1, 342, 485, 0, 392, 25, 2000, 0, 1, 0, 8, 0, 0, 0, 0, 0, 295, 438, 68, 1, 4, 26633, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'SmartAI', 0, 3, 20, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, '', 12340);
-- SAI
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@NPC_URSOC;
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 
(@NPC_URSOC, 0, 0, 0, 0, 0, 100, 0, 15000, 20000, 50000, 60000, 11, @SPELL_BLOOD_OF_GOD, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Ursoc - IC - Cast Summon Blood of the Old God'),
(@NPC_URSOC, 0, 1, 0, 0, 0, 100, 0, 10000, 13000, 21000, 25000, 11, @SPELL_GOODS_INFLUENCE, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Ursoc - IC - Cast Old God's Influence'),
(@NPC_URSOC, 0, 2, 0, 0, 0, 100, 0, 3000, 6000, 9000, 12000, 11, @SPELL_CRUNCH_ARMOR, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Ursoc - IC - Cast Crunch Armor'),
(@NPC_URSOC, 0, 3, 4, 8, 0, 100, 0, @SPELL_ASHES, 0, 0, 0, 12, @NPC_URSOC_SPIRIT, 3, 25000, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Ursoc - On Spellhit - Summon Spirit of Ursoc'),
(@NPC_URSOC, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Ursoc - Link - Despawn Self'),
(@NPC_URSOC, 0, 5, 0, 6, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 10, @CGUID+399, @NPC_TUR_RAGEPAW, 0, 0, 0, 0, 0, 'Ursoc - On Death - Set Data 1 1 to Tur'),
(@NPC_URSOC, 0, 7, 0, 38, 0, 100, 0, 1, 1, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Ursoc - On Set Data 1 1 - Despawn Self');
-- Purified Ashes of Vordrassil
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=18 AND `SourceEntry`=@ITEM_PURIFIED_ASHES AND `ElseGroup`=1;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES 
(18, 0, @ITEM_PURIFIED_ASHES, 1, 24, 2, @NPC_URSOC, 0, 0, '', 'Item Purified Ashes of Vordrassil cas be used on dead Ursoc');
-- Blood of the Old God
-- variables
SET @SPELL_CORRUPTION := 52564; -- Corruption of the Old God
-- SAI
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@NPC_BLOOD_OF_GOD;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@NPC_BLOOD_OF_GOD;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@NPC_BLOOD_OF_GOD;
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 
(@NPC_BLOOD_OF_GOD, 0, 0, 0, 0, 0, 100, 1, 4000, 11000, 0, 0, 11, @SPELL_CORRUPTION, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Blood of the Old God - IC - Cast Corruption of the Old God');
-- Spirit of Ursoc
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@NPC_URSOC_SPIRIT;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@NPC_URSOC_SPIRIT;
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 
(@NPC_URSOC_SPIRIT, 0, 0, 0, 1, 0, 100, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Spirit of Ursoc - OOC - Say Text 0'),
(@NPC_URSOC_SPIRIT, 0, 1, 0, 1, 0, 100, 1, 8000, 8000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Spirit of Ursoc - OOC - Say Text 1');
DELETE FROM `creature_text` WHERE `entry`=@NPC_URSOC_SPIRIT;
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
(@NPC_URSOC_SPIRIT, 0, 0, 'Dekuji vam vsem. Stari druidove byli moudri, ze znicili Vordrassil, jeho koreny pronikly nebezpecne blizko doupeti prasareho zla.', 12, 0, 100, 0, 0, 0, 'Spirit of Ursoc - say 0'),
(@NPC_URSOC_SPIRIT, 1, 0, 'Znate jeho druh jako stare bohy. Dejte pozor na Yogg-Sarona, nestvuru tisice tvari. Jeho zlo presahuje koreny Vordrassilu.', 12, 0, 100, 0, 0, 0, 'Spirit of Ursoc - say 1');
-- Tur Ragepaw
-- variables
-- bear form
SET @SPELL_BEAR_FORM    := 48368; -- Bear Form - 1
SET @SPELL_RAGEPAWS_PRE := 52507; -- Ragepaw's Presence - 1
SET @SPELL_LACERATE     := 52504; -- Lacerate - 2
SET @SPELL_MAUL         := 52506; -- Maul - 2
SET @SPELL_GROWL        := 6795;  -- Growl - 2
-- moonkin
SET @SPELL_MOONKIN_FORM := 62795; -- Moonkin Form - 1
SET @SPELL_MOONKIN_AURA := 24907; -- Moonkin Aura - 1
SET @SPELL_EMPOWERED_MF := 52503; -- Empowered Moonkin Aura - 2
SET @SPELL_WRATH        := 52501; -- Wrath - 2
SET @SPELL_MOONFIRE     := 52502; -- Moonfire - 2
-- tree of life
SET @SPELL_TREE_OF_LIFE := 48371; -- Tree of Life - 1
SET @SPELL_EMPOWERED_TL := 52553; -- Empowered Tree of Life - 1
SET @SPELL_LIFEBLOOM    := 52551; -- Lifebloom - player
SET @SPELL_NOURISH      := 52554; -- Nourisg - player
-- weapons
SET @ITEM_DISTANT_LAND  := 50040; -- Distant Land (tank)
SET @ITEM_ARCHUS        := 50429; -- Archus, Greatstaff of Antonidas (DPS)
SET @ITEM_DYING_LIGHT   := 50181; -- Dying Light (heal)
-- phase-out original mob
UPDATE `creature` SET `phaseMask`=1 WHERE `id`=@NPC_TUR_ORIG;
-- template
DELETE FROM `creature_template` WHERE `entry`=@NPC_TUR_RAGEPAW;
INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid1`, `modelid2`, `modelid3`, `modelid4`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `exp`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `speed_run`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `Health_mod`, `Mana_mod`, `Armor_mod`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `WDBVerified`) VALUES 
(@NPC_TUR_RAGEPAW, 0, 0, 0, 0, 0, 24555, 0, 0, 0, 'Tur Ragepaw', '', '', @GOSSSIP_TUR_RAGEPAW, 83, 83, 2, 35, 35, 1, 1, 1.14286, 1, 0, 325, 464, 0, 334, 4.6, 2000, 0, 2, 0, 8, 0, 0, 0, 0, 0, 285, 423, 48, 7, 4100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'SmartAI', 0, 3, 2.8, 10, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, '', 12340);
-- spawn
DELETE FROM `creature` WHERE `id`=@NPC_TUR_RAGEPAW;
INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES 
(@CGUID+399, @NPC_TUR_RAGEPAW, 571, 1, 2, 24555, 0, 4674.59, -3873.32, 330.667, 1.48353, 30, 0, 0, 16451, 13864, 0, 0, 0, 0, 0);
-- event insert
INSERT IGNORE INTO `game_event_creature` (`eventEntry`, `guid`)
SELECT @UD_EVENT, `guid` FROM `creature` WHERE `id`=@NPC_TUR_RAGEPAW;
-- equip
DELETE FROM `creature_equip_template` WHERE `entry` BETWEEN @EQUIP_TUR_RAGEPAW AND @EQUIP_TUR_RAGEPAW+3;
INSERT INTO `creature_equip_template` (`entry`, `itemEntry1`, `itemEntry2`, `itemEntry3`) VALUES 
(@EQUIP_TUR_RAGEPAW, @ITEM_DISTANT_LAND, 0, 0),
(@EQUIP_TUR_RAGEPAW+1, @ITEM_ARCHUS, 0, 0),
(@EQUIP_TUR_RAGEPAW+2, @ITEM_DYING_LIGHT, 0, 0),
(@EQUIP_TUR_RAGEPAW+3, 0, 0, 0);
-- waypoints
DELETE FROM `waypoints` WHERE `entry`=@NPC_TUR_RAGEPAW;
INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES 
(@NPC_TUR_RAGEPAW, 1, 4674.4, -3873.15, 330.561, 'Tur Ragepaw'),
(@NPC_TUR_RAGEPAW, 2, 4674.46, -3866.89, 329.246, 'Tur Ragepaw'),
(@NPC_TUR_RAGEPAW, 3, 4673.88, -3866.08, 329.222, 'Tur Ragepaw'),
(@NPC_TUR_RAGEPAW, 4, 4672.47, -3865.6, 328.498, 'Tur Ragepaw'),
(@NPC_TUR_RAGEPAW, 5, 4672.15, -3865.48, 328.646, 'Tur Ragepaw'),
(@NPC_TUR_RAGEPAW, 6, 4672.61, -3863.96, 328.316, 'Tur Ragepaw'),
(@NPC_TUR_RAGEPAW, 7, 4673.65, -3862.96, 328.13, 'Tur Ragepaw'),
(@NPC_TUR_RAGEPAW, 8, 4684.61, -3858.28, 327.406, 'Tur Ragepaw'),
(@NPC_TUR_RAGEPAW, 9, 4708.5, -3848.28, 327.683, 'Tur Ragepaw'),
(@NPC_TUR_RAGEPAW, 10, 4725.16, -3847.27, 330.066, 'Tur Ragepaw'),
(@NPC_TUR_RAGEPAW, 11, 4737.86, -3846.77, 331.398, 'Tur Ragepaw'),
(@NPC_TUR_RAGEPAW, 12, 4751.12, -3846.35, 333.464, 'Tur Ragepaw'),
(@NPC_TUR_RAGEPAW, 13, 4768.89, -3845.35, 333.872, 'Tur Ragepaw'),
(@NPC_TUR_RAGEPAW, 14, 4787.34, -3843.56, 333.92, 'Tur Ragepaw'),
(@NPC_TUR_RAGEPAW, 15, 4808.69, -3836.07, 336.295, 'Tur Ragepaw'),
(@NPC_TUR_RAGEPAW, 16, 4828.49, -3834.72, 337.858, 'Tur Ragepaw'),
(@NPC_TUR_RAGEPAW, 17, 4845.89, -3835.52, 338.634, 'Tur Ragepaw'),
(@NPC_TUR_RAGEPAW, 18, 4859.34, -3842.23, 338.559, 'Tur Ragepaw'),
(@NPC_TUR_RAGEPAW, 19, 4887.68, -3843.54, 337.535, 'Tur Ragepaw');
DELETE FROM `creature_text` WHERE `entry`=@NPC_TUR_RAGEPAW;
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
(@NPC_TUR_RAGEPAW, 0, 0, 'Ursocu, bratre Ursola a strazce kmenu srstnacu... ukaz se!', 12, 0, 100, 0, 0, 0, 'Tur Ragepaw - say 0'),
(@NPC_TUR_RAGEPAW, 1, 0, 'Drz se za mnou, $N. Udelam, co budu moct, abych te ochranil.', 12, 0, 100, 0, 0, 0, 'Tur Ragepaw - say 1'),
(@NPC_TUR_RAGEPAW, 2, 0, 'Urychlim konec tohoto besneni, $N.', 12, 0, 100, 0, 0, 0, 'Tur Ragepaw - say 2'),
(@NPC_TUR_RAGEPAW, 3, 0, 'Postaram se o tebe a tve spojence, $N.', 12, 0, 100, 0, 0, 0, 'Tur Ragepaw - say 3'),
(@NPC_TUR_RAGEPAW, 4, 0, 'Reset', 14, 0, 100, 0, 0, 0, 'Tur Ragepaw - DEBUG 1');
-- gossips
DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (@GOSSSIP_TUR_RAGEPAW, @GOSSSIP_TUR_RAGEPAW+1);
INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `action_script_id`, `box_coded`, `box_money`, `box_text`) VALUES
(@GOSSSIP_TUR_RAGEPAW, 0, 0, 'Podarilo se nam ziskat ocisteny popel Vordrassilu. Pokud porazime Ursoca, mozna se nam podari osvobodit jeho dusi a dat ji zaslouzeny klid.', 1, 1, @GOSSSIP_TUR_RAGEPAW+1, 0, 0, 0, 0, ''),
(@GOSSSIP_TUR_RAGEPAW+1, 0, 0, 'Chce to tvoji druidi medvedi formu.', 1, 1, 0, 0, 0, 0, 0, ''),
(@GOSSSIP_TUR_RAGEPAW+1, 1, 0, 'Dopomoz jeho porazce svoji silou.', 1, 1, 0, 0, 0, 0, 0, ''),
(@GOSSSIP_TUR_RAGEPAW+1, 2, 0, 'Bez lecitele ho tezko porazime.', 1, 1, 0, 0, 0, 0, 0, '');
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=@GOSSSIP_TUR_RAGEPAW;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(15, @GOSSSIP_TUR_RAGEPAW, 0, 0, 9, @Q28_URSOC, 0, 0, 0, '', 'Ursoc, medvedi buh - check for accepted quest');
DELETE FROM `npc_text` WHERE `ID` IN (@GOSSSIP_TUR_RAGEPAW, @GOSSSIP_TUR_RAGEPAW+1);
INSERT INTO `npc_text` (`ID`, `text0_0`, `text0_1`, `lang0`, `prob0`, `em0_0`, `em0_1`, `em0_2`, `em0_3`, `em0_4`, `em0_5`, `text1_0`, `text1_1`, `lang1`, `prob1`, `em1_0`, `em1_1`, `em1_2`, `em1_3`, `em1_4`, `em1_5`, `text2_0`, `text2_1`, `lang2`, `prob2`, `em2_0`, `em2_1`, `em2_2`, `em2_3`, `em2_4`, `em2_5`, `text3_0`, `text3_1`, `lang3`, `prob3`, `em3_0`, `em3_1`, `em3_2`, `em3_3`, `em3_4`, `em3_5`, `text4_0`, `text4_1`, `lang4`, `prob4`, `em4_0`, `em4_1`, `em4_2`, `em4_3`, `em4_4`, `em4_5`, `text5_0`, `text5_1`, `lang5`, `prob5`, `em5_0`, `em5_1`, `em5_2`, `em5_3`, `em5_4`, `em5_5`, `text6_0`, `text6_1`, `lang6`, `prob6`, `em6_0`, `em6_1`, `em6_2`, `em6_3`, `em6_4`, `em6_5`, `text7_0`, `text7_1`, `lang7`, `prob7`, `em7_0`, `em7_1`, `em7_2`, `em7_3`, `em7_4`, `em7_5`, `WDBVerified`) VALUES 
(@GOSSSIP_TUR_RAGEPAW, 'Kdyz jsem se ucil o mych pribuznych zijicich zde na severu, prisel jsem sem, abych se o nich dozvedel vice. Co jsem tu ale nasel, byly jen bojujici kmeny, ktere jednaly proti nasi samotne podstate.$BOpustila me veskera nadeje, $N. Dokonce i veliky Ursoc byl postizen prokletim tohoto mista.', '', 0, 1, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 11723),
(@GOSSSIP_TUR_RAGEPAW+1, 'Ano... Citim magii Vordrassilu... bez jakekoliv nakazy.$BProsim! Musite mi dovolit, abych vam pomohl. Osud me sem zaval, snad jeste mohu poslouzit svemu ucelu!', '', 0, 1, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 11723);
DELETE FROM `gossip_menu` WHERE `entry` IN (@GOSSSIP_TUR_RAGEPAW, @GOSSSIP_TUR_RAGEPAW+1);
INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES 
(@GOSSSIP_TUR_RAGEPAW, @GOSSSIP_TUR_RAGEPAW),
(@GOSSSIP_TUR_RAGEPAW+1, @GOSSSIP_TUR_RAGEPAW+1);
-- SAI
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@NPC_TUR_RAGEPAW;
DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid` BETWEEN @NPC_TUR_RAGEPAW*100 AND @NPC_TUR_RAGEPAW*100+3;
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 
(@NPC_TUR_RAGEPAW, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Link - Close Gossip'),
(@NPC_TUR_RAGEPAW, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Link - Despawn Self'),
(@NPC_TUR_RAGEPAW, 0, 3, 1, 62, 0, 100, 0, @GOSSSIP_TUR_RAGEPAW+1, 0, 0, 0, 80, @NPC_TUR_RAGEPAW*100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Gossip Select - Run Script 0'),
(@NPC_TUR_RAGEPAW, 0, 4, 1, 62, 0, 100, 0, @GOSSSIP_TUR_RAGEPAW+1, 1, 0, 0, 80, @NPC_TUR_RAGEPAW*100+1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Gossip Select - Run Script 1'),
(@NPC_TUR_RAGEPAW, 0, 5, 1, 62, 0, 100, 0, @GOSSSIP_TUR_RAGEPAW+1, 2, 0, 0, 80, @NPC_TUR_RAGEPAW*100+2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Gossip Select - Run Script 2'),
(@NPC_TUR_RAGEPAW, 0, 6, 0, 40, 0, 100, 0, 17, @NPC_TUR_RAGEPAW, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On WP Reached - Say Text 0'),
(@NPC_TUR_RAGEPAW, 0, 7, 0, 40, 0, 100, 0, 18, @NPC_TUR_RAGEPAW, 0, 0, 12, @NPC_URSOC, 4, 30000, 0, 1, 0, 8, 0, 0, 0, 4891.94, -3843.95, 337.55, 2.97, 'Tur Ragepaw - On WP Reached - Spawn Ursoc'),
(@NPC_TUR_RAGEPAW, 0, 8, 2, 6, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 11, @NPC_URSOC, 200, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Death - Set Data 1 1 to Ursoc'),
(@NPC_TUR_RAGEPAW, 0, 9, 2, 38, 0, 100, 0, 1, 1, 0, 0, 15, @Q28_URSOC, 0, 0, 0, 0, 0, 18, 50, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Set Data 1 1 - Call CompleteQuestEvent'),
(@NPC_TUR_RAGEPAW, 0, 10, 0, 11, 0, 100, 0, 0, 0, 0, 0, 80, @NPC_TUR_RAGEPAW*100+3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Respawn - Run Script 3'),
(@NPC_TUR_RAGEPAW, 0, 11, 0, 4, 0, 100, 0, 0, 0, 0, 0, 55, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Aggro - Stop WP Movement'),
(@NPC_TUR_RAGEPAW, 0, 12, 0, 1, 0, 100, 0, 600000, 600000, 600000, 600000, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - OOC - Despawn (antiBug)'),
-- bear
(@NPC_TUR_RAGEPAW, 0, 13, 0, 40, 1, 100, 0, 5, @NPC_TUR_RAGEPAW, 0, 0, 11, @SPELL_BEAR_FORM, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On WP Reached - Cast '),
(@NPC_TUR_RAGEPAW, 0, 14, 0, 40, 1, 100, 0, 6, @NPC_TUR_RAGEPAW, 0, 0, 11, @SPELL_RAGEPAWS_PRE, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On WP Reached - Cast '),
(@NPC_TUR_RAGEPAW, 0, 15, 0, 0, 1, 100, 0, 1000, 1000, 4000, 4000, 11, @SPELL_LACERATE, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - IC - Cast Lacerate'),
(@NPC_TUR_RAGEPAW, 0, 16, 0, 0, 1, 100, 0, 3000, 3000, 4000, 4000, 11, @SPELL_MAUL, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - IC - Cast Maul'),
(@NPC_TUR_RAGEPAW, 0, 17, 0, 0, 1, 100, 0, 0, 0, 20000, 20000, 11, @SPELL_GROWL, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - IC - Cast Growl'),
-- moonkin
(@NPC_TUR_RAGEPAW, 0, 18, 0, 40, 2, 100, 0, 5, @NPC_TUR_RAGEPAW, 0, 0, 11, @SPELL_MOONKIN_FORM, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On WP Reached - Cast Moonkin Form'),
(@NPC_TUR_RAGEPAW, 0, 19, 0, 40, 2, 100, 0, 6, @NPC_TUR_RAGEPAW, 0, 0, 11, @SPELL_MOONKIN_AURA, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On WP Reached - Cast Moonkin Aura'),
(@NPC_TUR_RAGEPAW, 0, 20, 0, 40, 2, 100, 0, 7, @NPC_TUR_RAGEPAW, 0, 0, 11, @SPELL_EMPOWERED_MF, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On WP Reached - Cast Empowered Moonkin Aura'),
(@NPC_TUR_RAGEPAW, 0, 21, 0, 4, 2, 100, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Aggro - Stop Combat Movement'),
(@NPC_TUR_RAGEPAW, 0, 22, 0, 0, 2, 100, 0, 1000, 1000, 1500, 1500, 11, @SPELL_WRATH, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - IC - Cast Wrath'),
(@NPC_TUR_RAGEPAW, 0, 23, 0, 0, 2, 100, 0, 0, 0, 13000, 13000, 11, @SPELL_MOONFIRE, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - IC - Cast Moonfire'),
-- tree
(@NPC_TUR_RAGEPAW, 0, 24, 0, 40, 4, 100, 0, 5, @NPC_TUR_RAGEPAW, 0, 0, 11, @SPELL_TREE_OF_LIFE, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On WP Reached - Cast Tree of Life'),
(@NPC_TUR_RAGEPAW, 0, 25, 0, 40, 4, 100, 0, 6, @NPC_TUR_RAGEPAW, 0, 0, 11, @SPELL_EMPOWERED_TL, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On WP Reached - Cast Empowered Tree of Life'),
(@NPC_TUR_RAGEPAW, 0, 26, 0, 4, 4, 100, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Aggro - Stop Combat Movement'),
(@NPC_TUR_RAGEPAW, 0, 27, 0, 0, 4, 100, 0, 1000, 1000, 2500, 3000, 11, @SPELL_NOURISH, 0, 0, 0, 0, 0, 21, 40, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - IC - Cast Nourish'),
(@NPC_TUR_RAGEPAW, 0, 28, 0, 0, 4, 100, 0, 0, 0, 8000, 8000, 11, @SPELL_LIFEBLOOM, 0, 0, 0, 0, 0, 21, 40, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - IC - Cast Lifebloom'),
-- script bear
(@NPC_TUR_RAGEPAW*100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 2, @FACTION_FRIENDLY, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Script - Set Faction'),
(@NPC_TUR_RAGEPAW*100, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 71, @EQUIP_TUR_RAGEPAW, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Script - Set Weapon'),
(@NPC_TUR_RAGEPAW*100, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Script - Say Text 1'),
(@NPC_TUR_RAGEPAW*100, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Script - Set Phase 1'),
(@NPC_TUR_RAGEPAW*100, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Script - Remove Gossip Flag'),
(@NPC_TUR_RAGEPAW*100, 9, 5, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 53, 1, @NPC_TUR_RAGEPAW, 1, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Script - Start WP Movement'),
-- script moonkin
(@NPC_TUR_RAGEPAW*100+1, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 2, @FACTION_FRIENDLY, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Script - Set Faction'),
(@NPC_TUR_RAGEPAW*100+1, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 71, @EQUIP_TUR_RAGEPAW+1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Script - Set Weapon'),
(@NPC_TUR_RAGEPAW*100+1, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Script - Say Text 2'),
(@NPC_TUR_RAGEPAW*100+1, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Script - Set Phase 2'),
(@NPC_TUR_RAGEPAW*100+1, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Script - Remove Gossip Flag'),
(@NPC_TUR_RAGEPAW*100+1, 9, 5, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 53, 1, @NPC_TUR_RAGEPAW, 1, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Script - Start WP Movement'),
-- script tree
(@NPC_TUR_RAGEPAW*100+2, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 2, @FACTION_FRI_ASSIST, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Script - Set Faction'),
(@NPC_TUR_RAGEPAW*100+2, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 71, @EQUIP_TUR_RAGEPAW+2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Script - Set Weapon'),
(@NPC_TUR_RAGEPAW*100+2, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Script - Say Text 3'),
(@NPC_TUR_RAGEPAW*100+2, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 22, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Script - Set Phase 3'),
(@NPC_TUR_RAGEPAW*100+2, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Script - Remove Gossip Flag'),
(@NPC_TUR_RAGEPAW*100+2, 9, 5, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 53, 1, @NPC_TUR_RAGEPAW, 1, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Script - Start WP Movement'),
-- script reset
(@NPC_TUR_RAGEPAW*100+3, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Script - Return Faction to Default'),
(@NPC_TUR_RAGEPAW*100+3, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 71, @EQUIP_TUR_RAGEPAW+3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Script - Remove Weapon'),
(@NPC_TUR_RAGEPAW*100+3, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Script - ReAdd Gossip Flag'),
(@NPC_TUR_RAGEPAW*100+3, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 28, @SPELL_MOONKIN_FORM, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Script - Reset Auras'),
(@NPC_TUR_RAGEPAW*100+3, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 28, @SPELL_MOONKIN_AURA, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Script - Reset Auras'),
(@NPC_TUR_RAGEPAW*100+3, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 28, @SPELL_EMPOWERED_MF, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Script - Reset Auras'),
(@NPC_TUR_RAGEPAW*100+3, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 28, @SPELL_TREE_OF_LIFE, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Script - Reset Auras'),
(@NPC_TUR_RAGEPAW*100+3, 9, 7, 0, 0, 0, 100, 0, 0, 0, 0, 0, 28, @SPELL_EMPOWERED_TL, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Script - Reset Auras'),
(@NPC_TUR_RAGEPAW*100+3, 9, 8, 0, 0, 0, 100, 0, 0, 0, 0, 0, 28, @SPELL_BEAR_FORM, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Script - Reset Auras'),
(@NPC_TUR_RAGEPAW*100+3, 9, 9, 0, 0, 0, 100, 0, 0, 0, 0, 0, 28, @SPELL_RAGEPAWS_PRE, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Script - Reset Auras'),
(@NPC_TUR_RAGEPAW*100+3, 9, 10, 0, 0, 0, 100, 0, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tur Ragepaw - On Script - Allow Combat Movement');
-- Therwina Moonstar - return letter
DELETE FROM `gossip_menu_option` WHERE `menu_id`=@GOSSIP_THERWINA AND `id`=2;
INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `action_script_id`, `box_coded`, `box_money`, `box_text`) VALUES
(@GOSSIP_THERWINA, 2, 0, 'Tys ztratil dopis se vsemi dulezitymi informacemi pro Rhonina? Tady mas dalsi, ale davej si tentokrat vetsi pozor!', 1, 1, 0, 0, 0, 0, 0, '');
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=@GOSSIP_THERWINA AND `SourceEntry`=2;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(15, @GOSSIP_THERWINA, 2, 0, 8, @Q28_URSOC, 0, 0, 0, '', 'Ursoc, medvedi buh - return letter - check for completed quest'),
(15, @GOSSIP_THERWINA, 2, 0, 14, @Q29_HLEDANI, 0, 0, 0, '', 'Ursoc, medvedi buh - return letter - check for no quest'),
(15, @GOSSIP_THERWINA, 2, 0, 26, @ITEM_LETTER, 1, 0, 0, '', 'Ursoc, medvedi buh - return letter - check for no item');
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@NPC_THERWINA_MOONSTAR AND `id` IN (3, 4, 5, 6);
DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@NPC_THERWINA_MOONSTAR*100+1;
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 
(@NPC_THERWINA_MOONSTAR, 0, 3, 4, 62, 0, 100, 0, @GOSSIP_THERWINA, 2, 0, 0, 80, @NPC_THERWINA_MOONSTAR*100+1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Therwina Moonstar - On Gossip Select - Run Script 1'),
(@NPC_THERWINA_MOONSTAR, 0, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Therwina Moonstar - On Link - Close Gossip'),
(@NPC_THERWINA_MOONSTAR*100+1, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 56, @ITEM_LETTER, 1, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Therwina Moonstar - On Script - Add Item Dopis pro Rhonina'),
(@NPC_THERWINA_MOONSTAR*100+1, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 2, 14, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Therwina Moonstar - On Script - Change Faction'),
(@NPC_THERWINA_MOONSTAR*100+1, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 11, @SPELL_STARFIRE, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Therwina Moonstar - On Script - Cast Starfire on Player'),
(@NPC_THERWINA_MOONSTAR, 0, 5, 0, 0, 0, 100, 0, 0, 0, 500, 500, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Therwina Moonstar - IC - Reset Faction'),
(@NPC_THERWINA_MOONSTAR, 0, 6, 0, 0, 0, 100, 0, 100, 100, 500, 500, 24, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Therwina Moonstar - IC - Evade');

Thanks a lot /emoticons/default_smile.png

there are a lot of errors ;o

I’ll rewrite it again tomorrow

it was written a year back for the “old core”… you have to rewrite conditions & stuff, but Ursoc’s SAI sould be OK