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
Ralph1971
Wanderer


Joined: 01 Mar 2008
Posts: 64

PostPosted: Sun Jan 25, 2009 9:07 am   

#sub, #stw, and variables..
 
Ok, so here's what I want to do..
the mud I play (realms of despair) has the eq damage message as follows:

(a lion-crested bracer gets damaged)

what I want to do, is based on that message, exam <item>.. in this case, something like exam lion-bracer which gives me this text

You take a closer look at a lion-crested bracer on your body...
You see nothing special.
As you look more closely, you notice that it is in good shape. (72%)
It appears to be within or below your level range.

using the #sub command, I added in the (72%)..
what I want to do is put the name (lion-crested bracer) into a static variable in a status window and either put the 'is in good shape' or the '(72%)' with it.. so it looks kinda like
worn on wrist: Lion-crested bracer (is in good shape)
or
worn on wrist: lion-crested bracer (72%).
part of the issue is, there's upwards of 23 wear locs available for different locations.
I'd also like to color the damage level.. right now, I'm using #sub "is in good shape ~(72%~)" for the sub command..
any ideas or suggestions?
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4691
Location: Pensacola, FL, USA

PostPosted: Sun Jan 25, 2009 10:30 am   
 
This should store values to you in a dbvar

#TR {~((*(%x)) gets damaged~)} {thisDamaged=%1;thisShort=%2;Exam @thisShort}
#COND {~((%d)~%~)} {#ADDKEY damagedGear {@thisDamaged=%1}}

and displaying it on the statuswindow

#STW %expanddb(@damagedGear, %crlf)

this won't show wearlocs and is untested, but it should work, or at least put you on the right track

as for the color... #COLOR and #CW are your friends
_________________
Discord: Shalimarwildcat
Reply with quote
Ralph1971
Wanderer


Joined: 01 Mar 2008
Posts: 64

PostPosted: Sun Jan 25, 2009 11:50 am   
 
primarily, this will be used for avatars for runs and such, and won't really change eq that much.. is there a way to 'hardcode' the statuswindow and the variables?
<used as light> (Glowing) Kendal's globe of moonlight <insert status here>
<worn on finger> the ring of the dragons <insert status here>
<worn on finger> a sapphire ring <insert status here>
<worn around neck> (Glowing) (Humming) scales of alpha & omega <insert status here>
<worn around neck> (Glowing) (Humming) scales of alpha & omega <insert status here>
<worn on body> the Breastplate of the Ravager <insert status here>
<worn on head> (Glowing) Crown of the Ages <insert status here>
<worn on legs> godskull shinguards <insert status here>
<worn on feet> boots of deepest blue empyrean snakeskin <insert status here>
<worn on hands> (Glowing) Blessed gauntlets of the Templar <insert status here>
<worn on arms> (Glowing) (Humming) a pair of dragonscale arm-guards <insert status here>
<worn about body> the essence of kundalini <insert status here>
<worn about body> (Humming) the cloak of Death <insert status here>
<worn about waist> (Glowing) the Ice Girth <insert status here>
<worn around wrist> (Glowing) (Humming) a Bracer of Light <insert status here>
<worn around wrist> (Glowing) (Humming) a Bracer of Light <insert status here>
<wielded> (Glowing) The Dragon Claw of Legend <insert status here>
<dual wielded> (Glowing) (Humming) Justice <insert status here>
<worn on ears> a studded, silver earring <insert status here>
<worn on eyes> shades of light <insert status here>
<worn on back> a thick piece of lizard hide <insert status here>
<worn over face> the fur from a raccoon <insert status here>
<worn around ankle> a turqoise anklet <insert status here>
<worn around ankle> [nothing]

for that matter, I'm not tied to a status window.. how would using a child window affect things?
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4691
Location: Pensacola, FL, USA

PostPosted: Sun Jan 25, 2009 12:06 pm   
 
that can be done, yes, but the fact that you have two identical items will prove to be an issue

in your instance you need to take the time to make a long variable with

#VAR gearList {%concat(@gearlist, "<used as whatever> itemname: ", %db(@damagedGear, "itemname"), "%", %cr)}

for each item, then use

#STW @gearlist
_________________
Discord: Shalimarwildcat
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