ErwinRohand.lua 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. --[[
  2. Script Name : SpawnScripts/QeynosHarbor/ErwinRohand.lua
  3. Script Purpose : Erwin Rohand
  4. Script Author : Dorbin
  5. Script Date : 2022.05.24
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. local Hides = 5563
  9. require "SpawnScripts/Generic/DialogModule"
  10. function spawn(NPC)
  11. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  12. ProvidesQuest(NPC,Hides)
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function hailed(NPC, Spawn)
  18. if GetFactionAmount(Spawn,11) <0 then
  19. choice = math.random(1,2)
  20. if choice == 1 then
  21. PlayFlavor(NPC, "", "", "shakefist", 2088886924, 3736631596, Spawn)
  22. elseif choice == 2 then
  23. PlayFlavor(NPC, "", "", "heckno", 1584866727, 581589457, Spawn)
  24. end
  25. else
  26. Dialog1(NPC, Spawn)
  27. end
  28. end
  29. function Dialog1(NPC, Spawn)
  30. FaceTarget(NPC, Spawn)
  31. Dialog.New(NPC, Spawn)
  32. PlayFlavor(NPC,"voiceover/english/merchant_erwin_rohand/qey_harbor/erwinrohand000.mp3","","agree",1877055695,2851553270,Spawn)
  33. Dialog.AddDialog("She's still out there, I can feel it. When I have enough money, I am heading out to sea to find my one true love. Won't you help me, friend? Just a small purchase?")
  34. if not HasQuest(Spawn,Hides) and not HasCompletedQuest(Spawn, Hides) then
  35. Dialog.AddOption("I am not really in the market for anything. Is there any other way I can help?", "Dialog3")
  36. end
  37. if GetQuestStep(Spawn,Hides)==2 then
  38. Dialog.AddOption("Here are five sleek hides, like you requested.","Delivered")
  39. end
  40. Dialog.AddOption("Maybe I will have a look at what you have for sale. ")
  41. Dialog.Start()
  42. end
  43. function Dialog3(NPC, Spawn)
  44. FaceTarget(NPC, Spawn)
  45. Dialog.New(NPC, Spawn)
  46. PlayFlavor(NPC,"voiceover/english/merchant_erwin_rohand/qey_harbor/erwinrohand001.mp3","","nod",67809503,3551257220,Spawn)
  47. Dialog.AddDialog("Sailors are always looking for ways to keep warm on the high seas. Wolf hides offer warmth and protection from the bone chilling waters. If you could bring me some sleek hides, the money I make selling them, will bring me closer to finding my love.")
  48. Dialog.AddOption("Then I'll be back with some sleek wolf hide in no time at all.", "Dialog4")
  49. Dialog.AddOption("I'm sorry, but I don't plan on hunting wolves anytime soon.")
  50. Dialog.Start()
  51. end
  52. function Dialog4(NPC, Spawn)
  53. FaceTarget(NPC, Spawn)
  54. Dialog.New(NPC, Spawn)
  55. OfferQuest(NPC,Spawn,Hides)
  56. PlayFlavor(NPC,"","","thanks",0,0,Spawn)
  57. Dialog.AddDialog("Thank you!")
  58. Dialog.AddOption("You're welcome.")
  59. Dialog.Start()
  60. end
  61. function Delivered(NPC, Spawn)
  62. FaceTarget(NPC, Spawn)
  63. Dialog.New(NPC, Spawn)
  64. PlayFlavor(NPC,"voiceover/english/merchant_erwin_rohand/qey_harbor/erwinrohand002.mp3","","thanks",1144088499,3368325355,Spawn)
  65. Dialog.AddDialog("Your kindness is appreciated. These wolf hides are premium wares and will fetch a handsome price!")
  66. Dialog.AddOption("Glad I could help. Hopefully they get you closer to your voyage.","FinishQuest")
  67. Dialog.Start()
  68. end
  69. function FinishQuest(NPC, Spawn)
  70. FaceTarget(NPC, Spawn)
  71. SetStepComplete(Spawn,Hides, 2)
  72. end