9
3

afallenblackguard.lua 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. --[[
  2. Script Name : SpawnScripts/Commonlands/afallenblackguard.lua
  3. Script Author : premierio015
  4. Script Date : 2019.01.31 02:01:43
  5. Script Purpose :
  6. :
  7. --]]
  8. local AnErodedKey = 5251
  9. function spawn(NPC)
  10. AddTimer(NPC, 5000, "anim")
  11. ProvidesQuest(NPC, AnErodedKey)
  12. end
  13. function anim(NPC, Spawn)
  14. PlayAnimation(NPC, 12166)
  15. AddTimer(NPC, 30000, "anim")
  16. end
  17. function hailed(NPC, Spawn)
  18. FaceTarget(NPC, Spawn)
  19. if not HasQuest(Spawn, AnErodedKey) and not HasCompletedQuest(Spawn, AnErodedKey) then
  20. local conversation = CreateConversation()
  21. AddConversationOption(conversation, "What important information?", "Option1")
  22. AddConversationOption(conversation, "I am sorry but I cannot help.")
  23. StartConversation(conversation, NPC, Spawn, "I don't have much strength so I will make this quick. I was on assignment to intercept a Bloodskull messenger because he is rumored to have some important information. ")
  24. PlayFlavor(NPC, "fallen_blackguard/commonlands/qst_fallen_blackguard001.mp3", "", "nod", 4235434346, 1973784174, Spawn)
  25. elseif GetQuestStep(Spawn, AnErodedKey) < 6 then
  26. progress(NPC, Spawn)
  27. elseif GetQuestStep(Spawn, AnErodedKey) == 6 then
  28. finish(NPC, Spawn)
  29. elseif HasCompletedQuest(Spawn, AnErodedKey) then
  30. local conversation = CreateConversation()
  31. AddConversationOption(conversation, "I will see what I can find.")
  32. StartConversation(conversation, NPC, Spawn, "Were you able to break into the excavation site? I am sure there are many riches to be had there.")
  33. end
  34. end
  35. function Option1(NPC, Spawn)
  36. FaceTarget(NPC, Spawn)
  37. local conversation = CreateConversation()
  38. AddConversationOption(conversation, "How can I help?", "Offer")
  39. AddConversationOption(conversation, "I am not interested.")
  40. StartConversation(conversation, NPC, Spawn, "Unfortunately I failed in my attempt to gather this information, but if you are able to locate him I think he is in possession of something that would be worth your while.")
  41. PlayFlavor(NPC, "fallen_blackguard/commonlands/qst_fallen_blackguard002.mp3", "", "pout", 326567968, 969149751, Spawn)
  42. end
  43. function Offer(NPC, Spawn)
  44. OfferQuest(NPC, Spawn, AnErodedKey)
  45. end
  46. function respawn(NPC)
  47. spawn(NPC)
  48. end
  49. function progress(NPC, Spawn)
  50. FaceTarget(NPC, Spawn)
  51. local conversation = CreateConversation()
  52. AddConversationOption(conversation, "No; I am still investigating.")
  53. StartConversation(conversation, NPC, Spawn, "Have you found out what the messenger was after?")
  54. PlayFlavor(NPC, "fallen_blackguard/commonlands/qst_fallen_blackguard004.mp3", "", "nod", 1424723305, 2939944769, Spawn)
  55. end
  56. function finish(NPC, Spawn)
  57. SetStepComplete(Spawn, AnErodedKey, 6)
  58. PlayFlavor(NPC, "fallen_blackguard/commonlands/qst_fallen_blackguard005.mp3", "", "thanks", 2586190464, 2791846728, Spawn)
  59. FaceTarget(NPC, Spawn)
  60. local conversation = CreateConversation()
  61. AddConversationOption(conversation, "I was happy to help.")
  62. StartConversation(conversation, NPC, Spawn, "I am happy to see that you were able to collect the ore fragments, this seems to be what he was trying to retrieve. It seems that these pieces are able to be fashioned into a key that will allow you access to the Bloodskull excavation site. I hope that you can go forward and defeat the orcs for the trouble they have caused freeport.")
  63. end