HunterVannil.lua 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. --[[
  2. Script Name : SpawnScripts/WillowWood/HunterVannil.lua
  3. Script Purpose : Hunter Vannil
  4. Script Author : Scatman
  5. Script Date : 2009.09.27
  6. Script Notes : This spawn speaks Ayr'Dal
  7. --]]
  8. local QUEST_1 = 222
  9. function spawn(NPC)
  10. ProvidesQuest(NPC, QUEST_1)
  11. EcologyEmotes(NPC,Spawn)
  12. end
  13. function EcologyEmotes(NPC,Spawn)
  14. local choice = math.random(1,4)
  15. if choice == 1 then
  16. PlayFlavor(NPC, "", "", "peer", 0, 0, Spawn)
  17. AddTimer(NPC, 12000, "EcologyEmotes",1,Spawn)
  18. elseif choice == 2 then
  19. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  20. AddTimer(NPC, 11000, "EcologyEmotes",1,Spawn)
  21. elseif choice == 3 then
  22. PlayFlavor(NPC, "", "", "sniff", 0, 0, Spawn)
  23. AddTimer(NPC, 10000, "EcologyEmotes",1,Spawn)
  24. elseif choice == 4 then
  25. PlayFlavor(NPC, "", "", "stare", 0, 0, Spawn)
  26. AddTimer(NPC, 8000, "EcologyEmotes",1,Spawn)
  27. end
  28. end
  29. function respawn(NPC)
  30. spawn(NPC)
  31. end
  32. function hailed(NPC, Spawn)
  33. FaceTarget(NPC, Spawn)
  34. if not HasLanguage(Spawn, 7) then
  35. PlayFlavor(NPC, "voiceover/english/halfelf/ft/halfelf/halfelf_eco_garble_garbled_gm_2e8f1542.mp3", "Another lost wanderer clawing at the gates. What?","ponder", 1894354512, 3476177255, Spawn, 7)
  36. else
  37. conversation = CreateConversation()
  38. if HasCompletedQuest(Spawn, QUEST_1) then
  39. local choice = math.random(1, 2)
  40. if choice == 1 then
  41. Say(NPC, "Come to get a better vantage point of the village, friend?", Spawn)
  42. elseif choice == 2 then
  43. PlayFlavor(NPC, "voiceover/english/hunter_vannil/qey_village05/huntervannil000.mp3", "", "", 1807378459, 3962910976, Spawn)
  44. Say(NPC, "Good day to you, friend. So you too have an interest in keeping an eye on who comes and goes out of these gates?", Spawn)
  45. end
  46. else
  47. if HasQuest(Spawn, QUEST_1) then
  48. if GetQuestStep(Spawn, QUEST_1) == 2 then
  49. AddConversationOption(conversation, "I have slain the adders.", "AddersSlain")
  50. end
  51. elseif GetLevel(Spawn) >= 2 then
  52. AddConversationOption(conversation, "Where does that gate go?", "dlg_1_1")
  53. end
  54. PlayFlavor(NPC, "voiceover/english/hunter_vannil/qey_village05/huntervannil000.mp3", "", "", 1807378459, 3962910976, Spawn)
  55. AddConversationOption(conversation, "Not really, I am just doing a bit of exploring. ")
  56. StartConversation(conversation, NPC, Spawn, "Good day to you, friend. So you too have an interest in keeping an eye on who comes and goes out of these gates?")
  57. end
  58. end
  59. end
  60. function dlg_1_1(NPC, Spawn)
  61. FaceTarget(NPC, Spawn)
  62. conversation = CreateConversation()
  63. PlayFlavor(NPC, "voiceover/english/hunter_vannil/qey_village05/huntervannil001.mp3", "", "", 929186001, 4080341564, Spawn)
  64. AddConversationOption(conversation, "I'm up for a little snake hunting.", "OfferQuest1")
  65. AddConversationOption(conversation, "I'm sorry, but I'm not up to snake hunting.")
  66. StartConversation(conversation, NPC, Spawn, "That gate leads to the Elddar and the other gate leads to the Forest Ruins. Many young adventurers journey through the gates testing their mettle against the dangerous creatures that inhabit the area. Say, you seem courageous... would you help rid the area of rock adders? The creatures are a lethal threat to our people!")
  67. end
  68. function OfferQuest1(NPC, Spawn)
  69. FaceTarget(NPC, Spawn)
  70. OfferQuest(NPC, Spawn, QUEST_1)
  71. end
  72. function AddersSlain(NPC, Spawn)
  73. SetStepComplete(Spawn, QUEST_1, 2)
  74. FaceTarget(NPC, Spawn)
  75. conversation = CreateConversation()
  76. AddConversationOption(conversation, "You're welcome.")
  77. StartConversation(conversation, NPC, Spawn, "You killed the rock adders! On behalf of our village, I thank you for carrying out this dangerous quest.")
  78. end