9
3

TavalZane.lua 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. --[[
  2. Script Name : SpawnScripts/WillowWood/TavalZane.lua
  3. Script Purpose : Taval Zane
  4. Script Author : Scatman
  5. Script Date : 2009.09.15
  6. Script Notes : Updated by Jabantiz (4/21/2017)
  7. --]]
  8. local ATaskForDavyn = 215
  9. function spawn(NPC)
  10. end
  11. function respawn(NPC)
  12. spawn(NPC)
  13. end
  14. function hailed(NPC, Spawn)
  15. FaceTarget(NPC, Spawn)
  16. conversation = CreateConversation()
  17. if HasCompletedQuest(Spawn, ATaskForDavyn) then
  18. IsItDeadYet(NPC, Spawn, conversation)
  19. elseif HasQuest(Spawn, ATaskForDavyn) then
  20. if GetQuestStep(Spawn, ATaskForDavyn) == 1 then
  21. GoodDay(NPC, Spawn, conversation)
  22. else
  23. IsItDeadYet(NPC, Spawn, conversation)
  24. end
  25. else
  26. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/taval_zane/qey_village05/quests/taval_zane/taval_zane001.mp3", "Good day. I see you've chosen the safety of indoors too!", "", 1526657502, 3373773349, Spawn)
  27. -- Say(NPC, "I'm really not in the mood to chat right now, friend.", Spawn)
  28. end
  29. end
  30. function GoodDay(NPC, Spawn, conversation)
  31. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/taval_zane/qey_village05/quests/taval_zane/taval_zane001.mp3", "", "", 1526657502, 3373773349, Spawn)
  32. AddConversationOption(conversation, "Are you the one who reported seeing the rabid wolf?", "YesThatWasMe")
  33. AddConversationOption(conversation, "We can speak of this later, I must be going.")
  34. StartConversation(conversation, NPC, Spawn, "Good day. I see you've chosen the safety of indoors too!")
  35. end
  36. function YesThatWasMe(NPC, Spawn)
  37. FaceTarget(NPC, Spawn)
  38. conversation = CreateConversation()
  39. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/taval_zane/qey_village05/quests/taval_zane/taval_zane002.mp3", "", "", 2737126508, 2185825783, Spawn)
  40. AddConversationOption(conversation, "Where were you when you saw it?", "JustOutside")
  41. AddConversationOption(conversation, "I will return later to discuss this.")
  42. StartConversation(conversation, NPC, Spawn, "Yes, that was me. I think I'll wait it out in here, where it's safe.")
  43. end
  44. function JustOutside(NPC, Spawn)
  45. SetStepComplete(Spawn, ATaskForDavyn, 1)
  46. FaceTarget(NPC, Spawn)
  47. conversation = CreateConversation()
  48. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/taval_zane/qey_village05/quests/taval_zane/taval_zane003.mp3", "", "", 2766240445, 2864858945, Spawn)
  49. AddConversationOption(conversation, "Thank you for your information.")
  50. StartConversation(conversation, NPC, Spawn, "Just outside the inn last night! I ran inside as fast as I could when I saw it. It chased me -- oh, it was certainly aggressive, but I managed to make it inside and close the door. When I peeked out later, it was heading toward the scribe. Talk to Jana Windstream; she always spends time outside the scribe's place. If she's still...alive!")
  51. end
  52. function IsItDeadYet(NPC, Spawn, conversation)
  53. if (HasCompletedQuest(Spawn, ATaskForDavyn)) or (HasQuest(Spawn, ATaskForDavyn) and (GetQuestStep(Spawn, ATaskForDavyn) == 5 or GetQuestStep(Spawn, ATaskForDavyn) == 6)) then
  54. AddConversationOption(conversation, "Yes, the beast has been put down.", "AhWonderful")
  55. end
  56. AddConversationOption(conversation, "No it is still alive.")
  57. StartConversation(conversation, NPC, Spawn, "Is it dead yet?")
  58. end
  59. function AhWonderful(NPC, Spawn)
  60. FaceTarget(NPC, Spawn)
  61. conversation = CreateConversation()
  62. AddConversationOption(conversation, "You're welcome.")
  63. StartConversation(conversation, NPC, Spawn, "Ah, wonderful! If you can't feel safe in your own home where can you feel safe. Thank you.")
  64. end