-
Notifications
You must be signed in to change notification settings - Fork 627
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[QUEST]Sandoria Teleport Scroll Quest to IF
[QUEST]Sandoria Teleport Scroll Quest to IF [QUEST]Sandoria Teleport Scroll Quest to IF Converts Healing the Land and Sorcery of the North to Interaction Framework.
- Loading branch information
Showing
5 changed files
with
171 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
----------------------------------- | ||
-- Healing the Land | ||
----------------------------------- | ||
-- !addquest 0 82 | ||
-- Eperdur: !pos 129 -6 96 231 | ||
-- qm3: !pos -168 1 311 196 | ||
----------------------------------- | ||
local gugsenMinesID = zones[xi.zone.GUSGEN_MINES] | ||
----------------------------------- | ||
|
||
local quest = Quest:new(xi.questLog.SANDORIA, xi.quest.id.sandoria.HEALING_THE_LAND) | ||
|
||
quest.reward = | ||
{ | ||
fame = 30, | ||
fameArea = xi.fameArea.SANDORIA, | ||
item = xi.item.SCROLL_OF_TELEPORT_HOLLA, | ||
title = xi.title.PILGRIM_TO_HOLLA, | ||
} | ||
|
||
quest.sections = | ||
{ | ||
{ | ||
check = function(player, status, vars) | ||
return status == xi.questStatus.QUEST_AVAILABLE and | ||
player:getFameLevel(xi.fameArea.SANDORIA) >= 4 and | ||
player:getMainLvl() >= 10 | ||
end, | ||
|
||
[xi.zone.NORTHERN_SAN_DORIA] = | ||
{ | ||
['Eperdur'] = quest:progressEvent(681), | ||
|
||
onEventFinish = | ||
{ | ||
[681] = function(player, csid, option, npc) | ||
quest:begin(player) | ||
npcUtil.giveKeyItem(player, xi.ki.SEAL_OF_BANISHING) | ||
end, | ||
}, | ||
}, | ||
}, | ||
|
||
{ | ||
check = function(player, status, vars) | ||
return status == xi.questStatus.QUEST_ACCEPTED | ||
end, | ||
|
||
[xi.zone.NORTHERN_SAN_DORIA] = | ||
{ | ||
['Eperdur'] = | ||
{ | ||
onTrigger = function(player, npc) | ||
if player:hasKeyItem(xi.ki.SEAL_OF_BANISHING) then | ||
return quest:event(682) | ||
elseif not player:hasKeyItem(xi.ki.SEAL_OF_BANISHING) then | ||
return quest:progressEvent(683) | ||
end | ||
end, | ||
}, | ||
|
||
onEventFinish = | ||
{ | ||
[683] = function(player, csid, option, npc) | ||
quest:complete(player) | ||
xi.quest.setMustZone(player, xi.questLog.SANDORIA, xi.quest.id.sandoria.SORCERY_OF_THE_NORTH) | ||
end, | ||
}, | ||
}, | ||
|
||
[xi.zone.GUSGEN_MINES] = | ||
{ | ||
['qm3'] = | ||
{ | ||
onTrigger = function(player, npc) | ||
if player:hasKeyItem(xi.ki.SEAL_OF_BANISHING) then | ||
player:delKeyItem(xi.ki.SEAL_OF_BANISHING) | ||
return quest:messageSpecial(gugsenMinesID.text.FOUND_LOCATION_SEAL, xi.ki.SEAL_OF_BANISHING) | ||
elseif not player:hasKeyItem(xi.ki.SEAL_OF_BANISHING) then | ||
player:messageSpecial(gugsenMinesID.text.IS_ON_THIS_SEAL, xi.ki.SEAL_OF_BANISHING) | ||
return quest:noAction() | ||
end | ||
end, | ||
}, | ||
}, | ||
}, | ||
|
||
{ | ||
check = function(player, status, vars) | ||
return status == xi.questStatus.QUEST_COMPLETED | ||
end, | ||
|
||
[xi.zone.NORTHERN_SAN_DORIA] = | ||
{ | ||
['Eperdur'] = quest:event(684):replaceDefault(), | ||
}, | ||
}, | ||
} | ||
|
||
return quest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
----------------------------------- | ||
-- Sorcery of the North | ||
----------------------------------- | ||
-- !addquest 0 83 | ||
-- Eperdur: !pos 129 -6 96 231 | ||
----------------------------------- | ||
|
||
local quest = Quest:new(xi.questLog.SANDORIA, xi.quest.id.sandoria.SORCERY_OF_THE_NORTH) | ||
|
||
quest.reward = | ||
{ | ||
fame = 30, | ||
fameArea = xi.fameArea.SANDORIA, | ||
item = xi.item.SCROLL_OF_TELEPORT_VAHZL, | ||
} | ||
|
||
quest.sections = | ||
{ | ||
{ | ||
check = function(player, status, vars) | ||
return status == xi.questStatus.QUEST_AVAILABLE and | ||
player:hasCompletedQuest(xi.questLog.SANDORIA, xi.quest.id.sandoria.HEALING_THE_LAND) and | ||
not quest:getMustZone(player) | ||
end, | ||
|
||
[xi.zone.NORTHERN_SAN_DORIA] = | ||
{ | ||
['Eperdur'] = quest:progressEvent(685), | ||
|
||
onEventFinish = | ||
{ | ||
[685] = function(player, csid, option, npc) | ||
quest:begin(player) | ||
end, | ||
}, | ||
}, | ||
}, | ||
|
||
{ | ||
check = function(player, status, vars) | ||
return status == xi.questStatus.QUEST_ACCEPTED | ||
end, | ||
|
||
[xi.zone.NORTHERN_SAN_DORIA] = | ||
{ | ||
['Eperdur'] = | ||
{ | ||
onTrigger = function(player, npc) | ||
if not player:hasKeyItem(xi.ki.FEIYIN_MAGIC_TOME) then | ||
return quest:event(686) | ||
else | ||
return quest:progressEvent(687) | ||
end | ||
end, | ||
}, | ||
|
||
onEventFinish = | ||
{ | ||
[687] = function(player, csid, option, npc) | ||
quest:complete(player) | ||
end, | ||
}, | ||
}, | ||
}, | ||
} | ||
|
||
return quest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,93 +1,22 @@ | ||
----------------------------------- | ||
-- Area: Northern San d'Oria | ||
-- NPC: Eperdur | ||
-- NPC: Eperdur | ||
-- Starts and Finishes Quest: Healing the Land, | ||
-- !pos 129 -6 96 231 | ||
----------------------------------- | ||
local ID = zones[xi.zone.NORTHERN_SAN_DORIA] | ||
----------------------------------- | ||
---@type TNpcEntity | ||
local entity = {} | ||
|
||
entity.onTrade = function(player, npc, trade) | ||
end | ||
|
||
entity.onTrigger = function(player, npc) | ||
local healingTheLand = player:getQuestStatus(xi.questLog.SANDORIA, xi.quest.id.sandoria.HEALING_THE_LAND) | ||
local sorceryOfTheNorth = player:getQuestStatus(xi.questLog.SANDORIA, xi.quest.id.sandoria.SORCERY_OF_THE_NORTH) | ||
|
||
if | ||
healingTheLand == xi.questStatus.QUEST_AVAILABLE and | ||
player:getFameLevel(xi.fameArea.SANDORIA) >= 4 and | ||
player:getMainLvl() >= 10 | ||
then | ||
player:startEvent(681) -- Start quest "Healing the Land" | ||
elseif | ||
healingTheLand == xi.questStatus.QUEST_ACCEPTED and | ||
player:hasKeyItem(xi.ki.SEAL_OF_BANISHING) | ||
then | ||
player:startEvent(682) -- During quest "Healing the Land" | ||
elseif | ||
healingTheLand == xi.questStatus.QUEST_ACCEPTED and | ||
not player:hasKeyItem(xi.ki.SEAL_OF_BANISHING) | ||
then | ||
player:startEvent(683) -- Finish quest "Healing the Land" | ||
elseif | ||
healingTheLand == xi.questStatus.QUEST_COMPLETED and | ||
sorceryOfTheNorth == xi.questStatus.QUEST_AVAILABLE and | ||
player:needToZone() | ||
then | ||
player:startEvent(684) -- New standard dialog after "Healing the Land" | ||
elseif | ||
healingTheLand == xi.questStatus.QUEST_COMPLETED and | ||
sorceryOfTheNorth == xi.questStatus.QUEST_AVAILABLE and | ||
not player:needToZone() | ||
then | ||
player:startEvent(685) -- Start quest "Sorcery of the North" | ||
elseif | ||
sorceryOfTheNorth == xi.questStatus.QUEST_ACCEPTED and | ||
not player:hasKeyItem(xi.ki.FEIYIN_MAGIC_TOME) | ||
then | ||
player:startEvent(686) -- During quest "Sorcery of the North" | ||
elseif | ||
sorceryOfTheNorth == xi.questStatus.QUEST_ACCEPTED and | ||
player:hasKeyItem(xi.ki.FEIYIN_MAGIC_TOME) | ||
then | ||
player:startEvent(687) -- Finish quest "Sorcery of the North" | ||
end | ||
end | ||
|
||
entity.onEventUpdate = function(player, csid, option, npc) | ||
end | ||
|
||
entity.onEventFinish = function(player, csid, option, npc) | ||
if csid == 681 and option == 0 then | ||
player:addQuest(xi.questLog.SANDORIA, xi.quest.id.sandoria.HEALING_THE_LAND) | ||
player:addKeyItem(xi.ki.SEAL_OF_BANISHING) | ||
player:messageSpecial(ID.text.KEYITEM_OBTAINED, xi.ki.SEAL_OF_BANISHING) | ||
elseif csid == 683 then | ||
if player:getFreeSlotsCount() == 0 then | ||
player:messageSpecial(ID.text.ITEM_CANNOT_BE_OBTAINED, xi.item.SCROLL_OF_TELEPORT_HOLLA) | ||
else | ||
player:addTitle(xi.title.PILGRIM_TO_HOLLA) | ||
player:addItem(xi.item.SCROLL_OF_TELEPORT_HOLLA) | ||
player:messageSpecial(ID.text.ITEM_OBTAINED, xi.item.SCROLL_OF_TELEPORT_HOLLA) -- Scroll of Teleport-Holla | ||
player:needToZone(true) | ||
player:addFame(xi.fameArea.SANDORIA, 30) | ||
player:completeQuest(xi.questLog.SANDORIA, xi.quest.id.sandoria.HEALING_THE_LAND) | ||
end | ||
elseif csid == 685 and option == 0 then | ||
player:addQuest(xi.questLog.SANDORIA, xi.quest.id.sandoria.SORCERY_OF_THE_NORTH) | ||
elseif csid == 687 then | ||
if player:getFreeSlotsCount() == 0 then | ||
player:messageSpecial(ID.text.ITEM_CANNOT_BE_OBTAINED, xi.item.SCROLL_OF_TELEPORT_VAHZL) | ||
else | ||
player:delKeyItem(xi.ki.FEIYIN_MAGIC_TOME) | ||
player:addItem(xi.item.SCROLL_OF_TELEPORT_VAHZL) | ||
player:messageSpecial(ID.text.ITEM_OBTAINED, xi.item.SCROLL_OF_TELEPORT_VAHZL) -- Scroll of Teleport-Vahzl | ||
player:addFame(xi.fameArea.SANDORIA, 30) | ||
player:completeQuest(xi.questLog.SANDORIA, xi.quest.id.sandoria.SORCERY_OF_THE_NORTH) | ||
end | ||
end | ||
end | ||
|
||
return entity |