Since you are planning on coordinating actions between two clients, I suggest learning about persistent variables by reading the easyuo documentation (
http://wiki.easyuo.com/index.php?title=Variables). It is hard to read an allies hp vs. your own or an enemies. Instead of using OCR, just tell the other client what the current hp is! Go on test center where no one will bother you and have the second client say the current hp of the first every few seconds. Play on the first client and damage yourself several times to test that it is working correctly. You can press F7 to walk through each line in a script to find spots where it hangs up or behaves funny. As you get basic parts keep building more and more complexity into the scripts.
Client 2:
main_loop:
repeat
if my allies *currenthp is less than his *maxhp
{
msg My BFF has *currenthp HP $
wait 30
; gosub healing
}
; gosub barding *enemyid
until #CharGhost = YES
while #CharGhost = YES
msg you said you would protect me! $
halt
GoTo main_loop
Client 1:
main_loop:
repeat
set my max hp to *maxhp ; in case of buff/debuff
set my current hp to *currenthp
wait 20
until #CharGhost = YES
while #CharGhost = YES
msg nice healing, anusface $
halt
GoTo main_loop
Once you get the above working modify it to display an enemy ID from the first client on the second. You can then use that to auto target your bard skills. I would use finditem in your backpack to look for bandages so you don't have to hardcode the ID each time.
To understand how to organize the flow of your script and use a wrapper/loop read (
http://www.scriptuo.com/index.php?topic=976.0)
To pull useful information about your toons for passing info about your HP check out (
http://wiki.easyuo.com/index.php?title=MaxHits)
You could consider adding some small waits in your subs for stability, and also using timers to figure out when you should use the next bard skill or bandaid (
http://www.scriptuo.com/index.php?topic=12094.0)
I'm not great at scripting, but that's a start until the Wizards can explain more.