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
mikael
Newbie


Joined: 19 Apr 2003
Posts: 6
Location: Sweden

PostPosted: Sun Apr 20, 2003 2:37 pm   

i need to do a auto spend my exp when i have alot
 
i want to make a trigger that does this
train hp 5
when i have more exp than 300000

its a vampirewars mud and the line look like this
[703595 exp] <12740hp 12755m 12735mv 81bl>


ive come this far
#ALIAS hola {say @exps;#TI of;#TS {5};#TI on [turnitof];#T- test} "test"
#TRIGGER {[%1 exp} {#VAR exps %1} "test"

i get this [703595

but i get the how do i loose the [ in the beginning ?

/mikael Josefsson
Reply with quote
Rorso
Wizard


Joined: 14 Oct 2000
Posts: 1368

PostPosted: Sun Apr 20, 2003 3:26 pm   
 
quote:

but i get the how do i loose the [ in the beginning ?


Hello Mikael,
I think "~[" should work. So instead of:
#TRIGGER {[%1 exp} {#VAR exps %1} "test"
You would:
#TRIGGER {~[%1 exp} {#VAR exps %1} "test"

This is needed because [] is special symbols. So the ~ character tells zMUD to handle it as characters.


Rorso
Currently using zMUD 6.40
Reply with quote
Rorso
Wizard


Joined: 14 Oct 2000
Posts: 1368

PostPosted: Sun Apr 20, 2003 3:38 pm   
 
By the way. I think a trigger something like this might work to train when the exp is more than 300000:

#TRIGGER {~[(%d) exp} {#if (%1>300000) {train hp 5}}

The trigger should be set to trigger on prompts if your prompts don't have a newline automaticully added to them. Like some muds use this: <>[newline] which doesnt need the 'prompt' triggering.

I'm not sure if you can use '%1' as a pattern like you did in your trigger. '%d' that I use above tells zMUD to scan for digits. However to capture the number the '%d' has to be enclosed by paranthesis like '(%d)'. As that one is the first pattern-code in the trigger the variable '%1' is assigned that number.

Rorso
Currently using zMUD 6.40
Reply with quote
mikael
Newbie


Joined: 19 Apr 2003
Posts: 6
Location: Sweden

PostPosted: Sun Apr 20, 2003 3:40 pm   
 

hi there
you have icq msn or aim ?
i have icq 2041407 and msn Ne_Mesis@hotmail.com

and we can take it in swedish ...couse it didnt work ... it wouldent renew the vallue in the variable ...
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