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


Joined: 15 Dec 2001
Posts: 1

PostPosted: Sat Dec 15, 2001 11:59 pm   

auto repeat trigger
 
What im trying to do, is cast a spell that gives me information, so i can share the info with others, but there is alot of info to copy and past, to tell my friends, i need a trigger that can atomaticly copy it all, and sent it to the mud with a ==> ' <=== infront of every line, ' is the say command. here is what my spell i use to do this, and what it looks like....

You finish the chant.
You mutter the words 'reNs a laKa'
Your eyes flash at Goblin combat boots.
Name : Goblin combat boots
Special : There is nothing special about this object.

Class : About 3
Enchanted : No
Cursed : No
Value : 720
Emits Light : No
Slots : feet
Breakable : No
Chestable : Yes
Stat Bonuses :
hp_regen : 5
Done.


lotsa info, no realy fast way to share it...if you can help me, pleas mail me at unix_46@hotmail.com Thanks :P
Reply with quote
iljhar
GURU


Joined: 10 Oct 2000
Posts: 1116
Location: USA

PostPosted: Sun Dec 16, 2001 12:46 am   
 
Try this:

#trigger {Your eyes flash at *} {#t+ IDSpell;#var temp ""}
#trigger {(*)} {#if (!%begins("%1", "Your eyes flash at")) {#additem temp "%1"}} "IDSpell"
#trigger {^Done.$} {#t- IDSpell;#forall @temp {' %i}} "IDSpell"

Untested but it should point you to the right direction.

Iljhar
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Dec 17, 2001 5:06 pm   
 
A similar approach:

#TR {^Your eyes flash at} {#T+ IDSpell}

#CLASS IDSpell
#TR {^(%*)} {~'%1}
#TR {^Done.} {#T- IDSpell}
#CLASS 0

LightBulb
Reply with quote
iljhar
GURU


Joined: 10 Oct 2000
Posts: 1116
Location: USA

PostPosted: Mon Dec 17, 2001 8:25 pm   
 
Well, I didn't do it that way because what would happen is the triggers would see the '%1 and trigger off of that as well, creating spam, most likely creating a nasty loop.

Example:

mud output-->Your eyes flash at Goblin combat boots.
trigger writes-->'Your eyes flash at Goblin combat boots.
mud output-->You say, "Your eyes flash at Goblin combat boots."
trigger writes-->'You say, "Your eyes flash at Goblin combat boots."
mud output-->You say, "You say, "Your eyes flash at Goblin combat boots.""

etc. until the trigger finally sees the "Done." line and turns off the class.

Iljhar
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Dec 18, 2001 4:41 pm   
 
*ouch*

Good point. If anyone chooses the method I suggested be sure to turn off trigger on trigger for the trigger that "says" stuff and include a filter to eliminate the actual "says".

#TR {^(%*)} {#IF (%word(%1,1) <> "You"} {~'%1}} {} {notrig}

LightBulb
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