summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHello=) <hello@themanaworld.org>2024-07-16 12:00:54 +0300
committerHello=) <hello@themanaworld.org>2024-07-16 12:00:54 +0300
commit577d79a5f115636ee71bce69523229c04dd669a3 (patch)
tree94fc24ada9be70f984b586a653bdd81240e9433c
parent43bf4d6d3b9252017a34e197ceea6f647a30c3de (diff)
downloadserverdata-577d79a5f115636ee71bce69523229c04dd669a3.tar.gz
serverdata-577d79a5f115636ee71bce69523229c04dd669a3.tar.bz2
serverdata-577d79a5f115636ee71bce69523229c04dd669a3.tar.xz
serverdata-577d79a5f115636ee71bce69523229c04dd669a3.zip
V2 of ManaMarket weight solution idea.
Differences vs previous version: * Allows to set "arbitrary" weight limits (within i32). * Does NOT makes hardcoded assumptions on nick or weight. * Reusable for >1 trade bot if desired. * Acts a bit like ACL, most of it done by server itself. * Still oneliner :) Usage: @setvar WEIGHT_LIMIT 0 10000000 ManaMarket Since its per-character variable, user must be online.
-rw-r--r--world/map/npc/functions/global_event_handler.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/world/map/npc/functions/global_event_handler.txt b/world/map/npc/functions/global_event_handler.txt
index 6664da36..b9e81e37 100644
--- a/world/map/npc/functions/global_event_handler.txt
+++ b/world/map/npc/functions/global_event_handler.txt
@@ -19,8 +19,8 @@ OnPCLoginEvent:
callfunc "ConvertChristmas21"; // Christmas 2021
callfunc "VaultLogin"; // Mirror Lake Protocol biddings
callfunc "VaultLogout"; // Clean some stuff, to be safe
+ if (WEIGHT_LIMIT) set MaxWeight, WEIGHT_LIMIT; // If this char var set, override max weight (tradebots, etc)
// add more here
- if (strcharinfo(0, BL_ID) == "ManaMarket") set MaxWeight, 10000000; // Let ManaMarket bot to carry 10 tons
set @login_event, 2;
end;