From: Dervish
procedure MillTalk;
begin
Wait(500+random(1000));
if FindColorSpiralTolerance( x, y, 13618870, MSX1, MSY1, MSX2, MSY2, 15) then
begin
MMouse(x, y, 5, 5);
If IsUpText('erator') then
begin
WriteLn('Found MillOperator');
WaitOption('pla',500);
Wait(500);
Oak:=DTMFromString('mVAEAAHicE2BgYAhkhOBoIE4E4iwgToDiMCCOA+J4qLwHELsAsT0QOwCxGxBPBeIKIG4G4hlAPBHKLgfiSiCeDcRLgXg1EC8G4nlAPB2IJwBxH0htljfD3IZIhhk14QwTSoMZyuJdGKZWhjJ05vsxlIRqMVRH6YDlQRgkDqIXt8YxRDopgtVSChgpxOgAADGnItw=');
WaitFindDTM(x, y, Oak, 500);
if FindDTM(Oak, X, Y, MSX1, MSY1, MSX2, MSY2) then
begin
Mouse(x, y, 2, 2, false)
WaitOption('All',500);
Wait(500+random(1000));
end else
WriteLn('Couldnt convert logs');
end else
WriteLn('Didnt find MillOperator');
end else
Writeln('Didnt find color.');
FreeDTM(Oak);
end;
Small fixes which might help with doing what it's supposed to. I'll look more into it tomorrow ;).
You should try to use Reflection for Object finding and stuff, it makes the process a whole lot easier :D !
Also, add checks like "IsUpText(text)" to make sure you really found what you needed and don't click next to the spot ;). SRL is full of these nice little functions that, when combined, can make flawless scripts :).
Thanks XD, honestly i didn't forget about the checks such as "IsUpTest" because i was trying to get the "bare bones" setup first. Once i got the script running up and at least accomplishing its goal i would then go back and add its checks and fail safes. Still gotta learn how anti bans and such work but I don't know if that's an appropriate method of coding, so if you don't mind please share your methods ^.^. Thanks again i do appreciate the help, Wire.
*Don't suppose you have an example of finding a npc with reflection :D? Seen you said object* still got an example :D?
added some tweaks of your tweaked verison, it wasn't freeing the DTM properly and was Mouse command was in the wrong segment. The same problem still persist with selecting the log from the Plank/Mill interface.
procedure MillTalk;
begin
Wait(500+random(1000));
if FindColorSpiralTolerance( x, y, 13618870, MSX1, MSY1, MSX2, MSY2, 5) then
begin
MMouse(x, y, 5, 5);
Wait(500);
If IsUpText('wmil') then
begin
WriteLn('Found MillOperator');
Mouse(x, y, 2, 2, false)
WaitOption('pla',500);
Wait(500);
Oak:=DTMFromString('mwQAAAHic42RgYMhlYmBIAOJkIM4E4lggTgfiaiAuA+IiIH4KVPcCiB8D8Sso/gjEz4D4FhC/BeKSSDOGBU3RDMs74hkmFboARRgxsByQRMaYKojDcAAAZfUR3g==');
WaitFindDTM(x, y, Oak, 500);
if FindDTM(Oak, X, Y, MSX1, MSY1, MSX2, MSY2) then
begin
WaitOption('All',500);
Wait(500+random(1000));
FreeDTM(Oak);
end else
WriteLn('Couldnt convert logs');
FreeDTM(Oak);
end else
WriteLn('Didnt find MillOperator');
end else
Writeln('Didnt find color.');
end;
Update* Replaced the finding dtm in the plank interface with a findcolorspiral and its working for now. It works, sorta for some reason it absolutely refuses to bank the planks. :l Any ideas?