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


Joined: 05 Apr 2007
Posts: 3

PostPosted: Sat Apr 07, 2007 1:34 am   

I just learned what a function is 10minutes ago. Who wants to help! :)
 
I'm going to have multiple connections to a mud and I want to create an 'auto assist' type thing for some of the windows. In my old client I'd just trigger something like "$assistvariableguy massacres" = assist, etc and then make an alias #alias {autto %1} {#var assistvariableguy %1}. And all I had to do was type 'autto warrior' and my char would assist always. It worked fine but it assists even when it's already assisting and I want to fix that.

This is a typical round when I'm in combat and don't need to assist:

358H 137V 1X 0C [Me:Perfect] [Warrior:Fair] [a shadow:Awful] Mem:3>
A shadow hits Warrior hard.
Warrior massacres a shadow with his slash.
You miss a shadow with your pierce.
358H 137V 1X 0C [Me:Perfect] [Warrior:V.Bad] [a shadow:Awful] Mem:3>

And if I were out of combat and need to assist:

358H 137V 1X 0C Mem:2>
A shadow hits Warrior hard.
Warrior massacres a shadow with his slash.
358H 137V 1X 0C Mem:2>

I want to know if it's possible to do something similar to what i had for all character windows I want. So, I'd like to still be able to type 'autto Steve' or something like that and the multiple character windows i want to assist will assist.

Thanks!
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Sat Apr 07, 2007 9:07 am   
 
The easiest way would be to have an Assisting variable that you set to 1 when you start assisting and 0 when you kill the enemy. You can then check if the variable is set using the #if command. For example:

#alias as {#if (@Assisting) {assist %1;#var Assisting 1}}
#trig {(*) has died.} {#var Assisting 0}

You could also give the trigger that makes you assist an ID and turn it off with the #t- command.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
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