Snowboot.lua 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. --[[
  2. Script Name : SpawnScripts/Graystone/Snowboot.lua
  3. Script Purpose : Snowboot <Armorsmith>
  4. Script Author : Dorbin
  5. Script Date : 2022.03.07
  6. Script Notes :
  7. --]]
  8. local Pickup = 5501
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 7, "InRange", "LeaveRange")
  11. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. end
  15. function InRange(NPC, Spawn)
  16. if math.random(1, 100) <= 80 then
  17. choice = math.random(1,3)
  18. if choice ==1 then
  19. PlayFlavor(NPC, "", "", "square", 0, 0, Spawn)
  20. elseif choice ==2 then
  21. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  22. else
  23. PlayFlavor(NPC, "", "", "woo", 0, 0, Spawn)
  24. end
  25. end
  26. end
  27. function hailed(NPC, Spawn)
  28. FaceTarget(NPC, Spawn)
  29. conversation = CreateConversation()
  30. PlayFlavor(NPC, "voiceover/english/armorsmith_snowboot/qey_village03/armorsmithsnowboot.mp3", "", "", 3584987348, 1438770677, Spawn)
  31. if GetQuestStep(Spawn,Pickup)==1 then
  32. AddConversationOption(conversation, "I'm here to pick up Watchman Fiercecry's suit of armor.","Armor")
  33. end
  34. AddConversationOption(conversation, "Sorry to disturb you!")
  35. StartConversation(conversation, NPC, Spawn, "Aye, what is it? I've got to be fitting this elven lass, and I haven't got all day! Come on, out with it!")
  36. end
  37. function Armor(NPC, Spawn)
  38. FaceTarget(NPC, Spawn)
  39. conversation = CreateConversation()
  40. PlayFlavor(NPC, "voiceover/english/armorsmith_snowboot/qey_village03/armorsmithsnowboot000.mp3", "", "", 2002270290, 3759394726, Spawn)
  41. AddConversationOption(conversation, "Fiercecry is apart of the Graystone Watch. Don't you want him protected?","Armor2")
  42. AddConversationOption(conversation, "Please? I am just trying to do a job.","Armor3")
  43. AddConversationOption(conversation, "I'm sure 'Old Snowboot' helps those who helps others.","Armor2")
  44. StartConversation(conversation, NPC, Spawn, "Oh, ya are, are you? Why should I believe you? I can't let every last soul run off with me full suit of armor just because they say they are here to pick it up for someone! Go on! Give me a reason! Why should I give it to you?! Out with it already! Why?!")
  45. end
  46. function Armor2(NPC, Spawn)
  47. FaceTarget(NPC, Spawn)
  48. conversation = CreateConversation()
  49. PlayFlavor(NPC, "voiceover/english/armorsmith_snowboot/qey_village03/armorsmithsnowboot001.mp3", "", "", 3372293691, 3262827310, Spawn)
  50. AddConversationOption(conversation, "I'll deliver it right away.","ArmorDone")
  51. StartConversation(conversation, NPC, Spawn, "Blast my good nature! Alright! Just a momment while I get it for ya. Now, don't let me hear about this suit going missing!")
  52. end
  53. function Armor3(NPC, Spawn)
  54. FaceTarget(NPC, Spawn)
  55. conversation = CreateConversation()
  56. PlayAnimation(Spawn, 10844)
  57. PlayFlavor(NPC, "voiceover/english/armorsmith_snowboot/qey_village03/armorsmithsnowboot001.mp3", "", "", 3372293691, 3262827310, Spawn)
  58. AddConversationOption(conversation, "I'll deliver it right away.","ArmorDone")
  59. StartConversation(conversation, NPC, Spawn, "Blast my good nature! Alright! Just a momment while I get it for ya. Now, don't let me hear about this suit going missing!")
  60. end
  61. function ArmorDone(NPC,Spawn)
  62. FaceTarget(NPC, Spawn)
  63. SetStepComplete(Spawn, Pickup, 1)
  64. end