Date: Fri, 7 Nov 1997 13:24:01 -0800
Reply-To: REXX Programming discussion list <REXXLIST@UGA.CC.UGA.EDU>
Sender: REXX Programming discussion list <REXXLIST@UGA.CC.UGA.EDU>
From: Steven Meyer <SMeyer@SLAC.STANFORD.EDU>
Organization: Stanford Linear Accelerator Center
Subject: Re: Newbie needs a little help
Content-Type: text/plain; charset=us-ascii
RyanK wrote:
>
> Hi, i'm a complete newbie to programming and rexx altogether, and
> here's my problem:
> I'm trying to write a rexx script to work with ZOC (a terminal
> program for Win95). I want to set a number of conditions, and if all
> are true, do one thing, if even one is untrue, to do another thing...
> Basically, i'm playing a game called Tele-Arena (kind of like a mud)
> on my bbs. you create a character which has certain stats
> (intelligence, knowledge, strength, stamina, agility, charisma, and
> vitality). you can type reroll and get completely new stats, which are
> random, until you get one's that are good enough. i need to create a
> script to type reroll and evaluate my stats until [snip] . . .
Assuming that you are able to actually retrieve the required data from
the terminal session into Rexx variables (let's call them int, kno, str,
sta, agi, cha, and vit), and assuming that 12 is your minimum, then you
need to do something like:
If Min(int,kno,str,sta,agi,cha,vit) < 12 Then Do
/*
* here you do something to cause the stats to be re-randomized.
*/
End
If you have different minimums for different stats, you can group them
like:
If Min(int,kno) < 12 | Min(str,sta,agi) < 13 | Min(cha,vit) < 18 Then Do
/*
* here you do something to cause the stats to be re-randomized.
*/
End
--
Greetings . . . Steven R Meyer
Stanford Linear Accelerator Center
2575 Sand Hill Road, Menlo Park - CA - 94025, Mail Stop 17
Voice: 650-926-4332 Fax: 650-926-3882
|