diff options
author | Jesusaves <cpntb1@ymail.com> | 2022-04-08 09:25:12 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2022-04-08 09:25:12 -0300 |
commit | d9ef8d92e65ea0680c89118392f0f42a55ac0c85 (patch) | |
tree | 44db34bf03b8cd634d8eb60304fd5a890f11f076 | |
parent | 3f4ba5f35dae01c10727f5a713716abb7df09daf (diff) | |
download | serverdata-d9ef8d92e65ea0680c89118392f0f42a55ac0c85.tar.gz serverdata-d9ef8d92e65ea0680c89118392f0f42a55ac0c85.tar.bz2 serverdata-d9ef8d92e65ea0680c89118392f0f42a55ac0c85.tar.xz serverdata-d9ef8d92e65ea0680c89118392f0f42a55ac0c85.zip |
Backport Chronos changes. But without personal trading limit.
The reason for the personal limit is the existing stacks of points.
These should be liquidated before the Evolved merge.
(And if not, this means BP costs go up, so.)
-rw-r--r-- | npc/099-7/_import.txt | 2 | ||||
-rw-r--r-- | npc/099-7/boss.txt | 3 | ||||
-rw-r--r-- | npc/099-7/chronos.txt (renamed from npc/099-7/cronos.txt) | 21 | ||||
-rw-r--r-- | npc/functions/clear_vars.txt | 6 |
4 files changed, 31 insertions, 1 deletions
diff --git a/npc/099-7/_import.txt b/npc/099-7/_import.txt index 998db4ea..081e29c6 100644 --- a/npc/099-7/_import.txt +++ b/npc/099-7/_import.txt @@ -1,4 +1,4 @@ // Map 099-7: Ruined Swamps // This file is generated automatically. All manually added changes will be removed when running the Converter. "npc/099-7/boss.txt", -"npc/099-7/cronos.txt", +"npc/099-7/chronos.txt", diff --git a/npc/099-7/boss.txt b/npc/099-7/boss.txt index 65be12b5..302c7cb2 100644 --- a/npc/099-7/boss.txt +++ b/npc/099-7/boss.txt @@ -730,6 +730,9 @@ L_Done: mes ""; getexp 1000000, 0; warp "027-2", 50, 29; + #CHRONOS = 0; + if ($CHRONOS_STOCK < 3) + $CHRONOS_STOCK = 3; close; } diff --git a/npc/099-7/cronos.txt b/npc/099-7/chronos.txt index c933571c..1a0ab6ed 100644 --- a/npc/099-7/cronos.txt +++ b/npc/099-7/chronos.txt @@ -2,6 +2,7 @@ // There's also Father Time in the GM stuff 099-7,99,30,0 script Chronos NPC313,{ + function outOfStock; mesn; mesq l("I'm Chronos, lord of time, the immortal, the head editor of the Almanach, the... Alright, let's forget that."); if (BOSS_POINTS < .price) @@ -19,6 +20,13 @@ next; } + // Check for stock. + // Adding a limit to individual purchases would be a pain so I didn't. + // But code is commented below + //.@cur_date = (gettime(7) * 100 + gettime(6)); + //if (#CHRONOS == .@cur_date) outOfStock(); + if ($CHRONOS_STOCK < 1) outOfStock(); + // Shopkeeping mesc l("All things shall pass, but with the limited time you have, please enjoy shopkeeping."); if (countitem(UnderworldKey)) { @@ -38,10 +46,23 @@ closeclientdialog; close; +function outOfStock { + mesn; + mesq l("I'm afraid I don't have anything now, please wait until my next travel, or complete the Tree of Knowledge quest for my amusement."); + close; +} + +OnClock0010: + if (gettime(5) == 1) + set $CHRONOS_STOCK, 5; + end; + OnInit: tradertype(NST_CUSTOM); .distance=4; .price=5000; + if ($CHRONOS_STOCK < 1) + set $CHRONOS_STOCK, 3; sellitem MovieCap, 1; sellitem BlueWolfHelmet, 1; diff --git a/npc/functions/clear_vars.txt b/npc/functions/clear_vars.txt index 65d21291..537012c8 100644 --- a/npc/functions/clear_vars.txt +++ b/npc/functions/clear_vars.txt @@ -21,6 +21,12 @@ function script ClearVariables { setq Quest_Doomsday, 2; #DD5_TALLY = 0; // Whatever, one is enough } + if (#CHRONOS) { + #CHRONOS = 0; // No longer used + } + if (#X21) { + #X21 = 0; // Flag for old events + } if (#BankAccount) { BankVault += #BankAccount; #BankAccount = 0; |