9
3

GeologistQuardifle.lua 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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. local GATHERING_ROCK_SAMPLES_QUEST_ID = 504
  12. function spawn(NPC)
  13. ProvidesQuest(NPC, GATHERING_ROCK_SAMPLES_QUEST_ID)
  14. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  15. end
  16. function respawn(NPC)
  17. spawn(NPC)
  18. end
  19. function InRange(NPC, Spawn) --Provides Language Based Callout
  20. if GetFactionAmount(Spawn,11) >0 then
  21. if not HasLanguage(Spawn, 6) then
  22. Garbled(NPC,Spawn)
  23. else
  24. if not HasCompletedQuest (Spawn, GATHERING_ROCK_SAMPLES_QUEST_ID) and not HasQuest (Spawn, GATHERING_ROCK_SAMPLES_QUEST_ID) and HasLanguage(Spawn, 6) then
  25. if GetLevel(Spawn) <=7 then
  26. FaceTarget(NPC,Spawn)
  27. 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)
  28. else
  29. choice = MakeRandomInt(1,3)
  30. if choice == 1 then
  31. FaceTarget(NPC,Spawn)
  32. 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)
  33. elseif choice ==2 then
  34. 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)
  35. elseif choice ==3 then
  36. 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)
  37. end
  38. end
  39. end
  40. end
  41. end
  42. end
  43. function hailed(NPC, Spawn)
  44. if GetFactionAmount(Spawn,11) <0 then
  45. FaceTarget(NPC, Spawn)
  46. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  47. else
  48. if not HasLanguage(Spawn, 6) then -- Hailed Language Check
  49. Garbled(NPC,Spawn)
  50. else --Provides quest checks
  51. FaceTarget(NPC, Spawn)
  52. Dialog.New(NPC, Spawn)
  53. 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...")
  54. Dialog.AddVoiceover("voiceover/english/geologist_quardifle/qey_village06/geologistquardifle000.mp3", 1675886861, 3931018482)
  55. -- Dialog.AddLanguage(6)
  56. Dialog.AddOption("What's so fascinating about it? There are lots of strange phenomena in Antonica.", "dlg_0_1")
  57. Dialog.AddOptionRequirement(REQ_QUEST_DOESNT_HAVE_QUEST, GATHERING_ROCK_SAMPLES_QUEST_ID)
  58. Dialog.AddOptionRequirement(REQ_QUEST_NOT_HAS_COMPLETED_QUEST, GATHERING_ROCK_SAMPLES_QUEST_ID)
  59. Dialog.AddOptionRequirement(REQ_LEVEL_GREATER_OR_EQUAL, 8)
  60. Dialog.AddOption("I'm back with those samples.", "dlg_1_1")
  61. Dialog.AddOptionRequirement(REQ_QUEST_ON_STEP, GATHERING_ROCK_SAMPLES_QUEST_ID , 4)
  62. Dialog.AddOption("Have fun with your rocks, I'm not interested. ")
  63. Dialog.Start()
  64. end
  65. end
  66. end
  67. --[[ Gathering Rock Samples QUEST (504) ]]--
  68. function dlg_0_1(NPC, Spawn)
  69. FaceTarget(NPC, Spawn)
  70. Dialog.New(NPC, Spawn)
  71. 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.")
  72. Dialog.AddVoiceover("voiceover/english/geologist_quardifle/qey_village06/geologistquardifle001.mp3", 672549863, 278365007)
  73. -- Dialog.AddLanguage(6)
  74. Dialog.AddOption("Hmm, you know, that's an interesting theory.", "Dialog3")
  75. Dialog.AddOption("I'm not sure I buy that. ")
  76. Dialog.Start()
  77. end
  78. function Dialog3(NPC, Spawn)
  79. FaceTarget(NPC, Spawn)
  80. Dialog.New(NPC, Spawn)
  81. 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?")
  82. Dialog.AddVoiceover("voiceover/english/geologist_quardifle/qey_village06/geologistquardifle002.mp3", 2616095419, 3348208994)
  83. -- Dialog.AddLanguage(6)
  84. Dialog.AddOption("Sure, that sounds good.", "dlg_0_3")
  85. Dialog.AddOption("No thanks.")
  86. Dialog.Start()
  87. end
  88. function dlg_0_3(NPC, Spawn)
  89. FaceTarget(NPC, Spawn)
  90. OfferQuest(NPC, Spawn, GATHERING_ROCK_SAMPLES_QUEST_ID)
  91. end
  92. function dlg_1_1(NPC, Spawn)
  93. SetStepComplete(Spawn, GATHERING_ROCK_SAMPLES_QUEST_ID, 4)
  94. FaceTarget(NPC, Spawn)
  95. Dialog.New(NPC, Spawn)
  96. 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!")
  97. Dialog.AddVoiceover("voiceover/english/geologist_quardifle/qey_village06/geologistquardifle004.mp3", 4074675847, 2418120893)
  98. -- Dialog.AddLanguage(6)
  99. Dialog.AddOption("Thanks Quardifle!")
  100. Dialog.Start()
  101. end
  102. --[[ QUEST END ]]--