9
3

mysteriousmachinequest.lua 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  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 = 209
  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. local spawn2 = GetSpawn(Spawn, 1950101)
  21. SendMessage(Spawn, "You hear a slight humming in the plants near the water's edge.")
  22. SpawnSet(spawn2, "show_command_icon", 1)
  23. end
  24. end
  25. function casted_on(NPC, Spawn, SpellName)
  26. if HasQuest(Spawn, OAKMYST_CHARLIN_QUEST_3) and GetQuestStep(Spawn, OAKMYST_CHARLIN_QUEST_3) == 3 and SpellName == "inspect" then
  27. SetStepComplete(Spawn, OAKMYST_CHARLIN_QUEST_3, 3)
  28. conversation = CreateConversation()
  29. 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.")
  30. end
  31. end