9
3

GeologistQuardifle.lua 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. --[[
  2. Script Name : SpawnScripts/Baubbleshire/GeologistQuardifle.lua
  3. Script Purpose : Geologist Quardifle
  4. Script Author : Scatman
  5. Script Date : 2009.09.27
  6. Script Notes : Speaks Gnomish/Updated 1/6/2020 by Shatou
  7. Script Notes : Updated Dialog Module. Re-attached Voiceovers. Created trigger for Gnomish Language Check. Applied level check. 2022.08.21 Dorbin
  8. --]]
  9. dofile("SpawnScripts/Generic/UnknownLanguage.lua") --added 2022.03.13 Dorbin
  10. --require "SpawnScripts/Generic/DialogModuleTest"
  11. require "SpawnScripts/Generic/DialogModule"
  12. local GATHERING_ROCK_SAMPLES_QUEST_ID = 504
  13. function spawn(NPC)
  14. ProvidesQuest(NPC, GATHERING_ROCK_SAMPLES_QUEST_ID)
  15. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  16. end
  17. function respawn(NPC)
  18. spawn(NPC)
  19. end
  20. function InRange(NPC, Spawn) --Provides Language Based Callout
  21. if GetFactionAmount(Spawn,11) >0 then
  22. if not HasLanguage(Spawn, 6) then
  23. Garbled(NPC,Spawn)
  24. else
  25. if not HasCompletedQuest (Spawn, GATHERING_ROCK_SAMPLES_QUEST_ID) and not HasQuest (Spawn, GATHERING_ROCK_SAMPLES_QUEST_ID) and HasLanguage(Spawn, 6) then
  26. if GetLevel(Spawn) <=7 then
  27. FaceTarget(NPC,Spawn)
  28. PlayFlavor(NPC, "voiceover/english/geologist_quardifle/qey_village06/100_geologist_quardifle_multhail1_6d457be1.mp3", "Sorry, friend. I don't think you'll find this discovery as intriguing as I. Please move on.", "no", 3683140255, 106567053, Spawn, 6)
  29. else
  30. choice = MakeRandomInt(1,3)
  31. if choice == 1 then
  32. FaceTarget(NPC,Spawn)
  33. PlayFlavor(NPC, "voiceover/english/geologist_quardifle/qey_village06/100_geologist_quardifle_callout_f774e0ee.mp3", "Hmm. Very interesting. What are these doing here? You, traveler, come... come look at look at these peculiar rocks.", "beckon", 2732164066, 2147939161, Spawn, 6)
  34. elseif choice ==2 then
  35. PlayFlavor(NPC, "voiceover/english/geologist_quardifle/qey_village06/100_geologist_quardifle_multhail2_3cc0c2f5.mp3", "These rocks are quite interesting ... I don't know where they came from. It's very strange ... they don't belong in this area. ", "", 3934406355, 941310685, Spawn, 6)
  36. elseif choice ==3 then
  37. PlayFlavor(NPC, "voiceover/english/geologist_quardifle/qey_village06/100_geologist_quardifle_quardifle_first_222b87f.mp3", "Hmm... quite strange really! Now what ARE these doing here?", "", 2991414207, 4164150895, Spawn, 6)
  38. end
  39. end
  40. end
  41. end
  42. end
  43. end
  44. function hailed(NPC, Spawn)
  45. if GetFactionAmount(Spawn,11) <0 then
  46. FaceTarget(NPC, Spawn)
  47. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  48. else
  49. if not HasLanguage(Spawn, 6) then -- Hailed Language Check
  50. Garbled(NPC,Spawn)
  51. else --Provides quest checks
  52. FaceTarget(NPC, Spawn)
  53. Dialog.New(NPC, Spawn)
  54. Dialog.AddDialog("These rocks here are interesting... I'm not sure where they came from. It's rather strange... they simply don't fit this area at all...")
  55. Dialog.AddVoiceover("voiceover/english/geologist_quardifle/qey_village06/geologistquardifle000.mp3", 1675886861, 3931018482)
  56. -- Dialog.AddLanguage(6)
  57. Dialog.AddOption("What's so fascinating about it? There are lots of strange phenomena in Antonica.", "dlg_0_1")
  58. Dialog.AddOptionRequirement(REQ_QUEST_DOESNT_HAVE_QUEST, GATHERING_ROCK_SAMPLES_QUEST_ID)
  59. Dialog.AddOptionRequirement(REQ_QUEST_NOT_HAS_COMPLETED_QUEST, GATHERING_ROCK_SAMPLES_QUEST_ID)
  60. Dialog.AddOptionRequirement(REQ_LEVEL_GREATER_OR_EQUAL, 8)
  61. Dialog.AddOption("I'm back with those samples.", "dlg_1_1")
  62. Dialog.AddOptionRequirement(REQ_QUEST_ON_STEP, GATHERING_ROCK_SAMPLES_QUEST_ID , 4)
  63. Dialog.AddOption("Have fun with your rocks, I'm not interested. ")
  64. Dialog.Start()
  65. end
  66. end
  67. end
  68. --[[ Gathering Rock Samples QUEST (504) ]]--
  69. function dlg_0_1(NPC, Spawn)
  70. FaceTarget(NPC, Spawn)
  71. Dialog.New(NPC, Spawn)
  72. Dialog.AddDialog("The geography of the area isn't suitable for forming this kind of rock. I'm merely curious I suppose, but understanding the world we live in often unseats presumptions we have about our existence.")
  73. Dialog.AddVoiceover("voiceover/english/geologist_quardifle/qey_village06/geologistquardifle001.mp3", 672549863, 278365007)
  74. -- Dialog.AddLanguage(6)
  75. Dialog.AddOption("Hmm, you know, that's an interesting theory.", "Dialog3")
  76. Dialog.AddOption("I'm not sure I buy that. ")
  77. Dialog.Start()
  78. end
  79. function Dialog3(NPC, Spawn)
  80. FaceTarget(NPC, Spawn)
  81. Dialog.New(NPC, Spawn)
  82. Dialog.AddDialog("I'll tell you what. If you want to learn more, and help me out at the same time, I can give you something to do that might whet your appetite for more - what do you say to that?")
  83. Dialog.AddVoiceover("voiceover/english/geologist_quardifle/qey_village06/geologistquardifle002.mp3", 2616095419, 3348208994)
  84. -- Dialog.AddLanguage(6)
  85. Dialog.AddOption("Sure, that sounds good.", "dlg_0_3")
  86. Dialog.AddOption("No thanks.")
  87. Dialog.Start()
  88. end
  89. function dlg_0_3(NPC, Spawn)
  90. FaceTarget(NPC, Spawn)
  91. OfferQuest(NPC, Spawn, GATHERING_ROCK_SAMPLES_QUEST_ID)
  92. end
  93. function dlg_1_1(NPC, Spawn)
  94. SetStepComplete(Spawn, GATHERING_ROCK_SAMPLES_QUEST_ID, 4)
  95. FaceTarget(NPC, Spawn)
  96. Dialog.New(NPC, Spawn)
  97. Dialog.AddDialog("Oooo, pass them here! These samples are remarkable! These will occupy my time for quite a while! Really, you're a natural! If you find more unique rocks on your journey, return them to me and I'll reimburse you. Here, take this coin for your first discovery!")
  98. Dialog.AddVoiceover("voiceover/english/geologist_quardifle/qey_village06/geologistquardifle004.mp3", 4074675847, 2418120893)
  99. -- Dialog.AddLanguage(6)
  100. Dialog.AddOption("Thanks Quardifle!")
  101. Dialog.Start()
  102. end
  103. --[[ QUEST END ]]--