Advertisement
_Stuff_

The Lesson of the Burning Scroll (Quest=29408)

Apr 21st, 2020
1,086
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 2.89 KB | None | 0 0
  1. SET @NPC = 53566; -- Master Shang Xi
  2. SET @QUEST = 29408; -- The Lesson of the Burning Scroll
  3. SET @SPELL = 114610; -- The Master's Flame
  4.  
  5. UPDATE `creature_template` SET `npcflag` = 1|2 WHERE `entry` = @NPC;
  6.  
  7. DELETE FROM `creature_queststarter` WHERE `id` = @NPC;
  8. INSERT INTO `creature_queststarter` VALUES
  9. (@NPC, @QUEST);
  10.  
  11. DELETE FROM npc_spellclick_spells WHERE npc_entry = @NPC;
  12. INSERT INTO `npc_spellclick_spells` (`npc_entry`, `spell_id`, `cast_flags`) VALUES
  13. (@NPC, @SPELL, 1);
  14.  
  15. DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`= 18 AND `ConditionTypeOrReference` IN (1, 9) AND `SourceGroup` = @NPC AND `SourceEntry` = @SPELL;
  16. INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`, `ErrorType`, `ErrorTextId`,`ScriptName`,`Comment`) VALUES
  17. (18, @NPC, @SPELL, 0, 0, 9, 0, @QUEST, 0, 0, 0, 0, 0, '', 'On SpellClick Event - Only if quest accepted');
  18. -- (18, @NPC, @SPELL, 0, 0, 1, 0, @SPELL, 0, 0, 1, 0, 0, '', 'On SpellClick Event - Only if aura pressent, Negative');
  19.  
  20. UPDATE creature_template SET AIName = 'SmartAI' WHERE entry = @NPC;
  21. DELETE FROM `smart_scripts` WHERE entryorguid = @NPC AND source_type = 0 AND id IN (7, 8, 9);
  22. DELETE FROM `smart_scripts` WHERE entryorguid = @NPC*100 AND source_type = 9;
  23. 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`, `event_param5`, `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
  24. (@NPC, 0, 7, 8, 73, 0, 100, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'On SpellClick - Say Text - Target Invoker'),
  25. (@NPC, 0, 8, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 81, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'On Link - Set npcflag - Target Self'),
  26. (@NPC, 0, 9, 0, 19, 0, 100, 0, @QUEST, 0, 0, 0, 0, 80, @NPC*100, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'On Accepted Quest - Start Script - Target Self'),
  27. (@NPC*100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 81, 16777216, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'On Script - Set npcflag - Target Self'),
  28. (@NPC*100, 9, 1, 0, 0, 0, 100, 0, 10000, 10000, 0, 0, 0, 81, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'On Script - Set npcflag - Target Self');
  29.  
  30. DELETE FROM creature_text WHERE creatureId = @NPC;
  31. INSERT INTO `creature_text` (`creatureId`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
  32. (@NPC, 0, 0, 'On your first try! Now, take the flame to the top of the temple and burn the scroll that you find there.', 12, 0, 100, 1, 0, 0, 'Master Shang Xi');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement