9
3

AlexaRamparts.lua 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. --[[
  2. Script Name : SpawnScripts/Nektropos1/AlexaRamparts.lua
  3. Script Author : smash
  4. Script Date : 2016.02.02 01:02:43
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. end
  10. function hailed(NPC, Spawn)
  11. if GetTempVariable(NPC, "talking") ~= "true" then
  12. SetTempVariable(NPC, "talking", "true")
  13. StartDialogLoop(NPC, Spawn)
  14. end
  15. end
  16. function StartDialogLoop(NPC, Spawn)
  17. Say(NPC, "I knew you were strong enough to save me.")
  18. AddTimer(NPC, 3500, "Dialog2", 1, Spawn)
  19. end
  20. function Dialog2(NPC, Spawn)
  21. Say(NPC, "In order to get into the room where Lord Everling keeps his most prized possessions")
  22. AddTimer(NPC, 3000, "Dialog3", 1, Spawn)
  23. end
  24. function Dialog3(NPC, Spawn)
  25. Say(NPC, "you'll need to gather six lockets.")
  26. AddTimer(NPC, 3000, "Dialog4", 1, Spawn)
  27. end
  28. function Dialog4(NPC, Spawn)
  29. Say(NPC, "Everling gave a locket to each of his six daughters. Only with all six can the door be opened.")
  30. AddTimer(NPC, 3500, "Dialog5", 1, Spawn)
  31. end
  32. function Dialog5(NPC, Spawn)
  33. Say(NPC, "Get these lockets from the sisters however you can.")
  34. AddTimer(NPC, 3000, "Dialog6", 1, Spawn)
  35. end
  36. function Dialog6(NPC, Spawn)
  37. Say(NPC, "Please hurry.")
  38. AddTimer(NPC, 3000, "Despawn")
  39. --Offer The Everling Lockets to the whole group
  40. local player_group = GetGroup(Spawn)
  41. if player_group ~= nil then
  42. for k,v in ipairs(player_group) do
  43. if IsPlayer(v) and CanReceiveQuest(v, 177) then
  44. OfferQuest(nil, v, 177)
  45. end
  46. end
  47. elseif CanReceiveQuest(Spawn, 177) then
  48. OfferQuest(nil, Spawn, 177)
  49. end
  50. end