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


Joined: 05 Jan 2002
Posts: 1
Location: USA

PostPosted: Sat Jan 05, 2002 9:47 pm   

Need help with a trigger problem
 
On a mud that I sometimes play, there are many different attacks someone can use against you, and a few different ways to block them. I have a sepperate set of triggers that catch what type of attack it is, and I have the command needed to block it aliased to "pa" 2.5 seconds after you see the type of attack they used, I need to type pa to block it. I'm trying to make a set of triggers that will block it automatically, but the problem is, occasionally they change the attack in the middle of the sequence, and you no longer need to block the first one. This is where the problem comes in, because if they do change attacks, the trigger still trys to block the first one, and is too lagged from skill lag, to block the second one in time. Any ideas on how I could make it not block, if, another attack is thrown, and then 2.5 seconds after the next one is thrown block, unless of course, they switch attacks again. Which would mean to issue the pa command 2.5 seconds after the newest attack.

Currently I was telling it when it sees the text "begins a high attack" It does:
#if {@qwe = 2} {#var qwe 2} {}
#if {@qwe = 1} {#var qwe 2} {}
#if {@qwe = 0} {#var qwe 1} {}
#if {@qwe = 1} {#Wa 2500;#If {@qwe = 2} {#var qwe 2} {};#if {@qwe = 1} {pa;#var qwe 0} {} }
#if {@qwe = 2} {#var qwe 1} {}

However when, someone throws a new attack, and it sees, "begins a high attack" it issues the pa command immediatly, then 2.5 seconds later issues another pa command, I can't figure out a better way to write this, or why this isn't working, any ideas would be appreciated
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sat Jan 05, 2002 10:34 pm   
 
A subtle change in your pa alias should do the trick. I am assuming your triggers set a variable with the correct block and your pa currently sends whatever is in that variable. So I will try to describe what to do based on those assumptions.

First change all your triggers to issue pa after setting the variable to the correct block.

Add this line to the beginning of pa:
#IF ("%-1"="Time to Block") {

Add this to the end of pa:
} {
#UNTRIGGER BlockExecution
#ALARM "BlockExecution" {+2} {pa Time to Block}
}

Supposedly in newer versions you will be able to do 2.5 in an alarm but right now only whole seconds work so you might want to try both 2 and 3 and see which works better.

Editted---
I would be a very good idea to eliminate all use of the wait command as it won't be supported in the future. Also change the triggers themselves to just set the variable with the appropiate block number and call pa. That with the changes above should do it.
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