BulltheCrafty.lua 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/BulltheCrafty.lua
  3. Script Purpose : Bull the Crafty <Mender>
  4. Script Author : Foof
  5. Script Date : 2013.05.16
  6. Script Notes :
  7. --]]
  8. local HarvestTutorial = 11
  9. local HadAHammer = 12
  10. function spawn(NPC)
  11. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  12. ProvidesQuest(NPC, HadAHammer)
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function InRange(NPC, Spawn)
  18. end
  19. function LeaveRange(NPC, Spawn)
  20. end
  21. function hailed(NPC, Spawn)
  22. FaceTarget(NPC, Spawn)
  23. conversation = CreateConversation()
  24. if HasCompletedQuest(Spawn, HarvestTutorial) and HasQuest(Spawn, HadAHammer) == false and HasCompletedQuest(Spawn, HadAHammer) == false then
  25. Quest1Chat_1(NPC, Spawn)
  26. elseif GetQuestStep(Spawn, HadAHammer) == 1 or GetQuestStep(Spawn, HadAHammer) == 2 then
  27. PlayFlavor(NPC, "", "The recipe's right there in front of me there, don't forget to read it once you pick it up. The coal's on the ground there. And make sure you have a tin cluster and a lead cluster in your bags, they'll be no use to you in the bank!", "nod", 1689589577, 4560189, Spawn)
  28. elseif GetQuestStep(Spawn, HadAHammer) == 3 then
  29. AddConversationOption(conversation, "I'll try.")
  30. StartConversation(conversation, NPC, Spawn, "Having any trouble? You might have noticed that at the bottom of the crafting window you see six tradeskill arts you can use. Three will improve the durability, and three the progress of your craft. Try using those as much as you need while crafting.")
  31. elseif GetQuestStep(Spawn, HadAHammer) == 4 then
  32. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1002.mp3", "", "", 0, 0, Spawn)
  33. AddConversationOption(conversation, "I made a lucky wolf paw charm!", "Quest1Chat_3")
  34. StartConversation(conversation, NPC, Spawn, "How did you make out? Was my recipe simple enough?")
  35. elseif GetQuestStep(Spawn, HadAHammer) == 5 or HasCompletedQuest(Spawn, HadAHammer) then
  36. Quest1Chat_1(NPC, Spawn)
  37. else
  38. PlayFlavor(NPC, "", "At peace or at war, my work must go on.", "nod", 1689589577, 4560189, Spawn)
  39. end
  40. end
  41. function Quest1Chat_1(NPC, Spawn)
  42. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  43. AddConversationOption(conversation, "Sure, why not? Is it hard?", "Quest1Chat_2")
  44. StartConversation(conversation, NPC, Spawn, "Greetings! I noticed you harvesting out there. Are you interested in trying your hand at making something out of them?")
  45. end
  46. function Quest1Chat_2(NPC, Spawn)
  47. FaceTarget(NPC, Spawn)
  48. conversation = CreateConversation()
  49. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  50. AddConversationOption(conversation, "Okay, what do I do?", "OfferHadAHammer")
  51. StartConversation(conversation, NPC, Spawn, "Nay, not hard at all once you wrap your head around it. But I'm not one to keep talking all day. Why don't you just jump in and try it?")
  52. end
  53. function Quest1Chat_3(NPC, Spawn)
  54. SetStepComplete(Spawn, HadAHammer, 4)
  55. FaceTarget(NPC, Spawn)
  56. conversation = CreateConversation()
  57. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  58. AddConversationOption(conversation, "Thanks, I might do that.")
  59. StartConversation(conversation, NPC, Spawn, "Congratulations! You seem to have a right knack for crafting things, if I do say so. If you're interested in learning more about crafting, you should look up a professional tradeskill tutor who can tell you all the details.")
  60. end
  61. function OfferHadAHammer(NPC, Spawn)
  62. if HasCompletedQuest(Spawn, HadAHammer) == false and HasQuest(Spawn, HadAHammer) == false then
  63. OfferQuest(NPC, Spawn, HadAHammer)
  64. end
  65. end