|
Glinka Wanderer
Joined: 20 Dec 2000 Posts: 53 Location: USA
|
Posted: Sat Sep 28, 2002 1:37 am
#temp,...Set'n Variables etc. |
I jus can't get this doggone stuff ryte!
here is a small snip't
*****************
#cw blue
#IF @hbot {
#if @sbot {#if @htact {#case @htact {@htact=2,adv 1,cough,hide}{@htact=3,adv 1,cough,hide}{@htact=0,ret 3,cough}}{@htact=1,adv 1,cough,hide}}
cough
hide
}
******************
This checks if the hide-bot is on, then checks
If the stealth-bot is also on, then checks if
the hidden-tactical variable is non-zero.
for instance, if I am at 1 UD (unitofDistance)
from center, htact should be at 1, then i
want to advance one step, add one to the
htact variable so it reflects my new
Tact ( 2 UD's from center)
The hbot and sbot stuff works fine,but
I cant get it to update the htact variable...
wrong syntax mebbe? @htact will be from 0-3
******************************
Also, I'm tryin to use the #temp thing
for a temporary trigger that will fire
only when the script is run.
trigger pattern: Skills
Value: #temp {Hiding (%s)(%d)(%d)}
#gag
#cw %1 red
#co %2 red
#co %3 red
#echo Hiding,%2,%3
***********************
would this remove the skill Hiding from a
list of 10 or so skills,
gag the rest of the skills, then display
Hiding plus the 2 numbers (uses & level)
in red?
**********************
one more small questy,
I have the trigger set like so..
Mudoutput: You have 23 second(s) remaining!
#tr: You have (%d) seconds
value: #gag
#sub %1
#co red
#echo %1
I'm trying to get it to jus give me a
number in red instead of the whole line,
then i was gonna put it inna gauge for a
delay tymer...wont work tho...any ideas?
*********************
Thanks for any help,
I get most of the scripting stuff, just
cant get the syntax!
Thanks again,
Glinx
Love, Lyte, and Laughter...
Glink |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Sat Sep 28, 2002 4:51 am |
First off, you should get in the habit of putting the expression for #IF's in (). Hence "#IF (@sbot) {". Doing this will save you headaches later.
Now on to the problem in your script, all the variable assignments within the case are wrong as you expected.
{@htact=2,adv 1,cough,hide}
Should be written as:
{htact=2,adv 1,cough,hide}
Otherwise the script system expands htact then tries to do "1=2" which obviously isn't what you want.
Aslo for readability and to make it easier on the parser you should put spaces between the arguements of the case, also between the true and else portions of an IF. So the whole offending line would be corrected as:
#if (@sbot) {#if (@htact) {#case @htact {htact=2,adv 1,cough,hide} {htact=3,adv 1,cough,hide} {htact=0,ret 3,cough}} {htact=1,adv 1,cough,hide}} |
|
|
|
|
|
|
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
|
|