4Dimensions Forum
May 22, 2013, 02:12:43 am *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: We're trying to improve the mud.  Please check out the following topic along with all of the Macro topics: http://4dimensions.org/forum/index.php/topic,760.0.html

 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: new variable?  (Read 1393 times)
Asmodeus
Riddler
Full Member
***
Offline Offline

Posts: 141



View Profile
« on: August 04, 2010, 03:57:48 pm »

Hey guys.  I'm not exactly sure who would be able to do this (i assume its possible), but I would really like a variable that could check a characters carried weight, considering %actor.weight% never changes depending on what one is holding/has in their inventory.  Or maybe it already exists and its just not on that dg scripts guide.  Is there a list of added variables anywhere?


so for example, the first things i see when I type inventory are...


[You are carrying 26 of 39 items]
[You have a total weight of 422/1055]


So I would like an %actor.tweight% variable (or whatever word you want to put in there) that would return the number 422, in this case.

Also, does anyone know if 422 includes all the things i'm wearing/holding/wielding?
« Last Edit: August 04, 2010, 04:14:35 pm by Asmodeus » Logged
Asmodeus
Riddler
Full Member
***
Offline Offline

Posts: 141



View Profile
« Reply #1 on: August 04, 2010, 04:10:51 pm »

just to clarify, %actor.weight% returns the weight you see when you finger a character.  And that doesn't change depending on inventory/items worn.

I'm looking for this other type of variable because im trying to create traps triggered by weight.
Logged
Kvetch
Administrator
Hero Member
*****
Offline Offline

Posts: 524



View Profile Email
« Reply #2 on: August 04, 2010, 04:12:17 pm »

Looks like %actor.weight% would bring up the weight of the pc and not what they're carrying.  I think that if this isn't a current variable, it is one that should be added.  I should've thought of this when I wanted my trap in NDR - instead of making it so people had to fly, I should have had it by total weight because it's the weight of the person that is supposed to trigger the trap (hence my reason for thinking of fly).
Logged
thotter
Lord Of All Pie
Newbie
*
Offline Offline

Posts: 15


View Profile
« Reply #3 on: August 04, 2010, 05:40:05 pm »

I added 4 new variables.
%actor.carriedweight% returns the weight the actor is carrying.
%actor.maxcarriedweight% returns how much weight the actor could carry.
%actor.carriedamount% returns the amount of items the actor is carrying.
%actor.maxcarriedamount% returns the amount of items the actor could carry.

Happy scripting!
Logged
Asmodeus
Riddler
Full Member
***
Offline Offline

Posts: 141



View Profile
« Reply #4 on: August 04, 2010, 05:41:52 pm »

you rock!

off to kill some fat mobs with weight traps!

 Grin

Logged
Tocharaeh
Sr. Member
****
Offline Offline

Posts: 276



View Profile WWW
« Reply #5 on: August 11, 2010, 04:19:52 pm »

that's so awesome!!@!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!11
Logged

-Tocharaeh D'Araesth
The Dirty Ol'' Drow that time left behind in fear of obliteration!
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!