SmithyFindlebop.lua 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. --[[
  2. Script Name : SpawnScripts/Baubbleshire/SmithyFindlebop.lua
  3. Script Purpose : Smithy Findlebop <Weaponsmith>
  4. Script Author : Scatman
  5. Script Date : 2009.09.27
  6. Script Notes :
  7. --]]
  8. local MystratTails = 5439
  9. --dofile("SpawnScripts/Generic/GenericWeaponsmithVoiceOvers.lua")
  10. function spawn(NPC)
  11. SetPlayerProximityFunction(NPC, 8, "InRange", "LeaveRange")
  12. ProvidesQuest(NPC, MystratTails)
  13. conversation = CreateConversation()
  14. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function InRange(NPC, Spawn)
  19. if not HasCompletedQuest(Spawn, MystratTails) then
  20. if math.random(0, 100) <= 65 then
  21. PlayFlavor(NPC, "voiceover/english/smithy_findlebop/qey_village06/100_smithy_findlebop_findlebop_first_fd0d329e.mp3", "More dirt? How in Brell's name can I get this thing to work if I can't keep it clean?!", "grumble", 1928188613, 3260712092, Spawn)
  22. end
  23. else
  24. if math.random(0, 100) <= 25 then
  25. local choice = MakeRandomInt(1, 2)
  26. FaceTarget(NPC, Spawn)
  27. -- GenericWeaponsmithHail(NPC, Spawn)
  28. if choice == 1 then
  29. PlayFlavor(NPC, "voiceover/english/smithy_findlebop/qey_village06/100_smithy_findlebop_multhail1_aa73007b.mp3", "Now, if I can only figure out how the sprocket will fit in this device, I'll be set! Why are you interrupting my work? Can't you see I'm busy? Go away!", "scream", 3823811804, 70891212, Spawn)
  30. else
  31. PlayFlavor(NPC, "voiceover/english/smithy_findlebop/qey_village06/100_smithy_findlebop_multhail2_5d0f29cb.mp3", "Now, if I can only figure out how the sprocket will fit in this device, I'll be set! Why are you interrupting my work? Can't you see I'm busy?", "frustrated", 446470782, 3454872230, Spawn)
  32. end
  33. end
  34. end
  35. function LeaveRange(NPC, Spawn)
  36. end
  37. function hailed(NPC, Spawn)
  38. if not HasCompletedQuest(Spawn, MystratTails) and GetLevel(Spawn) >=5 then
  39. FaceTarget(NPC, Spawn)
  40. Begin(NPC,Spawn)
  41. else
  42. Callout(NPC,Spawn)
  43. end
  44. end
  45. function Callout(NPC,Spawn)
  46. local randomCall2 = MakeRandomInt(1, 2)
  47. FaceTarget(NPC, Spawn)
  48. -- GenericWeaponsmithHail(NPC, Spawn)
  49. if randomCall2 == 1 then
  50. PlayFlavor(NPC, "voiceover/english/smithy_findlebop/qey_village06/100_smithy_findlebop_multhail1_aa73007b.mp3", "Now, if I can only figure out how the sprocket will fit in this device, I'll be set! Why are you interrupting my work? Can't you see I'm busy? Go away!", "scream", 3823811804, 70891212, Spawn)
  51. else
  52. PlayFlavor(NPC, "voiceover/english/smithy_findlebop/qey_village06/100_smithy_findlebop_multhail2_5d0f29cb.mp3", "Now, if I can only figure out how the sprocket will fit in this device, I'll be set! Why are you interrupting my work? Can't you see I'm busy?", "frustrated", 446470782, 3454872230, Spawn)
  53. end
  54. end
  55. function ImInterested(NPC, Spawn)
  56. FaceTarget(NPC, Spawn)
  57. conversation = CreateConversation()
  58. AddConversationOption(conversation, "Ok, I'm off to find you a mystrat tail.", "OfferQuest1")
  59. AddConversationOption(conversation, "I'll let you get back to work.")
  60. StartConversation(conversation, NPC, Spawn, "FINE! Sorry to be harsh, but you bother me a critical juncture! If you want to help me, go get me something to scrub this bit of metal. Perhaps the tail of a Mystail rat will do the trick. Yes, yes. That would work. Get one from the Oakmyst Forest! ")
  61. PlayFlavor(NPC, "voiceover/english/smithy_findlebop/qey_village06/smithyfindlebop002.mp3","","sigh",3746495978,2876844206, Spawn)
  62. end
  63. function GotAnyWork(NPC, Spawn)
  64. FaceTarget(NPC, Spawn)
  65. conversation = CreateConversation()
  66. AddConversationOption(conversation, "I could look for something to clean that for you.", "ImInterested")
  67. AddConversationOption(conversation, "Yeesh, sorry I asked.")
  68. StartConversation(conversation, NPC, Spawn, "No, NO! I'm too busy to give you a task! GET OUT! Get out, before I lose my train of thought! Now where was I? Oh, yes, if only I had something to scrub this bit of metal...")
  69. PlayFlavor(NPC, "voiceover/english/smithy_findlebop/qey_village06/smithyfindlebop001.mp3","","no",3069436891,2776154152, Spawn)
  70. end
  71. function OfferQuest1(NPC, Spawn)
  72. FaceTarget(NPC, Spawn)
  73. OfferQuest(NPC, Spawn, MystratTails)
  74. end
  75. function Begin(NPC, Spawn)
  76. conversation = CreateConversation()
  77. if not HasQuest(Spawn, MystratTails) and not HasCompletedQuest(Spawn, MystratTails) then
  78. AddConversationOption(conversation, "Have any odd jobs I could do?", "GotAnyWork")
  79. elseif HasQuest(Spawn, MystratTails) and GetQuestStep(Spawn, MystratTails) == 2 then
  80. AddConversationOption(conversation, "Here is a nice Mystrat tail for you.", "RatTail_Handin")
  81. end
  82. AddConversationOption(conversation, "Sorry. Just passing by.")
  83. PlayFlavor(NPC, "voiceover/english/smithy_findlebop/qey_village06/smithyfindlebop000.mp3", "", "frustrated", 1173629486, 2280866988, Spawn)
  84. StartConversation(conversation, NPC, Spawn, "Now, if only I could only figure out how this sprocket will fit in this device, it'll be set. Oh! Yes? Why are you interrupting my work? Can't you SEE I'M BUSY?")
  85. end
  86. function RatTail_Handin(NPC, Spawn)
  87. SetStepComplete(Spawn, MystratTails, 2)
  88. FaceTarget(NPC, Spawn)
  89. conversation = CreateConversation()
  90. AddConversationOption(conversation, "Thanks, I'll be sure not to step on any of your sprockets on my way out.")
  91. StartConversation(conversation, NPC, Spawn, "Yes, YES! This tail will do the trick! Very bristley, indeed. Good job! Perhaps you weren't a bother afterall. Let me pay you for your trouble. It is the least I could do. Sorry for being rude earlier ",Spawn)
  92. PlayFlavor(NPC, "voiceover/english/smithy_findlebop/qey_village06/smithyfindlebop003.mp3","","thank",4033931152,227104096, Spawn)
  93. end
  94. end