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


Joined: 19 Aug 2011
Posts: 7

PostPosted: Fri Aug 19, 2011 3:25 pm   

Database Help!
 
Basically, I want to create a curing database. I have a very meager understanding of zscript, and have thus far not been able to decipher the help files in any meaningful way. Basically, I want to be able to track every affliction that I receive, and heal them via a trueheal alias. It's fairly simple to set up the trueheal, as in my mind, each of the afflictions I'd load into my database, would have the cure for it attached to it, something like impatience.focus spirit, but I don't know how to get this all to work.

do I use #addkey %db(impatience.focus spirit) ? or something like that? I also have the DB view open, and the db name is afflist, would I do #addkey %db(afflist(impatience.focus spirit)) or something like that? Really lost, if you can't tell.
Reply with quote
blairferrell
Newbie


Joined: 19 Aug 2011
Posts: 7

PostPosted: Fri Aug 19, 2011 5:19 pm   
 
Okay, update, I've figured a lot of my questions out, now

I can do #additem afflist Impatience "focus spirit" which will give me a key of Impatience with the value of Focus Spirit, but how do I set up an alias to go through said AFFLIST from top to bottom, using the Value each time the alias procs? So this would mean I have say, 4 afflictions in my list currently

My list looks like

Impatience - Focus Mind
Paralysis - Focus Body
Epilepsy - Focus Spirit
Concussion - Focus Body

I want my TRUEHEAL to start at the top and use simply the Value. If I simply make my alias do @afflist.1, it tries to do ALL OF THEM in one line, if I try to do @afflist.impatience, it does the value, but if I simply had a trueheal alias that had a list of every affliction, from top to bottom, it would go through checking and returning nils for almost every affliction, every time I cured... So I don't know what to do here...
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