BarkerGordon.lua 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/BarkerGordon.lua
  3. Script Purpose : Barker Gordon
  4. Script Author : theFoof
  5. Script Date : 2013.09.02
  6. Script Notes :
  7. --]]
  8. local HamBeans = 89
  9. function spawn(NPC)
  10. ProvidesQuest(NPC, HamBeans)
  11. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. end
  15. function hailed(NPC, Spawn)
  16. FaceTarget(NPC, Spawn)
  17. conversation = CreateConversation()
  18. if not HasCompletedQuest(Spawn, HamBeans) and not HasQuest(Spawn, HamBeans) then
  19. PlayFlavor(NPC, "barker_gordon/halas/new_halas/barker_gordon/barker_gordon_001.mp3", "", "", 1186893886, 14843439, Spawn)
  20. AddConversationOption(conversation, "Hello Barker, I'm " .. GetName(Spawn) .. ".", "Quest1Chat_1")
  21. StartConversation(conversation, NPC, Spawn, "Good day to you, stranger! I am Barker Gordon, a native of New Halas.")
  22. elseif GetQuestStep(Spawn, HamBeans) == 1 or GetQuestStep(Spawn, HamBeans) == 2 then
  23. AddConversationOption(conversation, "No, not yet. Where can I find the ingredients again?", "Quest1Chat_6")
  24. StartConversation(conversation, NPC, Spawn, "Have you done the feed and killed Bentor and picked up my order of beans?")
  25. elseif GetQuestStep(Spawn, HamBeans) == 3 then
  26. AddConversationOption(conversation, "I have. Here is the ham and beans.", "Quest1Chat_7")
  27. StartConversation(conversation, NPC, Spawn, "Have you done the feed and killed Bentor and picked up my order of beans?")
  28. elseif GetQuestStep(Spawn, HamBeans) == 4 then
  29. PlayFlavor(NPC, "", "Now try a piece of my ham and beans, it's very good!", "beckon", 0, 0, Spawn)
  30. else
  31. PlayFlavor(NPC, "", "Thanks again for your help!", "thanks", 0, 0, Spawn)
  32. end
  33. end
  34. function Quest1Chat_1(NPC, Spawn)
  35. FaceTarget(NPC, Spawn)
  36. conversation = CreateConversation()
  37. PlayFlavor(NPC, "barker_gordon/halas/new_halas/barker_gordon/barker_gordon_003.mp3", "", "", 1426385889, 3817885268, Spawn)
  38. AddConversationOption(conversation, "What kind of work?", "Quest1Chat_2")
  39. StartConversation(conversation, NPC, Spawn, "Could I interest you in some work?")
  40. end
  41. function Quest1Chat_2(NPC, Spawn)
  42. FaceTarget(NPC, Spawn)
  43. conversation = CreateConversation()
  44. PlayFlavor(NPC, "barker_gordon/halas/new_halas/barker_gordon/barker_gordon_004.mp3", "", "", 3604382854, 1944496280, Spawn)
  45. AddConversationOption(conversation, "So what's the problem?", "Quest1Chat_3")
  46. StartConversation(conversation, NPC, Spawn, "I've been asked to make my recipe for ham and halasian beans for the New Halas City Festival. We want to impress all of our visitors!")
  47. end
  48. function Quest1Chat_3(NPC, Spawn)
  49. FaceTarget(NPC, Spawn)
  50. conversation = CreateConversation()
  51. PlayFlavor(NPC, "barker_gordon/halas/new_halas/barker_gordon/barker_gordon_005.mp3", "", "", 2169381971, 1634343888, Spawn)
  52. AddConversationOption(conversation, "So you want me to slaughter your pet pig?", "Quest1Chat_4")
  53. StartConversation(conversation, NPC, Spawn, "I've been raising a pig just for this occasion. I would normally slaughter him myself, but this time I've become too attached to him. I fear that I would not have the strength to see a clean cut through.")
  54. end
  55. function Quest1Chat_4(NPC, Spawn)
  56. FaceTarget(NPC, Spawn)
  57. conversation = CreateConversation()
  58. PlayFlavor(NPC, "barker_gordon/halas/new_halas/barker_gordon/barker_gordon_006.mp3", "", "", 1408333344, 155634991, Spawn)
  59. AddConversationOption(conversation, "Well, if it will help New Halas impress the rest of Norrath, I'll do it.", "Quest1Chat_5")
  60. AddConversationOption(conversation, "I'm not slaughtering your pig for you.")
  61. StartConversation(conversation, NPC, Spawn, "I knew ye would understand! I should have listened to others and not named him.")
  62. end
  63. function Quest1Chat_5(NPC, Spawn)
  64. FaceTarget(NPC, Spawn)
  65. conversation = CreateConversation()
  66. PlayFlavor(NPC, "barker_gordon/halas/new_halas/barker_gordon/barker_gordon_007.mp3", "", "", 4093429519, 442079211, Spawn)
  67. AddConversationOption(conversation, "You're right. You shouldn't have named him.", "OfferHamBeans")
  68. StartConversation(conversation, NPC, Spawn, "I promise that it will be worth it! My pig's name is Bentor the Mighty. Bentor is in the pen next to the mender's workshop, The Stone Hammer, up in New Halas proper.")
  69. end
  70. function Quest1Chat_6(NPC, Spawn)
  71. FaceTarget(NPC, Spawn)
  72. conversation = CreateConversation()
  73. AddConversationOption(conversation, "Thanks Barker. I'll return with the ingredients.")
  74. StartConversation(conversation, NPC, Spawn, "The halasian beans at the shaman hut called Pilgrims' Hearth in southwest New Halas. Bentor the Mighty is in the pen next to the mender's workshop, The Stone Hammer, in New Halas.")
  75. end
  76. function Quest1Chat_7(NPC, Spawn)
  77. FaceTarget(NPC, Spawn)
  78. conversation = CreateConversation()
  79. AddConversationOption(conversation, "Are you going to be okay?", "Quest1Chat_8")
  80. StartConversation(conversation, NPC, Spawn, "Oh, my Bentor! What a good pig you were!")
  81. end
  82. function Quest1Chat_8(NPC, Spawn)
  83. FaceTarget(NPC, Spawn)
  84. conversation = CreateConversation()
  85. AddConversationOption(conversation, "Well, okay then.", "Quest1Chat_9")
  86. StartConversation(conversation, NPC, Spawn, "I'll be fine. This is the way of things, I know better than to get attached to them. It's just me old age.")
  87. end
  88. function Quest1Chat_9(NPC, Spawn)
  89. FaceTarget(NPC, Spawn)
  90. conversation = CreateConversation()
  91. AddConversationOption(conversation, "I must admit it smells good.", "Quest1Chat_10")
  92. StartConversation(conversation, NPC, Spawn, "Here, I'll get right to work prepping the beans and cooking the ham. Just sit right there, it'll be done soon enough.")
  93. end
  94. function Quest1Chat_10(NPC, Spawn)
  95. AddSpawnAccess(GetSpawn(NPC, 4701844), Spawn)
  96. SetStepComplete(Spawn, HamBeans, 3)
  97. FaceTarget(NPC, Spawn)
  98. conversation = CreateConversation()
  99. AddConversationOption(conversation, "Okay, I'll grab myself of a slice of ham with some beans.")
  100. StartConversation(conversation, NPC, Spawn, "Done! Barker's ham and beans! Go ahead, try a slice. I've salted the rest of the meat so that I can use it for the City Festival.")
  101. end
  102. function OfferHamBeans(NPC, Spawn)
  103. OfferQuest(NPC, Spawn, HamBeans)
  104. end