9
3

crate_large_long_001.lua 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. --[[
  2. Script Name : SpawnScripts/Graystone/crate_large_long001.lua
  3. Script Purpose : crate_large_long001
  4. Script Author : Scatman
  5. Script Date : 2009.10.05
  6. Script Notes :
  7. --]]
  8. local BARBARIAN_MENTOR_QUEST_2 = 290
  9. local DWARF_MENTOR_QUEST_3 = 286
  10. function spawn(NPC)
  11. SetRequiredQuest(NPC, BARBARIAN_MENTOR_QUEST_2, 4)
  12. SetRequiredQuest(NPC, DWARF_MENTOR_QUEST_3, 2)
  13. end
  14. function hailed(NPC, Spawn)
  15. end
  16. function respawn(NPC)
  17. spawn(NPC)
  18. end
  19. function casted_on(Target, Caster, SpellName)
  20. if HasQuest(Caster, BARBARIAN_MENTOR_QUEST_2) and GetQuestStep(Caster, BARBARIAN_MENTOR_QUEST_2) == 4 and SpellName == "inspect" then
  21. AddStepProgress(Caster, BARBARIAN_MENTOR_QUEST_2, 4, 1)
  22. SendMessage(Caster, "This crate is not from shipment CG4QC.")
  23. SendPopUpMessage(Caster, "This crate is not from shipment CG4QC.", 255, 255, 255)
  24. SpawnSet(Target, "show_command_icon", 0)
  25. AddTimer(Target, 60000, "ResetBarrel")
  26. elseif HasQuest(Caster, DWARF_MENTOR_QUEST_3) and GetQuestStep(Caster, DWARF_MENTOR_QUEST_3) == 2 and SpellName == "inspect" then
  27. conversation = CreateConversation()
  28. AddConversationOption(conversation, "Stop inspecting.", "CloseConversation")
  29. StartDialogConversation(conversation, 1, Target, Caster, "A quick search doesn't turn up any packages meant for Mav Boilfist, perhaps you should check some of the other crates and barrels.")
  30. end
  31. end
  32. function ResetBarrel(NPC)
  33. SpawnSet(NPC, "show_command_icon", 1)
  34. end