9
3

Ubani.lua 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. --[[
  2. Script Name : SpawnScripts/GraystoneYard/Ubani.lua
  3. Script Purpose : Ubani
  4. Script Author : Dorbin
  5. Script Date : 2022.03.11
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. local Docks = 5507
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 8, "InRange", "LeaveRange")
  11. ProvidesQuest(NPC, Docks)
  12. end
  13. function InRange(NPC, Spawn) --Quest Callout
  14. if not HasCompletedQuest (Spawn, Docks) and not HasQuest (Spawn, Docks) --[[and GetLevel(Spawn) >=7--]] then
  15. if math.random(1, 100) <= 75 then
  16. choice = math.random(1,3)
  17. if choice ==1 then
  18. PlayFlavor(NPC, "voiceover/english/ubani/qey_village03/100_fisherman_kerra_ubani_callout_75e9ec82.mp3", "Bah! No fish! Where are all the fish? I could use some help finding a better fishing hole.", "", 1389707945, 2897524003, Spawn)
  19. elseif choice ==2 then
  20. PlayFlavor(NPC, "voiceover/english/ubani/qey_village03/100_fisherman_kerra_ubani_multhail3_d0b13e81.mp3", "Purrrfect. I loath the water, but love the fish it brings me.", "", 60679636, 1604621301, Spawn)
  21. else
  22. PlayFlavor(NPC, "voiceover/english/ubani/qey_village03/100_fisherman_kerra_ubani_multhail4_e9f331a1.mp3", "You haven't gone through the catacombs... Hmm - not afraid, are you?", "", 3782262604, 1552106400, Spawn)
  23. end
  24. end
  25. end
  26. end
  27. function respawn(NPC)
  28. spawn(NPC)
  29. end
  30. function hailed(NPC, Spawn)
  31. FaceTarget(NPC, Spawn)
  32. conversation = CreateConversation()
  33. PlayFlavor(NPC, "voiceover/english/ubani/qey_village03/ubani.mp3", "", "", 974049381, 1397003220, Spawn)
  34. if not HasQuest(Spawn, Docks) and not HasCompletedQuest(Spawn, Docks) --[[ and GetLevel (Spawn) >=7--]] then
  35. AddConversationOption(conversation, "Could it be the location?", "Location")
  36. end
  37. if GetQuestStep (Spawn, Docks) == 2 then
  38. AddConversationOption(conversation, "The Qeynos Harbor has many spots to fish along the pier.", "Delivered")
  39. end
  40. AddConversationOption(conversation, "You could be scaring them off. Goodbye.")
  41. StartConversation(conversation, NPC, Spawn, "Nettleville has no fish, so I come here... but I've been fishing here all day with no luck! I wonder why that is?")
  42. end
  43. function Location(NPC, Spawn)
  44. conversation = CreateConversation()
  45. FaceTarget(NPC, Spawn)
  46. PlayFlavor(NPC, "voiceover/english/ubani/qey_village03/ubani000.mp3", "", "no", 361667373, 281110115, Spawn)
  47. AddConversationOption(conversation, "What do you need?", "Favor")
  48. AddConversationOption(conversation, "I don't have time. Sorry.")
  49. StartConversation(conversation, NPC, Spawn, "No, it can't be the location. Brice catches fish here with his beatup pole. Perhaps you're right, though. Ahh. I have the perrrfect idea. Would you do me a favor?")
  50. end
  51. function Favor(NPC, Spawn)
  52. conversation = CreateConversation()
  53. FaceTarget(NPC, Spawn)
  54. PlayFlavor(NPC, "voiceover/english/ubani/qey_village03/ubani001.mp3", "", "agree", 2821619396, 975737342, Spawn)
  55. AddConversationOption(conversation, "I'll go check it out for you.", "QuestBegin")
  56. AddConversationOption(conversation, "You'll have to slink over yourself.")
  57. StartConversation(conversation, NPC, Spawn, "Good. I hate the catacombs, but for me its the only way into the city. Go check the pier over at the harbor and see if the fishing is better there than at this lousy fishing hole?")
  58. end
  59. function QuestBegin (NPC, Spawn)
  60. FaceTarget(NPC, Spawn)
  61. OfferQuest(NPC, Spawn, Docks)
  62. end
  63. function Delivered(NPC, Spawn)
  64. conversation = CreateConversation()
  65. PlayFlavor(NPC, "voiceover/english/ubani/qey_village03/ubani002.mp3", "", "thank", 2566293217, 2582627261, Spawn)
  66. AddConversationOption(conversation, "Glad I could help.", "Reward")
  67. StartConversation(conversation, NPC, Spawn, "Hmmm... purrrfect! It will be a prosperous fishing day, provided the guards don't catch me. But, the riskier the road the greater the profit. I may loath the water but certainly I love the fish it brings me. Take this coin. Consider it a finders fee. I'll be off as soon as I gather my supplies.")
  68. end
  69. function Reward(NPC, Spawn)
  70. SetStepComplete(Spawn, Docks, 2)
  71. end