HunterVannil.lua 3.7 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. dofile("SpawnScripts/Generic/UnknownLanguage.lua")
  9. local QUEST_1 = 222
  10. function spawn(NPC)
  11. ProvidesQuest(NPC, QUEST_1)
  12. EcologyEmotes(NPC,Spawn)
  13. end
  14. function EcologyEmotes(NPC,Spawn)
  15. local choice = math.random(1,4)
  16. if choice == 1 then
  17. PlayFlavor(NPC, "", "", "peer", 0, 0, Spawn)
  18. AddTimer(NPC, 12000, "EcologyEmotes",1,Spawn)
  19. elseif choice == 2 then
  20. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  21. AddTimer(NPC, 11000, "EcologyEmotes",1,Spawn)
  22. elseif choice == 3 then
  23. PlayFlavor(NPC, "", "", "sniff", 0, 0, Spawn)
  24. AddTimer(NPC, 10000, "EcologyEmotes",1,Spawn)
  25. elseif choice == 4 then
  26. PlayFlavor(NPC, "", "", "stare", 0, 0, Spawn)
  27. AddTimer(NPC, 8000, "EcologyEmotes",1,Spawn)
  28. end
  29. end
  30. function respawn(NPC)
  31. spawn(NPC)
  32. end
  33. function hailed(NPC, Spawn)
  34. FaceTarget(NPC, Spawn)
  35. if not HasLanguage(Spawn, 7) then
  36. Garbled(NPC,Spawn)
  37. else
  38. conversation = CreateConversation()
  39. if HasCompletedQuest(Spawn, QUEST_1) then
  40. local choice = math.random(1, 2)
  41. if choice == 1 then
  42. Say(NPC, "Come to get a better vantage point of the village, friend?", Spawn)
  43. elseif choice == 2 then
  44. PlayFlavor(NPC, "voiceover/english/hunter_vannil/qey_village05/huntervannil000.mp3", "", "", 1807378459, 3962910976, Spawn)
  45. 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)
  46. end
  47. else
  48. if HasQuest(Spawn, QUEST_1) then
  49. if GetQuestStep(Spawn, QUEST_1) == 2 then
  50. AddConversationOption(conversation, "I have slain the adders.", "AddersSlain")
  51. end
  52. elseif GetLevel(Spawn) >= 2 then
  53. AddConversationOption(conversation, "Where does that gate go?", "dlg_1_1")
  54. end
  55. PlayFlavor(NPC, "voiceover/english/hunter_vannil/qey_village05/huntervannil000.mp3", "", "", 1807378459, 3962910976, Spawn)
  56. AddConversationOption(conversation, "Not really, I am just doing a bit of exploring. ")
  57. 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?")
  58. end
  59. end
  60. end
  61. function dlg_1_1(NPC, Spawn)
  62. FaceTarget(NPC, Spawn)
  63. conversation = CreateConversation()
  64. PlayFlavor(NPC, "voiceover/english/hunter_vannil/qey_village05/huntervannil001.mp3", "", "", 929186001, 4080341564, Spawn)
  65. AddConversationOption(conversation, "I'm up for a little snake hunting.", "OfferQuest1")
  66. AddConversationOption(conversation, "I'm sorry, but I'm not up to snake hunting.")
  67. 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!")
  68. end
  69. function OfferQuest1(NPC, Spawn)
  70. FaceTarget(NPC, Spawn)
  71. OfferQuest(NPC, Spawn, QUEST_1)
  72. end
  73. function AddersSlain(NPC, Spawn)
  74. SetStepComplete(Spawn, QUEST_1, 2)
  75. FaceTarget(NPC, Spawn)
  76. conversation = CreateConversation()
  77. PlayFlavor(NPC, "", "", "smile", 0, 0, Spawn)
  78. AddConversationOption(conversation, "You're welcome.")
  79. StartConversation(conversation, NPC, Spawn, "You killed the rock adders! On behalf of our village, I thank you for carrying out this dangerous quest.")
  80. end