TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

Need multiple triggers for each line - or another solution

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
jroper73



Joined: 05 Feb 2006
Posts: 14

PostPosted: Sun Feb 05, 2006 3:06 am    Post subject: Need multiple triggers for each line - or another solution Reply with quote

On the mud that I play I can type

AFF

which produces all my current affects on a single line like this

Bless Armor Detect Invis Detect Magic Shield Invis

I am trying to create tiggers to load each one into variables
IsBless Isarmor IsDetectInvis ect

I tried this with triggers, but one thing I didn't realize is that only one trigger will fire per line. Arg

So it will pick up the first one, but not the rest

Any idea how to work around this? There are about 25 to 30 possible affects in all.

JRoper73
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Sun Feb 05, 2006 6:09 am    Post subject: Reply with quote

One work around is keeping track of spells as they expire and you renew them.

If you can trigger the line and fit all affects in one %0 you can use something like this:
Code:

#act {Affects: %0}
{
    #forall {%0} {#variable is&0 1}
}


I hope either one works for you.
Back to top
View user's profile Send private message Send e-mail
rosc



Joined: 13 Dec 2004
Posts: 115

PostPosted: Sun Feb 05, 2006 2:22 pm    Post subject: Reply with quote

That could be a toughy to work around, being on one line.. I would probably take the line, stuff it into a var, along with a var with all the possible spells I can have, then do successive #if tests, and if the string matches, #replacestring it to remove the spells that I already have on. Then use #forall on what is left (which would be the spells NOT in affect)...

The 1st problem I see is how to grab the string at all with a trigger. When you type the command 'aff' what exactly does the mud show? Is there anything else besides the list of spells?? Might need to use an alias, and substitutes to make that line stand out..
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> General Discussion All times are GMT - 5 Hours
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
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group