Author Topic: new variable?  (Read 11050 times)

0 Members and 1 Guest are viewing this topic.

Offline Asmodeus

  • Riddler
  • Full Member
  • ***
  • Posts: 141
    • View Profile
new variable?
« 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 »

Offline Asmodeus

  • Riddler
  • Full Member
  • ***
  • Posts: 141
    • View Profile
Re: new variable?
« 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.

Offline Kvetch

  • Administrator
  • Hero Member
  • *****
  • Posts: 729
    • View Profile
    • Email
Re: new variable?
« 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).

Offline thotter

  • Lord Of All Pie
  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: new variable?
« 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!

Offline Asmodeus

  • Riddler
  • Full Member
  • ***
  • Posts: 141
    • View Profile
Re: new variable?
« Reply #4 on: August 04, 2010, 05:41:52 pm »
you rock!

off to kill some fat mobs with weight traps!

 ;D


Offline Tocharaeh

  • Sr. Member
  • ****
  • Posts: 283
    • View Profile
    • 4Dimensions on Facebook!
Re: new variable?
« Reply #5 on: August 11, 2010, 04:19:52 pm »
that's so awesome!!@!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!11
-Tocharaeh D'Araesth
The Dirty Ol'' Drow that time left behind in fear of obliteration!