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
pyroevil
Newbie


Joined: 08 Jan 2009
Posts: 1

PostPosted: Thu Jan 08, 2009 3:51 am   

Need someone to write a script
 
Actually i need two. I need a way to keep track of my inventory and i'd like to track my health and sp in bars. I really dont know how to script nor the best way to do this so if someone could help i would be very thankful. This is for the mud frontier.

typing "inv" brings up this:

+Pyroevil's quicktyper.
Ring of protection (worn).
A small, glittering pin (worn).
Leather jacket (worn).
Bracer (worn).
Dark helm (worn).
Angelic wings (worn).
Pinky ring (worn).
Elven boots (worn).
Bloody Sword (wielded).
A bag of holding.
+A small imp.
+Pyroevil's spellbook.

which is just a list of what is in my inventory

typing "hp"

Hit points: 106 (max:106), Spell points: 122 (max:122).

Thanks
Reply with quote
Leitia
Adept


Joined: 04 May 2007
Posts: 292
Location: Boston

PostPosted: Thu Jan 08, 2009 4:52 pm   
 
I would try to help but I can't imagine a cool thing to do, if I were to do a multistate trigger to add the inv to a status window you would assume those things existed, though without knowing how things decay, or are dropped, given, and used (worn, held, expire) the status window is less useful then the "inv" command you already have. Make an Inv button. You want to program I think, start with a button.

The HP problem is similar, easier to write, but how is that representative after one minute?


Code:
#REGEX {Hit points: (\d+) \(max:(\d+)\), Spell points: (\d+) \(max:(\d+)\).} {#GAUGE hp "hp" %1 %2 (%2/10) "" "blue" "red";#GAUGE sp "sp" %3 %4 (%4/10) "" "blue" "red";; \(max:(\d)\), Spell points: (\d+)\(max:(122))\.;;Hit points: 106 (max:106), Spell points: 122 (max:122).}



You could learn to program your druthers or provide a dynamic problem that seems useful. That's just me.

BTW that trigger is a bit advanced if you wanted to begin programming there, learning basic zmud triggers and the gauge command would help you
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Thu Jan 08, 2009 4:58 pm   
 
You can use the code below to do your gauges... Not sure what you mean by keeping tracking of you inventory. Do you just want to put it in a string list?

Code:
#TRIGGER {Hit points:%s&%d{HP} ~(max:&%d{MxHP}~), Spell points: &%d{Spell} ~(max:&%d{MxSpell}~)} {}
#BUTTON 1 {Health} {} {} {} {@HP} {} {HEART} {} {} {} {} {} {} {32800} {} {Gauge||12|@MxHP|@HP/10|15} {1} "" {} {} {}
#BUTTON 2 {Mana} {} {} {} {@Spell} {} {DIAMOND} {} {} {} {} {} {} {32784} {} {Gauge||14|@MxSpell|@Spell/10|0} {} "" {Inset} {} {}
_________________
Asati di tempari!
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