Soulforge.lua 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. --[[
  2. Script Name : SpawnScripts/Graystone/Steelforge.lua
  3. Script Purpose : Steelforge <Weaponsmith>
  4. Script Author : Dorbin
  5. Script Date : 2022.03.07
  6. Script Notes :
  7. --]]
  8. local Delivery = 5502
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 8, "InRange", "LeaveRange")
  11. ProvidesQuest(NPC, Delivery)
  12. end
  13. function InRange(NPC, Spawn) --Quest Callout
  14. if not HasCompletedQuest (Spawn, Delivery) and not HasQuest (Spawn, Delivery) and GetLevel(Spawn) >=6 then
  15. if math.random(1, 100) <= 70 then
  16. FaceTarget(NPC, Spawn)
  17. PlayFlavor(NPC, "voiceover/english/weaponsmith_soulforge/qey_village03/100_weaponsmith_barbarian_soulfoge_callout_f8f8f127.mp3", "I sure could use some more materials. Oh! Why, hello! Are you interested in weapons? Or perhaps some work?", "hello", 190942341, 2950153557, Spawn)
  18. end
  19. else
  20. if math.random(1, 100) <= 70 then
  21. PlayFlavor(NPC, "", "", "hello", 0, 0, Spawn)
  22. end
  23. end
  24. end
  25. function respawn(NPC)
  26. spawn(NPC)
  27. end
  28. function hailed(NPC, Spawn)
  29. FaceTarget(NPC, Spawn)
  30. conversation = CreateConversation()
  31. PlayFlavor(NPC, "voiceover/english/weaponsmith_soulforge/qey_village03/weaponsmithsoulforge000.mp3", "", "hello", 549167891, 890595853, Spawn)
  32. if not HasCompletedQuest (Spawn, Delivery) and not HasQuest (Spawn, Delivery) and GetLevel(Spawn) >=6 then
  33. AddConversationOption(conversation, "Can I assist you with anything around the shop?", "Snakes")
  34. end
  35. if GetQuestStep(Spawn, Delivery)==2 then
  36. AddConversationOption(conversation, "Here are the snake skins you asked for.", "SnakesFinish")
  37. end
  38. AddConversationOption(conversation, "I'm just looking around.")
  39. StartConversation(conversation, NPC, Spawn, "If steel is what you seek traveler, then look no further!")
  40. end
  41. function Snakes(NPC, Spawn)
  42. conversation = CreateConversation()
  43. PlayFlavor(NPC, "voiceover/english/weaponsmith_soulforge/qey_village03/weaponsmithsoulforge001.mp3", "", "", 1346634645, 774618868, Spawn)
  44. AddConversationOption(conversation, "Of course I am, sir.", "Snakes2")
  45. AddConversationOption(conversation, "I don't have time. Sorry.")
  46. StartConversation(conversation, NPC, Spawn, "To tell the truth, I need someone to fetch these skins for my handles. Do you think you're up to the task, young one?")
  47. end
  48. function Snakes2(NPC, Spawn)
  49. conversation = CreateConversation()
  50. PlayFlavor(NPC, "voiceover/english/weaponsmith_soulforge/qey_village03/weaponsmithsoulforge002.mp3", "", "nod", 2117434498, 740221965, Spawn)
  51. AddConversationOption(conversation, "I'll return with the skins soon.", "QuestBegin")
  52. AddConversationOption(conversation, "Snakes!? I hate snakes!", "Snakes3")
  53. AddConversationOption(conversation, "Err.. I'm not interested in going to the Caves. Good day.")
  54. StartConversation(conversation, NPC, Spawn, "Humor me then. Go skin some cave snakes in the caves north of the Baubbleshire. Bring me back the skins and I'll what I can do about paying you.")
  55. end
  56. function Snakes3(NPC, Spawn)
  57. conversation = CreateConversation()
  58. PlayFlavor(NPC, "voiceover/english/weaponsmith_soulforge/qey_village03/weaponsmithsoulforge004.mp3", "", "frustrated", 3067377267, 3322501955, Spawn)
  59. AddConversationOption(conversation, "I'll return with the skins soon.", "QuestBegin")
  60. AddConversationOption(conversation, "You'll have to find someone else. Sorry.")
  61. StartConversation(conversation, NPC, Spawn, "Oh all right! I don't have time to deal with youngling drama. Just bring me back as many as you see fit.")
  62. end
  63. function QuestBegin (NPC, Spawn)
  64. FaceTarget(NPC, Spawn)
  65. OfferQuest(NPC, Spawn, Delivery)
  66. end
  67. function SnakesFinish(NPC, Spawn)
  68. PlayFlavor(NPC, "voiceover/english/blacksmith_baynor/qey_village05/blacksmithbaynor003.mp3", "", "thank", 4052925746, 2525148033, Spawn)
  69. FaceTarget(NPC, Spawn)
  70. conversation = CreateConversation()
  71. AddConversationOption(conversation, "Thanks, and be careful with those tongs.", "Reward")
  72. StartConversation(conversation, NPC, Spawn, "Thank you, friend! Ah, yes. These tongs work as well as the day Ironmallet gave them to me! Please, take a bit of coin for your trouble. Farewell.")
  73. end
  74. function Reward(NPC, Spawn)
  75. SetStepComplete(Spawn, Delivery, 2)
  76. end