ZekvilaDizelk.lua 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. local QUEST_1 = 237
  9. function spawn(NPC)
  10. ProvidesQuest(NPC, QUEST_1)
  11. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. end
  15. function hailed(NPC, Spawn)
  16. FaceTarget(NPC, Spawn)
  17. conversation = CreateConversation()
  18. RandomVoice(NPC, Spawn)
  19. if HasCompletedQuest(Spawn, QUEST_1) then
  20. Say(NPC, "You must not let that fool Ithelz rule the Scale Yard. I need the help of a diligent soldier... what do you need, peasant?", Spawn)
  21. elseif HasQuest(Spawn, QUEST_2) then
  22. OnQuest1(NPC, Spawn, conversation)
  23. else
  24. NotWhoIAmExpecting(NPC, Spawn, conversation)
  25. end
  26. end
  27. function RandomVoice(NPC, Spawn)
  28. local choice = math.random(1, 3)
  29. if choice == 1 then
  30. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1027.mp3", "", "", 0, 0, Spawn)
  31. elseif choice == 2 then
  32. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1027.mp3", "", "", 0, 0, Spawn)
  33. elseif choice == 3 then
  34. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1027.mp3", "", "", 0, 0, Spawn)
  35. end
  36. end
  37. ----------------------------------------------------------------------------------------------------------
  38. -- QUEST 1
  39. ----------------------------------------------------------------------------------------------------------
  40. function NotWhoIAmExpecting(NPC, Spawn, conversation)
  41. AddConversationOption(conversation, "Who were you expecting?", "dlg_9_1")
  42. AddConversationOption(conversation, "None. I'll leave you alone.")
  43. StartConversation(conversation, NPC, Spawn, "You are not who I was expecting. What game are you playing with me?")
  44. end
  45. function dlg_9_1(NPC, Spawn)
  46. FaceTarget(NPC, Spawn)
  47. conversation = CreateConversation()
  48. AddConversationOption(conversation, "What task do you need done?", "OfferQuest1")
  49. AddConversationOption(conversation, "Actually, you're wrong. It's not in my interests to do so. Bye.")
  50. 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.")
  51. end
  52. function OfferQuest1(NPC, Spawn)
  53. FaceTarget(NPC, Spawn)
  54. OfferQuest(NPC, Spawn, QUEST_1)
  55. end
  56. function OnQuest1(NPC, Spawn, conversation)
  57. if GetQuestStep(NPC, Spawn) == 1 then
  58. Say(NPC, "You are playing games with me, you deceitful little imp. Go collect the souls or you shall pay dearly.", Spawn)
  59. else
  60. AddConversationOption(conversation, "I have collected ten souls from the Undead Knights.", "dlg_1_1")
  61. AddConversationOption(conversation, "None. I'll leave you alone.")
  62. StartConversation(conversation, NPC, Spawn, "You are not who I was expecting. What game are you playing with me?")
  63. end
  64. end
  65. function dlg_1_1(NPC, Spawn)
  66. SetStepComplete(Spawn, QUEST_1, 2)
  67. FaceTarget(NPC, Spawn)
  68. conversation = CreateConversation()
  69. AddConversationOption(conversation, "Servant?! Don't ever refer to me... whatever. Bye.")
  70. 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.")
  71. end