TaskmastersAssistantKozma.lua 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. --[[
  2. Script Name : SpawnScripts/Commonlands/TaskmastersAssistantKozma.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.02.23 10:02:54
  5. Script Purpose :
  6. :
  7. --]]
  8. local FarSeasRequisitionWC124 = 5212
  9. local FarSeasRequisitionWC002 = 5213
  10. local FarSeasRequisitionWC154 = 5214
  11. local FarSeasRequisitionWC077 = 5215
  12. local FarSeasRequisitionWC045 = 5216
  13. local FarSeasRequisitionFG016 = 5240
  14. local FarSeasRequisitionFG073 = 5241
  15. local FarSeasRequisitionFG158 = 5242
  16. local FarSeasRequisitionFG212 = 5243
  17. local FarSeasRequisitionFG244 = 5244
  18. function spawn(NPC)
  19. SetPlayerProximityFunction(NPC, 10, "InRange")
  20. end
  21. function InRange(NPC, Spawn)
  22. PlayFlavor(NPC, "voiceover/english/taskmaster_s_assistant_koz_ma/commonlands/quest/015_taskmaster_assistant_kozma_qst_callout_b3f14a2b.mp3", "Bring your FSR's to me. If you don't have them, then I don't want to talk to you.", "", 2096341840, 1469770936, Spawn)
  23. end
  24. function hailed(NPC, Spawn)
  25. FaceTarget(NPC, Spawn)
  26. local conversation = CreateConversation()
  27. PlayFlavor(NPC, "voiceover/english/taskmaster_s_assistant_koz_ma/commonlands/quests/taskmaster/assistant_kozma001.mp3", "", "", 1822760720, 2300113695, Spawn)
  28. AddConversationOption(conversation, "What requisition?", "Option1")
  29. if GetQuestStep(Spawn, FarSeasRequisitionWC124) == 2 then
  30. AddConversationOption(conversation, "I have requisition # WC 124", "COMPLETE")
  31. elseif GetQuestStep(Spawn, FarSeasRequisitionWC002) == 5 then
  32. AddConversationOption(conversation, "I have requisition # WC 002", "COMPLETE")
  33. elseif GetQuestStep(Spawn, FarSeasRequisitionWC154) == 2 then
  34. AddConversationOption(conversation, "I have requisition # WC 154", "COMPLETE")
  35. elseif GetQuestStep(Spawn, FarSeasRequisitionWC077) == 3 then
  36. AddConversationOption(conversation, "I have requisition # WC 077", "COMPLETE")
  37. elseif GetQuestStep(Spawn, FarSeasRequisitionWC045) == 2 then
  38. AddConversationOption(conversation, "I have requisition # WC 045", "COMPLETE")
  39. elseif GetQuestStep(Spawn, FarSeasRequisitionFG016) == 4 then
  40. AddConversationOption(conversation, "I have requisition # FG 016", "COMPLETE")
  41. elseif GetQuestStep(Spawn, FarSeasRequisitionFG073) == 3 then
  42. AddConversationOption(conversation, "I have requisition # FG 073", "COMPLETE")
  43. elseif GetQuestStep(Spawn, FarSeasRequisitionFG158) == 3 then
  44. AddConversationOption(conversation, "I have requisition # FG 158", "COMPLETE")
  45. elseif GetQuestStep(Spawn, FarSeasRequisitionFG212) == 2 then
  46. AddConversationOption(conversation, "I have requisition # FG 212", "COMPLETE")
  47. elseif GetQuestStep(Spawn, FarSeasRequisitionFG244) == 2 then
  48. AddConversationOption(conversation, "I have requisition # FG 244", "COMPLETE")
  49. end
  50. AddConversationOption(conversation, "Then I'll leave.")
  51. StartConversation(conversation, NPC, Spawn, "Where's your requisition? Only those who filled requisitions should speak to me.")
  52. end
  53. function Option1(NPC, Spawn)
  54. FaceTarget(NPC, Spawn)
  55. local conversation = CreateConversation()
  56. PlayFlavor(NPC, "voiceover/english/taskmaster_s_assistant_koz_ma/commonlands/quests/taskmaster/assistant_kozma002.mp3", "", "", 4246141797, 1251397983, Spawn)
  57. AddConversationOption(conversation, "I can be a huntsman.", "Option2")
  58. AddConversationOption(conversation, "Thanks for the heads up.")
  59. StartConversation(conversation, NPC, Spawn, "Why are you wasting my time? The Far Seas Trading Company pays huntsmen to track down various items and beasts. Sometimes the huntsmen inadvertently feed the beasts and never return. Too bad ... for them.")
  60. end
  61. function Option2(NPC, Spawn)
  62. FaceTarget(NPC, Spawn)
  63. local conversation = CreateConversation()
  64. PlayFlavor(NPC, "voiceover/english/taskmaster_s_assistant_koz_ma/commonlands/quests/taskmaster/assistant_kozma003.mp3", "", "", 1400846330, 1112489501, Spawn )
  65. AddConversationOption(conversation, "I got it, thanks.")
  66. StartConversation(conversation, NPC, Spawn, "No! No, no, no! We have plenty of huntsmen! No more huntsmen! And that means you! Okay? Got it? ... That is, unless of course, you happen to find an unfilled order. Get it?")
  67. end
  68. function COMPLETE(NPC, Spawn)
  69. FaceTarget(NPC, Spawn)
  70. local conversation = CreateConversation()
  71. PlayFlavor(NPC, "voiceover/english/taskmaster_s_assistant_koz_ma/commonlands/quests/taskmaster/assistant_kozma004.mp3", "", "", 1286861813, 2432767981, Spawn)
  72. if GetQuestStep(Spawn, FarSeasRequisitionWC124) == 2 then
  73. SetStepComplete(Spawn, FarSeasRequisitionWC124, 2)
  74. elseif GetQuestStep(Spawn, FarSeasRequisitionWC002) == 5 then
  75. SetStepComplete(Spawn, FarSeasRequisitionWC002, 5)
  76. elseif GetQuestStep(Spawn, FarSeasRequisitionWC154) == 2 then
  77. SetStepComplete(Spawn, FarSeasRequisitionWC154, 2)
  78. elseif GetQuestStep(Spawn, FarSeasRequisitionWC077) == 3 then
  79. SetStepComplete(Spawn, FarSeasRequisitionWC077, 3)
  80. elseif GetQuestStep(Spawn, FarSeasRequisitionWC045) == 2 then
  81. SetStepComplete(Spawn, FarSeasRequisitionWC045, 2)
  82. elseif GetQuestStep(Spawn, FarSeasRequisitionFG016) == 4 then
  83. SetStepComplete(Spawn, FarSeasRequisitionFG016, 4)
  84. elseif GetQuestStep(Spawn, FarSeasRequisitionFG073) == 3 then
  85. SetStepComplete(Spawn, FarSeasRequisitionFG073, 3)
  86. elseif GetQuestStep(Spawn, FarSeasRequisitionFG158) == 3 then
  87. SetStepComplete(Spawn, FarSeasRequisitionFG158, 3)
  88. elseif GetQuestStep(Spawn, FarSeasRequisitionFG212) == 2 then
  89. SetStepComplete(Spawn, FarSeasRequisitionFG212, 2)
  90. elseif GetQuestStep(Spawn, FarSeasRequisitionFG244) == 2 then
  91. SetStepComplete(Spawn, FarSeasRequisitionFG244, 2)
  92. AddConversationOption(conversation, "Okay.")
  93. StartConversation(conversation, NPC, Spawn, "Lets me see ... Yes, yes! Here we are. This order is overdue, and the Far Seas Trading Company never pays full price for late orders. Consider yourself lucky that you get paid at all. Thank you, come again.")
  94. end
  95. end
  96. function respawn(NPC)
  97. spawn(NPC)
  98. end