9
3

QueenBunny.lua 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. --[[
  2. Script Name : SpawnScripts/FrostfellWonderlandVillage/QueenBunny.lua
  3. Script Purpose : Queen Bunny
  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) == 11 then
  20. DeepiceMysteryChat1(NPC, Spawn)
  21. elseif GetQuestStep(Spawn, ADeepiceMystery) == 12 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) == 10 and SpellName == "pour acid on" then
  30. SpawnSet(Target, "model_type", "6488")
  31. SetStepComplete(Caster, ADeepiceMystery, 10)
  32. end
  33. end
  34. function InRange(NPC, Spawn)
  35. if HasQuest(Spawn, ADeepiceMystery) and GetQuestStep(Spawn, ADeepiceMystery) == 10 then
  36. SpawnSet(NPC, "model_type", "11823")
  37. else
  38. SpawnSet(NPC, "model_type", "6488")
  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_2_1039.mp3", "", "", 0, 0, Spawn)
  47. elseif choice == 2 then
  48. PlayFlavor(NPC, "", "Thank you so much for your help!", "thanks", 1689589577, 4560189, Spawn)
  49. elseif choice == 3 then
  50. PlayFlavor(NPC, "", "You must meet with Felonious at Gnomeland Security in the Steamfont Mountains.", "nod", 1689589577, 4560189, Spawn)
  51. end
  52. end
  53. function DeepiceMysteryChat1(NPC, Spawn)
  54. FaceTarget(NPC, Spawn)
  55. Conversation = CreateConversation()
  56. AddConversationOption(Conversation, "Who did this to you? Do you recall anything prior to being frozen?", "DeepiceMysteryChat2")
  57. StartConversation(Conversation, NPC, Spawn, "Bless you! I cannot thank you enough for freeing me of that ice.")
  58. end
  59. function DeepiceMysteryChat2(NPC, Spawn)
  60. FaceTarget(NPC, Spawn)
  61. Conversation = CreateConversation()
  62. AddConversationOption(Conversation, "That may have been the same animal McScroogle saw.", "DeepiceMysteryChat3")
  63. StartConversation(Conversation, NPC, Spawn, "Yes, I remember seeing an odd animal, one that I had not seen before, but was familiar. It was a fay drake, like those in the Faydark, but white and blue, and snow falling from its wings.")
  64. end
  65. function DeepiceMysteryChat3(NPC, Spawn)
  66. FaceTarget(NPC, Spawn)
  67. if GetQuestStep(Spawn, ADeepiceMystery) == 11 then
  68. SetStepComplete(Spawn, ADeepiceMystery, 11)
  69. end
  70. end