NawalTahri.lua 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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 GetTradeskillLevel(Spawn) <2 then
  42. conversation = CreateConversation()
  43. --not HasItem(Spawn, ARTISAN_ESSENTIALS_VOLUME_2, 1) then
  44. AddConversationOption(conversation, "Yes, please teach me.", "dlg_39_1")
  45. AddConversationOption(conversation, "No, not at the moment.")
  46. 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?")
  47. else
  48. Say(NPC,"Good day! If you are looking for more crafting training, seek out the trainers in Qeynos Harbor. They can help you beyond the basics I provide.","Spawn")
  49. -- 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)
  50. end
  51. end
  52. end
  53. function dlg_39_1(NPC, Spawn)
  54. FaceTarget(NPC, Spawn)
  55. conversation = CreateConversation()
  56. if GetTradeskillLevel(Spawn) <2 then
  57. Quest = GetQuest(Spawn,5749)
  58. SummonItem(Spawn,1030001,1)
  59. SetTradeskillLevel(Spawn,2)
  60. SetTradeskillClass(Spawn,1)
  61. SendMessage(Spawn, "You are now an Artisan!")
  62. SendPopUpMessage(Spawn, "You are now an Artisan!", 200, 200, 200)
  63. end
  64. --[[ Revamped
  65. -- artisan essentials volume 2
  66. SummonItem(Spawn, ARTISAN_ESSENTIALS_VOLUME_2, 1)
  67. ]]--
  68. AddConversationOption(conversation, "I will start on that now.")
  69. 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.")
  70. end
  71. function Dialog1(NPC,Spawn)
  72. SetStepComplete(Spawn,5763,8)
  73. FaceTarget(NPC, Spawn)
  74. Dialog.New(NPC, Spawn)
  75. PlayFlavor(NPC, "", "", "hello", 0, 0, Spawn)
  76. Dialog.AddDialog("Hello, friend! Are you interested in joining The Elusive Commonwealth?")
  77. RandomVoiceOver(NPC, Spawn)
  78. Dialog.AddOption("I'm just saying hello!")
  79. Dialog.AddOption("What can I do here?", "CanDo")
  80. if GetTradeskillLevel(Spawn)<2 then
  81. Dialog.AddOption("I'm rather new at crafting. Can you help me?", "HelpMe")
  82. end
  83. Dialog.Start()
  84. end
  85. function CanDo(NPC,Spawn)
  86. FaceTarget(NPC, Spawn)
  87. Dialog.New(NPC, Spawn)
  88. PlayFlavor(NPC, "", "", "orate", 0, 0, Spawn)
  89. 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.")
  90. Dialog.AddOption("Anything else I should know?", "CanDo2")
  91. if GetTradeskillLevel(Spawn)<2 then
  92. Dialog.AddOption("I'm rather new at crafting. Can you help me?", "HelpMe")
  93. end
  94. Dialog.Start()
  95. end
  96. function CanDo2(NPC,Spawn)
  97. FaceTarget(NPC, Spawn)
  98. Dialog.New(NPC, Spawn)
  99. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  100. Dialog.AddDialog("Our society also has our very own Broker, who you can talk to in order to buy and sell items from other adventurers. A very handy connection, indeed!")
  101. Dialog.AddOption("Thank you for all the information!")
  102. if GetTradeskillLevel(Spawn)<2 then
  103. Dialog.AddOption("I'm rather new at crafting. Can you help me?", "HelpMe")
  104. end
  105. Dialog.Start()
  106. end
  107. function HelpMe(NPC,Spawn)
  108. FaceTarget(NPC, Spawn)
  109. Dialog.New(NPC, Spawn)
  110. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  111. 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.")
  112. Dialog.AddOption("What can I do here?", "CanDo")
  113. Dialog.AddOption("Thank you for all the information!")
  114. if GetTradeskillLevel(Spawn) <2 then
  115. SummonItem(Spawn,1030001,1)
  116. SetTradeskillLevel(Spawn,2)
  117. SetTradeskillClass(Spawn,1)
  118. SendMessage(Spawn, "You are now an Artisan!")
  119. SendPopUpMessage(Spawn, "You are now an Artisan!", 200, 200, 200)
  120. end
  121. Dialog.Start()
  122. end