|
alaric_tynan Newbie
Joined: 05 Sep 2004 Posts: 8
|
Posted: Sun Sep 05, 2004 3:33 pm
Help with the #IF command |
I am trying to alter a code I have. This is the code:
Code: |
tmp = %ismember( Food-Drink, @cnrContents)
#T+ SleepEat
#if @tmp="" {#show %ansi( white)You have not have a Food-Drink container option.} {
#if %item( @cnrNames, @tmp)=None {#show %ansi( white)Your Food-Drink container option is not set.} {
#if %item( @cnrLocations, @tmp)=" " {
get @ctlCurrentFood %item( @cnrShortnames, @tmp)
get @ctlCurrentFood %item( @cnrShortnames, @tmp)
eat @ctlCurrentFood
eat @ctlCurrentFood
} {
get %item( @cnrShortnames, @tmp) %item( @cnrLocations, @tmp)
get @ctlCurrentFood %item( @cnrShortnames, @tmp)
get @ctlCurrentFood %item( @cnrShortnames, @tmp)
eat @ctlCurrentFood
#if {You are too full to eat more.} {put @ctlCurrentFood %item( @cnrShortnames, @tmp)} {eat @ctlCurrentFood}
put %item( @cnrShortnames, @tmp) %item( @cnrLocations, @tmp)
}
} |
What I am trying to do is, if I do not need both food items to get full, make it put the extra food back in my container. I figure the #IF command can use some sort of variable or experession to see if this is the case and have the true or false command do it automatically. The messages I get are these.
You eat XXX.
You are no longer hungry.
or
You eat XXX.
You are full.
or
You are too full to eat more. |
|
|
|
darmir Sorcerer
Joined: 10 Oct 2000 Posts: 706 Location: USA
|
Posted: Sun Sep 05, 2004 4:06 pm |
This forum is only for finished scripts. If you need help with an script you are creating post in the general forum.
|
|
_________________ Run as hard as a wild beast if you will, but you won't get any reward greater than that destined for you.
Source: (Egyptian) |
|
|
|
|
|
|
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
|
|