mysterious_machine_quest.lua 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. --[[
  2. Script Name : SpawnScripts/Oakmyst/mysterious_machine_quest.lua
  3. Script Purpose : a mysterious machine
  4. Script Author : Scatman
  5. Script Date : 2009.10.07
  6. Script Notes :
  7. --]]
  8. local OAKMYST_CHARLIN_QUEST_3 = 206
  9. function spawn(NPC)
  10. SetRequiredQuest(NPC, OAKMYST_CHARLIN_QUEST_3, 3)
  11. SetPlayerProximityFunction(NPC, 15, "InRange")
  12. end
  13. function hailed(NPC, Spawn)
  14. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function InRange(NPC, Spawn)
  19. if HasQuest(Spawn, OAKMYST_CHARLIN_QUEST_3) and GetQuestStep(Spawn, OAKMYST_CHARLIN_QUEST_3) == 3 then
  20. SendMessage(Spawn, "You hear a slight humming in the plants near the water's edge.")
  21. end
  22. end
  23. function casted_on(NPC, Spawn, SpellName)
  24. if HasQuest(Spawn, OAKMYST_CHARLIN_QUEST_3) and GetQuestStep(Spawn, OAKMYST_CHARLIN_QUEST_3) == 3 and SpellName == "Inspect" then
  25. SetStepComplete(Spawn, OAKMYST_CHARLIN_QUEST_3, 3)
  26. conversation = CreateConversation()
  27. StartDialogConversation(conversation, 1, NPC, Spawn, "The machine is vibrating ever so slightly. Aside from the humming, there is nothing to suggest that the machine is currently active.")
  28. end
  29. end