9
3

CandiceCheriweth.lua 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. --[[
  2. Script Name : SpawnScripts/Frostfell/CandiceCheriweth.lua
  3. Script Purpose : Candice Cheriweth
  4. Script Author : vo1d
  5. Script Date : 2019.10.29
  6. Script Notes :
  7. --]]
  8. local ADeepiceMystery = 486
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 60, "InRange", "OutRange")
  11. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. end
  15. function hailed(NPC, Spawn)
  16. FaceTarget(NPC, Spawn)
  17. if HasCompletedQuest(Spawn, ADeepiceMystery) then
  18. elseif HasQuest(Spawn, ADeepiceMystery) then
  19. if GetQuestStep(Spawn, ADeepiceMystery) == 5 then
  20. DeepiceMysteryChat1(NPC, Spawn)
  21. elseif GetQuestStep(Spawn, ADeepiceMystery) == 6 then
  22. DeepiceMysteryChat1(NPC, Spawn)
  23. end
  24. else
  25. Greetings(NPC, Spawn)
  26. end
  27. end
  28. function casted_on(Target, Caster, SpellName)
  29. if HasQuest(Caster, ADeepiceMystery) and GetQuestStep(Caster, ADeepiceMystery) == 4 and SpellName == "pour acid on" then
  30. SpawnSet(Target, "model_type", "107")
  31. SetStepComplete(Caster, ADeepiceMystery, 4)
  32. end
  33. end
  34. function InRange(NPC, Spawn)
  35. if HasQuest(Spawn, ADeepiceMystery) and GetQuestStep(Spawn, ADeepiceMystery) == 4 then
  36. SpawnSet(NPC, "model_type", "11823")
  37. else
  38. SpawnSet(NPC, "model_type", "107")
  39. end
  40. end
  41. function OutRange(NPC, Spawn)
  42. end
  43. function Greetings(NPC, Spawn)
  44. local choice = math.random(1,3)
  45. if choice == 1 then
  46. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1039.mp3", "", "", 0, 0, Spawn)
  47. elseif choice == 2 then
  48. PlayFlavor(NPC, "", "We have heard everything that happened within the keep's walls. Everything! We know about the dragon and we know about what you did. You might want to go clean up after yourself. We will not let anyone know of your deeds but remember this is only due to the help you were to us. We are now even!", "", 1689589577, 4560189, Spawn)
  49. elseif choice == 3 then
  50. PlayFlavor(NPC, "", "Thank you for the work you have done for us. We might have use of you at a later time. In the meantime we will be listening as the story unfolds within the keep. Your work has already partially paid off, we have found that the snow goblins in this area have some sort of interest in what is going on within the keep. I would keep an eye out for any goblins that might be looking for assistance.", "", 1689589577, 4560189, Spawn)
  51. end
  52. end
  53. function DeepiceMysteryChat1(NPC, Spawn)
  54. FaceTarget(NPC, Spawn)
  55. Conversation = CreateConversation()
  56. AddConversationOption(Conversation, "Did you see who did that to you?", "DeepiceMysteryChat2")
  57. StartConversation(Conversation, NPC, Spawn, "I... I'm free! Thank you for the help.")
  58. end
  59. function DeepiceMysteryChat2(NPC, Spawn)
  60. FaceTarget(NPC, Spawn)
  61. Conversation = CreateConversation()
  62. AddConversationOption(Conversation, "Who would have wanted.....", "DeepiceMysteryChat3")
  63. StartConversation(Conversation, NPC, Spawn, "No, I was busy mixing some butter when BAM! The butter was cold, and so was I!")
  64. end
  65. function DeepiceMysteryChat3(NPC, Spawn)
  66. FaceTarget(NPC, Spawn)
  67. Conversation = CreateConversation()
  68. if GetQuestStep(Spawn, ADeepiceMystery) == 5 then
  69. SetStepComplete(Spawn, ADeepiceMystery, 5)
  70. end
  71. AddConversationOption(Conversation, "This seems a little much for them.")
  72. StartConversation(Conversation, NPC, Spawn, "I'm betting it was those troublesome Humbugs.")
  73. end