diff options
author | Fedja Beader <fedja@protonmail.ch> | 2025-01-11 20:10:15 +0000 |
---|---|---|
committer | Jesusalva Jesusalva <jesusalva@tmw2.org> | 2025-01-11 20:10:15 +0000 |
commit | a309fbc500ac8b69391a7e718f71b80f2c950313 (patch) | |
tree | b498dfee196cf6aff15607e9d7ac864f775de6f5 | |
parent | dabc2675ded3189793f32a28cb7be2fea5008982 (diff) | |
download | serverdata-a309fbc500ac8b69391a7e718f71b80f2c950313.tar.gz serverdata-a309fbc500ac8b69391a7e718f71b80f2c950313.tar.bz2 serverdata-a309fbc500ac8b69391a7e718f71b80f2c950313.tar.xz serverdata-a309fbc500ac8b69391a7e718f71b80f2c950313.zip |
deduplicate the two tulim sailors quest code a little
This comes with NO changes to translatable strings (I think).
- [x] Pushed two versions of if statement to see if herc doesen't like any. Will change to the best looking working one once CI passes/fails.
* Switch to new requirement listing format.
This one already exists elsewhere=>no-op for translators.
* tabs2spaces
* Push second version if statement
* deduplicate the two tulim sailors quest code a little
****
Approved-by: Jesusalva Jesusalva <jesusalva@tmw2.org>
-rw-r--r-- | npc/003-1/sailors.txt | 77 |
1 files changed, 37 insertions, 40 deletions
diff --git a/npc/003-1/sailors.txt b/npc/003-1/sailors.txt index 45b596608..8cb173764 100644 --- a/npc/003-1/sailors.txt +++ b/npc/003-1/sailors.txt @@ -42,16 +42,20 @@ L_Quest1: mesn; mesq l("You're willing to help? Perfect. We need @@ @@, @@ @@ and @@ @@ for travel.", 1, getitemlink(FishBox), 2, getitemlink(CroconutBox), 3, getitemlink(CottonCloth)); next; + mesn; mesq l("Cotton Cloth is sold at Candor, Croconut Boxes can be bought at the market. Fish, however, is a little more tricky."); next; + mesn; mesq l("If you hug the wall, there's a secret passage somewhere there. Well, there are many secret passages at Tulimshar."); next; + mesn; mesq l("You will find a fisher, maybe he is having a good time and can sell you a few boxes. And remember to keep your eye open."); setq TulimsharQuest_Sailors, 1; next; + mesn; mesq l("There are secret caves on this city. In fact, Tulimshar holds many misteries."); mesc l("Take care: Secret passages can be dangerous places (or not)."); @@ -60,35 +64,23 @@ L_Quest1: L_Report1: mesn; - mes l("@@/1 @@", countitem(FishBox), getitemlink(FishBox)); - mes l("@@/2 @@", countitem(CroconutBox), getitemlink(CroconutBox)); - mes l("@@/3 @@", countitem(CottonCloth), getitemlink(CottonCloth)); - if (countitem(FishBox) < 1 || - countitem(CroconutBox) < 2 || - countitem(CottonCloth) < 3) - close; + mes l("* %d/%d %s", countitem(FishBox), 1, getitemlink(FishBox)); + mes l("* %d/%d %s", countitem(CroconutBox), 2, getitemlink(CroconutBox)); + mes l("* %d/%d %s", countitem(CottonCloth), 3, getitemlink(CottonCloth)); next; + select l("[Deliver all goods.]"), l("[Maybe another time.]"); mes ""; if (@menu == 2) close; + if (countitem(FishBox) < 1 || countitem(CroconutBox) < 2 || - countitem(CottonCloth) < 3) { - mesn; - mesq l("Liar. Where are the goods? Are you trying to cheat me?!"); - next; - mesn; - mesq l("You know Jesus Saves hates cheaters, right? If Saulc didn't asked me to double-check stuff..."); - next; - mesn; - mesq l("For short, you would have lost all your items, wouldn't get anything, and there would be no refunds."); - next; - mesn; - mesq l("That's just a friendly advise. That's how things works around here."); - close; + countitem(CottonCloth) < 3 + ) { + goto L_Liar; } inventoryplace Dagger, 1, CottonShirt, 1; delitem FishBox, 1; // 7.500 GP → 3.750 GP @@ -129,35 +121,23 @@ L_Quest2: L_Report2: mesn; - mes l("@@/2 @@", countitem(FishBox), getitemlink(FishBox)); - mes l("@@/5 @@", countitem(CroconutBox), getitemlink(CroconutBox)); - mes l("@@/7 @@", countitem(CottonCloth), getitemlink(CottonCloth)); - if (countitem(FishBox) < 2 || - countitem(CroconutBox) < 5 || - countitem(CottonCloth) < 7) - close; + mes l("* %d/%d %s", countitem(FishBox), 2, getitemlink(FishBox)); + mes l("* %d/%d %s", countitem(CroconutBox), 5, getitemlink(CroconutBox)); + mes l("* %d/%d %s", countitem(CottonCloth), 7, getitemlink(CottonCloth)); next; + select l("[Deliver all goods.]"), l("[Maybe another time.]"); mes ""; if (@menu == 2) close; + if (countitem(FishBox) < 2 || countitem(CroconutBox) < 5 || - countitem(CottonCloth) < 7) { - mesn; - mesq l("Liar. Where are the goods? Are you trying to cheat me?!"); - next; - mesn; - mesq l("You know Jesus Saves hates cheaters, right? If Saulc didn't asked me to double-check stuff..."); - next; - mesn; - mesq l("For short, you would have lost all your items, wouldn't get anything, and there would be no refunds."); - next; - mesn; - mesq l("That's just a friendly advise. That's how things works around here."); - close; + countitem(CottonCloth) < 7 + ) { + goto L_Liar; } delitem FishBox, 2; // 7.500 GP → 3.750 GP delitem CroconutBox, 5; // 12.000 GP → 10.600~11.800 GP @@ -173,6 +153,23 @@ L_Report2: close; +L_Liar: + mesn; + mesq l("Liar. Where are the goods? Are you trying to cheat me?!"); + next; + + mesn; + mesq l("You know Jesus Saves hates cheaters, right? If Saulc didn't asked me to double-check stuff..."); + next; + + mesn; + mesq l("For short, you would have lost all your items, wouldn't get anything, and there would be no refunds."); + next; + + mesn; + mesq l("That's just a friendly advise. That's how things works around here."); + close; + OnInit: .sex = G_OTHER; .distance = 5; |