Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AMK][Lua] Added check and reminder text to AMK 6, enabled repeatability #4787

Merged
merged 1 commit into from
Dec 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions scripts/missions/amk/06_An_Errand_The_Professors_Price.lua
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ mission.sections =
-- Go get the Starfruit
{
check = function(player, currentMission, missionStatus, vars)
return currentMission == mission.missionId and not player:hasKeyItem(xi.ki.RIPE_STARFRUIT)
return currentMission >= mission.missionId and not player:hasKeyItem(xi.ki.RIPE_STARFRUIT)
end,

[xi.zone.WINDURST_WALLS] =
Expand All @@ -111,14 +111,27 @@ mission.sections =
{
['qm1'] =
{
-- Only need one KI orb to start fight
onTrigger = function(player, npc)
return mission:progressEvent(100)
if
player:hasKeyItem(xi.ki.ORB_OF_SWORDS) or
player:hasKeyItem(xi.ki.ORB_OF_CUPS) or
player:hasKeyItem(xi.ki.ORB_OF_BATONS) or
player:hasKeyItem(xi.ki.ORB_OF_COINS)
then
-- Prompt to start the fight
return mission:progressEvent(100)
else
-- Remind that orbs are needed
return mission:messageSpecial(horutotoID.text.IF_HAD_ORBS, xi.ki.ORB_OF_SWORDS, xi.ki.ORB_OF_CUPS, xi.ki.ORB_OF_BATONS, xi.ki.ORB_OF_COINS)
end
end,
},

onEventFinish =
{
[100] = function(player, csid, option, npc)
-- Violence was chosen, start fight
if option == 1 then
beginCardianFight(player, npc)
end
Expand All @@ -130,7 +143,7 @@ mission.sections =
-- Got the Starfruit
{
check = function(player, currentMission, missionStatus, vars)
return currentMission == mission.missionId and
return currentMission >= mission.missionId and
player:hasKeyItem(xi.ki.RIPE_STARFRUIT) and
not player:needToZone()
end,
Expand Down Expand Up @@ -164,7 +177,6 @@ mission.sections =
{
['qm1'] =
{
-- TODO: Reminder about the orbs
onTrigger = function(player, npc)
return mission:messageSpecial(horutotoID.text.CANNOT_ENTER_BATTLEFIELD, xi.ki.RIPE_STARFRUIT):setPriority(1000)
end,
Expand Down
3 changes: 2 additions & 1 deletion scripts/zones/Outer_Horutoto_Ruins/IDs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ zones[xi.zone.OUTER_HORUTOTO_RUINS] =
DOOR_FIRMLY_SHUT = 7265, -- The door is firmly shut.
ALL_G_ORBS_ENERGIZED = 7268, -- The six Mana Orbs have been successfully energized with magic!
CHEST_UNLOCKED = 7291, -- You unlock the chest!
CANNOT_ENTER_BATTLEFIELD = 7352, -- You cannot enter this battlefield with the key item: <keyitem> in your possession.
IF_HAD_ORBS = 7350, -- You sense that if you had <keyitem>, <keyitem>, <keyitem>, or <keyitem>, something might happen.
CANNOT_ENTER_BATTLEFIELD = 7353, -- You cannot enter this battlefield with the key item: <keyitem> in your possession.
PLAYER_OBTAINS_ITEM = 8268, -- <name> obtains <item>!
UNABLE_TO_OBTAIN_ITEM = 8269, -- You were unable to obtain the item.
PLAYER_OBTAINS_TEMP_ITEM = 8270, -- <name> obtains the temporary item: <item>!
Expand Down