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


Joined: 07 Mar 2002
Posts: 1
Location: Spain

PostPosted: Thu Mar 07, 2002 8:03 pm   

AutoKill "bot"
 

Hi! First sorry for my english. I am doing a "bot" (well at least trying beacuse my knowledge) which could do the hard things on my mud if I am fighting while y can concentrate in do the easiest one.
In my mud we can have two prompts (fighting and not), so I though that the easiest way was doing apart two triggers to control if i am fighting and the actual stats. They look like this:

Not fighting:
#TRIGGER {^R (%d)/(%d) (%d)/(%d) (%d)/(%d)} {@lucha = 0;#VAR vida %1;#VAR maxvida %2;#VAR mana %3;#VAR maxmana %4;#VAR mov %5;#VAR maxmov %6}

Fighting:
#TRIGGER {L (%d)/(%d) (%d)/(%d) (%d)/(%d)} {@lucha = 1;#VAR vida %1;#VAR maxvida %2;#VAR mana %3;#VAR maxmana %4;#VAR mov %5;#VAR maxmov %6;#IF (@autolucha > 1) {#ECHO Autolucha activada...}}

Because in my mud there are multispells by round, y just can't activate the trigger to cast a spell, because it will generate a incredible spam... so I have thought that controling if i am fighting or not would be a easier way. So I have introduced the #IF (@autolucha > 1) {#ECHO Autolucha activada...}, so i can trigger "Autolucha activada..." with {#VAR @autolucha 1;reir}, and zmud knows i am fighting and can fire the rest of fighting triggers. But it doesn't seem to run. The reir command is a social, so if i smile and the autolucha variable is 1 it should cast 10 'acid breath' #TRIGGER {Te ries} {#IF @autolucha 1} {#loop 10 {c 'acid'};reir} I "reir" again to loop the trigger until the fight have end.. You killed x or You have been killed by x, and this text will set @autolucha again to 0. But i can imagine how to set all this together... Could you help? Any idea will be really apreciated .

Lot of thankz and again sorry for my english...
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Fri Mar 08, 2002 12:44 am   
 
You seem to have a few typos here:
#TRIGGER {Te ries} {#IF @autolucha 1} {#loop 10 {c 'acid'};reir}
Should be written as:
#TRIGGER {Te ries} {#IF (@autolucha=1) {#loop 10 {c 'acid'};reir}}

Also I see that you are using an ECHO for your Autolucha activada... that is a good idea however you probably have echo's set to not activate triggers. Switch that to a SHOW and your script should start working.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Fri Mar 08, 2002 2:02 am   
 
Also, I'm guessing that variable lucha probably holds a 1 or 0

Change from
#TRIGGER {^R (%d)/(%d) (%d)/(%d) (%d)/(%d)} {@lucha = 0;#VAR vida %1;#VAR maxvida %2;#VAR mana %3;#VAR maxmana %4;#VAR mov %5;#VAR maxmov %6}

To
#TRIGGER {^R (%d)/(%d) (%d)/(%d) (%d)/(%d)} {lucha = 0;#VAR vida %1;#VAR maxvida %2;#VAR mana %3;#VAR maxmana %4;#VAR mov %5;#VAR maxmov %6}



TonDiening
Beta Upgrading to 6.26
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