9
3

WalterChanning.lua 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. --[[
  2. Script Name : SpawnScripts/NorthQeynos/WalterChanning.lua
  3. Script Purpose : Walter Channing
  4. Script Author : Dorbin
  5. Script Date : 2022.04.23
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. local Sword = 5544
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 6, "InRange", "LeaveRange")
  11. ProvidesQuest(NPC, Sword)
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function InRange(NPC,Spawn)
  17. if GetFactionAmount(Spawn,11) <0 then
  18. FaceTarget(NPC, Spawn)
  19. choice = math.random(1,2)
  20. if choice == 1 then
  21. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  22. elseif choice == 2 then
  23. PlayFlavor(NPC, "", "", "heckno", 0, 0, Spawn)
  24. end
  25. else
  26. if not HasCompletedQuest (Spawn, Sword) and not HasQuest (Spawn, Sword) then
  27. if math.random(1, 100) <= 90 then
  28. FaceTarget(NPC, Spawn)
  29. local choice = MakeRandomInt(1,2)
  30. if choice == 1 then
  31. PlayFlavor(NPC, "voiceover/english/merchant_walter_channing/qey_north/100_retainer_channing_walter_g4_multhail1_95c384e8.mp3", "Are you interested in my armor? I've no time for small talk and don't need any help.", "", 39831011, 3044568057, Spawn, 0)
  32. elseif choice == 2 then
  33. PlayFlavor(NPC, "voiceover/english/merchant_walter_channing/qey_north/100_retainer_channing_walter_g4_callout1_182d9ab2.mp3", "May I interest you in seeing some of the fine armor and weapons that made the Ironforge family famous?", "", 3181523989, 773123783, Spawn, 0)
  34. end
  35. end
  36. else
  37. if math.random(1,100) <= 60 then
  38. FaceTarget(NPC, Spawn)
  39. if choice == 1 then
  40. PlayFlavor(NPC, "voiceover/english/merchant_walter_channing/qey_north/100_retainer_channing_walter_g4_multhail1_95c384e8.mp3", "Are you interested in my armor? I've no time for small talk and don't need any help.", "", 39831011, 3044568057, Spawn, 0)
  41. elseif choice == 2 then
  42. PlayFlavor(NPC, "voiceover/english/merchant_walter_channing/qey_north/100_retainer_channing_walter_g4_callout1_182d9ab2.mp3", "May I interest you in seeing some of the fine armor and weapons that made the Ironforge family famous?", "", 3181523989, 773123783, Spawn, 0)
  43. end
  44. end
  45. end
  46. end
  47. end
  48. function hailed(NPC, Spawn)
  49. if GetFactionAmount(Spawn,11) <0 then
  50. FaceTarget(NPC, Spawn)
  51. choice = math.random(1,2)
  52. if choice == 1 then
  53. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  54. elseif choice == 2 then
  55. PlayFlavor(NPC, "", "", "heckno", 0, 0, Spawn)
  56. end
  57. else
  58. FaceTarget(Spawn, NPC)
  59. PlayFlavor(NPC, "voiceover/english/walter_channing/qey_north/walterchanning.mp3", "", "hello", 1421937036, 2649740764, Spawn)
  60. local conversation = CreateConversation()
  61. if not HasQuest(Spawn,Sword) and not HasCompletedQuest(Spawn, Sword) then
  62. AddConversationOption(conversation, "The Ironforge family seems to have made a name for themselves.", "Ironforge")
  63. end
  64. if GetQuestStep(Spawn,Sword)==2 then
  65. AddConversationOption(conversation, "Noelle was extremely pleased with your work.", "Delivered")
  66. end
  67. if HasQuest(Spawn,Sword) or HasCompletedQuest(Spawn, Sword) then
  68. AddConversationOption(conversation, "Remind me a little bit about the Ironforge family.", "Ironforge")
  69. end
  70. AddConversationOption(conversation, "I'll take a look. Thank you.")
  71. StartConversation(conversation, NPC, Spawn, "Good day to you! Perhaps you would be interested in seeing some of the armor and weaponsthat have made the Ironforge family famous?")
  72. end
  73. end
  74. function Ironforge(NPC,Spawn)
  75. FaceTarget(NPC, Spawn)
  76. PlayFlavor(NPC, "voiceover/english/merchant_walter_channing/qey_north/walterchanning000.mp3", "", "nod", 2147499763, 4176830287, Spawn)
  77. local conversation = CreateConversation()
  78. if not HasQuest(Spawn,Sword) and not HasCompletedQuest(Spawn, Sword) then
  79. AddConversationOption(conversation, "Sounds like the family does a lot of great work.", "Work")
  80. end
  81. AddConversationOption(conversation, "Interesting. Thanks for sharing.")
  82. StartConversation(conversation, NPC, Spawn, "The family has a long standing reputation for delivering high quality arms dating as far back as the War of the Plagues. They've passed down their smithing secrets for generations.")
  83. end
  84. function Work(NPC,Spawn)
  85. FaceTarget(NPC, Spawn)
  86. PlayFlavor(NPC, "voiceover/english/walter_channing/qey_north/walterchanning001.mp3", "", "ponder", 2678423442, 1274462543, Spawn)
  87. local conversation = CreateConversation()
  88. AddConversationOption(conversation, "Say no more. If it involves Ironforge craftsmanship then hand it over!", "Delivery2")
  89. AddConversationOption(conversation, "I really shouldn't. Sorry.")
  90. StartConversation(conversation, NPC, Spawn, "Speaking of work, if you have a momment I need an errand run, and I'm quite busy tending the forge.")
  91. end
  92. function Delivery2(NPC, Spawn)
  93. FaceTarget(NPC, Spawn)
  94. OfferQuest(NPC, Spawn,Sword)
  95. end
  96. function Delivered(NPC, Spawn)
  97. FaceTarget(NPC, Spawn)
  98. PlayFlavor(NPC, "voiceover/english/walter_channing/qey_north/walterchanning003.mp3", "", "thanks", 1064494929, 3797173733, Spawn)
  99. local conversation = CreateConversation()
  100. AddConversationOption(conversation, "It was a pleasure.", "FinishQuest")
  101. StartConversation(conversation, NPC, Spawn, "Thank you for the assistance! I might ask for your services again.")
  102. end
  103. function FinishQuest(NPC, Spawn)
  104. FaceTarget(NPC, Spawn)
  105. SetStepComplete(Spawn,Sword, 2)
  106. end