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: Wed Sep 04, 2002 9:05 am   

Variable Data Record
 
I have a data record variable that stores how many times each person in my party has gotten a specific message.

Ex-
#TRIGGER {^(%w) STRIKES Corn soldier and then STRIKES it AGAIN,$to only STRIKE it AGAIN untill Corn soldier has been HAMMERED down,$and all that remains is a godawful bloody mess!$} {#add pcrit_bloodymess.%lower( %1) 1}

The trigger works fine, but when I #show the var it displays as:
person1#ofmsgsperson2#ofmsgs

Those 's actually look like a bold | to me though.

Anyway, I know that this display is normal, but I was wondering if there was a way to display them similar to this:
Person 1 - #ofmsgs
Person 2 - #ofmsgs

Should I just switch over to using a string list, or is it possible as a data record?

Thanks for any input you may have.

Fat Tony
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Wed Sep 04, 2002 12:19 pm   
 
Use #SHOWDB instead of #SHOW.

Kjata
Reply with quote
fattony
Apprentice


Joined: 27 Dec 2001
Posts: 105
Location: USA

PostPosted: Thu Sep 05, 2002 2:27 am   
 
Thank you Kjata, that works just fine. I want this thing to be as versatile as possible though. I would like it to list the results in numeric order (from the person with the greatest number of a certain message, to the person that got that message the least number of times.)

Example:
This is the current output
- Party Criticals -
Bloody Mess:
Person1: 2
Person2: 4
Person3: 1
Person4: 3
Person5: 6

I would like it to display like
- Party Criticals -
Bloody Mess:
Person5: 6
Person2: 4
Person4: 3
Person1: 2
Person3: 1

I can probably figure it out if you can point me in the right direction (which commands/functions I should read up on etc) but I'd appreciate any help you can give.

Fat Tony
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Wed Sep 11, 2002 2:02 am   
 
Simplest thing that comes to mind is putting it into a string list and sorting it. Depending on how you call your database records and the player's name format, you can do nifty things.

quote:

#SHOW %sort(@slist,1)

displays:

def|ABC|ab cd|ab|9|789|45|123|008



Just be wary that if you get values > 9 you'll have to pad numbers less than 10 with a zero to get a nice sort.

Ton Diening
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