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
fattony
Apprentice


Joined: 27 Dec 2001
Posts: 105
Location: USA

PostPosted: Sun Jun 09, 2002 3:27 am   

String List and New Lines
 
I am using a trigger to capture multiple lines of the MUD in to a variable. Normally when #show -ing the variable or using it any other commands, it is displayed with the delimiter between each line. Is there a way to split them up and show them on seperate lines? Some line of carriage return or something maybe? Also, is there a way to add a command to the beginning of each line?

Ex-
It's dark but you can still see.
[ The Castle room: 16 ]
Druid Room

There is one obvious exit: east.
A large wooden chest labelled 'Druid Box' and An incense burner emitting
strange odour.
1256Hp 296Sp 5652400Xp 112Kg>

Displays as:
It's dark but you can still see.|[ The Castle room: 16 ]|Druid Room |There is one obvious exit: east.|A large wooden chest labelled 'Druid Box' and An incense burner emitting|strange odour.|1256Hp 296Sp 5652400Xp 112Kg>|1256Hp 296Sp 5652400Xp 112Kg>


And for the second question, I would like to be able to add a command to the beginning of each line. Ex-

tell %1 It's dark but you can still see.
tell %1 [ The Castle room: 16 ]
tell %1 Druid Room
tell %1
tell %1 There is one obvious exit: east.
tell %1 A large wooden chest labelled 'Druid tell %1 Box' and An incense burner emitting
tell %1 strange odour.
tell %1 1256Hp 296Sp 5652400Xp 112Kg>


Hope this makes some sense, and thank you for any help you can give.

Fat Tony
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun Jun 09, 2002 4:39 am   
 
Since it's a stringlist variable, just use #FORALL.
#FORALL @display {#SHOW %i}
#FORALL @display {tell %1 %i}


LightBulb
Vague questions get vague answers
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