diff options
author | Jesusaves <cpntb1@ymail.com> | 2025-01-29 21:03:36 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2025-01-29 21:03:36 -0300 |
commit | d00e2038b7ee4a6d0272ec924c50fce4b6ee82d5 (patch) | |
tree | c724c028eb540bdc4f70dc5104c1b67b4408ca9b | |
parent | 18f2b5d9162bedb886cd6206c130dfdb76c5b667 (diff) | |
download | serverdata-d00e2038b7ee4a6d0272ec924c50fce4b6ee82d5.tar.gz serverdata-d00e2038b7ee4a6d0272ec924c50fce4b6ee82d5.tar.bz2 serverdata-d00e2038b7ee4a6d0272ec924c50fce4b6ee82d5.tar.xz serverdata-d00e2038b7ee4a6d0272ec924c50fce4b6ee82d5.zip |
Fix some mistranslations reported by @Xtreem and Zegas' Barrel PoI.
More specifically, allow you to search the barrels after the quest.
-rw-r--r-- | npc/005-1/ayasha.txt | 2 | ||||
-rw-r--r-- | npc/005-3/barrel.txt | 16 | ||||
-rw-r--r-- | npc/functions/main.txt | 4 | ||||
-rw-r--r-- | npc/functions/openbook.txt | 4 | ||||
-rw-r--r-- | npc/functions/treasure.txt | 16 |
5 files changed, 34 insertions, 8 deletions
diff --git a/npc/005-1/ayasha.txt b/npc/005-1/ayasha.txt index 34177ec92..4a0997337 100644 --- a/npc/005-1/ayasha.txt +++ b/npc/005-1/ayasha.txt @@ -282,7 +282,7 @@ L_KidsTally: npctalk3 l("You found @@ out of @@ kids.", @kids_count, @count_tmp); if (@kids_count == 6) { - message strcharinfo(0), "That must have been the last kid."; + dispbottom l("That must have been the last kid."); setq CandorQuest_HAS, 3; } speech S_FIRST_BLANK_LINE | S_LAST_NEXT, diff --git a/npc/005-3/barrel.txt b/npc/005-3/barrel.txt index 235dcbd2c..615ac9a3d 100644 --- a/npc/005-3/barrel.txt +++ b/npc/005-3/barrel.txt @@ -27,7 +27,7 @@ function script CheckBarrel { L_BarrelTally: areamonster "005-3", 24, 34, 45, 42, "House Maggot", 1084, 1, "Trainer::OnKillHouseMaggot"; if (@barrel_count == 8) { - message strcharinfo(0), "You found the bug bomb."; + dispbottom l("You found the bug bomb."); specialeffect(14); specialeffect(FX_GRENADE); killmonster("005-3", "Trainer::OnKillHouseMaggot"); @@ -58,7 +58,8 @@ L_Loop: goto L_BarrelTally; L_Empty: - message strcharinfo(0), "You've already searched this barrel."; + if (!FakePoI(getq(CandorQuest_Barrel) >= 4, 1)) + dispbottom l("You've already searched this barrel."); return; } @@ -69,12 +70,23 @@ L_Empty: if (.@q == 2) CheckBarrel(); end; + OnInit: // Remember: array start at zero, but barrels count start at 1. "Fixing" may break barrel 8! setarray $@BarrelBits, (1 << 1), (1 << 2), (1 << 3), (1 << 4), (1 << 5), (1 << 6), (1 << 7), (1 << 8), (1 << 9); .sex = G_OTHER; .distance = 1; end; +OnMinute17: + .empty = any(true, false); + set(getvariableofnpc(.empty, "Barrel#2"), any(true, false)); + set(getvariableofnpc(.empty, "Barrel#3"), any(true, false)); + set(getvariableofnpc(.empty, "Barrel#4"), any(true, false)); + set(getvariableofnpc(.empty, "Barrel#5"), any(true, false)); + set(getvariableofnpc(.empty, "Barrel#6"), any(true, false)); + set(getvariableofnpc(.empty, "Barrel#7"), any(true, false)); + set(getvariableofnpc(.empty, "Barrel#8"), any(true, false)); + end; } 005-3,24,39,0 script Barrel#2 NPC_NO_SPRITE,{ diff --git a/npc/functions/main.txt b/npc/functions/main.txt index 1065f35ed..b0170d5ea 100644 --- a/npc/functions/main.txt +++ b/npc/functions/main.txt @@ -127,9 +127,9 @@ function script tutmes { dnext; if (.@showheader) { mesf(".:: %s ::.", .@header$); - mesc getarg(0), .@tcol; + mesc l(getarg(0)), .@tcol; } else { - mesc .@header$+": "+getarg(0), .@tcol; + mesc .@header$+": "+l(getarg(0)), .@tcol; } } return; diff --git a/npc/functions/openbook.txt b/npc/functions/openbook.txt index 7cf87dd40..c35fbf272 100644 --- a/npc/functions/openbook.txt +++ b/npc/functions/openbook.txt @@ -12,7 +12,7 @@ function script openbook { mesc l("You open a book named @@. Do you want to read it?", .@book_name$); next; - return (select("Yes.", "No.") == 1); + return (askyesno() == ASK_YES); } function script openbookshelf { @@ -22,6 +22,6 @@ function script openbookshelf { l("You see a dust covered book on the shelf... The name of the book is @@.", .@book_name$), l("Do you want to read it?"); - return (select("Yes.", "No.") == 1); + return (askyesno() == ASK_YES); } diff --git a/npc/functions/treasure.txt b/npc/functions/treasure.txt index 933a2f869..b6726ce61 100644 --- a/npc/functions/treasure.txt +++ b/npc/functions/treasure.txt @@ -80,7 +80,10 @@ function script TreasureBox { // A Point Of Interest is a temporary duplicate NPC which is randomly // created & assigned to key points and contains minor stuff you can loot. // #DungeonPOI controls the duplication, and #DungeonPOI_Type<%02d> is the type + +/* Type 1 : Thrash */ boss,0,0,0 script #DungeonPOI_Type01 NPC_NO_SPRITE,0,0,{ +OnTalk: // Someone already looted this before you if (.empty) end; // You are the first one looting this, so provision space @@ -167,8 +170,9 @@ OnInit: } - +/* Type 2 : Food */ boss,0,0,0 script #DungeonPOI_Type02 NPC_NO_SPRITE,0,0,{ +OnTalk: // Someone already looted this before you if (.empty) end; // You are the first one looting this, so provision space @@ -283,4 +287,14 @@ function create_poi { } +// Artifical PoI for pre-existing NPCs +// Must, however, handle .empty manually. Returns TRUE if it'll be searched. +// FakePoI( type=01, conditional=true ) +function script FakePoI { + .@type = getarg(0, 1); + .@cond = getarg(1, true); + if (!.@cond) return false; + doevent(sprintf("#DungeonPOI_Type%02d::OnTalk", .@type)); + return true; +} |