9
3

VtalNarin.lua 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. --[[
  2. Script Name : SpawnScripts/Commonlands/VtalNarin.lua
  3. Script Author : neatz09
  4. Script Date : 2019.08.28 09:08:17
  5. Script Purpose :
  6. :
  7. --]]
  8. local DoOrDieSaysIrizian = 5226
  9. local NarinHeirloom = 5227
  10. function spawn(NPC)
  11. SetPlayerProximityFunction(NPC, 10, "InRange")
  12. end
  13. function InRange(NPC, Spawn)
  14. PlayFlavor(NPC, "voiceover/english/v_tal_narin/commonlands/service/questgiver/020_vtal_narin_multhail1_733f89e7.mp3", "Get away from me! I know you're like the others! You heard me! Go away!", "", 1398229495, 3359813491, Spawn)
  15. end
  16. function hailed(NPC, Spawn)
  17. FaceTarget(NPC, Spawn)
  18. local conversation = CreateConversation()
  19. if GetQuestStep(Spawn, DoOrDieSaysIrizian) == 2 then
  20. AddConversationOption(conversation, "I'm here as a favor to someone else.", "Option1")
  21. elseif GetQuestStep(Spawn, NarinHeirloom) == 2 then
  22. AddConversationOption(conversation, "I'll tell you what I found once you have paid me.", "Option4")
  23. end
  24. AddConversationOption(conversation, "Goodbye.")
  25. StartConversation(conversation, NPC, Spawn, "You ridicule my loss as well!")
  26. PlayFlavor(NPC, "voiceover/english/v_tal_narin/commonlands/quests/vtalnarin/vtalnarin000.mp3", "", "", 2801900582, 1265268365, Spawn)
  27. end
  28. function Option1(NPC, Spawn)
  29. FaceTarget(NPC, Spawn)
  30. local conversation = CreateConversation()
  31. AddConversationOption(conversation, "No, I haven't.", "Option2")
  32. AddConversationOption(conversation, "No, and I don't care.")
  33. StartConversation(conversation, NPC, Spawn, "You haven't heard about my brother's failed expedition into Fallen Gate?")
  34. PlayFlavor(NPC, "voiceover/english/v_tal_narin/commonlands/quests/vtalnarin/vtalnarin001.mp3", "", "", 2495431857, 2586565982, Spawn)
  35. end
  36. function Option2(NPC, Spawn)
  37. FaceTarget(NPC, Spawn)
  38. local conversation = CreateConversation()
  39. AddConversationOption(conversation, "What would you be willing to give someone to look for it?", "Option3")
  40. AddConversationOption(conversation, "I could look for it for you.", "Option3")
  41. AddConversationOption(conversation, "Well I'm certainly not going to help you.")
  42. StartConversation(conversation, NPC, Spawn, "Three months ago, my brother left on an expedition to look for an old family heirloom in Fallen Gate. About two weeks ago he stopped writing me, and I'm afraid he lost the heirloom. I would look for it but I must take care of important matters here.")
  43. PlayFlavor(NPC, "voiceover/english/v_tal_narin/commonlands/quests/vtalnarin/vtalnarin002.mp3", "", "", 1992307355, 4176727239, Spawn)
  44. end
  45. function Option3(NPC, Spawn)
  46. FaceTarget(NPC, Spawn)
  47. local conversation = CreateConversation()
  48. AddConversationOption(conversation, "Alright, I'll do it.", "offer")
  49. AddConversationOption(conversation, "I'm sorry, but I don't have time to help you.")
  50. StartConversation(conversation, NPC, Spawn, "If you find the heirloom, I will pay for your services. If you can, find out what happened to my worthless brother.")
  51. PlayFlavor(NPC, "voiceover/english/v_tal_narin/commonlands/quests/vtalnarin/vtalnarin003.mp3", "", "", 4023042612, 929244024, Spawn)
  52. end
  53. function Option4(NPC, Spawn)
  54. SetStepComplete(Spawn, NarinHeirloom, 2)
  55. FaceTarget(NPC, Spawn)
  56. local conversation = CreateConversation()
  57. AddConversationOption(conversation, "You work for Qeynos? I need to go now...", "spawnaccess")
  58. StartConversation(conversation, NPC, Spawn, "Enjoy your payment. The city of Qeynos and the Concordium thank you.")
  59. PlayFlavor(NPC, "voiceover/english/v_tal_narin/commonlands/quests/vtalnarin/vtalnarin009.mp3", "", "", 1418505695, 2579481018, Spawn)
  60. end
  61. function transform(NPC, Spawn)
  62. RemoveSpawnAccess(NPC, Spawn)
  63. AddTimer(NPC, 5000, "transform2", 1, Spawn)
  64. end
  65. function transform2(NPC, Spawn)
  66. local zone = GetZone(Spawn)
  67. local X = GetX(NPC)
  68. local Y = GetY(NPC)
  69. local Z = GetZ(NPC)
  70. local Transformation = SpawnMob(zone, 331139, true, X, Y, Z, 140)
  71. AddTimer(NPC, 900000, "SpawnAccess", 1, Spawn)
  72. end
  73. function SpawnAccess(NPC, Spawn)
  74. AddSpawnAccess(NPC, Spawn)
  75. end
  76. function offer(NPC, Spawn)
  77. OfferQuest(NPC, Spawn, NarinHeirloom)
  78. end
  79. function respawn(NPC)
  80. spawn(NPC)
  81. end