SRL Archive - Outdated / Broken

GOP Water Talisman Buyer


litoris

2012-10-25 05:42:48

I made this script a while ago, thought I'd share. Standards etc might be off at certain parts, I didn't intend to release it but this is better than having it get lost in my folders.

Start in the GOP lobby, with tokens in the first slot. Handles everything else by itself, has failsafes etc. You'd get more tally's/h with 27 spots empty, but it doesn't screw up if you have stuff in your inventory. I used JJ's map, so you can go get it from his GOP script thread here.(map you need is called 99_7)
CBA to attach the file, so here's it pasted:
{
This script buys water talismans at the GOP lobby and deposits in the box.
Tokens must be in the first inventory slot
It will deposit the water talismans ONLY, so deposit all runes and ess before running the script to get
more talismans each round.
It will still work fine with other things in the inventory though.
It will switch to the next player once the current player can't buy any more water talismans
This script requires a map of the GOP lobby at: /Includes/SPS/img/runescape_surface


This script was written by litoris from SRL.
}
program GOPBuyer;

{$DEFINE SMART}
{$i srl/srl.simba}
{$i srl/srl/misc/Smartgraphics.simba}
{$i sps/sps.simba}
var
t, F : Integer;
Getbanned, CanGo : Boolean;

procedure DeclarePlayers;
begin

GetBanned := False; //Change to true to remove antiban. Will increase overall speed by removing occasional breaks and such.

HowManyPlayers := 3;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;//change to 1 or 2 if you want to start with another character on the list

with Players[0] do //enter each player's credentials here
begin
Name := '';//login email/username
Pass := '';//password
Active := True;
end;

with Players[1] do
begin
Name := '';
Pass := '';
Active := True;
end;

with Players[2] do
begin
Name := '';
Pass := '';
Active := True;
end;

end;
{*******************************************************************************
********|Don't change stuff below this line unless you are a scripter|**********
*******************************************************************************}
procedure StartUpClient;
begin
SRL_SIXHOURFIX := TRUE;
SMART_FIXSPEED := TRUE;
SetupSRL;
SPS_Setup(RUNESCAPE_SURFACE, ['99_7']);
DeclarePlayers;
ActivateClient;
MarkTime(t);
end;

procedure AntiBan;
var
w, h, rx, ry: Integer;
begin
if GetBanned then Exit;
if (TimeFromMark(t) >= (30 * 60000)) and (TimeFromMark(t) < (90 * 60000)) then
case Random(3000) of
1..10: RandomRclick;
11..15: BoredHuman;
16..20: SleepAndMoveMouse(10000);
21..25: PickUpMouse;
25..30:
begin
writeln('Antiban mini break...');
GetClientDimensions(w, h);
rx := RandomRange(0, w);
ry := RandomRange(0, h);
case (Random(4)) Of
0..1: MMouse(w, -10, rx, 0);
2: MMouse(w, h+10, rx, 0);
3: MMouse(-10, h, 0, ry);
4: MMouse(w+10, h, 0, ry);
end;
Wait(RandomRange(25000, 65000));
end;
end;
if (TimeFromMark(t) >= (90 * 60000)) then
case Random(4000) of
1..20: RandomRclick;
21..30: BoredHuman;
31..40: SleepAndMoveMouse(15000);
41..50: PickUpMouse;
50..70:
begin
writeln('Antiban mini break...');
GetClientDimensions(w, h);
rx := RandomRange(0, w);
ry := RandomRange(0, h);
case (Random(4)) Of
0..1: MMouse(w, -10, rx, 0);
2: MMouse(w, h+10, rx, 0);
3: MMouse(-10, h, 0, ry);
4: MMouse(w+10, h, 0, ry);
end;
Wait(RandomRange(65000, 120000));
end;
end else
Exit;
end;
function AND_TPA (tpa1 , tpa2 :TpointArray ; MinDist ,MaxDist : extended) : TPointArray;
var
a : integer;
temp_tpa1 :TPointarray;
begin
Setlength(Result,0);
for a:=0 to High(tpa2) do
begin
temp_tpa1 := tpa1;

FilterPointsDist(temp_tpa1,MinDist,MaxDist,tpa2[a].x,tpa2[a].y);

CombineTPAWrap(Result,temp_tpa1,Result);
end;
ClearDoubleTPA(Result);
end;



function FindObject(Which: String): Boolean;
var
TPA1, TPA2, RTPA: TPointArray;
Color, Tol: TIntegerArray;
Dist, nCTS, cts, i: Integer;
ATPA: T2DPointArray;
Option: String;
Uptext: Array of String;
HueMod1, SatMod1, HueMod2, SatMod2 : Extended;
begin
case Lowercase(Which) of
'elriss':
begin
nCTS := 2;
HueMod1 := 0.45;
SatMod1 := 0.46;
HueMod2 := 0.17;
SatMod2 := 2.85;
Color := [5069693, 7779301];
Tol := [10, 10];
Dist := 10;
Uptext := ['lriss', 'iss', 'ss'];
Option := 'ge W';
end;
'box':
begin
nCTS := 2;
HueMod1 := 0.62;
SatMod1 := 0.49;
HueMod2 := 0.13;
SatMod2 := 0.24;
Color := [12634313, 4544358];
Tol := [3, 4];
Dist := 10;
Uptext := ['eposit', 'epos'];
Option := 't D';
end;
end;
Result := False;
cts := GetColorToleranceSpeed;
ColorToleranceSpeed(nCTS);
if (nCTS = 2) then
SetColorSpeed2Modifiers(HueMod1, SatMod1);
FindColorsTolerance(TPA1, Color[0], MSX1, MSY1, MSX2, MSY2, Tol[0]);
RAaSTPAEx(TPA1,3,3);//}
if (nCTS = 2) then
SetColorSpeed2Modifiers(HueMod2, SatMod2);
FindColorsTolerance(TPA2, Color[1], MSX1, MSY1, MSX2, MSY2, Tol[1]);
RAaSTPAEx(TPA2,3,3);//}

RTPA := AND_TPA(TPA1,TPA2,0,Dist);

if Length(RTPA) = 0 then
begin
writeln('Didn''t find '+Which+' colors.');
ColorToleranceSpeed(cts);
Inc(F); //F for Failure
if F >= 20 then
begin
Writeln('We failed too many times, logging out and back in to change the colors.');
ExitToLobby;
Wait(Random(5000));
F := 0;
LoginPlayer;
end;
Exit;
end;
ColorToleranceSpeed(cts);
// ATPA := SplitTPAEx(RTPA, 15, 15);
SplitTPAExWrap(RTPA, 15, 15, ATPA);
if (Length(ATPA) > 0) then
begin
SortATPASize(ATPA, true);
//SortATPAFrom(ATPA, Point(MSCX, MSCY));
end else
Exit;
SMART_ClearCanvas;
for i:= 0 to high(ATPA) do
begin
SMART_DrawDots(ATPA[i]);
MMouse(MiddleTPA(ATPA[i]).x, MiddleTPA(ATPA[i]).y, 5, 5);
if (WaitUptextMulti(Uptext, 600 + Random(100))) then
begin
SMART_ClearCanvas;
ClickMouse2(mouse_right);
if WaitOption(Option, 600) then
begin
Result := True;
F := 0;
Exit;
end;
end;
end;
end;
function Buy: Boolean;
var
Talisman, px, py, Amount, Tokens: Integer;
begin
if InvFull then
Exit;
repeat
wait(600);
until(SPS_BlindWalk(Point(39835, 3079)));//elriss
Wait(RandomRange(3200,4000));
repeat
Wait(RandomRange(600, 1000));
until(FindObject('Elriss'));
Talisman := DTMFromString('mwQAAAHicjcqhDkBQAIXhc6OuKB5HMcEIkuY5JM0t95rZHZJ5AE/on6Bytq+c/ZGkykgZcpSo0aBFhwIzncOIFR4BJ3YsSNJLYfKPY9809L0W597PW6uY7ov54d0NxusX0g==');
repeat
Wait(600)
until FindDTM(Talisman, px, py, MSX1, MSY1, MSX2, MSY2);
FreeDTM(Talisman);
repeat
repeat
Mouse(px, py, 5, 5, mouse_right)
until WaitOption('X Wat', 600 + Random(300));
Wait(RandomRange(1200,1800));
Amount := 28 - InvCount;
Tokens := GetAmountBox(InvBox(1));
if (Amount*50 <= Tokens) then
begin
TypeSend(ToStr(Amount));
CanGo := True;
end else
begin
TypeSend(Tostr(Floor(Tokens/50)));
CanGo := False;
end;
Wait(RandomRange(1200,1800));
MouseBox(174, 280, 337, 323, mouse_left);
Wait(RandomRange(600,1000));
until (InvFull) or (GetAmountBox(InvBox(1))<50);
Result := True;
AntiBan;
end;
function DepositThem: Boolean;
var
Talisman, px, py: Integer;
begin
repeat
wait(600);
until(SPS_BlindWalk(Point(39855, 3031)));//dbox
Wait(4000);
repeat
Wait(600);
until(FindObject('box'));
Talisman := DTMFromString('m6wAAAHiclc0xC0BQAMTxexZFyavHIPlabzAYSFJkegZf3n+gTOTqd912qaQlkiZsGNBjRIcZATtWWCPlKJBdu0KDGiUSxLBu1xGCWu95iV45+vYV88MjJzObCPU=');
repeat
Wait(600)
until FindDTM(Talisman, px, py, MSX1, MSY1, MSX2, MSY2);
FreeDTM(Talisman);
repeat
Mouse(px, py, 5, 5, mouse_right)
WaitOption('ll Wat', 600 + Random(300));
Wait(RandomRange(600, 1200));
until (not InvFull);
Result := True;
AntiBan;
end;
procedure Loop;
begin
if InvFull or Buy then
DepositThem;
if not CanGo then
begin
Logout;
Players[CurrentPlayer].Active := False;
end;
end;
begin
StartUpClient;
repeat
LoginPlayer;

ClickNorth(SRL_ANGLE_HIGH);
repeat
Loop;
until (not LoggedIn) or (not CanGo);
NextPlayer(Players[CurrentPlayer].Active);
until AllPlayersInactive;
end.

Download link w/ map for the lazy bunch (has this exact script + jj's map)

J J

2012-10-25 07:38:51

Nice :P I'm currently finishing a GOP script for TRiBot after that I'll rework the GOP script here. I've some nice idea's to improve it's stability :) With the bonus xp weekend coming up water talismans are selling at 12k/each. You can make up to 750k/h right now I believe.

litoris

2012-10-25 10:33:56

From: J J
Nice :P I'm currently finishing a GOP script for TRiBot after that I'll rework the GOP script here. I've some nice idea's to improve it's stability :) With the bonus xp weekend coming up water talismans are selling at 12k/each. You can make up to 750k/h right now I believe.


O.O that's kinda worth legiting, too bad I don't need cash right now.