9
3

ZekvilaDizelk.lua 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. --[[
  2. Script Name : SpawnScripts/Graveyard/ZekvilaDizelk.lua
  3. Script Purpose : Zekvila Dizelk
  4. Script Author : scatman
  5. Script Date : 2009.07.12
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local QUEST_1 = 5263
  10. local AWorthyTeacher = 5687
  11. function spawn(NPC)
  12. ProvidesQuest(NPC, QUEST_1)
  13. ProvidesQuest(NPC, AWorthyTeacher)
  14. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function hailed(NPC, Spawn)
  19. FaceTarget(NPC, Spawn)
  20. conversation = CreateConversation()
  21. RandomVoice(NPC, Spawn)
  22. if not HasQuest(Spawn, QUEST_1) and not HasCompletedQuest(Spawn, QUEST_1) then
  23. NotWhoIAmExpecting(NPC, Spawn, conversation)
  24. end
  25. if HasCompletedQuest(Spawn, QUEST_1) then
  26. if not HasQuest(Spawn, AWorthyTeacher) and not HasCompletedQuest(Spawn, AWorthyTeacher) then
  27. FaceTarget(NPC, Spawn)
  28. Dialog.New(NPC, Spawn)
  29. Dialog.AddDialog("Ah, you again. Yes. How fortunate you have returned. I have great plans for these souls, but they have proven most obstinate. They resist control, and will not bend to my will. Most vexing. I fear a stronger magic is required to make them obedient. I need you to gather some information for me.")
  30. Dialog.AddOption("I'll help. What do you want me to do?","Dialog1")
  31. Dialog.Start()
  32. end
  33. end
  34. if HasCompletedQuest(Spawn, AWorthyTeacher) then
  35. RandomVoice(NPC, Spawn)
  36. end
  37. if GetQuestStep(Spawn, QUEST_1) == 2 then
  38. OnQuest1(NPC, Spawn, conversation)
  39. end
  40. if GetQuestStep(Spawn, AWorthyTeacher) == 2 then
  41. FaceTarget(NPC, Spawn)
  42. Dialog.New(NPC, Spawn)
  43. Dialog.AddDialog("GYAAAGGGHHH!!! How dare she! I swear by the blood of my brood she will pay for this insult! Let Verin Ithelz and all others know that Raban is now my enemy! I will tear her throat out with my teeth! I will claw her heart from her chest!")
  44. Dialog.AddOption("Aren't I going to get pa-- Umm... I mean, yes mistress.")
  45. Dialog.Start()
  46. SetStepComplete(Spawn, AWorthyTeacher, 2)
  47. else
  48. end
  49. function RandomVoice(NPC, Spawn)
  50. local choice = math.random(1, 3)
  51. if choice == 1 then
  52. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1027.mp3", "", "", 0, 0, Spawn)
  53. elseif choice == 2 then
  54. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1027.mp3", "", "", 0, 0, Spawn)
  55. elseif choice == 3 then
  56. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1027.mp3", "", "", 0, 0, Spawn)
  57. end
  58. end
  59. ----------------------------------------------------------------------------------------------------------
  60. -- QUEST 1
  61. ----------------------------------------------------------------------------------------------------------
  62. function NotWhoIAmExpecting(NPC, Spawn, conversation)
  63. AddConversationOption(conversation, "Who were you expecting?", "dlg_9_1")
  64. AddConversationOption(conversation, "None. I'll leave you alone.")
  65. StartConversation(conversation, NPC, Spawn, "You are not who I was expecting. What game are you playing with me?")
  66. end
  67. function dlg_9_1(NPC, Spawn)
  68. FaceTarget(NPC, Spawn)
  69. conversation = CreateConversation()
  70. AddConversationOption(conversation, "What task do you need done?", "OfferQuest1")
  71. AddConversationOption(conversation, "Actually, you're wrong. It's not in my interests to do so. Bye.")
  72. StartConversation(conversation, NPC, Spawn, "Gyah! How dare you speak to me with a sharp tongue! Who do you think you are, fool? You do not bear the dark instrument; therefore, I've no need for you. Unless ... yes ... yes ... unless my emissary failed at his task. Yes, you shall succeed where the emissary failed. Trust me - it is in your best interest to agree with me.")
  73. end
  74. function OfferQuest1(NPC, Spawn)
  75. FaceTarget(NPC, Spawn)
  76. OfferQuest(NPC, Spawn, QUEST_1)
  77. end
  78. function OnQuest1(NPC, Spawn, conversation)
  79. if GetQuestStep(NPC, Spawn) == 1 then
  80. Say(NPC, "You are playing games with me, you deceitful little imp. Go collect the souls or you shall pay dearly.", Spawn)
  81. else
  82. AddConversationOption(conversation, "I have collected ten souls from the Undead Knights.", "dlg_1_1")
  83. AddConversationOption(conversation, "None. I'll leave you alone.")
  84. StartConversation(conversation, NPC, Spawn, "You are not who I was expecting. What game are you playing with me?")
  85. end
  86. end
  87. function dlg_1_1(NPC, Spawn)
  88. SetStepComplete(Spawn, QUEST_1, 2)
  89. FaceTarget(NPC, Spawn)
  90. conversation = CreateConversation()
  91. AddConversationOption(conversation, "Servant?! Don't ever refer to me... whatever. Bye.")
  92. StartConversation(conversation, NPC, Spawn, "Give me the crystal. Ah, yes, it's filled. With these souls, Ithelz's puppet barbarians cannot prevent me from ruling over the district. You served me well, servant. Take this coin as a token of my gratitude.")
  93. end
  94. --====================Quest 2
  95. function Dialog1(NPC, Spawn)
  96. FaceTarget(NPC, Spawn)
  97. Dialog.New(NPC, Spawn)
  98. Dialog.AddDialog("I want you to travel to Stonestair Byway and find an Erudite named Raban. She's insufferable, but is well-versed in the necromantic arts. She may be able to discen what I am doing wro-- ... I mean, what immense power I must summon. Give her this missive and treat her with respect. Do not trifle with her ... or with me.")
  99. Dialog.AddOption("I'll go give her the message.")
  100. Dialog.Start()
  101. OfferQuest(NPC, Spawn, AWorthyTeacher)
  102. end