Skip to content

Commit

Permalink
Merge pull request #31 from Bia10/master
Browse files Browse the repository at this point in the history
add q21000s, q21001s, aranDirection
  • Loading branch information
Bia10 committed Jul 24, 2019
2 parents ab21427 + db86698 commit cac58c1
Show file tree
Hide file tree
Showing 12 changed files with 115 additions and 17 deletions.
15 changes: 15 additions & 0 deletions src/aranDirection.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
mapFields = require "lib/mapFields"

if target.field == mapFields.getID("AranScene") then
target.direction_mode = true
target.reserved_effect(mapEffects.getReservedEffect("scene0"))
elseif target.field == mapFields.getID("AranScene1") then
target.reserved_effect(mapEffects.getReservedEffect("scene1").. target.gender)
elseif target.field == mapFields.getID("AranScene2") then
target.reserved_effect(mapEffects.getReservedEffect("scene2") .. target.gender)
elseif target.field == mapFields.getID("AranScene3") then
target.reserved_effect(mapEffects.getReservedEffect("scene3"))
elseif target.field == mapFields.getID("AranHandedPoleArmScene") then
target.direction_mode = true
target.reserved_effect(mapEffects.getReservedEffect("handedPoleArm") .. target.gender)
end
2 changes: 1 addition & 1 deletion src/aranTutorAloneX.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
mapFields = require "lib/mapFields"

target.play_portal_sound_effect()
target.transfer_field(mapFields.getID("ReadyToLeave"), 1)
target.transfer_field(mapFields.getID("ReadyToLeave"), 0)
2 changes: 1 addition & 1 deletion src/aranTutorArrow0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ quest = target.get_quest(mapQuests.getID("AranTut"))

if quest.record_key("arr0") == "" then
quest.update("arr0", "o")
target.avatar_oriented_effect(mapEffects.getAvatarOrientedEffect("tutorialArrow1"))
target.avatar_oriented_effect(mapEffects.getAvatarOrientedEffect("tutorialArrow3"))
end
13 changes: 10 additions & 3 deletions src/aranTutorOut1.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,17 @@ mapFields = require "lib/mapFields"
mapQuests = require "lib/mapQuests"

quest = target.get_quest(mapQuests.getID("MissingChild"))
speaker = self.as_speaker(0x1)
mapleAdmin = self.as_speaker(npcSpeakers.getID("MapleAdministrator"))

if quest.state == mapQuests.getState("Perform") then
-- TODO: add skills, enable actions
--pi.teachSkill(20000017, 0, -1, -1);
--pi.teachSkill(20000018, 0, -1, -1);
--pi.teachSkill(20000017, 1, 0, -1);
--pi.teachSkill(20000018, 1, 0, -1);

if quest.state == 0x1 then
target.play_portal_sound_effect()
target.transfer_field(mapFields.getID("BurningForest1"), 1)
else
speaker.say("You can only exit after you accept the quest from Athena Pierce, who is to your right.")
mapleAdmin.say("You can only exit after you accept the quest from Athena Pierce, who is to your right.")
end
8 changes: 8 additions & 0 deletions src/lib/charInventory.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ function charInventory.giveRogersReward()
inventory.add(2010009, 3)
end

function charInventory.giveLostChild()
inventory.add(4001271, 1) -- Lost Child
end

function charInventory.removeLostChild()
inventory.remove(4001271, 1) -- Lost Child
end

function charInventory.hasRecommendationLetter()
if inventory.item_count(4031801) > 0 then -- Lucas's Recommendation Letter
return true;
Expand Down
9 changes: 7 additions & 2 deletions src/lib/mapEffects.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ local avatarOrientedEffects = {
legendBalloon3 = "Effect/OnUserEff.img/guideEffect/aranTutorial/legendBalloon3",
legendBalloon4 = "Effect/OnUserEff.img/guideEffect/aranTutorial/legendBalloon4", --unused yet
legendBalloon5 = "Effect/OnUserEff.img/guideEffect/aranTutorial/legendBalloon5", --unused yet
legendBalloon6 = "Effect/OnUserEff.img/guideEffect/aranTutorial/legendBalloon6"
legendBalloon6 = "Effect/OnUserEff.img/guideEffect/aranTutorial/legendBalloon6",
-- Aran tut arrows --
tutorialArrow1 = "Effect/OnUserEff.img/guideEffect/aranTutorial/tutorialArrow1", --unused yet
tutorialArrow1 = "Effect/OnUserEff.img/guideEffect/aranTutorial/tutorialArrow1",
tutorialArrow2 = "Effect/OnUserEff.img/guideEffect/aranTutorial/tutorialArrow2", --unused yet
tutorialArrow3 = "Effect/OnUserEff.img/guideEffect/aranTutorial/tutorialArrow3",
-- Aran tut guides --
Expand Down Expand Up @@ -97,6 +97,11 @@ local reservedEffects = {
clickPoleArm = "Effect/Direction1.img/aranTutorial/ClickPoleArm",
face = "Effect/Direction1.img/aranTutorial/face",
trio = "Effect/Direction1.img/aranTutorial/Trio",
scene0 = "Effect/Direction1.img/aranTutorial/Scene0",
scene1 = "Effect/Direction1.img/aranTutorial/Scene1",
scene2 = "Effect/Direction1.img/aranTutorial/Scene2",
scene3 = "Effect/Direction1.img/aranTutorial/Scene3",
handedPoleArm = "Effect/Direction1.img/aranTutorial/HandedPoleArm",
-- Resistance Tut --
talkJ = "Effect/Direction4.img/Resistance/TalkJ",
clickVel = "Effect/Direction4.img/Resistance/ClickVel",
Expand Down
6 changes: 6 additions & 0 deletions src/lib/mapFields.lua
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,12 @@ local fields = {
BurningForest2second = 914000410, -- Black Road : Burning Forest 2
BurningForest1second = 914000420, -- Black Road : Burning Forest 1
ReadyToLeave2 = 914000500, -- Black Road : Ready to Leave

AranScene = 914090010, -- :
AranScene1 = 914090011, --
AranScene2 = 914090012, --
AranScene3 = 914090013, --
AranHandedPoleArmScene = 914090100, --
-- Edelstein Tutorial --
NeglectedRockyMountain1 = 931000000, -- Dangerous Hide-and-Seek : Neglected Rocky Mountain
NeglectedRockyMountain2 = 931000001, -- Dangerous Hide-and-Seek : Neglected Rocky Mountain
Expand Down
1 change: 1 addition & 0 deletions src/lib/mapQuests.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ local quests = {
KoCTut = 20022, -- hidden
-- Aran Tutorial --
MissingChild = 21000, -- Find the Missing Kid 1
MissingChild2 = 21001, -- Find the Missing Kid 2
AranTut = 21002, -- hidden
-- Evan Tutorial --
DragonEyes = 22012,
Expand Down
2 changes: 2 additions & 0 deletions src/lib/npcSpeakers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ local speakers = {
Kyrin = 1090000, -- Kyrin
-- Ereve --
Cygnus = 1101000, -- Cygnus
-- Aran --
AthenaPierceAranTut = 1209000, -- Athena Pierce
-- Orbis --
IsaStationGuide = 2012006, -- Isa the Station Guide
-- Edelstein --
Expand Down
31 changes: 31 additions & 0 deletions src/q210001.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
mapQuests = require "lib/mapQuests"
mapFields = require "lib/mapFields"
charInventory = require "lib/charInventory"

quest = target.get_quest(mapQuests.getID("MissingChild2"))
athena = self.as_speaker(npcSpeakers.getID("AthenaPierceAranTut"))

if self.ask_yes_no("*Sniff sniff* I was so scared... Please take me to Athena Pierce.") then
charInventory.giveLostChild()
quest.accept()
target.transfer_field(mapFields.getID("DeadEndForest"), 0)
else
self.say("*Sob* Aran has declined my request!")
end

if athena.ask_yes_no("You made it back safely! What about the child?! Did you bring the child with you?!") then
athena.say("Oh, what a relief. I'm so glad...")
target.say("Hurry and board the ship! We don't have much time!")
athena.say("We don't have any time to waste. The Black Mage's forces are getting closer and closer! We're doomed if we don't leave right right this moment!")
target.say("Leave, now!")
athena.say("Aran, please! I know you want to stay and fight the Black Mage, but it's too late! Leave it to the others and come to Victoria Island with us!")
target.say("No, I can't!")
target.say("Athena Pierce, why don't you leave for Victoria Island first? I promise I'll come for you later. I'll be alright. I must fight the Black Mage with the other heroes!")

charInventory.removeLostChild()
-- qm.removeEquipFromSlot(-11);
quest.complete()
target.transfer_field(mapFields.getID("AranScene"), 0)
else
athena.say("What about the child? Please give me the child!")
end
16 changes: 16 additions & 0 deletions src/q21000s.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
mapQuests = require "lib/mapQuests"
mapEffects = require "lib/mapEffects"

quest = target.get_quest(mapQuests.getID("MissingChild"))

if self.ask_yes_no("Oh, no! I think there's still a child in the forest! Aran, I'm very sorry, but could you rescue the child? I know you're injured, but I don't have anyone else to ask!") then
quest.accept()

self.say("#bThe child is probably lost deep inside the forest!#k We have to escape before the Black Mage finds us. You must rush into the forest and bring the child back with you!")
self.say("Don't panic, Aran. If you wish to check the status of the \r\nquest, press #bQ#k and view the Quest window.")
self.say("Please, Aran! I'm begging you. I can't bear to lose another person to the Black Mage!")

target.avatar_oriented_effect(mapEffects.getAvatarOrientedEffect("tutorialArrow1"))
else
self.say("No, Aran... We can't leave a kid behind. I know it's a lot to ask, but please reconsider. Please!")
end
27 changes: 17 additions & 10 deletions src/talkHelena.lua
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
mapQuests = require "lib/mapQuests"
mapEffects = require "lib/mapEffects"
npcSpeakers = require "lib/npcSpeakers"

athena = self.as_speaker(npcSpeakers.getID("AthenaPierceAranTut"))
quest = target.get_quest(mapQuests.getID("AranTut"))

self.say("Aran, you're awake! How are you feeling? Hm? You want to know what's been going on?")
self.say("We're almost done preparing for the escape. You don't have to worry. Everyone I could possibly find has boarded the ark, and Shinsoo has agreed to guide the way. We'll head to Victoria Island as soon as we finish the remaining preparations.")
self.say("The other heroes? They've left to fight the Black Mage. They're buying us time to escape. What? You want to fight with them? No! You can't! You're hurt. You must leave with us!")
self.say ({
athena.get_speech("Aran, you're awake! How are you feeling? Hm? You want to know what's been going on?"),
athena.get_speech("We're almost done preparing for the escape. You don't have to worry. Everyone I could possibly find has boarded the ark, and Shinsoo has agreed to guide the way. We'll head to Victoria Island as soon as we finish the remaining preparations."),
athena.get_speech("The other heroes? They've left to fight the Black Mage. They're buying us time to escape. What? You want to fight with them? No! You can't! You're hurt. You must leave with us!")
})

quest.accept()
quest.update("1")
target.reserved_effect(mapEffects.getReservedEffect("trio"))

if quest.state == mapQuests.getState("Perform") then
self.say("We're in a dire situation. What would you like to know? \r\n#b#L0#About the Black Mage#l \r\n#b#L1#About the preparations for the escape#l \r\n#b#L2#About the other heroes#l")
self.say("I hear the Black Mage is very close. We can't even go into the forest because the dragons serving the Black Mage are there. That's why we're taking this route. We don't have any choice but to fly to Victoria Island, Aran...")
self.say("We're almost ready to go. We can head over to Victoria Island as soon as the remaining few people board the ark. Shinsoo says there isn't anyone left in Ereve he needs to protect, so he's agreed to guide us.")
self.say("The other heroes... They've already left to fight the Black Mage. They're slowing the Black Mage down so the rest of us can escape. They didn't want to take you with them because you were injured. Escape with us, Aran, as soon as we rescue the child!")
end
--if quest.state == mapQuests.getState("Perform") then
--self.say ({
--athena.get_speech("We're in a dire situation. What would you like to know? \r\n#b#L0#About the Black Mage#l \r\n#b#L1#About the preparations for the escape#l \r\n#b#L2#About the other heroes#l"),
--athena.get_speech("I hear the Black Mage is very close. We can't even go into the forest because the dragons serving the Black Mage are there. That's why we're taking this route. We don't have any choice but to fly to Victoria Island, Aran..."),
--athena.get_speech("We're almost ready to go. We can head over to Victoria Island as soon as the remaining few people board the ark. Shinsoo says there isn't anyone left in Ereve he needs to protect, so he's agreed to guide us."),
--athena.get_speech("The other heroes... They've already left to fight the Black Mage. They're slowing the Black Mage down so the rest of us can escape. They didn't want to take you with them because you were injured. Escape with us, Aran, as soon as we rescue the child!")
--})
--end

0 comments on commit cac58c1

Please sign in to comment.