CaptainIsta.lua 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. --[[
  2. Script Name : SpawnScripts/Commonlands/CaptainIsta.lua
  3. Script Purpose : Captain Ista
  4. Script Author : premierio015
  5. Script Date : 08/28/2019
  6. Script Notes :
  7. --]]
  8. local TheTrailOfSlime = 5323
  9. function spawn(NPC)
  10. ProvidesQuest(NPC, TheTrailOfSlime)
  11. SetPlayerProximityFunction(NPC, 15, "InRange")
  12. end
  13. function InRange(NPC, Spawn)
  14. FaceTarget(NPC, Spawn)
  15. PlayFlavor(NPC, "", "What a waste of time, standing around and trying to touch everything...Your mother sure raised a dumb one.", "applaud", 1689589577, 4560189, Spawn)
  16. end
  17. function respawn(NPC)
  18. spawn(NPC)
  19. end
  20. function hailed(NPC, Spawn)
  21. FaceTarget(NPC, Spawn)
  22. if not HasQuest(Spawn, TheTrailOfSlime) and not HasCompletedQuest(Spawn, TheTrailOfSlime) then
  23. local conversation = CreateConversation()
  24. AddConversationOption(conversation, "What do you need done?", "Option1")
  25. AddConversationOption(conversation, "I need to leave.")
  26. StartConversation(conversation, NPC, Spawn, "Glad you could make it. Now how about doing a little something for Freeport?")
  27. elseif GetQuestStep(Spawn, TheTrailOfSlime) == 1 then
  28. PlayFlavor(NPC, "", "What a waste of time, standing around and trying to touch everything...Your mother sure raised a dumb one.", "applaud", 1689589577, 4560189, Spawn)
  29. elseif GetQuestStep(Spawn, TheTrailOfSlime) == 2 then
  30. Option2(NPC, Spawn)
  31. elseif HasCompletedQuest(Spawn, TheTrailOfSlime) then
  32. PlayFlavor(NPC, "", "You can leave me alone now...", "", 0, 0, Spawn)
  33. end
  34. end
  35. function Option1(NPC, Spawn)
  36. FaceTarget(NPC, Spawn)
  37. local conversation = CreateConversation()
  38. AddConversationOption(conversation, "I think I can do that.", "offer")
  39. AddConversationOption(conversation, "I need to leave.")
  40. StartConversation(conversation, NPC, Spawn, "Freeport needs you to follow the trail of slime outside of the Sewer System to the north of here. You will need to slay the oversized sliding lump of refuse known as the Gobbler.")
  41. end
  42. function offer(NPC, Spawn)
  43. OfferQuest(NPC, Spawn, TheTrailOfSlime)
  44. end
  45. function Option2(NPC, Spawn)
  46. SetStepComplete(Spawn, TheTrailOfSlime, 2)
  47. FaceTarget(NPC, Spawn)
  48. local conversation = CreateConversation()
  49. AddConversationOption(conversation, "No problem.")
  50. StartConversation(conversation, NPC, Spawn, "Good! It is finally done and I'm sure that the Dark Lord will be happy with my success. That is all I needed, here is your reward and you may leave now.")
  51. end
  52. --[[
  53. Dialog.New(NPC, Spawn)
  54. Dialog.AddDialog("Hrmph! What? You expect me to assign a task to a weak little runt like yourself? Get Lost!")
  55. Dialog.AddOption("I will come back later then.")
  56. Dialog.Start()
  57. Say() from this NPC
  58. Orphaned PlayFlavors
  59. --]]