So lets say I want to use this to heal one of my other guys on a different account. So this guy just sits back and heals him while the other guy beats on something.
How do I pull the second character as the target?
Is there a way to make the script look for a name?
Can I also make this target mobs in a similar manner?
A quick / dirty implementation of healing a second person would be like:
set %otherChar SOME_ID
<mainloop same as before>
sub heal
set #LTARGETID %otherChar
event macro 15 3
wait 12
event macro 22 0 ; target last target
wait 5
return
<similar for cure>
Attacking is a little different, but similar to the above.
set #LTARGETID %monsterID
event macro 27 0 ;; attack last target
I don't think there is a built in way to find chars by name, but I think some combination of:
set %humanType IS ;; theres some other types too
finditem %humanType G_6 ;; search all around you with in 6 tiles
for %ind 1 #FINDINDEX
event property #FINDID
if Trigs in #PROPERTY
set %otherChar #FINDID
I haven't tested it, or even tried it but that should give you some ideas to get started on both fronts.