9
3

AlganTinmizer.lua 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. --[[
  2. Script Name : SpawnScripts/TheBaubbleshire/AlganTinmizer.lua
  3. Script Purpose : Algan Tinmizer
  4. Script Author : Dorbin
  5. Script Date : 2022.01.07
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local BagoParts = 505
  10. local TowerOfThree = 5441
  11. function spawn(NPC)
  12. ProvidesQuest(NPC, TowerOfThree)
  13. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  14. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function InRange(NPC, Spawn)
  19. if GetFactionAmount(Spawn,11) >0 then
  20. if not HasQuest(Spawn, TowerOfThree) and not HasCompletedQuest(Spawn, TowerOfThree) and GetLevel(Spawn) >= 7 then
  21. FaceTarget(NPC, Spawn)
  22. PlayFlavor(NPC, "voiceover/english/algan_tinmizer/qey_village06/100_ebik_wobblecog_callout_f7e366da.mp3","Hello adventurer! Come hither! You must help reveal the truth about wonders in the Forest Ruins.", "wave", 3574249828,2561130909, Spawn)
  23. else
  24. PlayFlavor(NPC, "","", "ponder", 0, 0, Spawn)
  25. end
  26. end
  27. end
  28. function LeaveRange(NPC, Spawn)
  29. end
  30. function hailed(NPC, Spawn)
  31. if GetFactionAmount(Spawn,11) <0 then
  32. FaceTarget(NPC, Spawn)
  33. PlayFlavor(NPC, "","", "shakefist", 0, 0, Spawn)
  34. else
  35. FaceTarget(NPC, Spawn)
  36. Dialog.New(NPC, Spawn)
  37. Dialog.AddDialog("Greetings! Looking for a bashcogglinator or perhaps a metefozic thermogauge?")
  38. Dialog.AddVoiceover("voiceover/english/algan_tinmizer/qey_village06/ebikwobblecog000.mp3", 3320741899, 2828360998)
  39. if not HasQuest(Spawn, TowerOfThree) and not HasCompletedQuest(Spawn, TowerOfThree) and GetLevel(Spawn) >= 7 then
  40. Dialog.AddOption("No, no. Do you need something?", "TowerStart")
  41. end
  42. if HasQuest(Spawn, BagoParts) and not HasCompletedQuest(Spawn, BagoParts) then
  43. Dialog.AddOption("I found this bag of cogs and sprockets and I believe it belongs to you.", "PartsComplete")
  44. end
  45. if GetQuestStep (Spawn, TowerOfThree) == 2 then
  46. Dialog.AddOption("I found the Tower of the Three in the Forest Ruins. It has certainly seen better days.", "TowerFinish")
  47. end
  48. if GetRace(Spawn)==5 then
  49. Dialog.AddOption("Nothing I need. I will be going now.")
  50. end
  51. Dialog.AddOption("Wait, what? I don't want any part of this.")
  52. Dialog.Start()
  53. end
  54. end
  55. function PartsComplete(NPC, Spawn)
  56. SetStepComplete(Spawn, BagoParts, 1)
  57. FaceTarget(NPC, Spawn)
  58. Dialog.New(NPC, Spawn)
  59. Dialog.AddDialog("Oh my, it does indeed! I thought I'd lost those parts. You've saved me a great deal of trouble, friend. Let me compensate you for your keen eyes and good nature.")
  60. Dialog.AddVoiceover("voiceover/english/algan_tinmizer/qey_village06/ebikwobblecog004.mp3", 3506700669, 47329733)
  61. PlayFlavor(NPC,"","","boggle",0,0,Spawn)
  62. Dialog.AddOption("Thanks!")
  63. Dialog.Start()
  64. end
  65. function TowerStart(NPC, Spawn)
  66. FaceTarget(NPC, Spawn)
  67. Dialog.New(NPC, Spawn)
  68. Dialog.AddDialog("I see my superior intellect confuses you. Don't worry, it perplexes many people - tis' the curse of the Tinmizer name. However, I can use your help, for even simple minds contribute to the greatness of Qeynos.")
  69. Dialog.AddVoiceover("voiceover/english/algan_tinmizer/qey_village06/ebikwobblecog001.mp3", 1973122055, 1074636856)
  70. PlayFlavor(NPC,"","","orate",0,0,Spawn)
  71. Dialog.AddOption("If you have the work I have the time.", "TowerMission")
  72. Dialog.AddOption("I can't help you.")
  73. Dialog.Start()
  74. end
  75. function TowerMission(NPC, Spawn)
  76. FaceTarget(NPC, Spawn)
  77. Dialog.New(NPC, Spawn)
  78. Dialog.AddDialog("You must venture into the Forest Ruins. Tavern tales claim the remnants of the magi tower of the Order of Three exist there. You must reveal the truth of this mystery.")
  79. Dialog.AddVoiceover("voiceover/english/algan_tinmizer/qey_village06/ebikwobblecog002.mp3", 331751253, 2149638636)
  80. PlayFlavor(NPC,"","","nod",0,0,Spawn)
  81. Dialog.AddOption("I will find the mage tower ruins.", "QuestStart")
  82. Dialog.AddOption("Dig through some ruins? Sorry. You'll need to find someone else to wade through that rubish.")
  83. Dialog.Start()
  84. end
  85. function QuestStart (NPC, Spawn)
  86. FaceTarget(NPC, Spawn)
  87. OfferQuest(NPC, Spawn, TowerOfThree)
  88. end
  89. function TowerFinish(NPC, Spawn)
  90. FaceTarget(NPC, Spawn)
  91. Dialog.New(NPC, Spawn)
  92. Dialog.AddDialog("This is wonderful news! Someday, I must explore the ruins but not today. I thank you for your service, adventurer.")
  93. Dialog.AddVoiceover("voiceover/english/algan_tinmizer/qey_village06/ebikwobblecog003.mp3", 1222490153, 3050983577)
  94. PlayFlavor(NPC,"","","thanks",0,0,Spawn)
  95. Dialog.AddOption("No problem at all.")
  96. Dialog.Start()
  97. SetStepComplete(Spawn, TowerOfThree, 2)
  98. end