putonajonny
2012-04-13 10:20:32
This procedure uses those hit splats like this:
it keeps checking for them until it goes 2000msec without seeing them, in practice it works really well, the can not be confused with other peoples because they are a different colour: 
I will talk you through it
I have made the DTM of the left part of the Red "Damage" image so it doesn't matter if it is one two or three digits it will still find it.
I made this for my Giant Spider Killer, (in SRL Members only atm for testing) feel free to copy it to use it in your scripts if it doesn't go in the include, if you would be so kind to put my name by it that would be nice :)
Test:

Success :D
Another Function that people have talked about could go something like this:
it keeps checking for them until it goes 2000msec without seeing them, in practice it works really well, the can not be confused with other peoples because they are a different colour: 
I will talk you through it
Procedure WaitFight;
Var
Time, x, y, WaitFight_Shield, WaitFight_Damage : integer;
begin
WaitFight_Shield := DTMFromString('mrAAAAHic42BgYOAFYgEg5gdiHiBmB2I+IGaBijECMRMQs0LlQOJcUBqkl9XUCS8mBBgJYBgAAK0nBH8='); //Sets DTMs and Names
WaitFight_Damage := DTMFromString('mbQAAAHicY2VgYNBmhGAdINYDYn0glgZiBSBWBmI5IJYA4nQ2NoYEPj4wns3DA6a5gPrRMSMWDAYAIPEEVA==');
SetDTMName(WaitFight_Shield, 'WaitFight Shield DTM');
SetDTMName(WaitFight_Damage, 'WaitFight Damage DTM');
FFlag(0); //Incase you clicked a monster that isn't close by
MarkTime(Time); //marks the time
Repeat
Wait(50+Random(50));
if(FindDTM(WaitFight_Shield, x, y, MSX1, MSY1, MSX2, MSY2))then //if it finds the blue "shield" dtm it resets the time marker
MarkTime(Time);
if(FindDTM(WaitFight_Damage, x, y, MSX1, MSY1, MSX2, MSY2))then //if it finds the red "damage" dtm it resets the time marker
MarkTime(Time);
Until(TimeFromMark(Time) > 2000); //if it hasn't found either for 2000msec then it exits, (i don't play RS much, is there a very slow weapon that this wouldn't work for?)
FreeDTM(WaitFight_Shield);
FreeDTM(WaitFight_Damage);
end;I have made the DTM of the left part of the Red "Damage" image so it doesn't matter if it is one two or three digits it will still find it.
I made this for my Giant Spider Killer, (in SRL Members only atm for testing) feel free to copy it to use it in your scripts if it doesn't go in the include, if you would be so kind to put my name by it that would be nice :)
Test:

Success :DAnother Function that people have talked about could go something like this:
function FindFightSymbols(Var x, y : integer) : Boolean;
Var
WaitFight_Shield, WaitFight_Damage : integer;
begin
WaitFight_Shield := DTMFromString('mrAAAAHic42BgYOAFYgEg5gdiHiBmB2I+IGaBijECMRMQs0LlQOJcUBqkl9XUCS8mBBgJYBgAAK0nBH8='); //Sets DTMs and Names
WaitFight_Damage := DTMFromString('mbQAAAHicY2VgYNBmhGAdINYDYn0glgZiBSBWBmI5IJYA4nQ2NoYEPj4wns3DA6a5gPrRMSMWDAYAIPEEVA==');
SetDTMName(WaitFight_Shield, 'WaitFight Shield DTM');
SetDTMName(WaitFight_Damage, 'WaitFight Damage DTM');
if(FindDTM(WaitFight_Shield, x, y, MSX1, MSY1, MSX2, MSY2))then //if it finds the blue "shield" dtm it returns true
begin
Result := True;
exit;
end;
if(FindDTM(WaitFight_Damage, x, y, MSX1, MSY1, MSX2, MSY2))then //if it finds the red "damage" dtm it returns true
begin
Result := True;
exit;
end;
FreeDTM(WaitFight_Shield);
FreeDTM(WaitFight_Damage);
end;