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
Evangelist
Adept


Joined: 10 Oct 2000
Posts: 224
Location: USA

PostPosted: Sun Jul 14, 2002 2:09 am   

Dispel report
 
I want it to collect the spells i dispel, and gt them in a list...

so if i see:


You dispel Andres's blazeward.
You dispel Andres's eldritch shield.
You dispel Andres's coat of thorns.
You dispel Andres's cloak of bravery.

i want it to do gt Dispelled: blazeward, eldritch shield, coat of thorns, cloak of bravery

I can't get it in a list, it just does gt Dispelled: or it will do gt Dispelled: first spell gt Dispelled: second spell and be really spammy :(

Im so lost

Evangelist
www.phidar.com
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sun Jul 14, 2002 4:28 am   
 
And now you are found.

Let's start with some sort of alias to initialize our variable and the variable.

#VAR Dispelled {}
#VAR Target {}
#ALIAS disp {cast 'dispel' "%1";Dispelled="";Target="%1";#T+ DispelCap}

Next a trigger to capture info.
#TR {^You dispel @Target's (*).$} {#ADDITEM Dispelled {"%1"}} "DispelCap"

Finally a trigger that is indicative of the end of the dispelled list, since you didn't say I will guess a blank line will appear.

#TR {^$} {gt %concat("Dispelled: ",%replace(@Dispelled,"|",", "),".");#T- DispelCap} "DispelCap"

That should do it assuming no typos.
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