WreganFirebeard.lua 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/WreganFirebeard.lua
  3. Script Purpose : Wregan Firebeard
  4. Script Author : theFoof
  5. Script Date : 2013.05.14
  6. Script Notes :
  7. --]]
  8. local RideGwenevyn = 8
  9. local BeetsAlternative = 13
  10. local SiftingGarbage = 14
  11. function spawn(NPC)
  12. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  13. SetPlayerProximityFunction(NPC, 50, "SpawnAccess", "SpawnAccess")
  14. ProvidesQuest(NPC, BeetsAlternative)
  15. AddSpawnAccess(NPC, NPC)
  16. end
  17. function respawn(NPC)
  18. spawn(NPC)
  19. end
  20. function InRange(NPC, Spawn)
  21. end
  22. function LeaveRange(NPC, Spawn)
  23. end
  24. function SpawnAccess(NPC, Spawn)
  25. if HasCompletedQuest(Spawn, BeetsAlternative) or GetQuestStep(Spawn, BeetsAlternative) == 3 then
  26. if HasCompletedQuest(Spawn, SiftingGarbage) == false and GetQuestStep(Spawn, SiftingGarbage) ~= 2 then
  27. AddSpawnAccess(GetSpawn(NPC, 4701834), Spawn)
  28. end
  29. else
  30. AddSpawnAccess(NPC, Spawn)
  31. end
  32. end
  33. function hailed(NPC, Spawn)
  34. FaceTarget(NPC, Spawn)
  35. conversation = CreateConversation()
  36. if HasQuest(Spawn, BeetsAlternative) == false and HasCompletedQuest(Spawn, BeetsAlternative) == false then
  37. Quest1Chat_1(NPC, Spawn)
  38. elseif GetQuestStep(Spawn, RideGwenevyn) == 1 then
  39. Quest1Chat_1(NPC, Spawn)
  40. elseif GetQuestStep(Spawn, BeetsAlternative) == 1 then
  41. PlayFlavor(NPC, "", "As soon as you get those tundra beets we'll be able to embark on our journey.", "tapfoot", 1689589577, 4560189, Spawn)
  42. end
  43. end
  44. function Quest1Chat_1(NPC, Spawn)
  45. if GetQuestStep(Spawn, RideGwenevyn) == 1 then
  46. SetStepComplete(Spawn, RideGwenevyn, 1)
  47. end
  48. FaceTarget(NPC, Spawn)
  49. conversation = CreateConversation()
  50. PlayFlavor(NPC, "wregan_firebeard/halas/gwenevyns_cove/wregan_firebeard_001.mp3", "", "", 1553579040, 3434703804, Spawn)
  51. AddConversationOption(conversation, "Yes.", "Quest1Chat_2")
  52. AddConversationOption(conversation, "You could say that.", "Quest1Chat_2")
  53. StartConversation(conversation, NPC, Spawn, "Another pilgrim, I take it?")
  54. end
  55. function Quest1Chat_2(NPC, Spawn)
  56. FaceTarget(NPC, Spawn)
  57. conversation = CreateConversation()
  58. PlayFlavor(NPC, "wregan_firebeard/halas/gwenevyns_cove/wregan_firebeard_002.mp3", "", "", 1986724829, 1256857659, Spawn)
  59. AddConversationOption(conversation, "Why's that?", "Quest1Chat_3")
  60. StartConversation(conversation, NPC, Spawn, "Well, you're lucky you arrived when you did.")
  61. end
  62. function Quest1Chat_3(NPC, Spawn)
  63. FaceTarget(NPC, Spawn)
  64. conversation = CreateConversation()
  65. PlayFlavor(NPC, "wregan_firebeard/halas/gwenevyns_cove/wregan_firebeard_003.mp3", "", "", 931801191, 1464668700, Spawn)
  66. AddConversationOption(conversation, "You were going to leave without enough provisions?", "Quest1Chat_4")
  67. AddConversationOption(conversation, "Why didn't you have the others gather what is needed?", "Quest1Chat_6")
  68. StartConversation(conversation, NPC, Spawn, "We were about ready to set out for our treacherous pilgrimage to the city of New Halas. Unfortunately, if your plans were to join us then you need to help us fill our packs with provisions for the trip.")
  69. end
  70. function Quest1Chat_4(NPC, Spawn)
  71. FaceTarget(NPC, Spawn)
  72. conversation = CreateConversation()
  73. PlayFlavor(NPC, "wregan_firebeard/halas/gwenevyns_cove/wregan_firebeard_005.mp3", "", "", 3666066743, 675613480, Spawn)
  74. AddConversationOption(conversation, "Oh, so I'll be gathering the stuff I need for this trip?", "OfferBeetsAlternative")
  75. AddConversationOption(conversation, "I am here to hunt not gather!", "Quest1Chat_5")
  76. StartConversation(conversation, NPC, Spawn, "No. We already have enough provisions for those that were already here, but you are another mouth to feed.")
  77. end
  78. function Quest1Chat_5(NPC, Spawn)
  79. FaceTarget(NPC, Spawn)
  80. conversation = CreateConversation()
  81. PlayFlavor(NPC, "wregan_firebeard/halas/gwenevyns_cove/wregan_firebeard_006.mp3", "", "", 3776727269, 3608373686, Spawn)
  82. AddConversationOption(conversation, "Oh, so I'll be gathering the stuff I need for this trip?", "OfferBeetsAlternative")
  83. AddConversationOption(conversation, "I am still not convinced. I'm going to go now.")
  84. StartConversation(conversation, NPC, Spawn, "There will be plenty of opportunity for hunting and fighting, eager one. The journey to the city is dangersome, full of wild beasts and harsh elements. That is why we must prepare ourselves now.")
  85. end
  86. function Quest1Chat_6(NPC, Spawn)
  87. FaceTarget(NPC, Spawn)
  88. conversation = CreateConversation()
  89. PlayFlavor(NPC, "wregan_firebeard/halas/gwenevyns_cove/wregan_firebeard_004.mp3", "", "", 2820759679, 594607724, Spawn)
  90. AddConversationOption(conversation, "Oh, so I'll be gathering the stuff I need for this trip?", "OfferBeetsAlternative")
  91. AddConversationOption(conversation, "I am here to hunt not gather!", "Quest1Chat_5")
  92. StartConversation(conversation, NPC, Spawn, "I did. They gathered the provisions that they will need for the journey, but you are another mouth to feed.")
  93. end
  94. function OfferBeetsAlternative(NPC, Spawn)
  95. if HasQuest(Spawn, BeetsAlternative) == false and HasCompletedQuest(Spawn, BeetsAlternative) == false then
  96. OfferQuest(NPC, Spawn, BeetsAlternative)
  97. end
  98. end