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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
obor
Wanderer


Joined: 20 Dec 2001
Posts: 56
Location: USA

PostPosted: Sat Oct 26, 2002 6:06 pm   

trigger that reads mana and casts when mana is ful
 
trying to setup a script that'll cast spells consistently and then will sleep when I run out of mana. that part is easy. I can do that.
what I have NOT been able to do is figure out how to get myself to wake up when my mana fills out.

#tr {You don't have enough mana} {sleep}

my prompt is in the form

(present hp}/(max hp) (present mana)/(max mana)

so I know I have to set up some type of variable that reads what my "max" mana should be, then it compares it to my "present" mana, and wakes me up when present mana is equal to max mana.

I just don't know how to make that happen *pout*
any help greatly appreciated
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Oct 26, 2002 6:44 pm   
 
quote:

trying to setup a script that'll cast spells consistently and then will sleep when I run out of mana. that part is easy. I can do that.
what I have NOT been able to do is figure out how to get myself to wake up when my mana fills out.

#tr {You don't have enough mana} {sleep}

my prompt is in the form

(present hp}/(max hp) (present mana)/(max mana)

so I know I have to set up some type of variable that reads what my "max" mana should be, then it compares it to my "present" mana, and wakes me up when present mana is equal to max mana.

I just don't know how to make that happen *pout*
any help greatly appreciated



I dunno why you wanna wait until you are completely full rather than, say, 3/4, but that's no biggie.

#trigger {prompt pattern here, replace each number with (%d)} {#if (%3 = %4) {wake} {#noop continue sleeping}}

li'l shmoe of Dragon's Gate MUD
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Oct 26, 2002 8:18 pm   
 
You'll also want to make sure this is a prompt trigger.
#TR {(%d)/(%d) (%d)/(%d)} {#IF (%3 = %4) {wake}} {} {nocr|prompt}

LightBulb
Senior Member
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun Oct 27, 2002 1:04 am   
 
Another thing is that this trigger (as it is in the previous posts) will continue trying to wake you (even though you're already awake) until you're mana goes down again. For this reason, it's important to add a control mechanism.

#TR {You don't have enough mana} {sleep;#VAR asleep 1}
#TR {(%d)/(%d) (%d)/(%d)} {#IF ((%3 = %4) AND (@asleep = 1)) {wake;#VAR asleep 0}} {} {nocr|prompt}

LightBulb
Senior Member
Reply with quote
obor
Wanderer


Joined: 20 Dec 2001
Posts: 56
Location: USA

PostPosted: Sun Oct 27, 2002 10:10 am   
 
hurmm...didn't work...I can't get 4.62 to recognize the trigger pattern.

this is exactly how my prompt looks:

407/407hp 260/260mn blahjblahbljdsfj

I adjusted the trigger so it read
(%d/%d)*(%d/%d)*

didn't work. *mutter*

this is version 4.62 btw...probably shoulda said that.

the "asleep" variable doesn't update itself, obviously, because the trigger pattern isn't being recognized.

also, when I enter the 2nd part (the %d/%d part) it takes off the first ( and the last ) so that it only reads
%d/%d) (%d/%d
in the trigger part, and it totally takes off the {} {nocr|prompt} part

sorry for being dense, any help greatly appreciated.

*looks at ground sheepishly, puts his hands in his pockets and kicks a small pebble*
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Sun Oct 27, 2002 1:26 pm   
 
#TR {You don't have enough mana} {sleep;#VAR asleep 1}
#TR {(%d)/(%d)hp (%d)/(%d)mn} {#IF ((%3 = %4) AND (@asleep = 1)) {wake;#VAR asleep 0}} {} {nocr|prompt}

Ok, here are LightBulb's triggers in a color coded form and with the pattern of the prompt trigger updated to match your prompt. You may create these two triggers using the Settings Editor with the following convention:


Stuff in red goes in the Pattern part of the trigger
Stuff in blue goes in the Value (Commands) part of the trigger.
Stuff in green mean the options of the trigger that must be selected/deselected. In the second trigger, particularly, you need to check the Trigger on Prompt option and uncheck the Trigger on Newline option.

Notice that in none of these the outer curly braces were included. So, for example, the pattern of the first trigger is:
You don't have enough mana

and not:
{You don't have enough mana}

Another very useful advice would be to upgrade to a newer version of zMUD. I certainly don't have 4.62, so I can't try what I suggest. You will also find that most people in this forum don't have 4.62 too and will not provide much help with it.

*shrug* Updates are always free, forever, and version 6.x is a whole lot better and more powerful...

Kjata
Reply with quote
obor
Wanderer


Joined: 20 Dec 2001
Posts: 56
Location: USA

PostPosted: Mon Oct 28, 2002 1:41 am   
 
I actuaslly have 6.16 on my system back home (I'm in korea now), even paid for the darn thing and got it registered!!!
but I am not aware of how to make the registration thingee work since I don't have the key or whatever...

regardless, it was the "check/uncheck" the newline thing that worked. thanks. :)
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Mon Oct 28, 2002 6:20 am   
 
E-mail [url="mailto:support@zuggsoft.com"]support@zuggsoft.com[/url], using the e-mail address you used to register and give them your name, address and all other info necessary to look up your purchase. They will send you your reg code.

Kjata
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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