diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-01-14 16:00:01 -0200 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-01-14 16:00:01 -0200 |
commit | 1dab71476e7fa493966b8e389e3a8c9f3a3616ee (patch) | |
tree | 13520d64685e39060563eccdbe336d39644ddf40 | |
parent | d7b6cf2e133e1bf2ed70368df929dd53bcf04fe5 (diff) | |
download | serverdata-1dab71476e7fa493966b8e389e3a8c9f3a3616ee.tar.gz serverdata-1dab71476e7fa493966b8e389e3a8c9f3a3616ee.tar.bz2 serverdata-1dab71476e7fa493966b8e389e3a8c9f3a3616ee.tar.xz serverdata-1dab71476e7fa493966b8e389e3a8c9f3a3616ee.zip |
Introduce a new helper for main storyline: msObjective().
-rw-r--r-- | npc/002-3/nard.txt | 5 | ||||
-rw-r--r-- | npc/003-2/lua.txt | 30 | ||||
-rw-r--r-- | npc/012-2/rakinorf.txt | 20 | ||||
-rw-r--r-- | npc/functions/main.txt | 10 |
4 files changed, 21 insertions, 44 deletions
diff --git a/npc/002-3/nard.txt b/npc/002-3/nard.txt index 51defc7b6..5ccd18f47 100644 --- a/npc/002-3/nard.txt +++ b/npc/002-3/nard.txt @@ -64,10 +64,7 @@ L_MenuQuest: setq ShipQuests_Julia, 3; next; mesc b(l(".:: Main Quest 1-1 ::.")), 3; - if (Zeny >= .@price) - mesc l("* @@/@@ GP", Zeny, .@price), 2; - else - mesc l("* @@/@@ GP", Zeny, .@price), 9; + msObjective(Zeny >= .@price, l("* Collect @@/@@ GP", Zeny, .@price)); // Referral program if (#REFERRAL_PROG == 0 && $REFERRAL_ENABLED) { diff --git a/npc/003-2/lua.txt b/npc/003-2/lua.txt index 86185c17b..10657b5b6 100644 --- a/npc/003-2/lua.txt +++ b/npc/003-2/lua.txt @@ -173,35 +173,17 @@ L_Info: L_Task: mesc b(l(".:: Main Quest 2-1 ::.")), 3; - if (BaseLevel >= 20) - mesc l("* @@/@@ Base Level", BaseLevel, 20), 2; - else - mesc l("* @@/@@ Base Level", BaseLevel, 20), 9; + msObjective(BaseLevel >= 20, l("* @@/@@ Base Level", BaseLevel, 20)); - if (JobLevel >= 6) - mesc l("* @@/@@ Job Level", JobLevel, 6), 2; - else - mesc l("* @@/@@ Job Level", JobLevel, 6), 9; + msObjective(JobLevel >= 6, l("* @@/@@ Job Level", JobLevel, 6)); - if (Zeny >= 1000) - mesc l("* @@/@@ GP", Zeny, 1000), 2; - else - mesc l("* @@/@@ GP", Zeny, 1000), 9; + msObjective(Zeny >= 1000, l("* @@/@@ GP", Zeny, 1000)); - if (countitem(TulimsharGuardCard)) - mesc l("* @@/@@ @@", countitem(TulimsharGuardCard), 1, getitemlink(TulimsharGuardCard)), 2; - else - mesc l("* @@/@@ @@", countitem(TulimsharGuardCard), 1, getitemlink(TulimsharGuardCard)), 9; + msObjective(countitem(TulimsharGuardCard), l("* @@/@@ @@", countitem(TulimsharGuardCard), 1, getitemlink(TulimsharGuardCard))); - if (countitem(FishingRod)) - mesc l("* @@/@@ @@", countitem(FishingRod), 1, getitemlink(FishingRod)), 2; - else - mesc l("* @@/@@ @@", countitem(FishingRod), 1, getitemlink(FishingRod)), 9; + msObjective(countitem(FishingRod), l("* @@/@@ @@", countitem(FishingRod), 1, getitemlink(FishingRod))); - if (countitem(LifestonePendant)) - mesc l("* @@/@@ @@", countitem(LifestonePendant), 1, getitemlink(LifestonePendant)), 2; - else - mesc l("* @@/@@ @@", countitem(LifestonePendant), 1, getitemlink(LifestonePendant)), 9; + msObjective(countitem(LifestonePendant), l("* @@/@@ @@", countitem(LifestonePendant), 1, getitemlink(LifestonePendant))); next; if (BaseLevel >= 20 && diff --git a/npc/012-2/rakinorf.txt b/npc/012-2/rakinorf.txt index 23fac1ed3..90aedfde1 100644 --- a/npc/012-2/rakinorf.txt +++ b/npc/012-2/rakinorf.txt @@ -238,25 +238,13 @@ L_MainStory: case 8: mesc b(l(".:: Main Quest 2-2 ::.")), 3; - if (BaseLevel >= 40) - mesc l("* @@/@@ Base Level", BaseLevel, 40), 2; - else - mesc l("* @@/@@ Base Level", BaseLevel, 40), 9; + msObjective(BaseLevel >= 40, l("* @@/@@ Base Level", BaseLevel, 40)); - if (JobLevel >= 15) - mesc l("* @@/@@ Job Level", JobLevel, 15), 2; - else - mesc l("* @@/@@ Job Level", JobLevel, 15), 9; + msObjective(JobLevel >= 15, l("* @@/@@ Job Level", JobLevel, 15)); - if (countitem(Scythe)) - mesc l("* @@/@@ @@", countitem(Scythe), 1, getitemlink(Scythe)), 2; - else - mesc l("* @@/@@ @@", countitem(Scythe), 1, getitemlink(Scythe)), 9; + msObjective(countitem(Scythe), l("* @@/@@ @@", countitem(Scythe), 1, getitemlink(Scythe))); - if (getq(HurnscaldQuest_BloodDonor)) - mesc l("* Donate blood at least once."), 2; - else - mesc l("* Donate blood at least once."), 9; + msObjective(getq(HurnscaldQuest_BloodDonor), l("* Donate blood at least once.")); next; if (BaseLevel >= 40 && diff --git a/npc/functions/main.txt b/npc/functions/main.txt index 2d4d3a11a..05ec73fc1 100644 --- a/npc/functions/main.txt +++ b/npc/functions/main.txt @@ -266,6 +266,16 @@ function script VarDiffValue { return (getarg(0) < .@val && getarg(1) >= .@val); } +// Function meant to be used by Main Storyline Quest +// msObjective ( condition , message ) +function script msObjective { + if (getarg(0)) + mesc getarg(1), 2; + else + mesc getarg(1), 9; + return; +} + function script getmap { if (getmapxy(.@mapName$, .@xpos, .@ypos, getarg(0,0)) != 0) return false; |