I can LClick only once

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Shimizoki
Newbie
Posts: 9
Joined: Tue Feb 19, 2008 10:42 pm

Post by Shimizoki » Tue Feb 26, 2008 12:44 am

perhaps not in this sense maybe... what i mean is i would like to make a macro that says, if my HP (int a game) ever drops beneath say 20%, i would like it to automatically use a health potion. do you see what i'm trying to say?

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Tue Feb 26, 2008 9:19 am

do you see what i'm trying to say?
No, I'm afraid I don't. I have no idea what HP is.

If you have a value on the screen, a script may be able to read it into a variable. If it is real text then you should be able to use the Text Capture functions. If it is editable you could have the script copy it to the clipboard and then retrieve it into a variable. If it is represented by a graphic then perhaps you can use image recognition.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

Post by jpuziano » Tue Feb 26, 2008 3:57 pm

Hi Shimizoki and Marcus,

HP = Hit Points. Say a players character has 100 HP max. If it drops to 0, character dies. He wants to somehow monitor that value and if it drops below 20% of max, have the script automatically initiate some action to get some hit points back, i.e. have the script automatically type (or click or whatever is necessary) to have the character drink a healing potion.

Anyway, the key is in extracting your HP value. Marcus has given you advice on several ways you might do this, it depends on how the game makes this value known. What have you tried so far?
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

Shimizoki
Newbie
Posts: 9
Joined: Tue Feb 19, 2008 10:42 pm

Post by Shimizoki » Sat Mar 01, 2008 10:54 pm

Well i havn't tried anything yet because i'm new to this, i thought that i would ask here first (no point in re-inventing the wheel) but i didn't know that i could capture text therefore i can give that a shot and get back to you on that one, thank you both.

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts