BarryViceheart.lua 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. --[[
  2. Script Name : SpawnScripts/Graystone/BarryViceheart.lua
  3. Script Purpose : Barry Viceheart
  4. Script Author : Dorbin
  5. Script Date : 2022.03.07
  6. Script Notes :
  7. --]]
  8. local Delivery = 5500
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 8, "InRange", "LeaveRange")
  11. ProvidesQuest(NPC, Delivery)
  12. SetInfoStructString(NPC, "action_state", "tapfoot")
  13. end
  14. function InRange(NPC, Spawn) --Quest Callout
  15. if math.random(1, 100) <= 60 then
  16. if not HasCompletedQuest (Spawn, Delivery) and not HasQuest (Spawn, Delivery) then
  17. choice = math.random(1,2)
  18. if choice ==1 then
  19. FaceTarget(NPC, Spawn)
  20. PlayFlavor(NPC, "voiceover/english/barry_viceheart/qey_village03/100_customer_barbarian_viceheart_callout_1461fbc1.mp3", "This tome will never reach home as long my buisness in Graystone is hampered. Are you looking to make some coin, friend?", "", 2446304440, 3164893910, Spawn)
  21. else
  22. FaceTarget(NPC, Spawn)
  23. PlayFlavor(NPC, "voiceover/english/barry_viceheart/qey_village03/100_customer_barbarian_viceheart_multhail1_31dbd300.mp3", "I don't think you want to help me with this difficult task. Farewell!", "no", 2478336212, 3512678812, Spawn)
  24. end
  25. else
  26. choice = math.random(1,2)
  27. if choice ==1 then
  28. PlayFlavor(NPC, "", "", "sigh", 0, 0, Spawn)
  29. else
  30. PlayFlavor(NPC, "", "", "grumble", 0, 0, Spawn)
  31. end
  32. end
  33. end
  34. end
  35. function respawn(NPC)
  36. spawn(NPC)
  37. end
  38. function hailed(NPC, Spawn)
  39. FaceTarget(NPC, Spawn)
  40. conversation = CreateConversation()
  41. PlayFlavor(NPC, "voiceover/english/barry_viceheart/qey_village03/barryviceheart000.mp3","","grumble",2578443870,2025920276,Spawn)
  42. if not HasCompletedQuest (Spawn, Delivery) and not HasQuest (Spawn, Delivery) then
  43. AddConversationOption(conversation, "Why don't you just come back later?", "DeliveryStart")
  44. end
  45. if GetQuestStep(Spawn,Delivery)==2 then
  46. AddConversationOption(conversation, "The tome is returned. They had words for you.", "DeliveryDone")
  47. end
  48. AddConversationOption(conversation, "Keep your place in line.")
  49. StartConversation(conversation, NPC, Spawn, "If you think I am going to give up my place in line for a few coins, think again. Every day it is the same long line. When will they hire new help? ")
  50. end
  51. function DeliveryStart(NPC, Spawn)
  52. conversation = CreateConversation()
  53. PlayFlavor(NPC, "voiceover/english/barry_viceheart/qey_village03/barryviceheart001.mp3","","",544720212,2865021326,Spawn)
  54. AddConversationOption(conversation, "This line seems to be your only crusade?", "QuestBegin1")
  55. AddConversationOption(conversation, "Alright then. Good luck with that.")
  56. StartConversation(conversation, NPC, Spawn, "By this time tomorrow I'll be marching across the fields of Antonica on a crusade to rid the land of the remaining gnolls. This shall prove the might and worth of Viceheart. The Qeynos Guard will be begging me to join their ranks. ")
  57. end
  58. function QuestBegin1(NPC, Spawn)
  59. conversation = CreateConversation()
  60. PlayFlavor(NPC, "voiceover/english/barry_viceheart/qey_village03/barryviceheart002.mp3","","agree",1094577603,3787168085,Spawn)
  61. AddConversationOption(conversation, "Can I help?", "QuestBegin2")
  62. AddConversationOption(conversation, "Alright then. Good luck with that.")
  63. StartConversation(conversation, NPC, Spawn, "Aye. I must agree. This line has been a greater bane than the hordes of khekloks and pirates I faced on my journey to Qeynos. If I cannot defeat this line in a few hours I will never defeat the fine I shall incur by not returning this tome.")
  64. end
  65. function QuestBegin2(NPC, Spawn)
  66. conversation = CreateConversation()
  67. PlayFlavor(NPC, "voiceover/english/barry_viceheart/qey_village03/barryviceheart003.mp3","","agree",1066723073,3215544160,Spawn)
  68. AddConversationOption(conversation, "I'll return the book to Bleemeb.", "QuestBegin")
  69. AddConversationOption(conversation, "On second thought, I'm busy. Sorry.")
  70. StartConversation(conversation, NPC, Spawn, "Carry this tome to Castleview Hamlet. There you will find a scribe's shop. Be sure that Bleemeb receives the tome. Do this and I shall reward you with coin.")
  71. end
  72. function QuestBegin (NPC, Spawn)
  73. FaceTarget(NPC, Spawn)
  74. OfferQuest(NPC, Spawn, Delivery)
  75. end
  76. function DeliveryDone(NPC, Spawn)
  77. conversation = CreateConversation()
  78. PlayFlavor(NPC, "voiceover/english/barry_viceheart/qey_village03/barryviceheart004.mp3","","facepalm",1668909106,3942142974,Spawn)
  79. AddConversationOption(conversation, "Thanks for the coin, and good luck with the line.", "Reward")
  80. StartConversation(conversation, NPC, Spawn, "Bah! I do not need to hear a scribbler's threats. Your deed is kind and a reward is just. Take these few coins. May your journeys bring you many victories.")
  81. end
  82. function Reward(NPC, Spawn)
  83. SetStepComplete(Spawn, Delivery, 2)
  84. end