|
tajemstvi Newbie
Joined: 18 Jan 2002 Posts: 1 Location: Czech Republic
|
Posted: Sat Feb 16, 2002 2:23 pm
Checking weapons against each other |
OK i am kinda struggling with a few probs with adding weapons to a variable
my variables are
1.mainwep (the most powerful weap i have on me)
2.otherwep (backupwep)
3.attackwep (what they are hitting me with)
i also have a list of the weapons used in my mud listed by power
#var bigwep=ls|fbb
#var midwep=axe|rat
#var smallwep=brick|knife
#var specialwep=rat
what i want to do is compare the mainwep against the weapon i have just picked up and if new one is more powerful add it automatically to the mainwep var and if the mainwep is bigger than my otherwep replace it.
however is one snag. for example if i pick up the fbb and try to pick up rat i cant have both same if i pick rat if i have ls.
not too much of a problem, however what i am also trying to do is target the weap an opponent attackes me with, so if their weap is more powerful i steal theirs and fight with that, this is where the rat becomes a pain.
i have messed round with triggers on patterns such as
^(%w) attacks you with the rusty longsword
attackwep=ls
you have taken the axe
mainwep=axe
so if pattern of attack =
x attacks you with the long sword
attackwep=ls;mainwep=ls;otherwep=axe
is what i want to achieve
but if my mainwep=ls and attackwep=rat i want to set attackwep to null how??
any ideas thanks |
|
|
|
Troubadour GURU
Joined: 14 Oct 2000 Posts: 556 Location: USA
|
Posted: Sat Feb 16, 2002 7:24 pm |
To set a varible to null, use "" or %null.
#IF ((@mainwep=ls) & (@attackwep=rat)) {#VAR attackwep ""}
or
#IF ((@mainwep=ls) & (@attackwep=rat)) {#VAR attackwep %null}
Troubadour |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|