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
Kuga
Beginner


Joined: 21 May 2005
Posts: 24

PostPosted: Sat May 21, 2005 12:57 am   

Inventory Reporting via Tell
 
Ok, this is what is going on, I have the inventory items grabbed to a variable named inventory. It contains multiple lines (rows) of data that I would like to send in one tell string.

Example of how it takes data:
a bag contains:
a bag
a blade (2)

it would state when i #show @inventory
Inventory Contains| a bag| a blade(2)

Just when I try to use it in a tell, it does not work.
Triggerline is a bag contains:
code is:
#GVAR inventory %null
#TEMP {^$} {#STATE invTrig 0}

I just want to be able to send a tell with all the contents of @inventory the way it shows up in #show.
Reply with quote
Aarlot
Adept


Joined: 30 Dec 2003
Posts: 226

PostPosted: Sat May 21, 2005 1:33 am   
 
#EXEC tell whoever @inventory

Also, if you want it to put things other than the | in between, you can use %expandlist:

#EXEC tell whovever %expandlist(@inventory, ", ")

which would return:

tell whoever item1, item2, item3, item4... etc
_________________
Everyone is entitled to their beliefs - until they die. Then only the truth matters.
Reply with quote
Kuga
Beginner


Joined: 21 May 2005
Posts: 24

PostPosted: Sat May 21, 2005 1:46 am   
 
Thanks much, was giving me an annoying headache.
Reply with quote
Kuga
Beginner


Joined: 21 May 2005
Posts: 24

PostPosted: Sat May 28, 2005 2:16 am   
 
Ok, I was reading a page about data manipulation and have a question.

With my above code for getting what the bag contains, I get a lot of white space, "(Humming)" and "(Glowing)". How would I use the %replace command to get rid of the spaces and make them nonexistant before the first character of each line. The glowing and humming are the first characters of the line. I tried prior and it ate all the spaces or gave me back 3 lists of inventory items and flooded the spam buffer horribly. I guess I could just do 3 passes of a for loop, but I am inexperienced doing that in zmud.

Any help would be appreciated.
Reply with quote
Kuga
Beginner


Joined: 21 May 2005
Posts: 24

PostPosted: Sat May 28, 2005 3:02 am   
 
I actually got it, disregard above request.
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