Rana's Weight Handling SUBs for Chars, Backpacks and Containers
;==========================================================================================
; Script Name: Rana's Weight Handling SUBs
; Author: Rana
; Version: Check %Ver
; Client Tested with: 7.0.19.x
; EUO version tested with: 1.5 (Build 202)
; Shard OSI / FS: OSI
; Revision Date: 10/31/2011
; Public Release: 07/10/2008
;==========================================================================================
Purpose
SUB Routines to handle all type of weight issues and
also provide the amount of Items within a given Container.
The maximum load limit of the Char is calculated by its strength and race.
There are a set of variables you can use within your own script
to manage all your weight and item needs eg prevent from
overload or prevent from overfill Containers, detect changes
in weight or items amounts to update your display.
SETUP
I recommand to do this line as a part of your Script header !!!!!
GoSUB RANA_CharWeightHandling INIT
GoSUB RANA_CharWeightHandling [INIT]
OPTION: INIT
Prepair Data for propper Weight calculations
The SUB has to run at least ones with the INIT parameter
before you can use it again in the script. The INIT part
will make sure you get propper data by open up Paperdoll,
Statusbar and figure out your Char and Server related limits.
How-to-Use
The two SUBs will give you all the data you might need:
GoSUB RANA_CharWeightHandling [INIT]
#RESULT returns ->
OK (no change in values, no errors) or
ERROR (something messed up, invalid results) or
UPDATE (a change in value since last check, you might initiate a redraw (Flickerprevention))
%RANA_WH_RACE -> HUMAN / ELF / GARGOYLE
%RANA_WH_ServerTypeSP -> #TRUE Server uses Siege Perilous ruleset eg. no recall
%RANA_WH_ServerName -> Just the Name of the actual Shard
%RANA_WH_ServerType -> Type of ruleset REGULAR -> OSI PROD Shard / OSI SP -> Siege P.
%RANA_WH_MaxFreeBackPackStones -> Max. amount of stones before your Char is overweighted
%RANA_WH_MaxFreeBackPackItems -> Max. amount of items your Backpack can hold
GoSUB RANA_ContainerCheck [ContainerID]
#RESULT returns ->
ERROR (invalid Container or something messed up) or
0-124 (amount of Items within the Container) or
FULL (no more room in the Container)
%RANA_WH_ContainerItems -> amount of items within the checked Container
%RANA_WH_ContainerFull -> #TRUE Container holds 125 Items / #FALSE holds less than 125 Items
History
Version 1.20
ADD ContainerCheck more Failsafe (Restore last #FindID)
Version 1.10
ADD Gargoyle Race