obj
weapon1
name = "acha d armas"
icon = 'axes.dmi'
icon_state = "acha d armas"
var
strength = 3
equipped = 0
verb
Equip()
set src in usr
if(usr.weapon == 0)
usr << "You equip the [src]!"
usr.Str += strength
suffix = "(Equiped)"
usr.weapon = 1
src.equipped = 1
else
usr << "You may only have one item equiped!"
Unequip()
set src in usr
if(src.equipped == 1)
usr << "You un-equip the [src]"
usr.Str -= strength
suffix = null
usr.weapon = 0
src.equipped = 0
else
usr << "That is not equiped yet!"
this is what it say
error : usr.weapon : undefined var
ID:143929
May 26 2007, 4:04 am
|
|
May 26 2007, 6:08 am
|
|
define usr.weapon doh >_>
|
In response to Kazekage
|
|
you need creat the var...
mob/var/weapon = 0 add this line. |
make a var called equipped
like this mob/var equipped then on ur actual mob rite mob icon = 'wat ever.dmi' icon_state = "wat ever" equipped = 0 that should fix it |
In response to Max34561
|
|
Bad advice.
|
In response to Max34561
|
|
Two things wrong with that:
-Very bad advice :) -I'll dumb this down for you. If there is nothing after a variable, like /mob/var/wee, it will be null, which is like FALSE, or 0. You can set default values to variables by putting something after it, like /mob/var/wee="woo" Also, please use dm tags when posting codes :) |