From 577d79a5f115636ee71bce69523229c04dd669a3 Mon Sep 17 00:00:00 2001 From: "Hello=)" Date: Tue, 16 Jul 2024 12:00:54 +0300 Subject: 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. --- world/map/npc/functions/global_event_handler.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.3-70-g09d2