GeologistQuardifle.lua 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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 : Re-attached Voiceovers. Created trigger for Gnomish Language Check. Applied level check.
  8. --]]
  9. dofile("SpawnScripts/Generic/UnknownLanguage.lua") --added 2022.03.13 Dorbin
  10. local GATHERING_ROCK_SAMPLES_QUEST_ID = 504
  11. function spawn(NPC)
  12. ProvidesQuest(NPC, GATHERING_ROCK_SAMPLES_QUEST_ID)
  13. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  14. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function InRange(NPC, Spawn) --Provides Language Based Callout with delay
  19. if not HasLanguage(Spawn, 6) then
  20. Garbled(NPC,Spawn)
  21. --[[ local choice = math.random(1,2)
  22. if choice == 1 then
  23. PlayFlavor(NPC, "voiceover/english/gnome/ft/gnome/gnome_eco_garble_garbled_gm_cd85a24f.mp3", "hail hail the gnomes are here", "", 2230728991, 3389119515, Spawn, 6)
  24. elseif choice == 2 then
  25. PlayFlavor(NPC, "voiceover/english/gnome/ft/gnome/gnome_eco_garble_garbled_gm_cd85a24f.mp3", "Words to not translate in language", "", 2230728991, 3389119515, Spawn, 6)
  26. end]]--
  27. elseif
  28. not HasCompletedQuest (Spawn, GATHERING_ROCK_SAMPLES_QUEST_ID) and not HasQuest (Spawn, GATHERING_ROCK_SAMPLES_QUEST_ID) and HasLanguage(Spawn, 6) then
  29. FaceTarget(NPC,Spawn)
  30. PlayFlavor(NPC, "", "Hmm. Very interesting. What are these doing here? You, traveler, come... come look at look at these peculiar rocks. ", "beckon", 0, 0, Spawn, 8)
  31. AddTimer(NPC, 2000, "PlayFlavor", Spawn)
  32. end
  33. end
  34. function hailed(NPC, Spawn)
  35. FaceTarget(NPC, Spawn)
  36. conversation = CreateConversation()
  37. if not HasLanguage(Spawn, 6) then -- Hailed Language Check
  38. Garbled(NPC,Spawn)
  39. --[[ local choice = math.random(1,2)
  40. if choice == 1 then
  41. PlayFlavor(NPC, "voiceover/english/gnome/ft/gnome/gnome_eco_garble_garbled_gm_cd85a24f.mp3", "garbled text not to be translated", "", 2230728991, 3389119515, Spawn, 6)
  42. elseif choice == 2 then
  43. PlayFlavor(NPC, "voiceover/english/gnome/ft/gnome/gnome_eco_garble_garbled_gm_cd85a24f.mp3", "text to not translate language", "", 2230728991, 3389119515, Spawn, 6)
  44. end
  45. --]]
  46. else --Provides quest checks
  47. if HasQuest(Spawn, GATHERING_ROCK_SAMPLES_QUEST_ID) and GetQuestStep(Spawn, GATHERING_ROCK_SAMPLES_QUEST_ID) == 4 then
  48. AddConversationOption(conversation, "I'm back with those samples.", "dlg_1_1")
  49. elseif not HasQuest(Spawn, GATHERING_ROCK_SAMPLES_QUEST_ID) and GetLevel(Spawn) >=8 then
  50. AddConversationOption(conversation, "What's so fascinating about it? There are lots of strange phenomena in Antonica.", "dlg_0_1")
  51. end
  52. if not HasQuest(Spawn, GATHERING_ROCK_SAMPLES_QUEST_ID) and GetLevel(Spawn) < 8 then
  53. NotInteresting(NPC,Spawn)
  54. else
  55. PlayFlavor(NPC, "voiceover/english/geologist_quardifle/qey_village06/geologistquardifle000.mp3", "", "", 1675886861, 3931018482, Spawn)
  56. AddConversationOption(conversation, "Have fun with your rocks, I'm not interested.")
  57. StartConversation(conversation, NPC, Spawn, "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...")
  58. end
  59. end
  60. end
  61. function NotInteresting(NPC,Spawn) -- Low level check
  62. PlayFlavor(NPC, "", "Sorry, friend. I don't think you'll find this discovery as intriguing as I. Please move along","no" ,0 ,0, Spawn, 6)
  63. end
  64. --[[ Gathering Rock Samples QUEST (504) ]]--
  65. function dlg_0_1(NPC, Spawn)
  66. FaceTarget(NPC, Spawn)
  67. conversation = CreateConversation()
  68. AddConversationOption(conversation, "Hmm, you know, that's an interesting theory.", "dlg_0_2")
  69. AddConversationOption(conversation, "I'm not sure I buy that.")
  70. StartConversation(conversation, NPC, Spawn, "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.")
  71. PlayFlavor(NPC, "voiceover/english/geologist_quardifle/qey_village06/geologistquardifle001.mp3", "", "", 672549863, 278365007, Spawn)
  72. end
  73. function dlg_0_2(NPC, Spawn)
  74. FaceTarget(NPC, Spawn)
  75. conversation = CreateConversation()
  76. PlayFlavor(NPC, "voiceover/english/geologist_quardifle/qey_village06/geologistquardifle002.mp3", "", "ponder", 2616095419, 3348208994, Spawn)
  77. AddConversationOption(conversation, "Sure, that sounds good.", "dlg_0_3")
  78. AddConversationOption(conversation, "No, thanks.")
  79. StartConversation(conversation, NPC, Spawn, "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?")
  80. end
  81. function dlg_0_3(NPC, Spawn)
  82. FaceTarget(NPC, Spawn)
  83. conversation = CreateConversation()
  84. OfferQuest(NPC, Spawn, GATHERING_ROCK_SAMPLES_QUEST_ID)
  85. end
  86. function dlg_1_1(NPC, Spawn)
  87. FaceTarget(NPC, Spawn)
  88. conversation = CreateConversation()
  89. SetStepComplete(Spawn, GATHERING_ROCK_SAMPLES_QUEST_ID, 4)
  90. PlayFlavor(NPC, "voiceover/english/geologist_quardifle/qey_village06/geologistquardifle004.mp3", "", "thank", 4074675847, 2418120893, Spawn)
  91. AddConversationOption(conversation, "Thanks Quardifle!")
  92. StartConversation(conversation, NPC, Spawn, "Oooo, pass them here! 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!")
  93. end
  94. --[[ QUEST END ]]--