Noob King
05-31-2012, 01:32 AM
Hello, I am new to making scripts for simba, so bare with me. I can't seem to get my script to click on the logs. The first thing I did when I was making this script after reading every tutorial I could find, was a method to click on a maple log, then click add to bonfire. That was working, but after adding my other methods it doesn't want to do it any more. Im assuming the logic of how I put everything together doesn't quite work. Also please forgive me if my script isn't up to the syntax standards.
Here's the script:
program HouseBonfire;
//{$DEFINE SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}
Var
X, Y: Integer;
MapleLogs, AddToFire, Butler, NotedMapleLogs, UnNote, ButlerPayment, PayButler: Integer;
Procedure Antiban; //AnitBan By Solidone40
Begin
Case Random(100) Of
1: HoverSkill('firemaking', False);
2: HoverSkill('random', False);
3: Boredhuman;
4: Wait(2500 + random(4500));
5: HoverSkill('magic', False);
6: PickUpMouse;
7: RandomMovement;
8: RandomRClick;
end;
end;
Procedure MiniBreak;
Begin
Case Random (160) Of
1: Wait(40000 + random(7400));
2: Wait(25500 + random(8550));
3: Wait(60040 + random(6759));
4: Wait(20400 + random(2549));
end;
end;
Procedure GetLogs;
begin
UnNote := DTMFromString('mrAAAAHic42BgYFjExMCQDsSPmCDs+UA8GY p3AvF/RgaGf1DMBuR/B9K/gZgRyGYC4hMnTjAEOekzBDsbMKioqjJY29qBxWCYEGAkgGEAAK exFjo='); //DTM For Option To UnNote Logs
ButlerPayment := DTMFromString('mggAAAHicY2NgYFjGxMDQCcQngXg5EDdC2a 5ALA/EilDsAcTOQPz//3+grgY4Xr16NcOlS5cYcAFGHBgCAJHqDjM='); //DTM For Butler Asking For Payment
PayButler := DTMFromString('mwQAAAHic42RgYJjGAAH6jBB2PxDfAuIbQM wNxFxAzAbE7FAMAgJQOQ4gZoaqEZBSYNjpKg7G1rZ2DI3pXgwn TpxAwcQARiIwHAAAzIERxQ=='); //DTM For Pressing Pay Butler
if FindDTM(NotedMapleLogs, X, Y, MIX1, MIY1, MIX2, MIY2) then //Detects Noted Maple Logs And Clicks On Them
begin
Mouse(X, Y, 8, 8, True);
Writeln('Found Noted Maple Logs'); //Debugging
if FindColor(x, y, 1516629, MSX1, MSY1, MSX2, MSY2) then // Detects Demon Butler
MMouse(x, y, 4, 4);
Writeln('Found Demon Butler');
if IsUpText('emon') then
Mouse(X, Y, 4, 4, True);
wait(500 + random(100));
if FindDTM(ButlerPayment, X, Y, MCX1, MCY1, MCX2, MCY2) then //Detects Demon Butler Needing Payment
begin
MMouse(X, Y, 5, 5);
if IsUpText('tinue') then
Mouse(X, Y, 0, 0, True);
wait(1000);
if FindDTM(PayButler, X, Y, MCX1, MCY1, MCX2, MCY2) then // Detects Pay Butler Option
MMouse(X, Y, 5, 5);
if IsUpText('tinue') then
wait(500);
end else;
if FindDTM(UnNote, X, Y, MCX1, MCY1, MCX2, MCY2) then // Detects Option To UnNote Logs
begin
MMouse(X, Y, 5,5);
if IsUpText('tinue') then
Mouse(X, Y, 0, 0, True);
Wait(400 + random(200));
TypeSend('26'); //Types 26 in the chatbox for the amount of logs the demon needs to get
MiniBreak; //Waits While Butler Retrives The Logs
end;
end;
end;
Procedure Burn;
begin
MapleLogs := DTMFromString('mlwAAAHicY2dgYMhmYmAoBuIKIE4C4gQgLm eCiPMwMjD8AaoRANJCQMwCxIxA/B8oFm3DCySZcGDcgBEPhgIAxE8F+g=='); //DTM For UnNoted Maple Logs
AddToFire := DTMFromString('mrAAAAHic42BgYEhgZGBwAGInILYD4iAgrg XiLiC2AOKlQLwDiPdDcR8UrwLixUDsZaHA8H+GPBybaQiBsZ4C J4OTqTIDIcBIAMMAAO8TD6s='); //DTM For Add To Fire Option In The Chat Box
if FindDTM(MapleLogs, X, Y, MIX1, MIY1, MIX2, MIY2) then //If Maple Logs Are Found Left Click Them
begin
Mouse(X, Y, 7, 7, True);
Writeln('Found Maple Logs'); //Debugging
Wait(700 + random(100));
If FindDTM(AddToFire, X, Y, MCX1, MCY1, MCX2, MCY2) then //Detects Add To Bonfire Option And Clicks It
begin
Mouse(X, Y, 15, 15, True);
Writeln('Found Add To Fire Option'); //Debugging
end;
if not FindDTM(MapleLogs, X, Y, MIX1, MIY1, MIX2, MIY2) then //If There Are No Maple Logs Then GOTO GetLogs;
begin
GetLogs;
Writeln('No Maple Logs Found'); //Debugging
end;
end;
end;
begin
SetupSRL;
repeat
Burn;
until not loggedin;
FreeDTM(MapleLogs);
FreeDTM(AddToFire);
//FreeDTM(UnNote);
//FreeDTM(ButlerPayment);
//FreeDTM(PayButler);
end.
Edit: It now will just keep clicking on the maple logs.
Here's the script:
program HouseBonfire;
//{$DEFINE SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}
Var
X, Y: Integer;
MapleLogs, AddToFire, Butler, NotedMapleLogs, UnNote, ButlerPayment, PayButler: Integer;
Procedure Antiban; //AnitBan By Solidone40
Begin
Case Random(100) Of
1: HoverSkill('firemaking', False);
2: HoverSkill('random', False);
3: Boredhuman;
4: Wait(2500 + random(4500));
5: HoverSkill('magic', False);
6: PickUpMouse;
7: RandomMovement;
8: RandomRClick;
end;
end;
Procedure MiniBreak;
Begin
Case Random (160) Of
1: Wait(40000 + random(7400));
2: Wait(25500 + random(8550));
3: Wait(60040 + random(6759));
4: Wait(20400 + random(2549));
end;
end;
Procedure GetLogs;
begin
UnNote := DTMFromString('mrAAAAHic42BgYFjExMCQDsSPmCDs+UA8GY p3AvF/RgaGf1DMBuR/B9K/gZgRyGYC4hMnTjAEOekzBDsbMKioqjJY29qBxWCYEGAkgGEAAK exFjo='); //DTM For Option To UnNote Logs
ButlerPayment := DTMFromString('mggAAAHicY2NgYFjGxMDQCcQngXg5EDdC2a 5ALA/EilDsAcTOQPz//3+grgY4Xr16NcOlS5cYcAFGHBgCAJHqDjM='); //DTM For Butler Asking For Payment
PayButler := DTMFromString('mwQAAAHic42RgYJjGAAH6jBB2PxDfAuIbQM wNxFxAzAbE7FAMAgJQOQ4gZoaqEZBSYNjpKg7G1rZ2DI3pXgwn TpxAwcQARiIwHAAAzIERxQ=='); //DTM For Pressing Pay Butler
if FindDTM(NotedMapleLogs, X, Y, MIX1, MIY1, MIX2, MIY2) then //Detects Noted Maple Logs And Clicks On Them
begin
Mouse(X, Y, 8, 8, True);
Writeln('Found Noted Maple Logs'); //Debugging
if FindColor(x, y, 1516629, MSX1, MSY1, MSX2, MSY2) then // Detects Demon Butler
MMouse(x, y, 4, 4);
Writeln('Found Demon Butler');
if IsUpText('emon') then
Mouse(X, Y, 4, 4, True);
wait(500 + random(100));
if FindDTM(ButlerPayment, X, Y, MCX1, MCY1, MCX2, MCY2) then //Detects Demon Butler Needing Payment
begin
MMouse(X, Y, 5, 5);
if IsUpText('tinue') then
Mouse(X, Y, 0, 0, True);
wait(1000);
if FindDTM(PayButler, X, Y, MCX1, MCY1, MCX2, MCY2) then // Detects Pay Butler Option
MMouse(X, Y, 5, 5);
if IsUpText('tinue') then
wait(500);
end else;
if FindDTM(UnNote, X, Y, MCX1, MCY1, MCX2, MCY2) then // Detects Option To UnNote Logs
begin
MMouse(X, Y, 5,5);
if IsUpText('tinue') then
Mouse(X, Y, 0, 0, True);
Wait(400 + random(200));
TypeSend('26'); //Types 26 in the chatbox for the amount of logs the demon needs to get
MiniBreak; //Waits While Butler Retrives The Logs
end;
end;
end;
Procedure Burn;
begin
MapleLogs := DTMFromString('mlwAAAHicY2dgYMhmYmAoBuIKIE4C4gQgLm eCiPMwMjD8AaoRANJCQMwCxIxA/B8oFm3DCySZcGDcgBEPhgIAxE8F+g=='); //DTM For UnNoted Maple Logs
AddToFire := DTMFromString('mrAAAAHic42BgYEhgZGBwAGInILYD4iAgrg XiLiC2AOKlQLwDiPdDcR8UrwLixUDsZaHA8H+GPBybaQiBsZ4C J4OTqTIDIcBIAMMAAO8TD6s='); //DTM For Add To Fire Option In The Chat Box
if FindDTM(MapleLogs, X, Y, MIX1, MIY1, MIX2, MIY2) then //If Maple Logs Are Found Left Click Them
begin
Mouse(X, Y, 7, 7, True);
Writeln('Found Maple Logs'); //Debugging
Wait(700 + random(100));
If FindDTM(AddToFire, X, Y, MCX1, MCY1, MCX2, MCY2) then //Detects Add To Bonfire Option And Clicks It
begin
Mouse(X, Y, 15, 15, True);
Writeln('Found Add To Fire Option'); //Debugging
end;
if not FindDTM(MapleLogs, X, Y, MIX1, MIY1, MIX2, MIY2) then //If There Are No Maple Logs Then GOTO GetLogs;
begin
GetLogs;
Writeln('No Maple Logs Found'); //Debugging
end;
end;
end;
begin
SetupSRL;
repeat
Burn;
until not loggedin;
FreeDTM(MapleLogs);
FreeDTM(AddToFire);
//FreeDTM(UnNote);
//FreeDTM(ButlerPayment);
//FreeDTM(PayButler);
end.
Edit: It now will just keep clicking on the maple logs.