View Full Version : procedure BurnLogs3(LogColor, Seconds : Integer);
WhiteShadow 06-11-2006, 08:24 PM Jagex_Fagex told me that the current log burner in SRL wasn't working so I made this.
{ By WhiteShadow
Param : LogColor - LogColor, Seconds - Time it takes for char to make a fire
Make sure player is in a area where a long line of fire can be made, tinderbox
in first inventory slot
}
procedure BurnLogs3(LogColor, Seconds : Integer);
var
Spee : Integer;
begin
Spee:= MouseSpeed;
MouseSpeed:= 8 + random(5);
repeat
if(FindColorSpiralTolerance(x, y, LogColor, mix1, miy1, mix2, miy2, 5))then
begin
Wait(500 + random(300));
Status('Click TinderBox');
UseItem(1);
Wait(500 + random(300));
Status('Click Log');
Wait(100);
Mouse(x, y, 0, 0, true);
Wait(Seconds * 1000);
end;
until(not(FindColorSpiralTolerance(x, y, LogColor, mix1, miy1, mix2, miy2, 5)))
MouseSpeed:= Spee;
end;
If you want autocolors then do something like
procedure Example;
begin
LColor := GetColor(x, y); //x, y begin 2nd inv slot or something
BurnLogs3(LColor, 4);
end;
*As a side note, yes I've tried just using a for to do statement with ExistsItem it didn't work properly.
Post feedback, please.
Starblaster100 06-11-2006, 08:41 PM ice idea, some Suggestions:
You can take out the Log Color by Using Universal DTM's for the Log. That way it will burn any log it sees. You could make it move over the DTM and if it matches a String which you specify then burn it.
Tinderbox might not be in first inventory slot, maybe use DTM's to find that?
Burn time is mostly the same, so i would suggest changing it to something like:
Procedure BurnLogs(TypeofLog : String);
Good Luck :)
WhiteShadow 06-12-2006, 02:17 AM I'll try those ideas thanks. :) I was hoping to make it store least possible varIables though.
And burn time isn't the same. Higher leveled characters burn much faster then lower levels.
YoHoJo 06-12-2006, 03:17 AM Hers a log DTM
dtmLogs:= DTMFromString('78DA639CCAC4C0E0C1C8800A18914820BD0 8A' +
'8C695809A79403551F8D50000BF8402CF');
WhiteShadow 06-12-2006, 03:55 AM I already made one. :p
Oak and Log can use the same DTM, has anyone noticed that before?
Jagex_Fagex 06-12-2006, 04:09 AM thanks white, this could ver very helpful ;)
WhiteShadow 06-12-2006, 04:53 AM procedure BurnLogs(LogType : String; Seconds : Integer);
var
Tx, Ty, Lx, Ly : Integer;
TinderBox, LogX : Integer;
begin
TinderBox:= DTMFromString('78DA63BCC3C8C0B00C8891C0C4966686874 01' +
'A24FA1F0818EF01595B51D54064612490BE0164CD23A0E639 9035' +
'87809A5740D60A026ACE03591B08A8390B64AD24A0E60990B 59E8' +
'09AFB84DD0C0004BC1445');
Wait(1);
case LogType of
'Log' : LogX:= DTMFromString('78DA639CCAC4C0E0C1C8800A18914820BD0 8A' +
'8C695809A79403551F8D50000BF8402CF');
'Oak' : LogX:= DTMFromString('78DA63FCC9C8C0708B010C582114434FAE1 38' +
'31C906684F219FF035967195040458C05440EA6E605907583 010D' +
'30A2A80100258207D4');
'Willow':LogX:= DTMFromString('78DA6354656260D8C60006AC108A21D4478 E4' +
'10E483342F98C9A40352B185080ADB928440EA64608610E02 30A2' +
'A80100145C03ED');
end;
repeat
if(FindDTM(LogX, Lx, Ly, Mix1, Miy1, Mix2, Miy2))then
begin
Status('Click log');
Wait(300 + random(300));
Mouse(Lx + 3, Ly + 4, 1, 1, true);
if(FindDTM(TinderBox, Tx, Ty, Mix1, Miy1, Mix2, Miy2))then
begin
Wait(100);
Status('Click Tinderbox');
Wait(700 + random(300));
Mouse(Tx - 6, Ty + 2, 1, 1, true);
Wait(Seconds * 1000);
end;
end;
until(not(FindDTM(LogX, Lx, Ly, Mix1, Miy1, Mix2, Miy2)))
Writeln('No More Logs! yay');
end;
I moderated it. Now it's based on DTMs. I tested a load with regular logs and it worked great.
Param Description
LogType - 'Log', 'Oak', 'Willow'
Seconds - Seconds it takes to make a fire for the player
Dark_Sniper 06-12-2006, 05:14 AM just make a dtm of one log and use text and tolerance to locate the others :p
-chaos- 06-12-2006, 05:20 AM or just set the tolerance of the parent dot really high so it can click on any color based on the shape of that log
or use bitmap masks of the log.......
get me a picture of a log and I'll make your procedure use bitmap masks ;)
WhiteShadow 06-12-2006, 05:29 AM Woodcutting guide has all the logs right there. :)
P.S your cat is a Tiger + Polar bear. ;P
yeah, I don't feel like testing....
procedure setupBMPDTM;
var
BurnBitmap: array [1..2] of integer;
begin
BurnBitmap[1]:= DTMFromString('78DA63BCC3C8C0B00C8891C0C4966686874 01' +
'A24FA1F0818EF01595B51D54064612490BE0164CD23A0E639 9035' + //tinderbox
'87809A5740D60A026ACE03591B08A8390B64AD24A0E60990B 59E8' +
'09AFB84DD0C0004BC1445');
Wait(1);
BurnBitmap[2]:= BitmapFromString(31, 24, 'z78DAEDD7BB0DC0300804D095' +
'6009F61F29459A34B1B9E0C039E10A2A4B7E967F4224397A5 61BE' +
'632922113ED6B728D5403B3480ECF1B4F585E605EE46FF98F 4ECB' + //logs
'27E4FAECF5338238FC144E7017A8CDE355B4BCE52DA734CBE 672A' +
'1FC77EE2ADC41240ACB7A31B793AE972470027E4AA7FF46A4 E600' +
'DAD62A7D');
end;
procedure BurnLogs(Seconds : Integer);
var
T, L: TPoint;
begin
repeat
if(FindBitmapMaskTolerance(BurnBitmap[2], L.x, L.y, MIX1,MIY1,MIX2,MIY2, 10, 200))then
begin
Status('Click log');
Wait(300 + random(300));
MMouse(Lx + 3, Ly + 4, 1, 1);
case random(4) of
1: wait(40+random(30));
2: wait(40-random(40)+random(40))
3: wait(70+random(40)+random(30))
end;
if(FindDTM(BurnBitmap[1], T.x, T.y, MIX1,MIY1,MIX2,MIY2))then
begin
Wait(100);
Status('Click Tinderbox');
Wait(700 + random(300));
Mouse(T.x - 6, T.y + 2, 1, 1, true);
Wait(Seconds * 1000);
end;
end;
until(not(FindBitmapMaskTolerance(BurnBitmap[2] L.x, L.y, MIX1,MIY1,MIX2,MIY2, 10, 200)))
Writeln('No More Logs! yay');
end;
p.s. Don't diss my cat :p
WhiteShadow 06-13-2006, 05:13 AM Yea I use to use TPoints in my procedure also until I kept getting this f***ed up error.
I ain't dissin your cat. Teh kitty is extremely cute. :)
|
|