loosesoil.lua 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. --[[
  2. Script Name : SpawnScripts/Nettleville/loosesoil.lua
  3. Script Purpose : loose soil
  4. Script Author : Scatman
  5. Script Date : 2009.08.21
  6. Script Notes :
  7. --]]
  8. local QUEST_1_FROM_LAKOSHA = 300
  9. function spawn(NPC)
  10. local sli = GetSpawnLocationID(NPC)
  11. if sli == 565366 then
  12. SetRequiredQuest(NPC, QUEST_1_FROM_LAKOSHA, 1, 1)
  13. elseif sli == 565350 then
  14. SetRequiredQuest(NPC, QUEST_1_FROM_LAKOSHA, 2, 1)
  15. elseif sli == 565360 then
  16. SetRequiredQuest(NPC, QUEST_1_FROM_LAKOSHA, 3, 1)
  17. end
  18. end
  19. function respawn(NPC)
  20. spawn(NPC)
  21. end
  22. function hailed(NPC, Spawn)
  23. end
  24. function casted_on(NPC, Spawn)
  25. Say(Spawn, "Test")
  26. if HasQuest(Spawn, QUEST_1_FROM_LAKOSHA) and GetQuestStep(Spawn, QUEST_1_FROM_LAKOSHA) <= 3 then
  27. local sli = GetSpawnLocationID(NPC)
  28. Say(Spawn, sli)
  29. if sli == 565366 then
  30. if not QuestStepIsComplete(Spawn, QUEST_1_FROM_LAKOSHA, 1) then
  31. SetStepComplete(Spawn, QUEST_1_FROM_LAKOSHA, 1)
  32. end
  33. elseif sli == 565350 then
  34. if not QuestStepIsComplete(Spawn, QUEST_1_FROM_LAKOSHA, 2) then
  35. SetStepComplete(Spawn, QUEST_1_FROM_LAKOSHA, 2)
  36. end
  37. elseif sli == 565360 then
  38. if not QuestStepIsComplete(Spawn, QUEST_1_FROM_LAKOSHA, 3) then
  39. SetStepComplete(Spawn, QUEST_1_FROM_LAKOSHA, 3)
  40. end
  41. end
  42. end
  43. end