9
3

ulinir_gravestone01.lua 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. --[[
  2. Script Name : SpawnScripts/ForestRuins/ulinir_gravestone01.lua
  3. Script Purpose : ulinir_gravestone01
  4. Script Author : Scatman
  5. Script Date : 2009.09.26
  6. Script Notes :
  7. --]]
  8. local WOODELF_MENTOR_QUEST_5 = 64
  9. function spawn(NPC)
  10. end
  11. function respawn(NPC)
  12. spawn(NPC)
  13. end
  14. function hailed(NPC, Spawn)
  15. end
  16. function casted_on(NPC, Spawn, SpellName)
  17. conversation = CreateConversation()
  18. if HasQuest(Spawn, WOODELF_MENTOR_QUEST_5) and SpellName == "Read Gravestone" then
  19. AddConversationOption(conversation, "Place the Tribute.", "PlaceTribute")
  20. end
  21. AddConversationOption(conversation, "Leave.", "CheckRace")
  22. StartDialogConversation(conversation, 1, NPC, Spawn, "Ulinir\n\nOf the Pine\n\nNature's Strength")
  23. end
  24. function CheckRace(NPC, Spawn)
  25. if HasCompletedQuest(Spawn, WOODELF_MENTOR_QUEST_5) then
  26. MakeIlaenTalk(NPC, Spawn)
  27. end
  28. end
  29. function MakeIlaenTalk(NPC, Spawn)
  30. local ilaen_lilac = GetSpawn(Spawn, 1960126)
  31. if ilaen_lilac ~= nil then
  32. FaceTarget(ilaen_lilac, Spawn)
  33. PlayFlavor(ilaen_lilac, "voiceover/english/tutorial_revamp/ilaen_lilac/qey_adv02_ruins_revamp/qst_woodelf_ilaen_lilac_ulinir_d84a1bb.mp3", "You are wise to know Ulinir is worth your time. Speak with me if you wish to use your wisdom for a greater good.", "", 1864539566, 4233668295, Spawn)
  34. end
  35. end
  36. function PlaceTribute(NPC, Spawn)
  37. SetStepComplete(Spawn, WOODELF_MENTOR_QUEST_5, 1)
  38. -- Tribute for Ulinir
  39. while HasItem(Spawn, 12830) do
  40. RemoveItem(Spawn, 12830)
  41. end
  42. local tribute = GetSpawn(Spawn, 1960200)
  43. if tribute == nil then
  44. local flower1 = SpawnMob(GetZone(Spawn), 1960199, 0, 967.417, -17.0745, -820.883, 159.344)
  45. local flower2 = SpawnMob(GetZone(Spawn), 1960199, 0, 967.54, -17.0745, -821.211, 159.344)
  46. local flower3 = SpawnMob(GetZone(Spawn), 1960199, 0, 967.604, -17.0745, -820.813, 159.344)
  47. local flower4 = SpawnMob(GetZone(Spawn), 1960199, 0, 967.727, -17.0745, -821.14, 159.344)
  48. tribute = SpawnMob(GetZone(Spawn), 1960200, 0, 967.581, -17.0745, -821.035, 159.344)
  49. Despawn(tribute, 300000)
  50. Despawn(flower1, 300000)
  51. Despawn(flower2, 300000)
  52. Despawn(flower3, 300000)
  53. Despawn(flower4, 300000)
  54. end
  55. MakeIlaenTalk(NPC, Spawn)
  56. end