Help please?

Posted by WRTIII on Sun 13 Mar 2005 12:09 AM — 1 posts, 9,598 views.

Canada #0
I need to write a VBScript.

It will be for auto drinking potions during a fight
There are 3 types of potion

DARK (Heals 80 Health) 6 seconds between sips(secs.figured out by counting in head after typing cmd)
PALE (Heals 40 Health) 4 seconds between sips(secs.figured out by counting in head after typing cmd)
and
CLEAR (Heals 20 Health) 2 seconds between sips(secs.figured out by counting in head after typing cmd)

INPUT: drink dark
OUTPUT: You take a sip of dark green healing draught from a potion bottle.
OUTPUT: The healing liquid infuses you with a warm glow.

INPUT: drink pale
OUTPUT: You take a sip of dark green healing draught from a potion bottle.
OUTPUT: The healing liquid infuses you with a warm glow.

INPUT: drink clear
OUTPUT: You take a sip of dark green healing draught from a potion bottle.
OUTPUT: The healing liquid infuses you with a warm glow.

OUTPUT IF YOU ATTEMPT TO DRINK BEFORE YOU CAN DO SO AGAIN:
You cannot benefit from another sip of healing draft so soon.

OUTPUT FROM MUD WHEN YOU ARE ABLE TO DRINK AGAIN:
You could drink another healing draft.

COMBAT TAKES PLACE AS SUCH:

* lunge anabella
You lunge at Duchess Anabella, Dragee a la Gelee de Sucre, missing as she
manages to parry.
U*
Balance has returned to you.
*
Duchess Anabella, Dragee a la Gelee de Sucre takes a slash at you, hitting as
you just fail to parry.
Your health is now 85.
U* lunge anabella
You are unbalanced, and cannot attack.
U*
Duchess Anabella, Dragee a la Gelee de Sucre takes a slash at you, connecting
well as you narrowly fail to parry.
Your health is now 24.
U*
Duchess Anabella, Dragee a la Gelee de Sucre takes a sip of dark green healing
draught from a potion bottle.
U* drink dark
You take a sip of dark green healing draught from a potion bottle.
The healing liquid infuses you with a warm glow.
U*p
Duchess Anabella, Dragee a la Gelee de Sucre takes a slash at you, connecting
well as you narrowly fail to parry.
Your health is now 55.
U*p
Duchess Anabella, Dragee a la Gelee de Sucre takes a slash at you, just
hitting as you barely fail to parry.
Your health is now 40.
U*p
Duchess Anabella, Dragee a la Gelee de Sucre takes a slash at you, connecting
well as you narrowly fail to parry.
Your health is now 0.
You have been slain by Duchess Anabella, Dragee a la Gelee de Sucre!

So What It needs to do is Each time you get Hit, Look at the line Your health is now *. and make a decision on which to drink

I figure it would have a command you could type to adjust your max health if needed

MAXHEALTH = #

and hopefully that could autoupdate the values at which you would drink.. not sure if a percetage type system would work for this or not

pretty much just needs to check to see which potion would be the best suited to drink

:: dark takes longer between ability to sip than pale and clear more so than pale ::
-- I will see if I can figure out how long and put it up top of the msg..

I am not really sure how to go about this, any help would be appreciated.
It's a oddball mud to work with it seems so if anyone is interested in helping and wants to see the place I can give you the addy for it.
again I appreciate any help
Thanks,
WRTIII