9
3

planter_7.lua 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. --[[
  2. Script Name : SpawnScripts/Castleview/planter_7.lua
  3. Script Purpose : planter_7
  4. Script Author : Scatman
  5. Script Date : 2009.10.02
  6. Script Notes :
  7. --]]
  8. local HIGH_ELF_MENTOR_QUEST_2 = 224
  9. function spawn(NPC)
  10. SetRequiredQuest(NPC, HIGH_ELF_MENTOR_QUEST_2, 7)
  11. end
  12. function hailed(NPC, Spawn)
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function casted_on(Target, Caster, SpellName)
  18. if HasQuest(Caster, HIGH_ELF_MENTOR_QUEST_2) and not QuestStepIsComplete(Caster, HIGH_ELF_MENTOR_QUEST_2, 7) and SpellName == "Plant Seeds" then
  19. conversation = CreateConversation()
  20. AddConversationOption(conversation, "Plant the seeds.", "PlantSeeds")
  21. StartDialogConversation(conversation, 1, Target, Caster, "This is one of the planters that Vindain spoke of.")
  22. end
  23. end
  24. function PlantSeeds(NPC, Spawn)
  25. SetStepComplete(Spawn, HIGH_ELF_MENTOR_QUEST_2, 7)
  26. local GreenWisp = SpawnMob(GetZone(Spawn), 2360170, false, 749.837, -12.8826, -126.576, 220)
  27. Despawn(GreenWisp, 300000)
  28. conversation = CreateConversation()
  29. AddConversationOption(conversation, "Leave the planter.", "CloseConversation")
  30. StartDialogConversation(conversation, 1, NPC, Spawn, "You place a seed, some soil, and some water into the planter. A fresh green wisp plant begins to grow at a surprising rate.")
  31. end