DaneSteelfist.lua 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. --[[
  2. Script Name : SpawnScripts/Graystone/DaneSteelfist.lua
  3. Script Purpose : Dane Steelfist
  4. Script Author : Dorbin
  5. Script Date : 2022.03.10
  6. Script Notes :
  7. --]]
  8. dofile("SpawnScripts/Generic/UnknownLanguage.lua")
  9. local DanesQuest = 5506
  10. function spawn(NPC)
  11. SetPlayerProximityFunction(NPC, 6, "InRange", "LeaveRange")
  12. ProvidesQuest(NPC, DanesQuest)
  13. end
  14. function InRange(NPC, Spawn) --Quest Callout
  15. if math.random(1, 100) <= 70 then
  16. if not HasLanguage(Spawn,3)then
  17. FaceTarget(NPC, Spawn)
  18. Garbled(NPC,Spawn)
  19. else
  20. choice = math.random(1,2)
  21. if choice ==1 then
  22. PlayFlavor(NPC, "", "", "happy", 0, 0, Spawn)
  23. else
  24. PlayFlavor(NPC, "", "", "threaten", 0, 0, Spawn)
  25. end
  26. end
  27. end
  28. end
  29. function hailed(NPC, Spawn)
  30. FaceTarget(NPC, Spawn)
  31. if not HasLanguage(Spawn,3)then
  32. Garbled(NPC,Spawn)
  33. else
  34. conversation = CreateConversation()
  35. PlayFlavor(NPC, "voiceover/english/dane_steelfist/qey_village03/danesteelfist000.mp3","","chuckle",1318075638,1771466130,Spawn)
  36. if not HasCompletedQuest (Spawn, DanesQuest) and not HasQuest (Spawn, DanesQuest) then
  37. AddConversationOption(conversation, "You seem busy here. Need any help?", "Quest1")
  38. end
  39. if GetQuestStep (Spawn, DanesQuest)== 2 then
  40. AddConversationOption(conversation, "Here are those badger parts you requested.", "Badger1")
  41. end
  42. if GetQuestStep (Spawn, DanesQuest)== 4 then
  43. AddConversationOption(conversation, "I've killed the grizzled badgers like you wanted.", "Badger2")
  44. end
  45. if GetQuestStep (Spawn, DanesQuest)== 6 then
  46. AddConversationOption(conversation, "There are now less timber wolves in Antonica.", "Wolves1")
  47. end
  48. AddConversationOption(conversation, "I'll leave you to it.")
  49. StartConversation(conversation, NPC, Spawn, "Haha! Hilarious! You better stand back. Looks like the lad bit off more than he can chew. Don't worry. The ol' barbarian there is a softy. He let the wee one blow off a bit of steam first. I love this city!")
  50. end
  51. end
  52. function Quest1(NPC, Spawn)
  53. FaceTarget(NPC, Spawn)
  54. conversation = CreateConversation()
  55. PlayFlavor(NPC, "voiceover/english/dane_steelfist/qey_village03/danesteelfist002.mp3","","ponder",3810575167,4164364374,Spawn)
  56. AddConversationOption(conversation, "What do you need?", "QuestBegin1")
  57. AddConversationOption(conversation, "On second thought, I must be going.")
  58. StartConversation(conversation, NPC, Spawn, "Busy? I'm not busy! Well, mabye a little busy. Okay, I'm swamped with a new position I agreed to take! There's even a book I'm suppose to read for my job! Imagine! I suppose I should run home and read the darn thing. Can you help me out? I need to get some stuff to finish a repair.")
  59. end
  60. function QuestBegin1(NPC, Spawn)
  61. FaceTarget(NPC, Spawn)
  62. conversation = CreateConversation()
  63. PlayFlavor(NPC, "voiceover/english/dane_steelfist/qey_village03/danesteelfist003.mp3","","agree",3255837441,1786747362,Spawn)
  64. AddConversationOption(conversation, "I'll get those badgers for you.", "QuestBegin")
  65. AddConversationOption(conversation, "Nevermind, I must be going.")
  66. StartConversation(conversation, NPC, Spawn, "Great! I see you're keep'n a journal. Jot this down. 'Thin out the lowland badgers'. Appreciate your help! Come on back when you're done.")
  67. end
  68. function QuestBegin (NPC, Spawn)
  69. FaceTarget(NPC, Spawn)
  70. OfferQuest(NPC, Spawn, DanesQuest)
  71. end
  72. function Badger1(NPC, Spawn)
  73. FaceTarget(NPC, Spawn)
  74. conversation = CreateConversation()
  75. PlayFlavor(NPC, "voiceover/english/dane_steelfist/qey_village03/danesteelfist004.mp3","","happy",2037959888,2353530376,Spawn)
  76. AddConversationOption(conversation, "Still need some help to make the time?", "QuestUpdate1")
  77. StartConversation(conversation, NPC, Spawn, "Wonderful! Now I can finish my project. You're saving me a lot of time, friend. Look at my job book. It says here, 'Fill out form B according to rule five found in appendix C'. Where is appendix C?! Uugh, I need more time to learn my new job.")
  78. end
  79. function QuestUpdate1(NPC, Spawn)
  80. FaceTarget(NPC, Spawn)
  81. conversation = CreateConversation()
  82. PlayFlavor(NPC, "voiceover/english/dane_steelfist/qey_village03/danesteelfist005.mp3","","agree",2121116768,3344330588,Spawn)
  83. AddConversationOption(conversation, "I suppose I could take care of these grizzled badgers.", "QuestUpdate2")
  84. StartConversation(conversation, NPC, Spawn, "You know, this morning I was asked to clear out some grizzled badgers gett'n in the way of new construction. Nasty little black critters they are. I will be ever in your debt if you help me.")
  85. end
  86. function QuestUpdate2(NPC, Spawn)
  87. SetStepComplete(Spawn, DanesQuest, 2)
  88. end
  89. function Badger2(NPC, Spawn)
  90. FaceTarget(NPC, Spawn)
  91. conversation = CreateConversation()
  92. PlayFlavor(NPC, "voiceover/english/dane_steelfist/qey_village03/danesteelfist006.mp3","","happy",2321830335,3176079398,Spawn)
  93. AddConversationOption(conversation, "What else do you need?", "BadgerUpdate2")
  94. AddConversationOption(conversation, "More? What is it?", "BadgerUpdate2")
  95. StartConversation(conversation, NPC, Spawn, "Good. Good! I think I understand my new job a bit better. All this bureaucracy... I need to put my official stamp on the- Gah! I don't have an official stamp! Why don't people tell me these things! No rest for the weary. Say, do you have time to do me a favor while I find someone to craft a seal?")
  96. end
  97. function BadgerUpdate2(NPC, Spawn)
  98. FaceTarget(NPC, Spawn)
  99. conversation = CreateConversation()
  100. PlayFlavor(NPC, "voiceover/english/dane_steelfist/qey_village03/danesteelfist007.mp3","","thank",2156174393,4161330007,Spawn)
  101. AddConversationOption(conversation, "Alright. I'll let you know when the deed is done.", "QuestUpdate4")
  102. StartConversation(conversation, NPC, Spawn, "Thank ya. One of my first offical duties is to take a tour of the area. And I've ... one... little... weakness... I'm scared of wolves, especially timber wolves. If you can help me out, I'll never forget it.")
  103. end
  104. function QuestUpdate4(NPC, Spawn)
  105. SetStepComplete(Spawn, DanesQuest, 4)
  106. end
  107. function Wolves1(NPC, Spawn)
  108. FaceTarget(NPC, Spawn)
  109. conversation = CreateConversation()
  110. PlayFlavor(NPC, "voiceover/english/dane_steelfist/qey_village03/danesteelfist008.mp3","","nod",1137915375,2696390060,Spawn)
  111. AddConversationOption(conversation, "Glad to be of service.", "QuestDone")
  112. StartConversation(conversation, NPC, Spawn, "Very good. Very good! I've got my stamp, see? You've been a big help. If ya ever need anything, just ask my assistant. And make sure you fill out your form in triplicate! ")
  113. end
  114. function QuestDone(NPC, Spawn)
  115. SetStepComplete(Spawn, DanesQuest, 6)
  116. end