TavalZane.lua 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. Say(NPC, "I'm really not in the mood to chat right now, friend.", Spawn)
  27. end
  28. end
  29. function GoodDay(NPC, Spawn, conversation)
  30. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/taval_zane/qey_village05/quests/taval_zane/taval_zane001.mp3", "", "", 1526657502, 3373773349, Spawn)
  31. AddConversationOption(conversation, "Are you the one who reported seeing the rabid wolf?", "YesThatWasMe")
  32. AddConversationOption(conversation, "We can speak of this later, I must be going.")
  33. StartConversation(conversation, NPC, Spawn, "Good day. I see you've chosen the safety of indoors too!")
  34. end
  35. function YesThatWasMe(NPC, Spawn)
  36. FaceTarget(NPC, Spawn)
  37. conversation = CreateConversation()
  38. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/taval_zane/qey_village05/quests/taval_zane/taval_zane002.mp3", "", "", 2737126508, 2185825783, Spawn)
  39. AddConversationOption(conversation, "Where were you when you saw it?", "JustOutside")
  40. AddConversationOption(conversation, "I will return later to discuss this.")
  41. StartConversation(conversation, NPC, Spawn, "Yes, that was me. I think I'll wait it out in here, where it's safe.")
  42. end
  43. function JustOutside(NPC, Spawn)
  44. SetStepComplete(Spawn, ATaskForDavyn, 1)
  45. FaceTarget(NPC, Spawn)
  46. conversation = CreateConversation()
  47. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/taval_zane/qey_village05/quests/taval_zane/taval_zane003.mp3", "", "", 2766240445, 2864858945, Spawn)
  48. AddConversationOption(conversation, "Thank you for your information.")
  49. 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!")
  50. end
  51. function IsItDeadYet(NPC, Spawn, conversation)
  52. if (HasCompletedQuest(Spawn, ATaskForDavyn)) or (HasQuest(Spawn, ATaskForDavyn) and (GetQuestStep(Spawn, ATaskForDavyn) == 5 or GetQuestStep(Spawn, ATaskForDavyn) == 6)) then
  53. AddConversationOption(conversation, "Yes, the beast has been put down.", "AhWonderful")
  54. end
  55. AddConversationOption(conversation, "No it is still alive.")
  56. StartConversation(conversation, NPC, Spawn, "Is it dead yet?")
  57. end
  58. function AhWonderful(NPC, Spawn)
  59. FaceTarget(NPC, Spawn)
  60. conversation = CreateConversation()
  61. AddConversationOption(conversation, "You're welcome.")
  62. StartConversation(conversation, NPC, Spawn, "Ah, wonderful! If you can't feel safe in your own home where can you feel safe. Thank you.")
  63. end