In response to Govegtos
Govegtos wrote:
I did that but when i can wear it when my strenght is 1 and i need it to be 50 in order to wear what is wrong?

heres the wear code a again

>if(usr.Strength <= 50 && usr.Mentality <= 50 && usr.Dexterity <= 50)

>


Like I said above, I got the operators around the wrong way. Change that line to:

if(usr.Strength >= 50 && usr.Mentality >= 50 && usr.Dexterity >= 50)


Hehe.



In response to Sinyc
k thanks but now when i go and try i got 50 strenght and mentallity and dex i getYou are not strong enough to wear this restricted item.

Heres the wear coding

            Wear()
set category = "Utilities"
if(src.worn == 1)
src.worn = 0
usr.overlays -= 'GogetaVest.dmi'
usr << "You remove [src.name]."
else
if(usr.Strength >= 50 && usr.Mentality >= 50 && usr.Dexterity >= 50)
usr.overlays += 'GogetaVest.dmi'
usr << "You wear [src.name]."
else
usr << "You are not strong enough to wear this restricted item."
In response to Govegtos
Govegtos wrote:
k thanks but now when i go and try i got 50 strenght and mentallity and dex i getYou are not strong enough to wear this restricted item.

Uuh, beats me. That wear verb should work perfectly, giving that your strength, mentality and dexterity are all 50 or over.
In response to Sinyc
Thanks for trying ill try and get somone to give me a hand thanks for helping so far :)
I think it would be something like
mob
var
strength = ##//strength [usr] starts with
obj
item
verb
pick_up()
if(usr.strength <= ##)
usr << "[usr] picks up item!"
else
usr<< "[usr] can't even hold this item."

//or if you had multiple vars to deal with
mob
var
strenth = ##
agility = ##
obj
item
verb
pick_up()
if(usr.strength <= ##||usr.agility <= ##)
usr << "[usr] picks up item!"
else
usr << "[usr] couldn't pick up item."

Is this what you need? (Untested)
In response to Govegtos
They gave it you at least 10 times x_x
In response to Popisfizzy
actually, now that i look at it:
if(usr.strength <= ##||usr.agility <= ##)

would be for either or.
if(usr.strenth <= ##)if(usr.agility <= ##)

would be for multiple vars
In response to Popisfizzy
if(ref.var>=#&&ref.var>=#)
=p
In response to Ol' Yeller
the way i have it set up works for me. i've never use && (i don't even know what it does)
In response to Popisfizzy
AND >_> && = And :P
obj/item
var
min_strength = 50
min_will = 10

if you did something like that, then when you go to pick it up you can do a check to make sure that the player's strength is less than min_strength, and compare variables as they are needed. rather than using an integer constant such as 50 in a case such as
if(ref.strength < 50)
return

you could do
 if(ref.strength < ref.min_strength)


This would help prevent bugs and errors where you might accidentally type 59 or such, since the required amount is kept in a single location.

Hiead
Page: 1 2