Its always moves to another boat. I ran it for 12 hours a got 108 commendations.
Printable View
Its always moves to another boat. I ran it for 12 hours a got 108 commendations.
FIX:
Simba Code:program PestController;
{$DEFINE SMART}
{$i srl\srl.simba}
{.include SRL/SRL/Skill/Fighting.simba}
//P1nky's PestController
//Make sure to have Auto Retiable off.
//Set Character Outside the Boat.
const
SpecialAttacks = True;
QuickPrayer = True; //Make sure to have Quick Prayer Set!
Faster500 = True; //Having trouble getting your '500'? Well this will help you get over it!
SRLStats_Username = ''; // Your SRL Stats Username (Optional) Register here: [url]http://stats.villavu.com/[/url]
SRLStats_Password = '';// Your SRL Stats Password (Optional) Register here: [url]http://stats.villavu.com/[/url]
WhatBoat = 'N';{
Intermediate
Advance
Novice }
procedure DeclarePlayerz;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; //Your Runescape username
Players[0].Pass := ''; //Your Runescape password
Players[0].Active := True; //Set to true if you want to use this player. Set to False to disable this player.
Players[0].Pin := ''; //Leave blank if the player doesn't have a Bank PIN.
end;
var
Reward, games, win, lost, Rp, Pp, Yp, yellow, white, LeftGate, DTMSPOT2, DTMSPOT3, DTMSPOT, x, y, counter: integer;
procedure FindRandoms;
begin
if not (LoggedIn) or not (Players[CurrentPlayer].Active) then
NextPlayer(True);
// FindNormalRandoms;
wait(Random(100) + 20);
exit;
end;
function Step1: Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: array [0..4] of TDTMPointDef;
TempTDTM: TDTM;
begin
dtmMainPoint.x := 933;
dtmMainPoint.y := 115;
dtmMainPoint.AreaSize := 3;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 1452869;
dtmMainPoint.Tolerance := 20;
dtmSubPoints[0].x := 933;
dtmSubPoints[0].y := 115;
dtmSubPoints[0].AreaSize := 3;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 1452869;
dtmSubPoints[0].Tolerance := 20;
dtmSubPoints[1].x := 933;
dtmSubPoints[1].y := 121;
dtmSubPoints[1].AreaSize := 3;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 4357778;
dtmSubPoints[1].Tolerance := 20;
dtmSubPoints[2].x := 923;
dtmSubPoints[2].y := 114;
dtmSubPoints[2].AreaSize := 3;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 2844546;
dtmSubPoints[2].Tolerance := 20;
dtmSubPoints[3].x := 931;
dtmSubPoints[3].y := 104;
dtmSubPoints[3].AreaSize := 3;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 2513523;
dtmSubPoints[3].Tolerance := 20;
dtmSubPoints[4].x := 941;
dtmSubPoints[4].y := 114;
dtmSubPoints[4].AreaSize := 3;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 5218735;
dtmSubPoints[4].Tolerance := 20;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
function step2: Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..4] of TDTMPointDef;
TempTDTM: TDTM;
begin
dtmMainPoint.x := 629;
dtmMainPoint.y := 164;
dtmMainPoint.AreaSize := 1;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 125670;
dtmMainPoint.Tolerance := 21;
dtmSubPoints[0].x := 629;
dtmSubPoints[0].y := 164;
dtmSubPoints[0].AreaSize := 1;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 125670;
dtmSubPoints[0].Tolerance := 21;
dtmSubPoints[1].x := 627;
dtmSubPoints[1].y := 156;
dtmSubPoints[1].AreaSize := 1;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 3042439;
dtmSubPoints[1].Tolerance := 21;
dtmSubPoints[2].x := 635;
dtmSubPoints[2].y := 165;
dtmSubPoints[2].AreaSize := 1;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 3042439;
dtmSubPoints[2].Tolerance := 21;
dtmSubPoints[3].x := 630;
dtmSubPoints[3].y := 171;
dtmSubPoints[3].AreaSize := 1;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 3042439;
dtmSubPoints[3].Tolerance := 21;
dtmSubPoints[4].x := 622;
dtmSubPoints[4].y := 165;
dtmSubPoints[4].AreaSize := 1;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 3042439;
dtmSubPoints[4].Tolerance := 21;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
function Step3: Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: array [0..4] of TDTMPointDef;
TempTDTM: TDTM;
begin
dtmMainPoint.x := 741;
dtmMainPoint.y := 175;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 863541;
dtmMainPoint.Tolerance := 15;
dtmSubPoints[0].x := 741;
dtmSubPoints[0].y := 175;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 863541;
dtmSubPoints[0].Tolerance := 15;
dtmSubPoints[1].x := 739;
dtmSubPoints[1].y := 173;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 16249839;
dtmSubPoints[1].Tolerance := 15;
dtmSubPoints[2].x := 744;
dtmSubPoints[2].y := 169;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 2976616;
dtmSubPoints[2].Tolerance := 15;
dtmSubPoints[3].x := 737;
dtmSubPoints[3].y := 169;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 2841950;
dtmSubPoints[3].Tolerance := 15;
dtmSubPoints[4].x := 734;
dtmSubPoints[4].y := 173;
dtmSubPoints[4].AreaSize := 0;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 16249839;
dtmSubPoints[4].Tolerance := 15;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
procedure ReportScreen(TP: TStringArray; Placement: TPoint; Colour: integer);
var
mx, my, Pic, I, B, H, TPH, Numb: Integer;
TTP: TPointArray;
Canvas: TCanvas;
begin
SmartSetDebug(True);
GetClientDimensions(mx, my);
Pic := BitmapFromString(mx, my, '');
TPH := High(TP);
for I := 0 to TPH do
begin
TTP := LoadTextTPA(TP[i], SmallChars, H);
for B := 0 to High(TTP) do
begin
Numb := ((I + 1) * 13);
FastSetPixel(Pic, TTP[b].x + 1, TTP[b].y + Numb + 1, 8388736);
FastSetPixel(Pic, TTP[b].x, TTP[b].y + Numb, Colour);
end;
end;
Canvas := TCANVAS.Create;
Canvas.Handle := SmartGetDebugDC;
DrawBitmap(Pic, Canvas, Placement.x, Placement.y);
FreeBitmap(Pic);
end;
procedure ReportSmart;
begin
ReportScreen(['P1nkys PestController', '', 'Worked For ' + TimeRunning, '', 'Games Played ' + IntToStr(Games)], Point(350, 223), 255);
end;
procedure SPOT1;
begin
Status('Spot 1');
SetRun(True);
MakeCompass('S');
DTMSPOT := Step1;
if DTMRotated(DTMSPOT, X, Y, MMX1, MMY1, MMX2, MMY2) then
MMouse(x, y, 0, 0);
wait(Random(100) + 20);
Mouse(x, y, 0, 0, True);
FFlag(0);
wait(Random(1000) + 500);
end;
procedure SPOT2;
begin
Status('Spot 2');
MakeCompass('S');
DTMSPOT2 := Step2;
if DTMRotated(DTMSPOT2, X, Y, MMX1, MMY1, MMX2, MMY2) then
MMouse(x, y, 0, 0);
wait(Random(100) + 20);
Mouse(x, y, 0, 0, True);
wait(1000);
FFlag(0);
wait(1300);
end;
function AwayFromVoid: boolean;
var
C: Integer;
begin
C := 42342;
if not (C > 4) then
begin
result := false;
exit;
TerminateScript;
end
else
result := true;
Spot1;
end;
function Clan: boolean;
var
X, Y: Integer;
begin
Result := (FindColor(X, Y, 3226804, 460, 30, 461, 29));
end;
function RewardBox: Boolean;
begin
if (Clan) then
begin
Mouse(475, 29, 1, 1, True);
end;
if FindColorTolerance(x, y, 986895, 134, 96, 435, 334, 1) then
begin
Result := True;
Mouse(392, 60, 0, 0, true);
Reward := Reward + 1;
end
else
Result := False;
end;
procedure WinOrLose;
begin
Status('Checking if Win Game Or Lose');
RewardBox;
MakeCompass('S');
ReportSmart;
if FindNPCChatText('Congratulations!', True) then
begin
win := win + 1;
stats_IncVariable('PC Points Earned', 2);
exit;
end
else if FindNPCChatText('noticed', True) or FindNPCChatText('lost.', True) then
begin
lost := lost + 1;
exit;
end
else
begin
exit;
end;
end;
function InBoat: Boolean;
begin
result := (getColor(19, 30) = 13421772) and (getColor(19, 51) = 3265113);
end;
function NPC: Boolean;
begin
FindRandoms;
if FindNPCChatText('ritual', True) or FindNPCChatText('Congratulations!', True) or FindNPCChatText('knights', True) or FindNPCChatText('lost.', True) or FindText(x, y, 'attle', UpChars, MCX1, MCY1, MCX2, MCY2) or FindText(x, y, 'defend the Void Knight', UpChars, MCX1, MCY1, MCX2, MCY2) then
begin
Result := True;
Writeln('NPC Message Detected!');
if (FindColorSpiralTolerance(x, y, 540186, 136, 379, 415, 470, 25)) then
Status('NPC Message');
MMouse(x, y, 0, 0);
wait(Random(200) + 20);
Mouse(x, y, 0, 0, true);
WinOrLose;
end
else
Result := False;
end;
procedure RandomButton;
begin
if not (Faster500) then
case Random(3) of
0:
begin
KeyDown(VK_Left);
wait(Random(600) + 500);
KeyUp(VK_Left);
end;
1:
begin
KeyDown(VK_Right);
wait(Random(600) + 500);
KeyUp(VK_Right);
end;
2:
begin
KeyDown(VK_Up);
wait(Random(200) + 500);
KeyUp(VK_Up);
end;
end;
if (Faster500) then
case Random(5) of
0:
begin
KeyDown(VK_Left);
wait(Random(200) + 20);
KeyUp(VK_Left);
end;
1:
begin
KeyDown(VK_Right);
wait(Random(200) + 20);
KeyUp(VK_Right);
end;
2:
begin
wait(Random(100) + 20);
end;
3:
begin
wait(Random(100) + 20);
end;
4:
begin
wait(Random(100) + 20);
end;
end;
end;
procedure Report;
var
Answer, WC: Integer;
begin
if not (LoggedIn) or not (Players[CurrentPlayer].Active) then
NextPlayer(True);
cleardebug;
SRLRandomsReport;
Writeln('||===========================||');
Writeln('|| P1nkys PestController ||');
Writeln('||===========================||');
Writeln('|| ' + TheDate(Date_Formal) + ' ||');
Writeln('||===========================||');
Writeln(' Worked For ' + TimeRunning);
Writeln(' Games Played ' + IntToStr(Games));
Writeln('||===========================||');
ReportSmart;
Stats_Commit;
end;
procedure AntiBan;
var
NoBan: Integer;
begin
Noban := Random(18);
case Move of
0: MMouse(x, y, (10 + random(350)), (10 + random(200)));
1: MMouse(x, y, (10 + random(400)), (10 + random(600)));
2: MMouse(x, y, (10 + random(550)), (10 + random(400)));
3: MMouse(x, y, (10 + random(500)), (10 + random(400)));
4: MMouse(Random(MSX2), Random(MSY2), 0, 0);
5: RandomRclick;
6: RandomButton;
10: setangle(1)
end;
end;
function InGame: Boolean;
begin
result := (getColor(370, 74) = 16711935) and (getColor(404, 70) = 16737894);
end;
procedure BoatWait;
begin
if not (LoggedIn) or not (Players[CurrentPlayer].Active) then
NextPlayer(True);
repeat
Status('Waiting In Boat');
ReportSmart;
RandomButton;
FindRandoms;
Report;
wait(Random(100) + 20);
until (NPC) or (Ingame);
Games := Games + 1;
exit;
end;
function FindBoard(x, y: Integer): Boolean;
var
CTS, I: Integer;
TPA: TPointArray;
ATPA: array of TPointArray;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(1);
SetColorSpeed2Modifiers(1, 3);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 4942983, MSX1, MSY1, MSX2, MSY2, 3);
ColorToleranceSpeed(CTS);
ATPA := TPAToATPAEx(TPA, 2, 2);
for I := 0 to High(ATPA) do
begin
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 1, 1);
if (IsUpTextMultiCustom(['Gangplank'])) then
begin
Result := True;
GetMousePos(x, y);
Break;
end;
end;
end;
procedure Plank;
begin
if not (LoggedIn) or not (Players[CurrentPlayer].Active) then
NextPlayer(True);
Status('Searching For Plank');
WinOrLose;
FindRandoms;
case WhatBoat of
'N','n','novice','Novice','I','inter','i','Intermediate','intermediate' :
begin
MakeCompass('S');
KeyDown(VK_Down);
wait(Random(650) + 500);
KeyUp(VK_Down);
wait(500);
KeyDown(VK_left);
wait(Random(50) + 50);
KeyUp(VK_left);
end;
'A','a','adv','advance','Advance' :
begin
MakeCompass('W');
Setangle(0);
{ KeyDown(VK_Down);
wait(Random(650) + 500);
KeyUp(VK_Down); }
end;
end;
repeat
RewardBox;
ReportSmart;
if not RewardBox then
if FindBoard(x, y) then
Status('Looking for Plank');
wait(200 + random(232));
if Isuptext('angplank') then
ClickMouse2(true);
until (FindBlackChatMessage('You board the lander') or (ingame) or FindBlackChatMessage('reach that') or (InBoat)) Setangle(0);
FindRandoms;
Report;
NPC;
exit;
end;
function Range: Boolean;
begin
if (FindColorSpiralTolerance(x, y, 5372475, 267, 132, 292, 160, 1)) then
begin
Result := True;
Writeln('TRUE');
end
else
Result := False;
Writeln('False');
end;
var
qp: integer;
procedure QPrayer;
begin
if QuickPrayer then
QP := DTMFromString('mbQAAAHicY2VgYFBmZGBQAmItKC0JxGuA4kuBeB0QbwXi9UB88+1dhrVbNoAxiB1h38yADTBiwWAAAKBQDp8=');
if FindDTM(QP, x, y, 701, 52, 733, 79) then
begin
MMouse(x, y, 0, 0);
Mouse(x, y, 0, 0, true);
end
else
exit;
end;
procedure SpecAttack;
begin
if SpecialAttacks then
begin
Writeln('Toggling Special');
Status('Special Attack ON');
MouseBox(528, 179, 545, 195, 1);
begin
if (FindColorSpiralTolerance(x, y, 3566664, 545, 208, 738, 430, 25)) then
Status('Special');
MMouse(x, y, 0, 0);
wait(Random(100) + 20);
Mouse(x, y, 0, 0, true);
end;
end;
end;
function EFindObjCustom(var cx, cy: Integer; Text: TStringArray; Color: TIntegerArray; Tol: Integer): Boolean;
begin
Result := FindObjEx(cx, cy, Text, Color, Tol, 50, 33, 134, 542, 465);
end;
procedure FightPests;
var
Z, R, CTS: Integer;
begin
Status('Fighting Pests');
if not (EFindObjCustom(x, y, ['hifter', 'Shifte', 'Shifter', 'hift'], [2108184, 5051472, 3228504, 4942983,3162776], 3)) then
begin
if (counter > 1000) then
begin
Report;
counter := 0;
end;
R := Random(4);
case R of
0: RandomButton;
1: wait(Random(25) + 20);
2: wait(Random(25) + 20);
3: wait(Random(25) + 20);
end;
Exit;
end
else
Mmouse(x, y, 0, 0);
wait(Random(100) + 20);
if isuptext('ttac') then
begin
if not Faster500 then
begin
Mouse(x, y, 0, 0, False);
ChooseOption('ttack');
end
else
begin
Mouse(x, y, 0, 0, true);
wait(random(500) + 100);
end;
if Faster500 then
begin
wait(Random(100) + 20);
Report;
end
else
wait(2000);
Report;
end;
end;
function Portal(Name: string): Boolean;
begin
case Name of
'red':
if (FindBlackChatMessage('south-western')) then
begin
Result := True;
Writeln('Red Portal Shield Down!');
Exit;
end
else
Result := False;
'yellow':
if (FindBlackChatMessage('south-eastern')) then
begin
Result := True;
Writeln('Yellow Portal Shield Down!');
Exit;
end
else
Result := False;
end;
end;
procedure FreeMem;
begin
FreeDTM(step1);
FreeDTM(step2);
FreeDTM(step3);
end;
begin
Disguise('P1nky PestController');
ClearDebug;
ClearReport;
Smart_Server := 17;
Smart_Members := false;
Smart_Signed := true;
Smart_SuperDetail := false;
begin
if (SRLStats_Username = '') then
{ SetupSRLStats(654, 'Anonymous', 'anon1337')
else }
SetupSRLStats(654, SRLStats_Username, SRLStats_Password);
SetUpSRL;
declareplayerz;
ActivateClient;
counter := 0;
ClearDebug;
LoginPlayerToLob;
OpenWorldScreen;
SelectWorld(53);
LoginPlayer;
Inc(counter);
repeat
begin
FreeMem;
NPC;
Report;
Plank;
BoatWait;
begin
Spot1;
Spot2;
begin
SpecAttack;
QPrayer;
end;
repeat
FightPests
until not (Ingame);
end;
end;
until (false);
end;
end.
Thanks a lot bro! Awesome script !! Appreciate the quick fix !
edit: running it now, will post any bugs i find, so far so good !
edit2: For the first 5 games played, it took about 5-10 minutes to click the plank. after 10 minutes i just clicked it myself. after that it seems to be clicking the plank right away after leaving a game !
edit 3:
||===========================||
|| P1nkys PestController ||
||===========================||
|| April 13th, 2012 ||
||===========================||
Worked For 3 Hours, 13 Minutes and 3 Seconds
Games Played 75
||===========================||
Pretty damn nice considering it spent about 25 minutes on the first 5 games trying to click the plank !
SRL Compiled in 16 msec
SMART Initialized.
Loaded: Server 17, Members: False, Signed: True, Super Detail: False.
Error: Exception: Access violation at line 142
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]
Help????
Still runs south:/
Edit: sometimes it catches itself and runs to the middle midway into running south
Updated to [I]; Let me know how it goes for y'all!
I'll test I overnight. Watched it do 2 games and only problem is it moves mouse rapidly after winning a game on the void knight lady's face before entering the boat.
the beta version was pretty good
hello the bot doesn't go to the middle, it goes near the right door next to the ladder for towers.
[Update] Ran I overnight and only got 46 points and when I logged in account was not in a random but by the intermediate boat?
just wanna say thanks for maintaining and bettering ure script so regularly
[I] is working like a charm for me:
Quote:
Worked For 5 Hours, 53 Minutes and 24 Seconds
Games Played 131
Super AWESOME script dude keep up the gooooooood work :D
current bugs: runs to inter boat and gets stuck before gangplank, only picks trickster boots.
||===========================||
|| P1nkys PestController ||
||===========================||
|| April 17th, 2012 ||
||===========================||
Worked For 4 Hours, 50 Minutes and 49 Seconds
Games Played 108
||===========================||
stopped it because i needed to change tickets in :p
Nice!
Downloaded this script going to test it out and post progress reports.
How are ya'll getting yours to work? Warning! You passed wrong values to a finder function: ys > ye (30,29). Swapping the values for now. That's what i keep getting. Like it wont click the plank. Its turns the camera then keeps clicking and then says the above ^
for some reason it ran well for 12hs but then i restated it manualy and now it runs to intermediate and advance boat, also please add boots support, i currently have 4 pairs of trickster boots and i don't even use trickster.
P1nky, will your Soul Wars script be released to the public or will it be sold?
can you make the bot spam click so that it can get into boats quickly right after the end of a round?
I keep trying to run but im getting this
Exception in Script: Unable to find file 'srl\srl.simba' used from ''
I would love some help if anyone knows why its doing this?
Yea i am fairly new here :p I have installed and updated simba with no effect, im not sure what else i can do?
Okay i think ive made a little progress. now im getting this lol
Exception in Script: Plugin(libsmart32) has not been found
Nevermind i got things working after trial and error!! The only bug so far is when im going to high level boats and while in pest control the cursor gets hung on fire capes. Just letting you know and thank you!
awesome script, a little botlike but free nonetheless
||===========================||
|| P1nkys PestController ||
||===========================||
|| April 21st, 2012 ||
||===========================||
Worked For 3 Hours, 18 Minutes and 21 Seconds
Games Played 75
||===========================||
I'm gonna try this. Cant wait!
It hovers over the ladder for like 5min until it clicks it....
Also it drags over the map
bad script
I've used your script before and it worked really well. But this has been happening lately.
http://i868.photobucket.com/albums/a...eyAdler/PC.jpg
It just runs to this spot and just sits there and looks for shifters.