Deadly Serious
2012-01-15 16:06:02
You need to download this to be able to use the script: http://villavu.com/forum/showthread.php?t=68112&highlight=objdtm+walking
Follow the instructions at the bottom of this page on how to download and install it correctly.
You can fix your door detection problems here: http://villavu.com/forum/showthread.php?t=72578
Beginner5 has made an incredible script to detect and open the doors in Port Sarim.
I'll be posting my own fix in a few days, in the meantime I encourage you to implement Beginner5s' fix for yourselves. Don't forget to thank/ +rep him for the time and effort he spent into developing such a beastly script!
This script buys harpoons from the fishing shop in Port Sarim and deposits them in the deposit box.
I've only made this script capable of running one account and not being able to run multiple accounts, since you can only buy 1000 thousand harpoons at a time.
Always sell for well over the medium price, this only took me a few hours to sell. Don't flood the market to much :)

Requirements:
Start off with at least 60k in your money pouch.
Starting Point:

Recommended set up:
e.g. Monk robes, wizard robes, any other combo. You don't need an air tiara, I just stole this picture from my air runecrafting script.
Current Features
Rests when below 50% energy, either at the shop or deposit box.
Opens the door when needed.
Future Updates:
Auto Updater.
Known Bugs:
Sometimes misclicks the npc, since he strolls around the room.
Progress Reports:
You have been Pooning for:50 Minutes and 30 Seconds
Poons Bought:840
I had to stop it since there was no harpoons left to buy.
You have been Pooning for:1 Hours, 5 Minutes and 24 Seconds
Poons Bought:1064
You have been Pooning for:57 Minutes and 19 Seconds
Poons Bought:1064
Version:
1.2: Released to the public again. There's a few anti-leech prevention techniques in this new script. This is because I don't want the price to drop to drastically.
You can solve most of them by reading up on the errors here: http://villavu.com/forum/showthread.php?t=6413&highlight=annoying+error
Please refrain yourself from posting and asking for fixes here or in any other part of this forum. I want you to be competent enough to figure this out on your own. If you can’t find all the fixes in the link, you can go here: http://villavu.com/forum/forumdisplay.php?f=95
1.1: I changed the depositall TPA to a findcustom, it now finds it every time. I believe I fixed the occasional misclick the "buy 50" option.
1: Initial release
program Harpoon_Buyer;
{$i srl/srl/misc/smart.simba}
{$i SRL/SRL.simba}
//{.Include SRL\SRL\Misc\Debug.simba}
//{$i SRL/SRL/misc/paintsmart.simba}
{$i ObjectDTM/ObjDTMInclude.Simba}
Const //Yoho's
SERVER = ('54'); // Enter "0" to pick a random server.
MEMBERS = False; // Set to True if using a RS-Members account. False if F2P.
SRLStats_Username = ''; // Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password
NumbOfPlayers= 1; //How many players are you using
StartPlayer= 0; //Player to start auoting with! (0 means first char)
Version = 1.2;
Var
tries: integer;
opened : boolean;
Poon: integer;
aFound: Extended;
{*******************************************************************************
procedure DeclarePlayers;
By: SRL
Description: SRL's Player Setup
*******************************************************************************}
procedure DeclarePlayers;
var i:integer;
begin
NumberOfPlayers(6);
CurrentPlayer := 4;
for i := 1 to NumbOfPlayers-5 do
Players[i].BoxRewards := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Member := False;
Players[0].Active := True;
Players[0].Pin := '';
end;
Procedure ObjSetup; //Euph's
begin;
ObjDTM_Setup;
end;
Procedure StatsGuise(wat:String); //Yoho's
Begin
Status(wat);
Disguise(wat);
End;
//Function CheckAndClick(X,Y:Integer):Boolean;
//By: YoHoJo
//Description: Moves mouse to x,y, checks for uptext, and clikcs if found
//*******************************************************************************}
Function CheckAndClick(X,Y:Integer):Boolean;
Begin
MMouse(x, y, 5, 5);
{Wait(100 + Random(50));
If CountUpColor('B', 41, 5, 86, 24, 70, 140) Then}
If WaitUpTextMulti(['Mine','ine'], 150) Then
Begin
Result:=True;
GetMousePos(x, y);
Mouse(x, y, 0, 0,True);
Wait(100+Random(50));
FFlag(0);
End;
End;
Procedure FailSafe(Reason:String); //Yoho's
begin
Players[CurrentPlayer].Loc:=reason;
Logout;
Terminatescript;
end;
Procedure HumanMMouse(eX, eY, ranX, ranY: Integer);
var
randSpeed: extended;
X,Y,X2,Y2,A,Dist,MP: integer;
begin
A := MouseSpeed;
GetMousePos(X, Y);
Dist := Distance(X, Y, eX, eY);
MP := Round(Dist/150);
if MP < 0 then
MP := 1;
randSpeed := (random(MouseSpeed) / 2.0 + MouseSpeed) / 10.0;
X2 := RandomRange(eX-(A*MP), eX+(A*MP));
Y2 := RandomRange(eY-(A*MP), eY+(A*MP));
WindMouse(X, Y, X2, Y2, 11, 8, 10.0 / randSpeed, 12.0 / randSpeed, 10.0 * randSpeed, 10.0 * randSpeed);
GetMousePos(X, Y);
MMouse(eX, eY, ranX, ranY);
MouseSpeed := A;
end;
Procedure Loadvars;
begin;
MouseSpeed := RandomRange(14, 18);
end;
Procedure Antiban; //I liked a few of Yoho's antibans, I implemented them here
Begin
Case Random(254) Of
0: HoverSkill('Constitution', False);
1: Begin PickUpMouse; SleepAndMoveMouse(3000 + Random(500)); End;
2: IdleTime(100+random(700), 100+Random(100), 0.2+RandomE/2);
3: Begin GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(Tab_Inv); End;
4: HoverSkill('random', False);
5: RandomMovement;
End;
end;
Procedure ProgressReport;
begin
Cleardebug;
Writeln('You have been Pooning for:' + TimeRunning);
Writeln('Poons Bought:' + IntToStr(Poon*28));
end;
procedure Resting;
var
X,Y: Integer;
s: String;
begin
if not loggedin then exit;
FindNormalRandoms;
Antiban;
DidRedClick;
begin
if (Not runenergy(50)) then
begin
setrest;
Wait(10000+Random(5000));
RestUntil(80)
end;
end;
end;
Procedure BuyThosePoons;
Var
X,Y,I: Integer;
TPA : TPointArray;
ATPA : T2DPointArray;
begin
If not loggedin then exit;
FindNormalRandoms;
Antiban;
DidRedClick;
Timerunning;
begin
Resting;
end;
begin
SetAngle(SRL_ANGLE_HIGH);
MakeCompass('S');
if not invfull then
begin
if not shopscreen then
begin
If (FindObjCustom(x,y,['alk', 'talk'], [7841457, 926253, 8561065, 7118242, 7510954], 3)) Then
begin
MMouse(X, Y, 1, 1);
ClickMouse2(False);
Writeln('Talking to the Fisherman');
Wait(600+random(250));
Waitoption('rade', 3000);
Wait(3500+random(250));
end;
begin
If shopscreen then
begin
MouseBox(186, 55, 225, 98, 2);
begin
getmousepos(x, y);
Writeln('Buying dose poons');
ClickMouse2(False);
Wait(600+random(250));
Waitoption('00', 3000);
Wait(1500+random(250));
end;
begin
MouseBox(479, 13, 493, 27, 1);
begin
Wait(1000+random(500));
end;
end;
end;
end;
end;
end;
end;
Procedure WalkToTheDepositBox;
var
Path: TStringArray;
DoorDTM, X, Y, I: Integer;
TPA : TPointArray;
ATPA : T2DPointArray;
begin
if not loggedin then exit;
FindNormalRandoms;
Antiban;
DidRedClick;
if not invfull then
begin
buythosepoons;
end;
begin
Path:= ['626:102:4:1:7:605:69:1:7:597:98:1:7:656:97:3:7:646:131'];
for I := 0 to 0 do
ObjDTM_Walk(Path[i], 0, 100, 80, True);
Wait(2000+Random(500));
begin
DoorDTM := DTMFromString('mwQAAAHic42RgYPBnYmCwAuJkIPYDYmsgTgRiGyD2BeIEIBZlZGD4BVT7mwFCizBCxLSAWAeKLYzlGSrynBjKchwZagpdGTydNRnsrZQZ3B3VGVwc5cCYH6iXEGYkAsMBAAWQDm0=');
if FindDTMRotated(DoorDTM, x, y, 0, 0, 700, 500, -Pi, Pi, Pi/30, aFound) then
begin
MMouse(X, Y, 2, 2);
ClickMouse2(True);
Wait(2000+random(250));
end;
if not FindDTM(DoorDTM, x, y, 0, 0, 700, 500) then
begin
writeln('Doors Open');
Wait(1000+Random(500));
Path:= ['688:51:6:3:7:644:113:1:7:655:81:1:7:607:54:1:7:598:81:1:7:618:116:2:7:602:118'];
for I := 0 to 0 do
ObjDTM_Walk(Path[i], 0, 100, 80, True);
end;
FreeDtm(doorDTM) // FreeBitmap(Door);
end;
end;
end;
Procedure Flagcheck;
var
Path: TStringArray;
X, Y, I: Integer;
TPA : TPointArray;
ATPA : T2DPointArray;
begin
Wait(5000+Random(1000));
begin
Path:= ['666:56:1:1:7:592:113:1:669:57'];
//this one replace // '686:62:1:1:7:594:112' Might do box
for I := 0 to 0 do
ObjDTM_Walk(Path[i], 0, 100, 80, True);
Wait(2000+Random(500));
begin
Path:= ['644:86:3:3:7:593:39:3:7:609:31:3:7:597:27'];
for I := 0 to 0 do
ObjDTM_Walk(Path[i], 0, 100, 80, True);
Wait(2000+Random(500));
end;
end;
end;
Procedure DepositPoons;
var
X,Y,I: Integer;
TPA : TPointArray;
ATPA : T2DPointArray;
begin
if not loggedin then exit;
FindNormalRandoms;
Antiban;
DidRedClick;
Inc(Poon);
ProgressReport;
begin
resting;
end;
If Invfull then
begin
If not depositscreen then
begin
If (FindObjCustom(x,y,['eposit', 'deposit'], [5991031, 5924981], 2)) Then
begin
Writeln('Opening Deposit box');
MMouse(X, Y, 5, 5);
ClickMouse2(True);
Wait(3000+random(250));
end;
begin
If (FindObjCustom(x,y,['eposit', 'deposit'], [1854330, 1985922, 1655411, 1655411], 8)) Then
begin
Writeln('Depositing dose poons');
MMouse(X, Y, 3, 3);
ClickMouse2(True);
Wait(1000+random(250));
end;
end;
end;
end;
end;
Procedure BackToTheShop;
var
Path: TStringArray;
Door2DTM, Door3DTM, Door4DTM, X, Y, I: Integer;
begin
if not loggedin then exit;
FindNormalRandoms;
Antiban;
DidRedClick;
If invfull then
begin
DepositPoons;
end;
begin
If not invfull then
begin
Path:= ['569:87:1:3:7:588:31'];
for I := 0 to 0 do
ObjDTM_Walk(Path[i], 0, 100, 80, True);
Wait(2500+Random(500));
begin
Path:= ['610:142:3:3:7:635:36:3:7:652:27:3:7:640:23:1:610:142'];
for I := 0 to 0 do
ObjDTM_Walk(Path[i], 0, 100, 80, True);
Wait(2000+Random(500));
begin
Path:= ['568:97:2:1:7:597:85:3:7:587:119'];
for I := 0 to 0 do
ObjDTM_Walk(Path[i], 0, 100, 80, True);
Wait(4000+Random(500));
begin
SetAngle(SRL_ANGLE_HIGH);
MakeCompass('S');
Door2DTM := DTMFromString('mwQAAAHic42RgYMhgZGAIZoTQtUAcAsQ1QBwGxFVQ8SggdkbCkUAcDsSZUHkQbWIgy1Ca7chQme/MUJzlwODmoM5gb6nM4OIgC8f8QPsIYUYiMBwAABsUDnY=');
if FindDTMRotated(Door2DTM, x, y, 0, 0, 700, 500, -Pi, Pi, Pi/30, aFound) then
begin
MMouse(X, Y, 2, 2);
ClickMouse2(True);
Wait(2000+random(250));
end;
begin
if not FindDTM(Door2DTM, x, y, 0, 0, 700, 500) then
begin
writeln('Doors Open')
end;
begin
Door3DTM := DTMFromString('mwQAAAHic42RgYNjByMCwAIi3AfEZIF4CpVcC8Tkg3g3EG4B4DhDPhuJNQLwWiPcB8V4oNtKTZijOcmAoz3ViyE2xYXBzUGfwdtVkcHGQhWN+oH2EMCMRGA4Ao98UVQ==');
if FindDTMRotated(Door3DTM, x, y, 0, 0, 700, 500, -Pi, Pi, Pi/30, aFound) then
begin
MMouse(X, Y, 2, 2)
ClickMouse2(True)
Wait(2000+random(250))
end;
begin
Door4DTM := DTMFromString('mwQAAAHic42RgYFBmYmDgBWIrIFYFYn4gtgBiISA2Z4LIJzIyMHgAsTsUg/gJQFwCxIVQ2txInqEsxwmMKwtcGDydNRmCvPUY3JzkGewtlcE0P9A+QpiRCAwHAMUvDK4=');
begin
MMouse(X, Y, 2, 2);
ClickMouse2(True);
Wait(2000+random(250));
end;
begin
Path:= ['628:63:7:1:7:581:119:1:7:597:73:1:7:605:43:1:7:655:72:1:7:618:110:3:7:645:106:2:7:601:112'];
for I := 0 to 0 do
ObjDTM_Walk(Path[i], 0, 100, 80, True);
Wait(2000+Random(500));
end;
end;
FreeDtm(Door3DTM)
FreeDtm(Door4DTM)
end;
end;
end;
end;
end;
end;
end;
end;
begin
Smart_Server := 54;
Smart_Members := False;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
Loadvars;
ObjSetup;
Declareplayers;
if not (LoggedIn) then
LoginPlayer;
Repeat
Repeat
BuyThosePoons;
WalkToTheDepositBox;
Flagcheck;
DepositPoons;
BackToTheShop;
Until(Poon=42) or (not LoggedIn);
NextPlayer(Players[CurrentPlayer].Active);
Poon:=0;
Until(false);
