9
3

SnarfFrostfoot.lua 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. --[[
  2. Script Name : SpawnScripts/Frostfell/SnarfFrostfoot.lua
  3. Script Purpose : Snarf Frostfoot
  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) == 13 then
  20. DeepiceMysteryChat1(NPC, Spawn)
  21. elseif GetQuestStep(Spawn, ADeepiceMystery) == 14 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) == 12 and SpellName == "pour acid on" then
  30. SpawnSet(Target, "model_type", "7039")
  31. SetStepComplete(Caster, ADeepiceMystery, 12)
  32. end
  33. end
  34. function InRange(NPC, Spawn)
  35. if HasQuest(Spawn, ADeepiceMystery) and GetQuestStep(Spawn, ADeepiceMystery) == 12 then
  36. SpawnSet(NPC, "model_type", "11823")
  37. else
  38. SpawnSet(NPC, "model_type", "7039")
  39. end
  40. end
  41. function OutRange(NPC, Spawn)
  42. end
  43. function Greetings(NPC, Spawn)
  44. end
  45. function DeepiceMysteryChat1(NPC, Spawn)
  46. FaceTarget(NPC, Spawn)
  47. Conversation = CreateConversation()
  48. AddConversationOption(Conversation, "What put you in that ice, Snarf?", "DeepiceMysteryChat2")
  49. StartConversation(Conversation, NPC, Spawn, "Finally, Snarf is not frozened!")
  50. end
  51. function DeepiceMysteryChat2(NPC, Spawn)
  52. FaceTarget(NPC, Spawn)
  53. Conversation = CreateConversation()
  54. AddConversationOption(Conversation, "Oh? Who did this to you?", "DeepiceMysteryChat3")
  55. StartConversation(Conversation, NPC, Spawn, "Me no know what. Me know who!")
  56. end
  57. function DeepiceMysteryChat3(NPC, Spawn)
  58. FaceTarget(NPC, Spawn)
  59. Conversation = CreateConversation()
  60. AddConversationOption(Conversation, "But you didn't see her, did you?", "DeepiceMysteryChat4")
  61. StartConversation(Conversation, NPC, Spawn, "Lady Vox! She mad we Frostfoots trying to be free!")
  62. end
  63. function DeepiceMysteryChat4(NPC, Spawn)
  64. FaceTarget(NPC, Spawn)
  65. Conversation = CreateConversation()
  66. AddConversationOption(Conversation, "Lady Vox isn't tiny.", "DeepiceMysteryChat5")
  67. StartConversation(Conversation, NPC, Spawn, "Yes! Tiny icy dragon.")
  68. end
  69. function DeepiceMysteryChat5(NPC, Spawn)
  70. FaceTarget(NPC, Spawn)
  71. Conversation = CreateConversation()
  72. if GetQuestStep(Spawn, ADeepiceMystery) == 13 then
  73. SetStepComplete(Spawn, ADeepiceMystery, 13)
  74. end
  75. AddConversationOption(Conversation, "Thank you.", "DeepiceMysteryChat6")
  76. StartConversation(Conversation, NPC, Spawn, "Oh. Me no know then.")
  77. end