okokokok
2013-06-21 06:14:50
How Long have You Played Runescape?
5 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
Pascal
Are you a member of any other communities?
None related to Runescape
Tell us about yourself…
Please show us one (or multiple) of your scripts.
5 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
Pascal
Are you a member of any other communities?
None related to Runescape
Tell us about yourself…
From: okokokok
Well I'm 20 years old and I'm from Holland. I've played RS for around 5 years (with breaks). I joined SRL around 2 years ago. Started scripting a bit back then and took a few major breaks of RS as well as scripting.
Now with RS07 I'm back and also started scripting again. I've done more scripting than ever and also learned alot lately.
Therefore I think that i'm ready to apply and hopefully learn more about scripting for RS and maybe even other programming languages.
Thank you for your time to view my application and script.
Please show us one (or multiple) of your scripts.
program OkOkOkOk_AKCBaller_Application_Version;
{$DEFINE SMART8}
{$I SRL-OSR/SRL.Simba}
{$i SRL-OSR\SRL\misc\debug.simba}
{$I SPS/sps-osr.simba}
var
x,y,t,Timeout,LoadsDone,Loads ,LoadsPerHour ,CBallsMade,CBallsPH, TimeDone, CurrentXP, OriginalXP, XPGain, XPGainPH: Integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 4;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer:= 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Pin := '';
Players[0].Active:= True;
Players[0].LampSkill := Skill_Prayer;
Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := '';
Players[1].Pin := '';
Players[1].Active:= True;
Players[1].LampSkill := Skill_Prayer;
Players[2].Name := '';
Players[2].Pass := '';
Players[2].Nick := '';
Players[2].Pin := '';
Players[2].Active:= True;
Players[2].LampSkill := Skill_Prayer;
Players[3].Name := '';
Players[3].Pass := '';
Players[3].Nick := '';
Players[3].Pin := '';
Players[3].Active:= True;
Players[3].LampSkill := Skill_Prayer;
end;
////////////////////////////////////////////
/////////// AntiBan Procedure ///////////
/////////// Made by OkOkOkOk ///////////
////////////////////////////////////////////
procedure AntiBan;
begin
FindNormalRandoms;
case Random (1500) of
0..15: RandomRClick;
50..65: PickUpMouse;
90..105: RandomRClick;
115..120: RandomMovement;
160..180: ExamineInv;
230..250:
begin
HoverSkill('random', false);
sleepandmovemouse(276 + Random(100));
PickUpMouse;
ChooseOption('Cancel');
SetAngle(SRL_ANGLE_HIGH);
end;
300..320: BoredHuman;
350..390: PickUpMouse;
420..450: RandomRClick;
280..299: RandomMovement;
460..480: SleepAndMoveMouse(3000 + Random(500));
end;
end;
/////////////////////////////////////////////
/////////// GetXP Adjustment ///////////
/////////// Adjusted by OkOkOkOk ///////////
/////////////////////////////////////////////
function GetXPCustom(skill: variant): integer;
var
MouseTB,b: TBox;
rcc: TPoint;
tpa: TPointArray;
begin
result := -1;
if(not TabExists(tab_Stats)) or (not gameTab(tab_Stats)) then
exit;
rcc:= SkillToPoint(skill);
MouseTB := SkillBoxCoords(rcc.x,rcc.y);
if (MouseTB.X1 < 1) then
exit;
MMouse(MouseTB.X1+2,MouseTB.Y1+2, 1, 1);
wait(400 + random(200));
if (WaitFindColors(tpa, 10551295, MIX1, MIY1, MIX2, MIY2, 0, 3000)) then
begin
b := getTPABounds(tpa);
wait(450 + random(150));
result := strToIntDef(getNumbers(GetTextAtExWrap(b.x1+15, b.y1+2,b.x2-2,
b.y1+13, 0, 5, 1, 0, 0, 'smallChars07')), -1);
end;
end;
////////////////////////////////////////////
/////////// Proggy Report ///////////
/////////// Made by OkOkOkOk ///////////
////////////////////////////////////////////
procedure ProgressReport;
begin
ClearDebug;
Loads := (LoadsDone);
TimeDone := (GetTimeRunning/1000);
LoadsPerHour := (3600 * (Loads) / (TimeDone));
CBallsMade := (Loads * 108);
CBallsPH := (3600 * (CBallsMade) / (TimeDone));
CurrentXP := GetXPCustom('smithing');
XPGain := (CurrentXP - OriginalXP);
XPGainPH :=(3600*(XPGain))/((TimeDone));
begin
Writeln('****************************************************************');
Writeln('******************** OkOkOkOk AKCBaller ************************');
Writeln('****************************************************************');
Writeln('Proggy for the player: ' + Players[0].Nick + '');
Writeln('Time running: ' + IntToStr(GetTimeRunning/60000) + ' Minutes ');
Writeln('We have gained: ' + IntToStr(XPGain) + ' Smithing xp / Thats ' + IntToStr(XPGainPH) + ' Smithing xp per hour ');
Writeln('We have done: ' + IntToStr(Loads) + ' Loads / Thats ' + IntToStr(LoadsPerHour) + ' Loads per hour ');
Writeln('We have made: ' + IntToStr(CBallsMade) + ' Cannonballs / Thats ' + IntToStr(CBallsPH) + ' Cannonballs per hour');
end;
end;
//////////////////////////////////////////////////////
/////////// Epic Ultimate North Functions ///////////
/////////// Made by Flight ///////////
//////////////////////////////////////////////////////
{*******************************************************************************
Function GenerateWallDTM(WallType, WallLength: Integer): Integer;
By: Flight
Description: Creates a DTM of a perfectly straight wall.
-WallType : 1 for vertical, 2 for horizontal
-WallLength: Length of the DTM to be generated
*******************************************************************************}
function GenerateWallDTM(WallType, WallLength: Integer): Integer;
var
i: Integer;
TempTDTM: TDTM;
mPnt: TDTMPointDef;
sPnts: array of TDTMPointDef;
begin
SetArrayLength(sPnts, (WallLength-1));
mPnt.x := 0;
mPnt.y := 0;
mPnt.AreaSize := 0;
mPnt.AreaShape := 0;
mPnt.Color := 16119287;
mPnt.Tolerance := 40;
for i:=0 to High(sPnts) do
begin
case WallType of
1:
begin
sPnts[i].x := 0;
sPnts[i].y := i+1;
end;
2:
begin
sPnts[i].x := i+1;
sPnts[i].y := 0;
end;
end;
sPnts[i].AreaSize := 0;
sPnts[i].AreaShape := 0;
sPnts[i].Color := 16119287;
sPnts[i].Tolerance := 40;
end;
TempTDTM.MainPoint := mPnt;
TempTDTM.SubPoints := sPnts;
Result := AddDTM(TempTDTM);
end;
{*******************************************************************************
Function GetLongestWallLength(WallType: Integer): Integer;
By: Flight
Description: Determines the longest wall on your MM at any compass angle.
-WallType: 1 for vertical walls, 2 for horizontal walls
*******************************************************************************}
function GetLongestWallLength(WallType: Integer): Integer;
var
B: TBox;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
ColorToleranceSpeed(1);
FindColorsSpiralTolerance(MMCX, MMCY, TPA, 16119287, MMX1, MMY1, MMX2, MMY2, 40);
if (Length(TPA)<1) then
Exit;
RAaSTPA(TPA, 1);
if (WallType = 1) then
SplitTPAExWrap(TPA, 2, 3, ATPA)
else
SplitTPAExWrap(TPA, 3, 2, ATPA);
SortATPASize(ATPA, True);
B := GetTPABounds(ATPA[0]);
if (WallType = 1) then
Result := (B.Y2-B.Y1)
else
Result := (B.X2-B.X1);
end;
{*******************************************************************************
Function ForceMapNorth: Boolean;
By: Flight
Description: Using auto-generated wall DTMs, this function will attempt to
rotate the compass to near-perfect north. Should it fail it will revert
back to default north.
*******************************************************************************}
Function ForceMapNorth: Boolean;
var
Left: Boolean;
StartAngle: Extended;
X,Y,DTM_VertWall,
DTM_HorWall,T,F,L1,L2: Integer;
label
Start,FuncEnd;
begin
Result := False;
L1 := GetLongestWallLength(1);
L2 := GetLongestWallLength(2);
if (L1 > 50) then
L1 := 50;
if (L2 > 50) then
L2 := 50;
DTM_VertWall := GenerateWallDTM(1, Round(L1*0.85)); //Create a DTM 85% of the length of the longest vertical wall
DTM_HorWall := GenerateWallDTM(2, Round(L2*0.85)); //Create a DTM 85% of the length of the longest horizontal wall
if (FindDTM(DTM_VertWall, X, Y, MMx1, MMy1, MMx2, MMy2) or
FindDTM(DTM_HorWall, X, Y, MMx1, MMy1, MMx2, MMy2)) then
begin
Result := True;
GoTo FuncEnd;
end;
StartAngle := (rs_GetCompassAngleDegrees);
Left := (Round((360 - StartAngle)) mod 360 <= Round((StartAngle + 360)) mod 360);
Start:
if (F > 0) then
MakeCompass('N');
MarkTime(T);
Repeat
TypeByte((Ord(not Left) * 2) + 37); //No holding down, actually press the arrow key
if (FindDTM(DTM_VertWall, X, Y, MMx1, MMy1, MMx2, MMy2) or
FindDTM(DTM_HorWall, X, Y, MMx1, MMy1, MMx2, MMy2)) then
break;
Until(TimeFromMark(T) >= 1000)
FuncEnd:
if ((not FindDTM(DTM_VertWall, X, Y, MMx1, MMy1, MMx2, MMy2)) and
(not FindDTM(DTM_HorWall, X, Y, MMx1, MMy1, MMx2, MMy2))) then
begin
Inc(F);
StartAngle := (rs_GetCompassAngleDegrees);
Left := (Round((360 - StartAngle)) mod 360 <= Round((StartAngle + 360)) mod 360);
if (F < 2) then
GoTo Start;
end else if ((X > 1) and (Y > 1)) then
Result := True;
if not Result then
MakeCompass('N');
FreeDTM(DTM_VertWall);
FreeDTM(DTM_HorWall);
end;
////////////////////////////////////////////
/////////// LevelUpCheck Function //////////
/////////// Made by OkOkOkOk //////////
////////////////////////////////////////////
function LevelUpCheck: Boolean;
var AnvilDTM: Integer;
begin
AnvilDTM := DTMFromString('mwQAAAHic42RgYHABYnUgNgNidyCOBOJYIA4CYjsgNgBiRyYGBiMg1oFiPSAOAeJIII6CstMT4hliw8MZArw9wdjdyQmOo0JCwGJcQLMIYUYiMBwAADqZDXE=');
if finddtm(AnvilDTM,x,y,4,342,516,476) then
begin
writeln('Leveled up!');
result := true;
end;
freedtm(AnvilDTM);
end;
////////////////////////////////////////////
/////////// Smelt Procedures ///////////
/////////// Made by OkOkOkOk ///////////
////////////////////////////////////////////
Function NoSteelBar: Boolean;
var SteelbarDTM: Integer;
begin
SteelbarDTM := DTMFromString('mlwAAAHicY2dgYMhlYmBIBuIcIC4B4kIgzgbiDCD+C5RnYWRgYAdiBiD+yQDB/4C4srCAwc7SEoxBbBgO8PZk4ALK48KMeDAUAACcIQ7+');
if not(finddtm(SteelbarDTM,x,y,MIX1,MIY1,MIX2,MIY2)) then
result := true;
freedtm(SteelbarDTM);
end;
Function SteelBarInBank: Boolean;
var SteelbarDTM: Integer;
begin
SteelbarDTM := DTMFromString('mlwAAAHicY2dgYMhlYmBIBuIcIC4B4kIgzgbiDCD+C5RnYWRgYAdiBiD+yQDB/4C4srCAwc7SEoxBbBgO8PZk4ALK48KMeDAUAACcIQ7+');
if finddtm(SteelbarDTM,x,y,MSX1,MSY1,MSX2,MSY2) then
result := true;
freedtm(SteelbarDTM);
end;
procedure SmeltCball;
var SteelBarDTM,SteelBarAfterFurnaceDTM, FurnaceDTM: Integer;
begin
AntiBan;
SteelbarDTM := DTMFromString('mlwAAAHicY2dgYMhlYmBIBuIcIC4B4kIgzgbiDCD+C5RnYWRgYAdiBiD+yQDB/4C4srCAwc7SEoxBbBgO8PZk4ALK48KMeDAUAACcIQ7+');
FurnaceDTM := DTMFromString('mrAAAAHic42BgYJgAxP1APAeIFwDxLCDuAeImIG4D4l1AvBqI1wPxHiA+BsQngfgAEG8CYnMjIzA2NjBg0NPRAdNWpqZwzAVUgw8zEsAwAABEOA+J');
SteelBarAfterFurnaceDTM := DTMFromString('mWAAAAHicY2FgYHgPxF+B+A+UvY6RgWEBEC8C4rlAfHrXVAY7S0s45gKqQcaMaBgEAJNhCrs=');
gametab(tab_inv);
if finddtm(SteelBarDTM,x,y,MIX1,MIY1,MIX2,MIY2) then
begin
mmouse(x,y,0,0);
wait(300 + random(50));
mouse(x,y,0,0,true);
wait(600 + random(100));
if finddtm(FurnaceDTM,x,y,MSX1,MSY1,MSX2,MSY2) then
begin
mmouse(x,y,0,0);
wait(300 + random(50));
mouse(x,y,0,0,true);
wait(3000 + random(50));
if finddtm(SteelBarAfterFurnaceDTM,x,y,4,342,516,476) then
begin
wait(250 + random(50));
mmouse(x,y,0,0);
wait(600 + random(100));
mouse(x,y,0,0,false);
wait(100 + random(50));
if chooseoption('ake All') then
repeat
begin
wait(200 + random(200));
FindNormalRandoms;
wait(200 + random(200));
FindNormalRandoms;
wait(200 + random(200));
FindNormalRandoms;
wait(200 + random(200));
FindNormalRandoms;
wait(200 + random(200));
FindNormalRandoms;
wait(200 + random(200));
FindNormalRandoms;
end;
until (NoSteelBar = true) or (LevelUpCheck = True);
Inc(LoadsDone);
end
else
begin
Players[CurrentPlayer].Active := False;
LogOut;
Exit;
end;
end;
end;
ProgressReport;
if not(loggedin) then
Exit;
freedtm(SteelBarAfterFurnaceDTM);
freedtm(SteelBarDTM);
freedtm(FurnaceDTM);
end;
////////////////////////////////////////////
/////////// PinCheck Function ///////////
/////////// Made by OkOkOkOk ///////////
////////////////////////////////////////////
Function PinCheck: Boolean;
var ChestDTM, CoinsDTM: Integer;
begin
ChestDTM := DTMFromString('mwQAAAHic42RgYNjEyMAwC4iXAfFmIN4DxHuh7KVAPBeI1wPVTQbiSVB6BUgfEO+B4rVA/OxhMMOOjiyGGVmhDG56KgwVgXYMevIiYDaIBolzAdURwoxEYDgAADgAFdo=');
CoinsDTM := DTMFromString('m6wAAAHic42ZgYLjOyMCwDYiPAPF5IL4LxE+A+D0QPwbiO0B8FYhPAfF9oPpXQPwOiP8AMSNQ7DmQfgzEt4H4HBBfBuJrQFyUwsOQGsHNwM/Hx9BZIcgQ6s3LYGbABxYDsUHyirL8YJoLqJ5YzEgCRgIAJp0aHQ==');
if finddtm(ChestDTM,x,y,MSX1,MSY1,MSX2,MSY2) or
finddtm(CoinsDTM,x,y,MSX1,MSY1,MSX2,MSY2) then
begin
result := true;
end;
freedtm(ChestDTM);
freedtm(CoinsDTM);
end;
/////////////////////////////////////////////////
/////////// Banking Procedures Report ///////////
/////////// Made by OkOkOkOk ///////////
/////////////////////////////////////////////////
procedure OpenBankBooth;
var
tmpCTS, i, l, r, Count:integer;
BoothTPA:TPointArray;
begin
repeat
tmpCTS := GetToleranceSpeed;
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.96, 1.07);
FindColorsTolerance(BoothTPA, 5265245, MSX1, MSY1, MSX2, MSY2, 4);
SetColorToleranceSpeed(tmpCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);
L := High(BoothTPA)
marktime(Count);
for i := 0 to L do
begin
r := random(L);
wait(randomrange(60, 200));
MMouse(BoothTPA[r].x, BoothTPA[r].y, 2, 2);
if waituptext('ooth', 300) then
Break;
if timefrommark(Count) > 10000 then
begin
writeln('Could not find bank booth!');
Terminatescript;
end;
end;
clickmouse2(mouse_right);
wait(200 + random(50));
if chooseoption('ank') then
wait(3000 + random(100));
until (bankscreen) or (SteelBarInBank = true) or not(loggedin) or (PinCheck = true);
end;
procedure DepositCball;
var CBallDTM: Integer;
begin
CBallDTM := DTMFromString('mrAAAAHic42BgYMhjguBSKM4F4jQgTgHiLCB+ClRzD4gfAfEbIH4LxO+A+AUQPwFiO0tLBmMDAwZFOTkGAwUFBitTUwZvJyuwOAhzAdXgw4wEMAwAAExZD+s=');
if (PinCheck = true) then
inpin(Players[CurrentPlayer].Pin);
if finddtm(CBallDTM,x,y,MIX1,MIY1,MIX2,MIY2) then
begin
mmouse(x,y,0,0);
wait(500 + random(50));
mouse(x,y,0,0,false);
wait(500 + random(50));
if chooseoption('re All') then
wait(300 + random (50));
end;
if not(loggedin) then
Exit;
end;
procedure WithdrawSteelBar;
var SteelbarDTM: Integer;
begin
SteelbarDTM := DTMFromString('mlwAAAHicY2dgYMhlYmBIBuIcIC4B4kIgzgbiDCD+C5RnYWRgYAdiBiD+yQDB/4C4srCAwc7SEoxBbBgO8PZk4ALK48KMeDAUAACcIQ7+');
if finddtm(SteelbarDTM,x,y,MSX1,MSY1,MSX2,MSY2) then
begin
mmouse(x,y,0,0);
wait(500 + random(50));
mouse(x,y,0,0,false);
wait(500 + random(50));
if chooseoption('aw All') then
begin
wait(300 + random (50));
closebank;
wait(300 + random(50));
end;
end;
ForceMapNorth;
if not(LoggedIn) then
Exit;
end;
////////////////////////////////////////////
/////////// Walking Procedures ///////////
/////////// Made by OkOkOkOk ///////////
////////////////////////////////////////////
procedure ToFurnace;
begin
ForceMapNorth;
setrun(True);
symbolaccuracy := 0.5;
if findsymbol(x,y,'Kebab shop') then
begin
mouse(x,y,0,0,true);
FFlag(0);
wait(3000 + random(100));
end;
symbolaccuracy := 0.8;
symbolaccuracy := 0.5;
if findsymbol(x,y,'furnace') then
begin
mouse(x,y,0,0,true);
FFlag(0);
wait(1000 + random(100));
end
else
begin
Players[CurrentPlayer].Active := False;
LogOut;
Exit;
end;
symbolaccuracy := 0.8;
if not(LoggedIn) then
Exit;
end;
procedure ToBank;
begin
setrun(True);
symbolaccuracy := 0.6;
if findsymbol(x,y,'cook') then
begin
mouse(x,y,0,0,true);
FFlag(0);
wait(3000 + random(100));
end;
symbolaccuracy := 0.8;
symbolaccuracy := 0.4;
if findsymbol(x,y,'bank') then
begin
mouse(x,y,0,0,true);
FFlag(0);
wait(1000 + random(100));
end
else
begin
Players[CurrentPlayer].Active := False;
LogOut;
Exit;
end;
symbolaccuracy := 0.8;
if not(LoggedIn) then
Exit;
end;
////////////////////////////////////////////
/////////// Final Procedures ///////////
/////////// Made by OkOkOkOk ///////////
////////////////////////////////////////////
procedure Banking;
begin
ForceMapNorth;
OpenBankBooth;
DepositCball;
WithdrawSteelBar;
end;
Procedure WalkingAndBanking;
begin
ToBank;
Banking;
ToFurnace;
end;
procedure OneRun;
begin
repeat
repeat
setangle(SRL_ANGLE_HIGH);
AntiBan;
FindNormalRandoms;
ForceMapNorth;
SmeltCBall;
WalkingAndBanking;
until (not(LoggedIn));
NextPlayer(Players[CurrentPlayer].Active);
until False;
end;
begin
DeclarePlayers;
SetupSRL;
LoginPlayer;
OriginalXP := GetXPCustom('smithing');
SRL_CombatRandoms := True;
ClearDebug;
begin
repeat
OneRun;
until(false);
end;
end.