9
3

NawalTahri.lua 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. --[[
  2. Script Name : SpawnScripts/Nettleville/NawalTahri.lua
  3. Script Purpose : Nawal Tahri <Crafting Trainer>
  4. Script Author : scatman
  5. Script Date : 2009.08.12
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. -- Item ID's
  9. local ARTISAN_ESSENTIALS_VOLUME_2 = 31373
  10. function spawn(NPC)
  11. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. end
  15. function RandomVoiceOver(NPC, Spawn)
  16. local choice = math.random(1, 3)
  17. if choice == 1 then
  18. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1047.mp3", "", "", 0, 0, Spawn)
  19. elseif choice == 2 then
  20. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1047.mp3", "", "", 0, 0, Spawn)
  21. elseif choice == 3 then
  22. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1047.mp3", "", "", 0, 0, Spawn)
  23. end
  24. end
  25. require "SpawnScripts/Generic/DialogModule"
  26. dofile("SpawnScripts/Generic/GenericVoiceOvers.lua")
  27. -- Item ID's
  28. local ARTISAN_ESSENTIALS_VOLUME_2 = 31373
  29. function spawn(NPC)
  30. end
  31. function respawn(NPC)
  32. spawn(NPC)
  33. end
  34. function hailed(NPC, Spawn)
  35. FaceTarget(NPC, Spawn)
  36. if HasQuest(Spawn,5763) and GetQuestStep(Spawn,5763) == 8 then
  37. Dialog1(NPC,Spawn)
  38. else
  39. conversation = CreateConversation()
  40. GenericHail(NPC, Spawn)
  41. if not HasItem(Spawn, ARTISAN_ESSENTIALS_VOLUME_2, 1) then
  42. AddConversationOption(conversation, "Yes, please teach me.", "dlg_39_1")
  43. AddConversationOption(conversation, "No, not at the moment.")
  44. StartConversation(conversation, NPC, Spawn, "You show interest in the crafting trade, good. We can always use talented artisans. I can help you get started, would you be interested?")
  45. else
  46. Say(NPC, "I have nothing else to teach you for the moment. Please return to me when you have earned enough experience to choose your profession.", Spawn)
  47. end
  48. end
  49. end
  50. function dlg_39_1(NPC, Spawn)
  51. FaceTarget(NPC, Spawn)
  52. conversation = CreateConversation()
  53. -- artisan essentials volume 2
  54. SummonItem(Spawn, ARTISAN_ESSENTIALS_VOLUME_2, 1)
  55. AddConversationOption(conversation, "I will start on that now.", "dlg_39_2")
  56. StartConversation(conversation, NPC, Spawn, "There, you now have knowledge required to begin crafting. Speak to the Tradeskill Tutor for more detailed guidance on learning to craft, if you are interested in more information. Return to me when you are ready to select a crafting specialty.")
  57. end
  58. function Dialog1(NPC,Spawn)
  59. SetStepComplete(Spawn,5763,8)
  60. FaceTarget(NPC, Spawn)
  61. Dialog.New(NPC, Spawn)
  62. PlayFlavor(NPC, "", "", "hello", 0, 0, Spawn)
  63. Dialog.AddDialog("Hello, friend! Are you interested in joining The Elusive Commonwealth?")
  64. RandomVoiceOver(NPC, Spawn)
  65. Dialog.AddOption("I'm just saying hello!")
  66. Dialog.AddOption("What can I do here?", "CanDo")
  67. if GetTradeskillLevel(Spawn)<2 then
  68. Dialog.AddOption("I'm rather new at crafting. Can you help me?", "HelpMe")
  69. end
  70. Dialog.Start()
  71. end
  72. function CanDo(NPC,Spawn)
  73. FaceTarget(NPC, Spawn)
  74. Dialog.New(NPC, Spawn)
  75. PlayFlavor(NPC, "", "", "orate", 0, 0, Spawn)
  76. Dialog.AddDialog("Many things can be done at a tradeskill society and there are many in the city... but ours is obviously the best! Each is equipped with quality crafting stations and fuels needed to become proficient at any tradeskill class you might desire.")
  77. Dialog.AddOption("Anything else I should know?", "CanDo2")
  78. if GetTradeskillLevel(Spawn)<2 then
  79. Dialog.AddOption("I'm rather new at crafting. Can you help me?", "HelpMe")
  80. end
  81. Dialog.Start()
  82. end
  83. function CanDo2(NPC,Spawn)
  84. FaceTarget(NPC, Spawn)
  85. Dialog.New(NPC, Spawn)
  86. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  87. Dialog.AddDialog("Our society also has our very own Broker, who you can talk to in order to buy and sell items from other players. A very handy connection, indeed!")
  88. Dialog.AddOption("Thank you for all the information!")
  89. if GetTradeskillLevel(Spawn)<2 then
  90. Dialog.AddOption("I'm rather new at crafting. Can you help me?", "HelpMe")
  91. end
  92. Dialog.Start()
  93. end
  94. function HelpMe(NPC,Spawn)
  95. FaceTarget(NPC, Spawn)
  96. Dialog.New(NPC, Spawn)
  97. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  98. Dialog.AddDialog("Lets see... here are the basics to get you going on your path to becoming an Artisan. Scribe these recipies to learn the basics. If you are needing more information, step inside and there will be others that can help you.")
  99. Dialog.AddOption("What can I do here?", "CanDo")
  100. Dialog.AddOption("Thank you for all the information!")
  101. if GetTradeskillLevel(Spawn) <2 then
  102. SummonItem(Spawn,1030001,1)
  103. SetTradeskillLevel(Spawn,2)
  104. SetTradeskillClass(Spawn,1)
  105. SendMessage(Spawn, "You are now an Artisan!")
  106. SendPopUpMessage(Spawn, "You are now an Artisan!", 200, 200, 200)
  107. end
  108. Dialog.Start()
  109. end