9
3

CogBurn.lua 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. --[[
  2. Script Name : CogBurn.lua
  3. Script Purpose : Cog Burn
  4. Script Author : ParserGenerated (Replace this)
  5. Script Date : 08/30/2019
  6. Script Notes : Auto-Generated from a chat log using SpawnScriptDesigner
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. -- Quest ID's
  10. local COMBUSTIBLE_GNOME = 478
  11. function spawn(NPC)
  12. ProvidesQuest(NPC, COMBUSTIBLE_GNOME)
  13. SetPlayerProximityFunction(NPC, 8, "InRange")
  14. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function InRange(NPC, Spawn)
  19. if not HasCompletedQuest (Spawn, COMBUSTIBLE_GNOME) and not HasQuest (Spawn, COMBUSTIBLE_GNOME) and math.random(1, 100) <= 75 then
  20. FaceTarget(NPC, Spawn)
  21. PlayFlavor(NPC, "voiceover/english/cog_burn/wailingcaves/025_qst_cog_burn_callout_18c055d.mp3", "How fortunate for me! More adventurers! Whee! Come now, come here.", "clap", 2867416761, 2931341984, Spawn)
  22. else
  23. if math.random(1, 100) <= 70 then
  24. PlayFlavor(NPC, "", "", "dance", 0, 0, Spawn)
  25. end
  26. end
  27. end
  28. function hailed(NPC, Spawn)
  29. if not HasCompletedQuest (Spawn, COMBUSTIBLE_GNOME) and not HasQuest (Spawn, COMBUSTIBLE_GNOME) then
  30. conversation = CreateConversation()
  31. PlayFlavor(NPC, "voiceover/english/cog_burn/wailingcaves/cog_burn/cog_burn001.mp3", "", "happy", 827552063, 2224145017, Spawn)
  32. AddConversationOption(conversation, "I have to smash them?", "dlg_2")
  33. AddConversationOption(conversation, "I'm not interested.")
  34. StartConversation(conversation, NPC, Spawn, "You're just in time! Yes, yes, just in time to help me continue my research. With the popping and smoke, poofing! So, so very exciting! All you have to do is fetch me the smashed remains of these undead orcs.")
  35. elseif HasQuest (Spawn, COMBUSTIBLE_GNOME) then
  36. conversation = CreateConversation()
  37. if GetQuestStep (Spawn, COMBUSTIBLE_GNOME) == 2 then
  38. AddConversationOption(conversation, "Here is what you asked for.", "Handin")
  39. end
  40. PlayFlavor(NPC, "voiceover/english/cog_burn/wailingcaves/cog_burn/cog_burn004.mp3", "", "", 2589655569, 670111190, Spawn)
  41. AddConversationOption(conversation, "I'm working on it.")
  42. StartConversation(conversation, NPC, Spawn, "What!? No smoldering, popping boom! I'm almost done! I've 78% of component A; 12% of ingredient B; and all I need now is the last 15% of sample D! Go, go, go get me my stuff! ")
  43. else
  44. conversation = CreateConversation()
  45. PlayFlavor(NPC, "voiceover/english/cog_burn/wailingcaves/cog_burn/cog_burn007.mp3", "", "hello", 3716966545, 2483311705, Spawn)
  46. AddConversationOption(conversation, "Sure, if you say so.")
  47. StartConversation(conversation, NPC, Spawn, "Hello again! Lovely day for a bit of doom, wouldn't you say?")
  48. end
  49. end
  50. function dlg_2(NPC, Spawn)
  51. FaceTarget(NPC, Spawn)
  52. conversation = CreateConversation()
  53. PlayFlavor(NPC, "voiceover/english/cog_burn/wailingcaves/cog_burn/cog_burn002.mp3", "", "", 2433324308, 3739464743, Spawn)
  54. AddConversationOption(conversation,"That sounds dreadful!", "OfferQuest1")
  55. AddConversationOption(conversation, "Good luck finding help.")
  56. StartConversation(conversation, NPC, Spawn, "Of course you have to smash them before they're any good to me. Nothing worse than components trying to eliminate the tinker! We don't want that to happen again, I'm telling you. I was not amused.")
  57. end
  58. function OfferQuest1(NPC, Spawn)
  59. FaceTarget(NPC, Spawn)
  60. conversation = CreateConversation()
  61. PlayFlavor(NPC, "voiceover/english/cog_burn/wailingcaves/cog_burn/cog_burn003.mp3", "", "agree", 132546489, 2576044342, Spawn)
  62. AddConversationOption(conversation, "Ok.","OfferQuest2")
  63. StartConversation(conversation, NPC, Spawn, "Good, good! I'm glad we agree. You fetch me what I need, and I'll see what I can do for you. You can trust me ... can't you? Oh, no matter. ")
  64. end
  65. function OfferQuest2(NPC, Spawn)
  66. OfferQuest(NPC, Spawn, COMBUSTIBLE_GNOME)
  67. function Handin(NPC, Spawn)
  68. conversation = CreateConversation()
  69. PlayFlavor(NPC, "voiceover/english/cog_burn/wailingcaves/cog_burn/cog_burn005.mp3", "", "cheer", 3167264299, 329469726, Spawn)
  70. AddConversationOption(conversation, "Nothing for me?", "Handin2")
  71. StartConversation(conversation, NPC, Spawn, "Marvelous! Just fine, most satisfactory, absolutely acceptable. Hmm! Not bad even ... What? What is it? What are you looking at!? ")
  72. end
  73. function Handin2(NPC, Spawn)
  74. conversation = CreateConversation()
  75. --WRONG MP3 Key
  76. PlayFlavor(NPC, "voiceover/english/cog_burn/wailingcaves/cog_burn/cog_burn006.mp3", "", "cheer", 2945497015, 2240466538, Spawn)
  77. AddConversationOption(conversation, "Thank you.", "Reward")
  78. StartConversation(conversation, NPC, Spawn, "I see. So it's that kind of relationship is it? So be it! Here, take it! Go on, take it I didn't want it anyway. Wait ... yes I did. I need that piece. Here, take this; it's much nicer anyway, really!")
  79. end
  80. function Reward(NPC, Spawn)
  81. SetStepComplete(Spawn, COMBUSTIBLE_GNOME, 2)
  82. end
  83. --[[ Move the following conversation to the Accepted function of the quest script
  84. FaceTarget(QuestGiver, Player)
  85. Dialog.New(QuestGiver, Player)
  86. Dialog.AddDialog("Good, good! I'm glad we agree. You fetch me what I need, and I'll see what I can do for you. You can trust me ... can't you? Oh, no matter. ")
  87. Dialog.AddOption("Ok.")
  88. Dialog.Start()
  89. --]]
  90. end