Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Balarik
Newbie


Joined: 07 Jul 2007
Posts: 9

PostPosted: Sat Jul 07, 2007 7:43 am   

I can't find the error
 
Just a quick explanation first. I've manually copied all my scripts from zMUD to CMUD because I couldn't import it. Anyway, most of it seem to work, but there are some things that doesn't.
The first thing is just a normal trigger and the trigger pattern is:

^You are {prepared to do the skill.|finished with your attack maneuver.}$

These are the things that should happen:

#IF (@char = "Main" AND @autoattack = 1 AND @mk_on != 1) {use @mcombatskill}
#IF (@char = "Sec" and @autoattack = 1) {use @scombatskill}
autoattack = 1
#echo hej

I want to say "hey it worked in zmud!" Very Happy But i'm not gonna do that, instead I'll say "gggnnnhrRAAARRGGHH". Because I have no idea why it doesn't work! Mad

As a sidenote, the #echo hej is just for testing that the pattern works, and it does. It seems as if it's those #if cases that doesn't work

I've coloured the code so that it appear exactly the way it does in the editor
Reply with quote
Balarik
Newbie


Joined: 07 Jul 2007
Posts: 9

PostPosted: Sat Jul 07, 2007 8:46 am   
 
Not to brag or so, but that code isn't bad at all. In fact it works pretty well and executes as it should...provided that the variables are set correctly. Embarassed
I realize from this that maybe I haven't had enough coffee, or that one should avoid trying to understand your own code after just recently converted it all manually from zMUD. Neutral
I have no problem understanding and evaluating @autoattack = 1 in my head, but @mk_on != 1 is a totally different story, especially when i'm tired Rolling Eyes
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Sat Jul 07, 2007 2:10 pm   
 
@mk_on != 1 In this case pretty much means @mk_on = 0

Because it looks like you are using 1 for TRUE and 0 for FALSE. Said another way they are ON or OFF. So if @mk_on is NOT EQUAL to ON then it MUST be OFF.

!= means Not Equal


A good example of the above trigger script is.

If your name is Bob and you are berserk and you are not crippled use cleave.
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
Balarik
Newbie


Joined: 07 Jul 2007
Posts: 9

PostPosted: Sat Jul 07, 2007 2:49 pm   
 
Yeah i know, i wrote that code myself. It is an on/off var but i always confuse myself when i have used != Very Happy
Thanks for explaining though Smile
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net