9
3

UdiyitasXKilrae.lua 4.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. --[[
  2. Script Name : SpawnScripts/DarklightWood/UdiyitasXKilrae.lua
  3. Script Purpose : Udiyitas X'Kilrae
  4. Script Author : Cynnar
  5. Script Date : 2015.07.05
  6. Script Notes : Beginning dialog has "wince" emote being used but is not correct.
  7. : Closest I found so far.
  8. --]]
  9. local ASolidifiedFront = 120
  10. local ElementalEncroachment = 121
  11. function spawn(NPC)
  12. ProvidesQuest(NPC, ElementalEncroachment)
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function hailed(NPC, Spawn)
  18. FaceTarget(NPC, Spawn)
  19. conversation = CreateConversation()
  20. if HasQuest(Spawn, ASolidifiedFront) and not QuestStepIsComplete(Spawn, ASolidifiedFront, 1) then
  21. SetStepComplete(Spawn, ASolidifiedFront, 1)
  22. end
  23. if not HasQuest(Spawn, ASolidifiedFront) and not HasCompletedQuest(Spawn, ASolidifiedFront) then
  24. StartConversation(conversation, NPC, Spawn, "The Sablevein must be stopped before they burn down all of Hate's Envy!")
  25. elseif HasQuest(Spawn, ElementalEncroachment) and GetQuestStep(Spawn, ElementalEncroachment) == 1 then
  26. PlayFlavor(NPC, "udiyitas_x_kilrae/darklight_wood/hates_envy/udiyitas_revamp/udiyitas004.mp3", "", "", 827914916, 961160559, Spawn)
  27. AddConversationOption(conversation, "I'm still hunting them.", "dlg_1_1")
  28. StartConversation(conversation, NPC, Spawn, "Were you successful in striking down the invaders?")
  29. elseif HasQuest(Spawn, ElementalEncroachment) and GetQuestStep(Spawn, ElementalEncroachment) == 2 then
  30. PlayFlavor(NPC, "udiyitas_x_kilrae/darklight_wood/hates_envy/udiyitas_revamp/udiyitas004.mp3", "", "", 827914916, 961160559, Spawn)
  31. AddConversationOption(conversation, "I slew a great number of the Sablevein crumblers!", "dlg_2_1")
  32. StartConversation(conversation, NPC, Spawn, "Were you successful in striking down the invaders?")
  33. elseif HasCompletedQuest(Spawn, ElementalEncroachment) then
  34. PlayFlavor(Spawn, "", "", "wave", 0, 0, Player)
  35. PlayFlavor(NPC, "udiyitas_x_kilrae/darklight_wood/hates_envy/udiyitas_revamp/udiyitas005.mp3", "", "", 3475491960, 633382350, Spawn)
  36. AddConversationOption(conversation, "Good-bye, Udiyitas.")
  37. StartConversation(conversation, NPC, Spawn, "Excellent work, " .. GetName(Spawn) .. ". I see now that fear is not an emotion you're much familiar with. Neriak will prosper greatly so long as you defend her banner. Now then, enough idle discourse. The Sablevein continue to strike. You must speak with Pellandra if you have not already.")
  38. else
  39. PlayFlavor(NPC, "udiyitas_x_kilrae/darklight_wood/hates_envy/udiyitas_revamp/udiyitas001.mp3", "", "wince", 1460950468, 2447529332, Spawn)
  40. AddConversationOption(conversation, "Yes, point me in the face of danger.", "dlg_0_1")
  41. AddConversationOption(conversation, "How can I help?", "dlg_0_1")
  42. StartConversation(conversation, NPC, Spawn, "It's about time Verex sent some help! You are here to assist with the Sablevein, right?")
  43. end
  44. end
  45. function dlg_0_1(NPC, Spawn)
  46. FaceTarget(NPC, Spawn)
  47. conversation = CreateConversation()
  48. PlayFlavor(NPC, "udiyitas_x_kilrae/darklight_wood/hates_envy/udiyitas_revamp/udiyitas002.mp3", "", "smirk", 3581344743, 4242686519, Spawn)
  49. AddConversationOption(conversation, "Consider them no more!", "QuestOffer")
  50. AddConversationOption(conversation, "I do not feel ready to battle.", "PlayerEmote")
  51. StartConversation(conversation, NPC, Spawn, "This outpost is about to be overrun if we don't act fast! If you really do think you can assist us, charge out into the fray and slay a number of the advancing Sablevein crumblers.")
  52. end
  53. function PlayerEmote(NPC, Spawn)
  54. PlayFlavor(Spawn, "", "", "no", 0, 0, Player)
  55. end
  56. function dlg_1_1(NPC, Spawn)
  57. FaceTarget(NPC, Spawn)
  58. conversation = CreateConversation()
  59. PlayFlavor(NPC, "udiyitas_x_kilrae/darklight_wood/hates_envy/udiyitas_revamp/udiyitas006.mp3", "", "", 2328635398, 829982468, Spawn)
  60. AddConversationOption(conversation, "I wiill return victoriouns!")
  61. StartConversation(conversation, NPC, Spawn, "Do not return until you have slain a great number of the Sablevein elementals!")
  62. end
  63. function dlg_2_1(NPC, Spawn)
  64. FaceTarget(NPC, Spawn)
  65. conversation = CreateConversation()
  66. SetStepComplete(Spawn, ElementalEncroachment, 2)
  67. PlayFlavor(Spawn, "", "", "wave", 0, 0, Player)
  68. PlayFlavor(NPC, "udiyitas_x_kilrae/darklight_wood/hates_envy/udiyitas_revamp/udiyitas005.mp3", "", "", 3475491960, 633382350, Spawn)
  69. SetStepComplete(Spawn, ElementalEncroachment, 2)
  70. AddConversationOption(conversation, "Good-bye, Udiyitas.")
  71. StartConversation(conversation, NPC, Spawn, "Excellent work, " .. GetName(Spawn) .. ". I see now that fear is not an emotion you're much familiar with. Neriak will prosper greatly so long as you defend her banner. Now then, enough idle discourse. The Sablevein continue to strike. You must speak with Pellandra if you have not already.")
  72. end
  73. function QuestOffer(NPC, Spawn)
  74. PlayFlavor(Spawn, "", "", "brandish", 0, 0, Player)
  75. OfferQuest(NPC, Spawn, ElementalEncroachment)
  76. end