|
mf01302 Newbie
Joined: 27 Jun 2011 Posts: 2
|
Posted: Mon Jun 27, 2011 7:41 am
Healing System |
Alright, so I'm not an epic coder, but not a novice either. But something that's always given me trouble has been my healing system. So, I'm deciding to scratch my old ways and ask you fine people for hints or tips.
So in my mud, you can use two herbs to cure afflictions with about a second or two balance before applying herbs again. So, if I use three herbs at once, the third affliction won't get healed. Etcetera. Was wanting to do something like a prioritized list/alias/etcetera that will heal two things at once, in a certain order and then cure the next two in line if needed, etcetera.
What would be the most efficient/fastest way of going about this?
|
|
|
|
mf01302 Newbie
Joined: 27 Jun 2011 Posts: 2
|
Posted: Mon Jun 27, 2011 9:10 pm |
alright, so I'm not looking for a hand-out, complete scripted healing system. I would just like some pointers on what balance of trigs/functions/aliases etcetera would be best, and what makes a good system for healing.
|
|
|
|
geniusclown Magician
Joined: 23 Apr 2003 Posts: 358 Location: USA
|
Posted: Wed Jul 06, 2011 2:44 pm |
You're not giving us much to go on. Do you want to manually start the healing process by declaring what herbs to use, then have the script space them out over time? What is the messaging you wait for between applications?
Let's say you want to apply the same 5 herbs whenever you type "applyherbs", or apply specified herbs when you type them in (use the | to separate each herb). You can do something like:
#ALIAS applyherbs {
#IF (%1) {herblist=%-1} {herblist=herb1|herb2|herb3|herb4|herb5}
apply %pop(herblist)
apply %pop(herblist)
#IF (%numitems(@herblist)) {#T+ applymoreherbs}
}
#TR "applymoreherbs" {You feel fully balanced.} {
apply %pop(herblist)
#IF (%numitems(@herblist)=0) {#T- applymoreherbs}
} "" {disabled}
I hope this gets you started in the right direction. |
|
_________________ .geniusclown |
|
|
|
Scarn Apprentice
Joined: 24 Jul 2005 Posts: 137
|
Posted: Fri Jul 15, 2011 4:01 pm |
You want something working off your health variable (if you use one).
#If {@Health <100} {2eat herb}
#TRIGGER {You eat a herb} {#IF {@Health <100} {#WAIT 5000;eat herb}
That is the simplest form, if you drop below 100 heath, you'll eat 2 herbs....if after eating them you are still under 100 it will wait 5 seconds then eat another... if still under 100 it will wait a further 5 second and eat another etc... The initial IF would trigger off your prompt, but without knowing what it looks like I am unable to help. |
|
|
|
|
|