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
3-Finity
Newbie


Joined: 03 Oct 2003
Posts: 5
Location: USA

PostPosted: Fri Oct 03, 2003 12:57 pm   

Scripter needed!!!
 
Hey everybody I need some help with a script I'm trying to do. I have a nice potion usage counter but it needs improvement. What I'm trying to do is make it pull information from a database to display how many sips I have left in a vial total. Obviously this would require me updating the database everytime I got a new vial of something. Thus I also need help with an alias or something that will update the DB for me so that I won't have to do it manually on a constant basis. If you could help me out with this please do so. Thank you in advance.SmileSmile

Here is a link to the current script I'm using.
http://www.mc0wnage.com/achaea/scrsipcount.htm
Reply with quote
3-Finity
Newbie


Joined: 03 Oct 2003
Posts: 5
Location: USA

PostPosted: Fri Oct 03, 2003 6:13 pm   
 
If nothing else could someone atleast point me to a help file where I can learn about controlling Databases via scripting in zmud ? I am more than willing to learn on my own.
Reply with quote
user0101
Apprentice


Joined: 01 Aug 2003
Posts: 100
Location: USA

PostPosted: Fri Oct 03, 2003 10:12 pm   
 
The amount of sips you have left isn't dependent upon any single vial. Therefore, I think a much easier solution would lie in an echo readout based off of the 'HC'/'MC' variable.

Something like this:

#CLASS Sipping
#VAR healthcount 0
#VAR manacount 0
#VAR lastvial %null
#ALIAS HC {healthcount=%1}
#ALIAS MC {manacount=%1}
#ALIAS hsip {#echo @healthcount health sips left.}
#ALIAS msip {#echo @manacount mana sips left.}
#ALIAS dh {drink health;lastvial=0}
#ALIAS dm {drink mana;lastvial=1}
#TRIGGER {The elixir heals and soothes you.} {#add healthcount -1;hsip}
#TRIGGER {Your mind feels stronger and more alert.} {#add manacount -1;msip}
#TRIGGER {The elixir flows down your throat without effect.} {#if (@lastvial=0) {#add healthcount -1};#if (@lastvial=1) {#add manacount -1}}
#CLASS 0

This will give echo to you how many sips you have left after every sip of health or mana, providing you use the DH/DM aliases. To get a manual readout of either type of vial, type 'hsip' or 'msip'. Simple, yet effective.
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