Lancelot074
2008-04-20 12:43:24
<!– BEGIN TEMPLATE: formanswers –>
lancelot074 - SRL Member Application Form
lancelot074
What is the meaning to life?
Where you Referred to SRL? If yes, by whom?
Programming Knowledge
None
Other Communitys
Couple game wesites
How Long have You Played Runescape
like 4 years
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
I like to learn new things, recently I have been learning new things in SCAR and using them to make even better script. This time I have tested my script vigorously and made sure it works. I got some pretty good progress reports with one player and fixed as many bugs as I could find. Enjoy.
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
——————————————————
<!– END TEMPLATE: formanswers –>
lancelot074 - SRL Member Application Form
lancelot074
What is the meaning to life?
Where you Referred to SRL? If yes, by whom?
Programming Knowledge
None
Other Communitys
Couple game wesites
How Long have You Played Runescape
like 4 years
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
I like to learn new things, recently I have been learning new things in SCAR and using them to make even better script. This time I have tested my script vigorously and made sure it works. I got some pretty good progress reports with one player and fixed as many bugs as I could find. Enjoy.
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
{//////////////////////////////////////////////////////////////
[ Script by : Lancelot074 ]
[ Version : 0.3 ]
---------------------------------------------------------------
Description : Kills men in Edgeville and collects bones.
---------------------------------------------------------------
-SETUP-
1.Place char(s) in Edgeville northern most bank booth.
2.Place make sure char(s) have a weapon.
3.Declare players, and run!
4.Post progress reports please.
History:
v.01 - first release
v.02 - Updated the walking a bit
v0.3 - Added multiplayer and other stuff
v0.4 - Fixed some bugs
credits to munk for some procedures from his chickenkiller
///////////////////////////////////////////////////////////////}
program ManPwner;
{.include srl/srl/misc/smart.scar}
{.include SRL/SRL.scar}
{.include srl/srl/skill/fighting.scar}
Const
YourSrlID = '';
YourSrlPassword = '';
Smartworld = 153;//World to auto in
Var
x, y, Loadsnumb, bones,i,killed,t,WalkDDTM,BankDTM,WakkDDTM:integer;
procedure DeclarePlayers;
begin
HowManyPlayers :=4;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer:=0;
Players[0].Name :='';//username
Players[0].Pass :='';//password
Players[0].Nick :='';//2-4 letters of username
Players[0].Active:=True;//Want to use player?
Players[0].Integers[1]:= 10;//Loads to do
Players[0].Pin := '0000';//bankpin, leave if have none
Players[0].Skill := 'Defence';//Attack, Strength or Defence
Players[1].Name :='';//username
Players[1].Pass :='';//password
Players[1].Nick :='';//2-4 letters of username
Players[1].Active:=True;//Want to use player?
Players[1].Integers[1]:= 10;//Loads to do
Players[1].Pin := '0000';//bankpin
Players[1].Skill := 'Attack';//Attack, Strength or Defence
Players[2].Name :='';//username
Players[2].Pass :='';//password
Players[2].Nick :='';//2-4 letters of username
Players[2].Active:=True;//Want to use player?
Players[2].Integers[1]:= 10;//Loads to do
Players[2].Pin := '0000';//bankpin
Players[2].Skill := 'Strength';//Attack, Strength or Defence
Players[3].Name :='';//username
Players[3].Pass :='';//password
Players[3].Nick :='';//2-4 letters of username
Players[3].Active:=True;//Want to use player?
Players[3].Integers[1]:= 10;//Loads to do
Players[3].Pin := '0000';//bankpin
Players[3].Skill := 'Attack';//Attack, Strength or Defence
end;
procedure Proggz; forward;
procedure LoadDTM;//thats right only one needed in multiple procedures, so far
begin
BankDTM := DTMFromString('78DA63FCC2C4C0F09C0105FCFFFF9FE13F906' +
'684B0FF337E06AAF900916381AA79FB16423342F98CEF816ABE10' +
'50F30EA8E60F116A5819F1AA01008CCF1804');
end;
procedure Setfight;
begin
if not LoggedIn then Exit;
GameTab(1);
case lowercase(players[currentplayer].skill) of
'attack': setfightmode(1);
'strength': setfightmode(2);
'defence': setfightmode(4);
end;
GameTab(4);
end;
function LoadWalkDDTM: integer;
var
WalkMP: TDTMPointDef;
WalkSP: array of TDTMPointDef;
WalkDDTM: TDTM;
begin
SetArrayLength(WalkSP, 3);
WalkMP.x := 652;
WalkMP.y := 36;
WalkMP.areasize := 1;
WalkMP.areashape := 0;
WalkMP.color := FindRoadColor;
WalkMP.tolerance := 0;
WalkSP[0].x := 628;
WalkSP[0].y := 51;
WalkSP[0].areasize := 1;
WalkSP[0].areashape := 0;
WalkSP[0].color := FindRoadColor;
WalkSP[0].tolerance := 0;
WalkSP[1].x := 685;
WalkSP[1].y := 49;
WalkSP[1].areasize := 1;
WalkSP[1].areashape := 0;
WalkSP[1].color := FindRoadColor;
WalkSP[1].tolerance := 0;
WalkSP[2].x := 642;
WalkSP[2].y := 63;
WalkSP[2].areasize := 1;
WalkSP[2].areashape := 0;
WalkSP[2].color := FindRoadColor;
WalkSP[2].tolerance := 0;
WalkDDTM.MainPoint := WalkMP;
WalkDDTM.SubPoints := WalkSP;
result := AddDTM(WalkDDTM);
end;
function LoadWakkDDTM: integer;
var
WakkMP: TDTMPointDef;
WakkSP: array of TDTMPointDef;
WakkDDTM: TDTM;
begin
SetArrayLength(WakkSP, 2);
WakkMP.x := 620;
WakkMP.y := 27;
WakkMP.areasize := 1;
WakkMP.areashape := 0;
WakkMP.color := 1721452;//only way
WakkMP.tolerance := 40;//findladdercolor is mucked up or something, will add autocolor soon
WakkSP[0].x := 647;
WakkSP[0].y := 34;
WakkSP[0].areasize := 1;
WakkSP[0].areashape := 0;
WakkSP[0].color := FindRoadColor;
WakkSP[0].tolerance := 0;
WakkSP[1].x := 623;
WakkSP[1].y := 52;
WakkSP[1].areasize := 1;
WakkSP[1].areashape := 0;
WakkSP[1].color := FindRoadColor;
WakkSP[1].tolerance := 0;
WakkDDTM.MainPoint := WakkMP;
WakkDDTM.SubPoints := WakkSP;
result := AddDTM(WakkDDTM);
end;
function Playersleft: Integer;
begin
result := 0;
for i := 0 to (HowManyPlayers - 1) do
if (Players[i].Active = True) then result := result + 1;
end;
procedure AntiBanz;
begin
if not LoggedIn then Exit;
case Random(80) of
0: begin
HoverSkill('Attack', false);
wait(2000+random(1000));
GameTab(4);
end;
1: PickUpMouse;
2: begin
HoverSkill('Hitpoints', false);
wait(2000+random(1000));
GameTab(4);
end;
4: BoredHuman;
5: AlmostLogout;
6: begin
HoverSkill('Strength', false);
wait(2000+random(1000));
GameTab(4);
end;
7: begin
HoverSkill('Defense', false);
wait(2000+random(1000));
GameTab(4);
end;
end;
end;
function underAttack(rx,ry:integer):boolean;
begin
if not(loggedIn) then exit;
if (findcolorspiral(x,y,65280,rx-5,ry-40,rx+5,ry+20))
or (findcolorspiral(x,y,255,rx-5,ry-40,rx+5,ry+20)) then
result:=true;
end;
function OpendatDoor(Turn: Boolean): Boolean;
var
TPA, TPA2: TPointArray;
C, X, Y, I: Integer;
TP: TPoint;
begin
MakeCompass('E');
if (not (LoggedIn)) then Exit;
for I := 0 to 3 do
begin
FindColorsSpiralTolerance(MSCX, MSCY, TPA,
4218994, 20, 20, MSX2 - 10, MSY2 - 10, 10);
for C := 0 to GetArrayLength(TPA) - 1 do
begin
TP := TPA[c];
FindColorsTolerance(TPA2, 4218994, TP.x - 25, TP.y -
25, TP.x + 25, TP.y + 25, 10);
if (GetArrayLength(TPA2) > 150) then
begin
MiddleTPAEx(TPA2, X, Y);
MMouse(X, Y, 5, 5);
if (Pos('lose', GetUpText) > 0) then
begin
Result := true;
Exit;
end
else
begin
if (Pos('pen', GetUpText) > 0) then
begin
GetMousePos(X, Y);
Mouse(X, Y, 1, 1, false);
ChooseOption('pen');
Result := true;
Exit;
end;
end;
end;
end;
if not Turn then
begin
Exit;
end
else
begin
ActivateClient;
Wait(125 + Random(25));
SendArrowSilentWait(1, 1100 + Random(150));
end;
end;
MakeCompass('N');
end;
procedure SetRetaliate(ret:boolean);
var
i:integer;
begin
if not(loggedIn) then exit;
gametab(1);
for i:=1 to 5 do
begin
case getColor(600,390) of
4540745: if ret=true then mouse(600+random(100),370+random(20),0,0,true) else exit;
1711220: if ret=false then mouse(600+random(100),370+random(20),0,0,true) else exit;
end;
wait(200);
end;
end;
Procedure SetupStuff;
begin
If not loggedin then exit;
MakeCompass('N');
SetAngle(True);
SetRun(True);
SetRetaliate(True);
Setfight;
GameTab(4);
end;
function Takebone: Boolean;
var
i,m,l: integer;
q: tpoint;
yb : tpointarray;
xr : t2dpointarray;
Color1: array [0..2] of Integer;
begin
if not LoggedIn then Exit;
m := 0;
Color1[0] := 12171970;
Color1[1] := 12764106;
Color1[2] := 13487571;
wait(100+random(250));
repeat
for i := 0 to 2 do
begin
Findcolorstolerance(yb,Color1[i],MSx1,MSy1,MSx2,MSy2,4);
xr := TpaToATPAex(yb,5,5);
for l:= 0 to high(xr) do
begin
if length(xr[l]) > 1 then
begin
q := MiddleTPA(xr[l]);
if (q.x <> 0) and (q.y <> 0) then
begin
Mouse(q.x,q.y,5,5,False);
wait(500);
if ChooseOption('one') then
begin
wait(150);
result := true;
bones := bones + 1;
ReportVars[1] := ReportVars[1] + 1;
SendSRLreport;
Players[currentplayer].integers[2] := Players[currentplayer].integers[2] + 1;
findnormalrandoms;
Fflag(1);
Wait(500+random(500));
proggz;
end;
end;
end;
end;
end;
until(true);
end;
procedure PwnMan;
var
i,m,p,l: integer;
q: tpoint;
tt : tpointarray;
rr : t2dpointarray;
Color1: array [0..3] of Integer;
begin
if not LoggedIn then Exit;
if finddead then exit;
m := 0;
Color1[0] := 5456450;
Color1[1] := 4214848;
Color1[2] := 4017469;
Color1[3] := 1587298;
SetupStuff;
Disguise('Pwning men and picking bones');
wait(1000);
repeat
for i := 0 to 3 do
begin
Findcolorstolerance(tt,Color1[i],MSx1,MSy1,MSx2,MSy2,4);
rr := TpaToATPAex(tt,5,5);
for l:= 0 to high(rr) do
begin
if length(rr[l]) > 1 then
begin
q := MiddleTPA(rr[l]);
if (q.x <> 0) and (q.y <> 0) then
begin
if not(underAttack(q.x,q.y)) then
begin
Mouse(q.x,q.y,5,5,False);
wait(500);
if ChooseOption('ttack') then
begin
wait(150);
MarkTime(p);
while TimeFromMark(p) < 8000 do
begin
FindNormalRandoms;
Takebone;
end;
Killed := Killed + 1;
ReportVars[0] := ReportVars[0] + 1;
SendSRLreport;
Players[currentplayer].integers[5] := Players[currentplayer].integers[5] + 1;
proggz;
end;
end;
end;
end;
end;
end;
until(Invfull);
end;
procedure Walktomen;
begin
if not LoggedIn then Exit;
Disguise('Walking to men...');
WalkDDTM := LoadWalkDDTM;//i think it looks cooler
WakkDDTM := LoadWakkDDTM;
MakeCompass('N');
Setangle(true);
if Dtmrotated(WalkDDTM,x,y,mmx1,mmy1,mmx2,mmy2) then
begin
Mouse(x,y,3,3,true);
Flag;
Opendatdoor(true);
findnormalrandoms;
end else
if not RadialRoadWalk(FindRoadColor, 9, 30, 70, 0, 0) or
not RadialRoadWalk(FindRoadColor, 6, 20, 66, 0, 0) then
Mouse(641,31,5,5,true);//triple failsafe? :p
FFlag(3);
Opendatdoor(true);
if Dtmrotated(WakkDDTM,x,y,mmx1,mmy1,mmx2,mmy2) then
begin
Mouse(x,y,3,3,true);
Flag;
end else
RadialWalk(FindLadderColor , 263, 300, 35, 0, 0);
FreeDTM(WalkDDTM);
FreeDTM(WakkDDTM);
end;
procedure Walktobank;
begin
if not LoggedIn then Exit;
if Invfull then
begin
MakeCompass('n');
Disguise('To the bank!');
WalkDDTM := LoadWalkDDTM;
WakkDDTM := LoadWakkDDTM;
if Dtmrotated(WakkDDTM,x,y,mmx1,mmy1,mmx2,mmy2) then
begin
Mouse(x,y,3,3,true);
Flag;
end;
Opendatdoor(true);
MakeCompass('n');
Findnormalrandoms;
wait(500+random(250));
if Dtmrotated(WalkDDTM,x,y,mmx1,mmy1,mmx2,mmy2) then
begin
Mouse(x,y,3,3,true);
Flag;
end;//almost at the bank at this point, you can see the symbol sometimes, just need to make sure it gets close enough
if not RadialRoadWalk(FindRoadColor, 196, 212, 45, 0, 0) or
not RadialRoadWalk(FindRoadColor, 192, 216, 42, 0, 0) then
Mouse(609,111,7,7,true);//usually works, only as a triple failsafe is the walking messes up somehow
repeat
symbolaccuracy := symbolaccuracy - 0.05;
wait(500+random(1000));
FindNormalRandoms;
T := t + 1;
until (FindSymbol(x,y,'bank')) or (t = 6);
if(FindSymbol(x,y,'bank'))then
begin
Mouse(x, y, 4, 4,true);
FFlag(5);
end;
if Dtmrotated(BankDTM,x,y,mmx1,mmy1,mmx2,mmy2) then
begin
Mouse(x,y,3,3,true);
Flag;
end;
end;
symbolaccuracy := 0.8;
FreeDTM(WalkDDTM);
FreeDTM(BankDTM);
FreeDTM(WakkDDTM);
end;
Procedure Banko;
var
time: Integer;
begin
MarkTime(time);
Disguise('Banking');
repeat
if not Loggedin then break;
OpenBankfast('eb');
if pinscreen then inpin(Players[currentplayer].pin);
until(BankScreen or (TimeFromMark(time) > 120000));
if Bankscreen then
begin
Deposit(1, 28, 28);
Loadsnumb := Loadsnumb + 1;
CloseBank;
FindNormalRandoms;
proggz;
if Dtmrotated(BankDTM,x,y,mmx1,mmy1,mmx2,mmy2) then
begin
Mouse(x,y,3,3,true);//need to get to spot so DDTM finding works properly
Flag;
end;
end;
FreeDTM(BankDTM);
end;
procedure Proggz;
begin
ClearDebug;
WriteLn('-----------------MAN-----PWNER-----------------');
WriteLn(' -By:Lancelot074- ');
WriteLn('//============================================\\');
WriteLn('ManPwner has been running for ' + Timerunning);
WriteLn('We have pwned ' + inttostr(killed) + ' men altogether.');
WriteLn('We have gathered ' + inttostr(bones) + ' bones altogether.');
WriteLn(' ');
for i := 0 to (HowManyPlayers - 1) do
begin
if players[i].integers[5] > 0 then
WriteLn('"' +Players[i].nick + '"' + '(' + BooltoStr(players[i].Active) + ')' +' has killed ' + inttostr(players[i].integers[5]) + ' men.');
if players[i].integers[2] > 0 then
WriteLn('"' +Players[i].nick + '"' +' has collected ' + inttostr(players[i].integers[2]) + ' bones.');
WriteLn(' ');
end;
WriteLn('\\============================================//');
end;
procedure Setupscript;
begin
SmartSetupEx(Smartworld,false,true);
SetTargetDC(SmartGetDC);
while not(smartready) do wait(1000);
SetupSRL;
ScriptID := '761';
SRLID := YourSRLID;
SRLPassword := YourSRLPassword;
DeclarePlayers;
LoginPlayer;
end;
begin
Setupscript;
repeat
LoadWalkDDTM;
LoadWakkDDTM;
LoadDtm;
Walktomen;
PwnMan;
if not loggedin then nextplayer(false);
Takebone;
Proggz;
if Invfull then
begin
LoadWalkDDTM;
LoadWakkDDTM;
Walktobank;
LoadDTM;
Banko;
if (Players[CurrentPlayer].Integers[1]) = Loadsnumb then
begin
Logout;
NextPlayer(True);
LoadsNumb:=0;
end;
end;
until(Playersleft = 0);
proggz;
end.——————————————————
<!– END TEMPLATE: formanswers –>