9
3

UmliGrayfist.lua 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. --[[
  2. Script Name : SpawnScripts/QeynosHarbor/UmliGrayfist.lua
  3. Script Purpose : Umli Grayfist <Bartender>
  4. Script Author : Dorbin
  5. Script Date : 2022.05.20
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. local fish = 5535
  9. local fishy = 5564
  10. require "SpawnScripts/Generic/DialogModule"
  11. function spawn(NPC)
  12. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function InRange(NPC, Spawn)
  18. end
  19. function LeaveRange(NPC, Spawn)
  20. end
  21. function Dialog1(NPC, Spawn)
  22. FaceTarget(NPC, Spawn)
  23. Dialog.New(NPC, Spawn)
  24. PlayFlavor(NPC, "", "", "beckon", 0, 0, Spawn)
  25. Dialog.AddDialog("Have I got a bargain for you! Come now, step up, I don't bite. Check my goods and see if we can't make a whale of a deal! Ha ha ha ha ...Whale of a deal, get it?")
  26. Dialog.AddVoiceover("voiceover/english/merchant_umli_grayfist/qey_harbor/umligrayfist.mp3", 3286861103, 2387698452)
  27. if GetQuestStep(Spawn,fish)==1 then
  28. Dialog.AddOption("I'd say the deal's already been struck, Gretta sent me to fetch her order.", "Dialog2")
  29. end
  30. if not QuestStepIsComplete(Spawn,fishy,3)and HasQuest(Spawn,fishy) then
  31. Dialog.AddOption("Innkeeper Galsway is interested in the best price you can offer on your fish.","FishQuestion")
  32. end
  33. Dialog.AddOption("Thank you but I'm not interested right this second, perhaps some other time.")
  34. Dialog.Start()
  35. end
  36. function hailed(NPC, Spawn)
  37. if GetFactionAmount(Spawn,11) <0 then
  38. choice = math.random(1,2)
  39. if choice == 1 then
  40. PlayFlavor(NPC, "", "", "shakefist", 2088886924, 3736631596, Spawn)
  41. elseif choice == 2 then
  42. PlayFlavor(NPC, "", "", "heckno", 1584866727, 581589457, Spawn)
  43. end
  44. else
  45. Dialog1(NPC, Spawn)
  46. end
  47. end
  48. function Dialog2(NPC, Spawn)
  49. FaceTarget(NPC, Spawn)
  50. Dialog.New(NPC, Spawn)
  51. Dialog.AddDialog("Oh, Gretta, she's a feisty little lass! Did you see her nose? And those eye brows! Yow! Some day she and I will have some mighty fine lookin' little dwarves, but don't go telling her I said so! I'll just put it on her account. There. And here's her fish.")
  52. Dialog.AddVoiceover("voiceover/english/merchant_umli_grayfist/qey_harbor/umligrayfist000.mp3", 4224571781, 125811953)
  53. Dialog.AddOption("I'll make sure she hears about your plans... by the way, she says you're uglier than a female troll. I guess that's how dwarves flirt.","Chuckle")
  54. Dialog.AddOption("Ugh! These smell horrible! If this is the freshest you've got, then I'll be avoiding Irontoes tonight for sure!","Chuckle")
  55. Dialog.Start()
  56. end
  57. function Chuckle(NPC,Spawn)
  58. PlayFlavor(NPC, "", "", "chuckle", 0, 0, Spawn)
  59. FaceTarget(NPC, Spawn)
  60. SetStepComplete(Spawn,fish, 1)
  61. end
  62. function FishQuestion(NPC, Spawn)
  63. FaceTarget(NPC, Spawn)
  64. Dialog.New(NPC, Spawn)
  65. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  66. Dialog.AddDialog("My best price, eh? So the old grubber is shopping for a deal. Hmm, he does run a big place... and I really need to sell this stock! Okay, you tell Galsway I'll give him a five percent break- but the deal's off if he tells anyone how generous I am!")
  67. Dialog.AddVoiceover("voiceover/english/merchant_umli_grayfist/qey_harbor/umligrayfist001.mp3", 4032126743, 224777324)
  68. Dialog.AddOption("Fair enough. I'll let him know about your offer. Thanks!", "ThankYou")
  69. Dialog.Start()
  70. end
  71. function ThankYou(NPC,Spawn)
  72. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  73. FaceTarget(NPC, Spawn)
  74. SetStepComplete(Spawn,fishy, 3)
  75. end