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


Joined: 14 Jun 2002
Posts: 3
Location: Slovenia

PostPosted: Fri Jun 14, 2002 8:05 pm   

Spell Trigger
 
Ok, this is first time to this forum, and there is a chance that this question was posted before...but i didn't find it :).

Trying to make a cast/timer emote trigger. The line i get from mud looks like 'name of spell': ####, where # stands for number of rounds.

trigger " #TRIGGER {^(%w): ########$} {emote casting in 8 (%1)} " worked ok for spells that contain one word, but obviousley didn work with spells that have more than one word in name.

trigger " #TRIGGER {^(%w,%w,%w): ########$} {emote casting in 7 (%1 %2 %3)} " and now trigger only works for spells with 3 words, what do i need to do, that it will work for spells that have 1-3 words in their name.

Thank you
Reply with quote
int 21h
Newbie


Joined: 14 Jun 2002
Posts: 8

PostPosted: Fri Jun 14, 2002 8:41 pm   
 
#TRIGGER {^(%*): ########$} {emote casting in 8 (%1)}

---
I can show you the door, but only you can open it.

ArcticMUD (http://mud.arctic.org || telnet://mud.arctic.org:2700)
Reply with quote
Dante
Newbie


Joined: 14 Jun 2002
Posts: 3
Location: Slovenia

PostPosted: Fri Jun 14, 2002 8:59 pm   
 
Tried this, but it also emotes my prompt from time to time...which is not good :). Spell timer sometimes apears in same line with prompt and then the * parses the whole line.

Is there a special character that specifies start of line...that would make this trigger work fine. If there isn't a character that does that another solution is needed.
Reply with quote
int 21h
Newbie


Joined: 14 Jun 2002
Posts: 8

PostPosted: Fri Jun 14, 2002 9:04 pm   
 
^ is the character that specifies to match at the beginning of the line.

Can you give me an example of the entire prompt?

With the ^, you shouldn't need the $, is this text somewhere in the prompt, or its seperate? If its in the prompt, I need the prompt before I can tell you how to proceed.

---
I can show you the door, but only you can open it.

ArcticMUD (http://mud.arctic.org || telnet://mud.arctic.org:2700)
Reply with quote
Dante
Newbie


Joined: 14 Jun 2002
Posts: 3
Location: Slovenia

PostPosted: Fri Jun 14, 2002 9:09 pm   
 
well the trigger buggs if this happens:

Hp:463/449 Sp:776/776 Ep::251/251 Exp:71914 Kg:12 Csh:8940 Bnk:272 >Heal all: #####

when it's like this:

Heal all: #####

it works fine :)
Reply with quote
int 21h
Newbie


Joined: 14 Jun 2002
Posts: 8

PostPosted: Fri Jun 14, 2002 9:26 pm   
 
Probably an easier way to do this, and this trigger doesn't exactly demonstrate the best techniques, but it will work... I think.

#TRIGGER {(%*): ########$} {#var shiznit %pos(">",%1); #IF (@shiznit) {#var foobar %copy(%1,(@shiznit)+1,50)} {#var foobar %1}; emote casting in 8 (@foobar)}

---
I can show you the door, but only you can open it.

ArcticMUD (http://mud.arctic.org || telnet://mud.arctic.org:2700)
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