//EDGEVILLE MAN KILLER - MADE BY ~JUSTIN
program EdgeManKiller;
{.include SRL/SRL/Misc/Smart.scar}
{.include SRL/SRL.scar}
{.include SRL/SRL/Skill/Fighting.scar}
{$i sps/sps.simba}
{$DEFINE UseLaptopMouse}
var
ManColours : TIntegerArray;
x, y, i, StartAttack, StartStrength, StartDefence, StartHitpoints, CurrentAttack, CurrentStrength, CurrentDefence, CurrentHitpoints, LevelPopUp, NoThanks, xx,yy : integer;
WalkBank,WalkMen,MyTPA: TPointArray;
MyPoint : TPoint;
const
Tolerance = 2; //Make higher if it wont attack;
Version = '0.501'; //Please don't change.
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
With Players[0] do
begin
Name := '@gmail.com'; //Character Name
Pass := ''; //Character Pass
Pin := ''; //Pin for bank
Active := True;
end;
end;
function GetCustomXP(skill: variant): integer;
var
b: TBox;
p: TPoint;
tpa: TPointArray;
begin
result := -1;
if (not gameTab(TAB_STATS)) then
exit;
p := skillToCoords(skill);
if (p.x < 1) then
exit;
mmouse(p.x, p.y + 5, 12, 4);
Wait(150);
if (WaitFindColors(tpa, 921102, MIX1, MIY1, MIX2, MIY2, 0, 3000)) then
begin
b := getTPABounds(tpa);
Result := strToIntDef(getNumbers(getTextAt(b.x1 + 15, b.y1 + 15, 0, 1, 4, 4305653, 0, 75, smallChars)), -1);
end;
end;
function WalkToBank: Boolean;
begin
WalkBank := [Point(4224, 2633),Point(4208, 2649),Point(4210, 2667)]
SPS_WalkPath(WalkBank)
end;
function WalkToMen: Boolean;
begin
WalkMen := [Point(4208, 2649),Point(4232, 2608)]
SPS_WalkPath(WalkMen)
end;
procedure CheckRandoms;
begin
if not(LoggedIn) then
begin
WriteLn('I think we failed a random - I will just Check');
LoginPlayer;
FindNormalRandoms;
if not(LoggedIn) then
begin
WriteLn('Client has Logged Out So Probably Failed a Random - Terminating Script');
TerminateScript;
end ;
end;
if (FindBitMap(LevelPopUp,x,y)) then
begin
FreeBitmap(LevelPopUp);
FindBitMap(NoThanks,xx,yy)
Mouse(xx,yy,3,3,true);
FreeBitmap(NoThanks);
end;
FindNormalRandoms;
end;
procedure Attack;
var Xi, Yi:integer;
begin
if InFight then
begin
repeat
FindNormalRandoms;
until (not (OthersInFight) or (not LoggedIn) or (not InFight))
end;
x := Random(8)
case x of
4: WalkToMen; //Failsafe if we get lured
end;
if FindObjCustom(Xi, Yi, ['ttack'], ManColours, Tolerance) then
begin
if not (IsFightAt(Xi, Yi) and not InFight) then
begin
GetMousePos(Xi, Yi);
Mouse(Xi, Yi, RandomRange(0,5), RandomRange(0,5), false);
WaitOptionMulti(['ttack M', 'attack Man'], 200);
end;
while IsMoving do
begin
Wait(250);
end;
end;
SetAngle(True);
end;
procedure AntiBan;
begin
x := Random(500)
case x of
0: HoverSkill('Attack', False);
1: HoverSkill('Strength', False);
2: HoverSkill('Defence', False);
3: HoverSkill('hitpoints', False);
12..15: PickUpMouse;
16..25: RandomMovement;
26..27: RandomRClick;
28..32: BoredHuman;
33: ExamineInv;
34: RandomAngle(True);
end;
end;
function DoBanking: Boolean;
var
FailSafe: Integer;
begin
if not (LoggedIn) then
Exit;
while (IsMoving) do
begin
Wait(RandomRange(900, 1200));
end;
FailSafe := 0;
repeat
Inc(FailSafe);
MakeCompass('w');
Wait(RandomRange(400, 1200));
OpenBankNPC;
until BankScreen or PinScreen or (FailSafe = 7);
if PinScreen then
begin
repeat
InPin(Players[0].Pin);
until BankScreen or not (LoggedIn);
end;
if BankScreen then
begin
Withdraw(0,0,RandomRange(17,28));
CloseBank;
WalkToMen;
end;
if (FailSafe = 7) then
begin
Writeln('We failed to find the bank 7 times. Terminating script.');
TerminateScript;
end;
end;
procedure Report;
begin
CurrentAttack := GetCustomXP(0);
CurrentStrength := GetCustomXP(2);
CurrentDefence := GetCustomXP(1)
CurrentHitpoints := GetCustomXP(3);
Writeln('||=====');
Writeln('||===== Attack EXP Gained : ' + IntToStr(CurrentAttack - StartAttack));
Writeln('||===== Strength EXP Gained : ' + IntToStr(CurrentStrength - StartStrength));
Writeln('||===== Defence EXP Gained : ' + IntToStr(CurrentDefence - StartDefence));
Writeln('||===== Hitpoints EXP Gained : ' + IntToStr(CurrentHitpoints - StartHitpoints));
Writeln('||=====');
exit;
end;
procedure HpCheck; //Credits to Narcle
var
c, T, i, x, y:Integer;
begin
if (HPPercent < RandomRange(45,65)) and LoggedIn then
begin
if not InvEmpty then
for c := 0 to 2 do
for i := 1 to 28 do
if ExistsItem(i) then
begin
MMouseItem(i);
GetMousePos(x, y);
if WaitUptext('Eat', 400) then
begin
Mouse(x,y,0,0,false);
if WaitOption('Eat', 400) then
begin
t := GetSystemTime;
while ExistsItem(i) and ((GetSystemTime-t) < 2000) do
wait(20);
end;
Exit;
end;
end;
if InvEmpty then
begin
WalkToBank;
If IsMoving then
repeat
Wait(500);
until not (IsMoving);
Report;
DoBanking;
WalkToMen;
Exit;
end;
end;
end;
procedure VersionCheck();
var
oVersion : string;
begin
oVersion := GetPage('http://web.aanet.com.au/SRLJustin/EdgevilleManKiller/edgeman_version.txt');
if(oVersion <> Version)then
begin
WriteLn('The version you''re using is outdated!');
WriteLn('Downloading new version...');
if(WriteFileString(RewriteFile(ScriptPath + 'EdgeManKiller ~Justin.simba', True), GetPage('http://web.aanet.com.au/SRLJustin/EdgevilleManKiller/edgeman_script.txt')))then
WriteLn('Successfully downloaded the script! Please close the script and re-open to see the changes, thank you!');
TerminateScript;
end
else
WriteLn('You have the current version, good to go!');
end;
begin
Cleardebug;
Writeln('Please wait while I check your script version...');
VersionCheck();
ManColours := [1977911,3099988,1781298,3556934,3033449,3100779,5277332,7774421,1518669,2696227,4279104];
Smart_Server := 97;
Smart_Members := False;
Smart_Signed := False;
Smart_SuperDetail := False;
SetupSRL;
DeclarePlayers;
LoginPlayer;
SPS_Areas := ['10_6'];
SPS_Setup(RUNESCAPE_SURFACE, SPS_Areas);
Writeln('Welcome to ~Justin''s Edgeville Man Killer! Verson: '+ Version);
Wait(800);
Writeln('Grabbing starting EXP...');
MouseSpeed := RandomRange(17,22);
StartAttack := GetCustomXP(0); //atk
StartStrength := GetCustomXP(2); //str
StartDefence := GetCustomXP(1) //def
StartHitpoints := GetCustomXP(3); //hp
Writeln('Grabbed and saved starting EXP!');
WalkToMen;
LevelPopUp := BitmapFromString(22, 42, 'meJytlVFIU2EUx0lpU+emu3fmYE' +
'7nNpzioIjZMiaYOlOn2Z2WuhRdZelSclpiI600ycKKsgyiguohCnz' +
'0ITJ86alegwp6Dnrtrbf+957xeXfvnQsM/hzOPff8f/d83+79Vmh1' +
'Fu5Mh1pPHGzuQqzvONkgDAS7o4gVtfUd/TFUqF7TKNSF+pAjQuhBn' +
'p3HZetN2XojGSEUISTwIg6MXUYz3SLX6ss14lPUmUugPN52Kj4Xm7' +
'mBCAsiJETHu4cnkfSNXoJQhxYfPkcbEsSzUj8joB916iTLkchZFAf' +
'jsxCKPSPTAEIspzZ4CaImvPr088G7Lwo93viqFjrtDo29xS1drr9N' +
'eBLqWkWEmjtWSYdDy0w5ehc6QdDv8SiEJ5a5b1W1bkKVLRuUqC9Nj' +
'jg6S8tduWV+uUxOP+pc8QX0FHnvVfjvFFcs8JVLyBG9gbsl3pvIcV' +
'dvEohgqGpj4ryiUDcXxdDDVy2Nza2//fCt2LOAHPaP3381HX8GlEg' +
'whohg3N/P+yJyTdx/w0szwMW752duvweE7J1DLzj3PCOgEwSFnQj5' +
'ljh6LBIBuray+eP3H9jFSxQlQo6xhQiW2iGFGIHsHt8inv7o9WdMY' +
'nVfwQyca15N4AMxpsHZlXxLjAhkb488LbQnphbWGYQI6BRXIfOSjo' +
'7OGrgz6IFrZHqN7JxjjiB4PQrsCYkQRKeaUNKQQtAUEXSGpiShfir' +
'dDNtLTrAFJ8lLCepZu6v1prDOEIT0xnYS8hxjs1RsgnZllW6tgiAY' +
'RkpQ/0d1phLMdRMEsZe7MssBOWGHmJHNQPNQwoQdhmyBqLUmbPI05' +
'tv3FVid3acnILVdU1uEA72M0H9+BtK2tyVEZZqBCBpPlNulxBmKE4' +
'QIBe46IvSeuwgp+1NV3p5Qz8B7tAhqoxQhNkCGGXZAoDa5l10m89R' +
'VcL4eEAy2araT8sfJpUnAOWDeG2aEnuEpiNpcQsIVvq6AYH75Eugk' +
'kRNoBhhFCSJEY5LUARQE2ockQQWRv1H05aoJ9FaTPbkQQcNOhORh6' +
'ItoEhQbqP4i2AzahDSTKwhsBvwlqX9NjYWzz1w6OdMR2Bul/hIZRG' +
'FXrGLrrU5/LMh/BSLIZ6B90DbSoRGIbU84Fh2HMtoZId0+aNhV/2L' +
'/i6BeRfzqMvQX5OsJfg==');
NoThanks := BitmapFromString(75, 14, 'meJztks1qAkEQhN8hBy9CEJSAIu' +
'IhSH4ugiB4UBD0oMccPOUNfDUfJve8REYGyqJ6undXEBECH8t0b1V' +
'Nz+5svo+bW/Kx2t83Z7E/MCknIR3RxLA+rU8/v00TiplX58y2XyDn' +
'5CjuoKxE9E3tNWMb8bncAT4gd7gEbJQECLi0rmIfRu7bMeIQ5m2+B' +
'sjJT+5gDXLT2lnAgeIqpnn6q0dK9CdTIAfkjv0X0BQT2M5Gdtk0T2' +
'8Xshd2jAkC7WzxAWuW3kG8eby3wem6o3cAC69lC6v0EuJSble8C/9' +
'Zu13xFXjuvwIE8lq2tkovISi9C1+pt5tKgsyTaL+MAWRcxiOxnRPy' +
'q2JgnQMGehHE85zpDcFFRiU6cqkgE4qfxebHV1T01sj3Np6n1RkwS' +
'SYld/iLidFz2cBiWqVejPXneWr3/nlo/gDohg86');
repeat
Attack;
AntiBan;
HpCheck;
CheckRandoms;
until(false)
end.
From: YoHoJo
http://villavu.com/forum/showthread.php?t=70152&highlight=Warning!+passed+wrong+finder+function
Answer there. Bascailly it's something up with FindObj, and it's not even really a problem unless it makes your mouse act odd.
Also in your Mouse, why RandomRange(0,5) you can just put 5…?
Had a look at that post, didn't seem to solve my issue.
Okay i'll make that change