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
DaHart85
Beginner


Joined: 25 Feb 2005
Posts: 10
Location: Fort Wayne, IN

PostPosted: Mon Apr 02, 2007 5:57 am   

Lost conc trigger
 
Okay, I am having trouble setting a trigger for when the game outputs "You lose your concentration!"

What I want it to do is repeat the last spell/command entered so that it will save me having to retype the alias every time it fails. Is there an easy way to do this? Everything I have tried doesn't seem to work.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4686
Location: Pensacola, FL, USA

PostPosted: Mon Apr 02, 2007 9:46 am   
 
you need to make triggers based on your attempt messanging to set the command that will (possibly) need be redone
_________________
Discord: Shalimarwildcat
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Mon Apr 02, 2007 11:45 am   
 
Depends how exactly it works and how fast the message comes after you enter a command. This might work though:

#trig {You lose your concentration!} {#exec %lastcom}

if your triggers keep executing other commands between when the command was first sent and when you get the concentration message, you'll need to use the more complicated method that shalimar is describing.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
myrison
Beginner


Joined: 10 Nov 2006
Posts: 22

PostPosted: Fri Apr 06, 2007 1:17 pm   
 
Suggestion:

Make a command input trigger with the following pattern:
Pattern: ^cast (*)$
Value: #VAR lastspell {%1}

This will capture the variable only when you type "cast <spellname>".

Then, make a trigger:
#TRIGGER {You lose your concentration!} {cast @lastspell}

That should do the trick.
Reply with quote
Theragil
Apprentice


Joined: 13 Feb 2004
Posts: 157
Location: USA

PostPosted: Fri Apr 06, 2007 1:37 pm   
 
Out of curiosity, is the command input trigger approach faster or better than doing it as an alias?
#alias cast {#var lastspell {%1};~cast %-1}
The result is essentially identical, but I always wondered if one was more efficient. Obviously a command input triger is more flexible because of wildcards, but in a situation like this where you don't need wildcards since the first word is always 'cast', are aliases better?
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Fri Apr 06, 2007 1:39 pm   
 
Or if you prefer an alias to a command input trigger
#ALIAS cast {lastSpell = %-1; ~cast %-1}
#TRIGGER {You lose your concentration!} {cast @lastSpell}
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
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