J_R
2015-05-19 15:50:13
JRPestControl
Just thought I'd release my pretty messy, but still gets the job done barebones pest control script, seeing as how people might want it for the new thaler system (and I didn't really see any other PC scripts here). I've been able to run this in the past pretty easily, and it still works ok. It might be bot-like but meh, I've ran this for many hours and havent been banned so it's probably safe.
Setup instructions:
1. probably starting in the boat is best (or in a pc game, that works too)
2. if you're going for trim comp or void, either way this script is not stable enough, especially with the lag from 400 people on pc boat, to run unattended, I highly suggest babysitting this; having it open in another window and checking that it doesn't get stuck. The most common part it gets stuck on is that the lag causes it to click the gangplank and barely miss; however, it lags enough to that the text that shows up on the side when you're in the boat isn't there so the script thinks you're in game when you clearly aren't/
3. Highly suggest world 53
4. You want to use mage or ranged for a better chance (it's already pretty good) of getting the 5k damage. Also set ricochet/chain to slot 1, and maybe dragonbreath to 2 if you're doing mage (keep revolution on). I'd highly suggest the t95 prayer + soulsplit on quickprayers
5. start with camera facing north and all the way up
6. fill in your account information in declarePlayers (or remove the procedure + comment it out of the bottom block)
I am NOT going to update this, so if people have problems they can put them here and I can provide suggestions, but I'm not looking to touch this script again as I got sup elite void on this a long while back and don't consider it worth the time when someone will probably release a much better PC script eventually (prob sooner than later)
That being said,
What it does it pretty simple:
1. finds the gangplank by screen coordinates
2. waits in the boat until the game starts
3. runs to the bottom of the map by clicking the minimap twice
4. activates quick prayers and attacks random monsters if the colors match (no guarantees on 5k damage a game though it tends to get it)
What it relies on:
1. probably want to start it in the boat, it'll run well from there (if you uncomment and/or fix the gangplankDTM this probably isn't necessary)
2. other people playing the game properly, not trolling you by shutting the gate; however you still get thaler for doing nothing so if you already have sup elite void you probably don't care about this
3. Just a word of caution, if a ton of people use this in the same PC game, it might look suspicious as a lot of people will be running to the same-ish location, but so many people are at PC now that maybe it won't matter; likewise, if everyone's using this noone will be killing the portals :P
What it doesn't have (and you could probably add):
1. antiban / more consistency checks
2. better walking/any gate interaction
3. portal detection/walking/killing (if someone adds this, I can update this with appropriate credit given)
4. walking back after dying
5. minigame boots claiming/anything, for some reason I never get them
Just thought I'd release my pretty messy, but still gets the job done barebones pest control script, seeing as how people might want it for the new thaler system (and I didn't really see any other PC scripts here). I've been able to run this in the past pretty easily, and it still works ok. It might be bot-like but meh, I've ran this for many hours and havent been banned so it's probably safe.
Setup instructions:
1. probably starting in the boat is best (or in a pc game, that works too)
2. if you're going for trim comp or void, either way this script is not stable enough, especially with the lag from 400 people on pc boat, to run unattended, I highly suggest babysitting this; having it open in another window and checking that it doesn't get stuck. The most common part it gets stuck on is that the lag causes it to click the gangplank and barely miss; however, it lags enough to that the text that shows up on the side when you're in the boat isn't there so the script thinks you're in game when you clearly aren't/
3. Highly suggest world 53
4. You want to use mage or ranged for a better chance (it's already pretty good) of getting the 5k damage. Also set ricochet/chain to slot 1, and maybe dragonbreath to 2 if you're doing mage (keep revolution on). I'd highly suggest the t95 prayer + soulsplit on quickprayers
5. start with camera facing north and all the way up
6. fill in your account information in declarePlayers (or remove the procedure + comment it out of the bottom block)
I am NOT going to update this, so if people have problems they can put them here and I can provide suggestions, but I'm not looking to touch this script again as I got sup elite void on this a long while back and don't consider it worth the time when someone will probably release a much better PC script eventually (prob sooner than later)
That being said,
What it does it pretty simple:
1. finds the gangplank by screen coordinates
2. waits in the boat until the game starts
3. runs to the bottom of the map by clicking the minimap twice
4. activates quick prayers and attacks random monsters if the colors match (no guarantees on 5k damage a game though it tends to get it)
What it relies on:
1. probably want to start it in the boat, it'll run well from there (if you uncomment and/or fix the gangplankDTM this probably isn't necessary)
2. other people playing the game properly, not trolling you by shutting the gate; however you still get thaler for doing nothing so if you already have sup elite void you probably don't care about this
3. Just a word of caution, if a ton of people use this in the same PC game, it might look suspicious as a lot of people will be running to the same-ish location, but so many people are at PC now that maybe it won't matter; likewise, if everyone's using this noone will be killing the portals :P
What it doesn't have (and you could probably add):
1. antiban / more consistency checks
2. better walking/any gate interaction
3. portal detection/walking/killing (if someone adds this, I can update this with appropriate credit given)
4. walking back after dying
5. minigame boots claiming/anything, for some reason I never get them
program JRPestControl;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}
var
{gangplankDTM, }colortextDTM, x, y, defilerbuttcolor, greyVeteranColor, torcherwingcolor : integer;
smallbox: TBox;
quickprayericon: TPoint;
//Game needs to max zoom out, facing north.
procedure declarePlayers(); //declare players first and never touch this area again
begin
setLength(players, 1);
with players[0] do
begin
loginName := 'xxxx';
password := 'xxxx';
isActive := true;
isMember := true;
world := 53;
end
currentPlayer := 0;
end;
procedure setup(); //setup my stuff
begin
//gangplankDTM := DTMFromString('mbQAAAHicY2VgYHjPwsDwDIgfAvFNIL4MxPGMDAyxQJwAxIlQui3ZlGFqiS+YnlHmx9CeYsqADTBiwWAAAJoRDHE=');
colortextDTM := DTMFromString('mWAAAAHicY2FgYOAHYmEoLQDE/kBsD8S6QCwPxDP//2e4dzmLIfKSIQMIcKFhRjQMAgByQwda');
greyVeteranColor := 986896;
torcherwingcolor := 1454994;
defilerbuttcolor := 12043973;
smallbox.x1 := 0;
smallbox.x2 := 50;
smallbox.y1 := 0;
smallbox.y2 := 100;
end
function BoxFinder(mouseOverText: array of string; x: integer; y: integer; diff: integer; waitLow: integer = 0; waitHigh: integer = 10): boolean;
begin
if not isLoggedIn then
exit;
//if our mouse is already over the obstacle then just click it (usually works for at least first 3 obstacles)
if isMouseOverText(mouseOverText) then
begin
fastClick(mouse_left);
wait(randomRange(waitLow, waitHigh));
exit(true);
end
if mainscreen.isPlayerAnimating then
begin
wait(randomRange(1000, 1500));
result := BoxFinder(mouseOverText, x, y, waitLow, waitHigh);
exit
end
mouse(x + random(diff), y + random(diff), mouse_move);
if isMouseOverText(mouseOverText) then
begin
fastClick(mouse_left);
wait(randomRange(waitLow, waitHigh));
exit(true);
end
else
exit(false);
end
function ClickObject(color: integer; mouseOverText: array of string; waitLow: integer = 0; waitHigh: integer = 10; pt : TPoint = mainScreen.playerPoint): Boolean
var
x, y, i: integer;
Coords: TBox;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
if not isLoggedIn then
exit;
Coords := mainScreen.getBounds();
Coords.x1 := Coords.x1 + 200;
Coords.y1 := Coords.y1 + 100;
if findColorsSpiralTolerance(x, y, TPA, color, Coords, 20, colorSetting(2, 0.05, 0.52)) then
begin
ATPA := TPA.toATPA(10, 10);
ATPA.sortFromMidPoint(pt); //sorts ATPA from closest to this pt
for i := 0 to high(ATPA) do
begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if isMouseOverText(mouseOverText) then
begin
TypeSend('1', false); //specially for this to save runes/arrows!
FastClick(Mouse_Left);
wait(randomRange(1500 + waitLow, 2000 + waitHigh));
Exit(True);
end
if i > 5 then
exit(false);
end
Exit(True);
end
else
begin
Exit(False)
end
end
procedure walkGangPlank();
var
i, x, y: integer;
p: TPoint;
gangbox : TBox;
bankFinding: TTimeMarker;
TPA : TPointArray;
foundGP1, foundGP2 : Boolean;
begin
if not isLoggedIn() then
exit;
if not minimap.findSymbol(p, MM_SYMBOL_MINIGAME, minimap.getBounds()) then begin writeln('didnt find minigame symbol'); exit; end
writeln(findDTM(colortextdtm, x, y, smallbox));
if findDTM(colortextdtm, x, y, smallbox) then begin writeln('we are inside the boat lol'); exit; end
foundGP1 := BoxFinder(['ross', 'ang', 'lan'], 250, 200, 10);
wait(randomrange(800,1200));
foundGP2 := BoxFinder(['ross', 'ang', 'lan'], 250, 200, 10);
//havent found the gangplanks means we should probably fix minimap direction and try it again
if ((not foundGP1) and (not foundGP2)) then begin
minimap.clickCompass;
mainScreen.setAngle(MS_ANGLE_HIGH);
walkGangPlank();
end
end;
//677 173
procedure waitUntilGameStarts();
var
chatbounds : TBox;
begin
if not isLoggedin then exit;
repeat
writeln('waiting for pest control game to start!');
wait(randomrange(800,1100));
until (not findDTM(colortextdtm, x, y, smallbox));
end
//710 170
procedure walkToBottomOfPC();
var
btminipt,p:Tpoint;
TPA: TPointArray;
Coords:TBox;
begin
if not isLoggedin then exit;
if minimap.findSymbol(p, MM_SYMBOL_MINIGAME, minimap.getBounds()) then begin writeln('found minigame symbol in PC'); exit; end
writeln('we are in PC, time to walk to bottom!');
btminipt.x := 680 + random(20);
btminipt.y := 170 + random(12);
Coords := mainscreen.getBounds();
mouse(btminipt, MOUSE_MOVE);
wait(randomRange(500,800));
fastClick(MOUSE_LEFT);
writeln('did first click');
wait(randomRange(1000, 1500));
minimap.waitPlayerMoving();
fastClick(MOUSE_LEFT);
writeln('did 2nd click');
wait(randomRange(1000, 1500));
minimap.waitPlayerMoving();
//turn on quick prayer
quickprayericon.x := 300+random(10);
quickprayericon.y := 395+random(10);
mouse(quickprayericon, MOUSE_MOVE);
fastClick(MOUSE_LEFT);
writeln('turned on quick prayer!');
//wait until new pc game
repeat //in here maybe atk monsters
if not isLoggedin then exit;
wait(randomRange(2000, 6000));
//under 30% is assumed to be 'safely' out of combat
//fight a torcher if available!
if((actionbar.getAdrenalinePercent < 30) and findColorsSpiralTolerance(x, y, TPA, torcherwingcolor, Coords, 20, colorSetting(2, 0.05, 0.52))) then begin
p.x := x;
p.y := y;
writeln('trying to kill a torcher');
clickObject(torcherwingcolor, ['tack']);
end
//fight a defiler if available
if((actionbar.getAdrenalinePercent < 30) and findColorsSpiralTolerance(x, y, TPA, defilerbuttcolor, Coords, 20, colorSetting(2, 0.05, 0.52))) then begin
p.x := x;
p.y := y;
writeln('trying to kill a defiler');
clickObject(defilerbuttcolor, ['tack']);
end
until minimap.findSymbol(p, MM_SYMBOL_MINIGAME, minimap.getBounds());
writeln('PC game ended!');
end
begin
clearDebug(); // Clear the debug box
//smartEnableDrawing := true; // So we can draw on SMART
setupSRL(); // Load the SRL include files
declarePlayers();
setup();
repeat
if not isLoggedIn() then // If player isn't logged in then
begin
players[currentPlayer].login(); // Log them in
exitSquealOfFortune(); // Exit squeal if found
minimap.setAngle(MM_DIRECTION_NORTH); // Make compass north and angle high
mainScreen.setAngle(MS_ANGLE_HIGH);
end;
//writeln(findColorTolerance(x, y, greyVeteranColor, smallbox, 10));
walkGangPlank();
waitUntilGameStarts();
walkToBottomOfPC();
until(false);
end.