9
3

quest_shipment_2.lua 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. --[[
  2. Script Name : SpawnScripts/Graystone/quest_shipment_2.lua
  3. Script Purpose : quest_shipment_2
  4. Script Author : Scatman
  5. Script Date : 2009.09.27
  6. Script Notes :
  7. --]]
  8. -- Quest ID's
  9. local BARBARIAN_MENTOR_QUEST_3 = 291
  10. -- Item ID's
  11. local LOCATION_BUOYS = 9109
  12. function spawn(NPC)
  13. SetRequiredQuest(NPC, BARBARIAN_MENTOR_QUEST_3, 2)
  14. end
  15. function hailed(NPC, Spawn)
  16. end
  17. function respawn(NPC)
  18. spawn(NPC)
  19. end
  20. function casted_on(Target, Caster, SpellName)
  21. -- Location Buoys
  22. if HasQuest(Caster, BARBARIAN_MENTOR_QUEST_3) and not QuestStepIsComplete(Caster, BARBARIAN_MENTOR_QUEST_3, 2) and HasItem(Caster, LOCATION_BUOYS) then
  23. conversation = CreateConversation()
  24. AddConversationOption(conversation, "Attach the location buoy to the create.", "AttachBuoy")
  25. AddConversationOption(conversation, "Put the buoys away.", "CloseConversation")
  26. StartDialogConversation(conversation, 1, Target, Caster, "The location buoys are ready to be attached to the crates, you just need to get close enough to attach them properly.")
  27. end
  28. end
  29. function AttachBuoy(NPC, Spawn)
  30. conversation = CreateConversation()
  31. AddConversationOption(conversation, "Put the buoys away.", "CloseConversation")
  32. StartDialogConversation(conversation, 1, NPC, Spawn, "You fashion a buoy to the crate and let the flotation device float freely to the surface. The shipping coordinate and his men should now be able to locate this crate.")
  33. SetStepComplete(Spawn, BARBARIAN_MENTOR_QUEST_3, 2)
  34. local Buoy = SpawnMob(GetZone(NPC), 2350166, false, 973.62, -27.23, -157.60)
  35. SpawnSet(Buoy, "initial_state", "49156")
  36. Despawn(Buoy, 120000)
  37. end