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
Delphi03
Novice


Joined: 20 Aug 2004
Posts: 37
Location: Illinois

PostPosted: Tue Sep 07, 2004 5:58 pm   

Need Help With Multiline
 
The MUD I'm connected to has an odd way of showing what you're holding in your hands.

If I have..

right: <none>
left : shield

the mud will display

Code:
shield
LHITEMICON*0
empty


If I have..

right: sword
left : <none>

the mud will display

Code:
sword
RHITEMICON*0
empty


If I have..

right: sword
left : shield

Code:
sword
RHITEMICON*0
shield
LHITEMICON*0


And finally..

right: <none>
left : <none>

Code:
empty
empty


How can I capture just stuff like this, store whatever is in my right hand in @rhand and left hand in @lhand? I've tried using multi-state triggers, but I'm not real fond of a #TR {^(*)} {//trigger stuff} and I never got it to work anyways. Is it possible to trip the trigger with RHITEMICON*0 or LHITEMICON*0 or ^empty and still be able to get to [b]previous[/] lines to get data?
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Sep 07, 2004 7:10 pm   
 
I think this should do it. I didn't have time to test it.
Code:

#TR {(*)$RHITEMICON} {#VAR right {%1}}
#COND {(*)} {#IF ("%1" = "empty") {#VAR left  {empty}}} {Within|Param=1}
#COND {^LHITEMICON} {#VAR left {%t2}} {Within|Param=1}
#TR {(*)$LHITEMICON} {#VAR left {%1}}
#COND {^empty$} {#VAR right {empty}} {Within|Param=1}
#TR {^empty$} {}
#COND {^empty$} {#VAR right empty;#VAR left empty} {Within|Param=1}
_________________
LightBulb
Senior member

Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious.
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