SRL Archive - Archive

laakerules - SRL Member Application


laakerules

2012-01-01 20:53:29

How Long have You Played Runescape?
9 Year(s)


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?
NOONE


What is your general programming knowledge?
Java, SQL, Simba/SCAR


Are you a member of any other communities?
No


Tell us about yourself…
From: laakerules
Im a kid just graduating highschool that has ADD and just lets his creativity flow out into programming and creating the best of something! I will not stop untill i do!



Please show us one (or multiple) of your scripts.
Cafinated Killer v3.0




program CaffinatedKiller;

{$DEFINE SMART}
{$i SRL\SRL.scar}
{$i SRL/SRL/skill/fighting.scar}


///////////////////////////////////
//start setup
///////////////////////////////////

const

//change to the smart world you want. Having the same world in all your scripts allows you to change scripts without smart restarting.
SWorld = 35;

//Speed of your mouse, higher is faster.
CaffinatedMouse = 25; //The Higher it is the faster it moves, but the more inhuman it becomes.

//Put Gaurd, Goblin, Yak, Zombie, Fire, Hill, Moss, or Cow
AttackingOption = 'Goblin';

//This is the number you want it to bury bones from. 0-27
//8 is the begining of the third row.
//Set this in properly and it WILL EAT YOUR FOOD!
InvNumber = 4; //on the left it goes 0-4-8-12-16-24

//Put this 'Yes' if you want to pick them up, 'No' if you dont.
Charmer = 'No';

//This is the antiban chance.. the higher the number, the less likely it will do an antiban
AntiLevel = 25; //15-40 are recommended, you can go higher/lower if you want

//choose the bone you want to pick up, Regular or Big
PickupBone = 'Yes'; //Currently bugged would not recomend, picks up all items on top of bones

var Kills: integer;
var
x, y, RBones, BoneColor: integer;
procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

With Players[0] Do
Begin
Name := ''; //Player username.
Pass := ''; //Player password.
Nick := ''; //Player nickname - 3-4 letters of Player username.
Active := True;
End;

End;

///////////////////////////////////
///////////////////////////////////
///// Stop ///////
///////////////////////////////////
///////////////////////////////////




procedure SetupChar;

begin

SetAngle(True);
MakeCompass('N');
Retaliate(True);
end;


procedure MSI_RandomFKey;
var
i, randInt, randKey, currTab: Integer;
keys: array[0..4] of Word;
begin
currTab := GetCurrentTab(); // Get the current tab player is on

keys[0] := VK_F1;
keys[1] := VK_F2;
keys[2] := VK_F3;
keys[3] := VK_F4;
keys[4] := VK_F5;

randInt := Random(6);

case randInt of
0..4:
begin
KeyDown(keys[randInt]);
wait(35+random(85));
KeyUp(keys[randInt]);
end;

else
for i := 1 to 3 do
begin
randKey := Random(5);
KeyDown(keys[randKey]);
wait(35+random(85));
KeyUp(keys[randKey]);
end;
end;
wait(75+random(100));
GameTab(currTab); // Reset to starting tab
end;

//random antibans to use
procedure GAntiBan;
begin
writeln('Choosing random antiban');
case random(11) of
0 : begin
writeln('Random click selected');
RandomRClick;
end;
1 : begin
writeln('Random movement selected');
RandomMovement;
end;
2 : begin
writeln('Hover skill strength');
HoverSkill(skill_strength,false);
end;
3 : begin
writeln('Prayer tab selected');
GameTab(27);
Wait(randomrange(400,800));
end;
4 : begin
writeln('Random Angle selected');
RandomAngle(True);
end;
5 : begin
writeln('Random Fkey selected');
MSI_RandomFKey;
end;
6 : begin
writeln('Hover Skill (HP) selected');
HoverSkill(skill_hitpoints,false);
Wait(randomrange(300,600));
end;
7 : begin
writeln('Game Tab stats selected');
GameTab(23);
end;
8 : begin
writeln('Pickup Mouse selected');
PickUpMouse;
end;
9 : begin
writeln('Random wait selected');
Wait(randomrange(1000,2000));
end;
10 : begin
writeln('Hover Skill attack selected');
HoverSkill('attack',false);
end;
end;
Wait(randomrange(500,1000));
end;

//thanks flight! and home!
Function Eat(What: String): Boolean;
var
I: Integer;
begin
Result := False;
If Not LoggedIn then Exit;
if (HPPercent < 50) then
If InvEmpty then Logout
else
for i := 1 to 28 do
begin
InvMouse(I, 3);
if IsUpText(What) then
begin
ClickMouse2(True);
Wait(RandomRange(350, 525));
Result := True;
Exit;
end else
Continue;
end;
end;


//from flight, thanks!
Function FindObjSimple_F(Colors: TIntegerArray; TheUpText: TStringArray; midx, midy: integer): Boolean;
Var
T,i,X,Y: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
Begin
MarkTime(T);
Repeat
SetArrayLength(ATPA, Length(Colors));
for i := 0 to High(Colors) do
FindColorsSpiralTolerance(midx, midy, ATPA[i], Colors[i], MSX1, MSY1, MSX2, MSY2, 5);
TPA := MergeATPA(ATPA);
ATPA := TPAtoATPAEx(TPA, 15, 15);
SortATPAFrom(ATPA, Point(MSCX, MSCY));
if (Length(ATPA) = 0) then
Exit;

MiddleTPAEx(ATPA[0], x, y);

if (TimeFromMark(T) > 5000) then
Exit;

MMouse(x, y, 10, 10);
Wait(randomrange(115,225));
If(IsUpTextMultiCustom(TheUpText)) then
begin
ClickMouse2(True);
if DidRedClick then
begin
Result := True;
Break;
end;
end;
Until(Result)
end;

//used to add chatbox text after 'someone else is fighting that' so it doesn't loop
procedure GetOutF;
begin
case random(2) of
0 : begin
KeyDown(VK_Tab);
wait(35+random(100));

wait(35+random(100));
KeyUp(VK_Tab);
wait(25+random(70));

wait(35+random(100));
end;
1 : begin
ExamineInv;
end;
end;
end;

//only used in below case
procedure GMoveMouse;
begin
case random(4) of
0 : begin
mMouse(5,25,10,20);
end;
1 : begin
mMouse(250,150,40,40);
end;
2 : begin
mMouse(505,350,50,50);
end;
3 : begin
mMouse(30,315,20,40);
end;
end;
end;

//Less likely to use one of the GAntiBan's
Procedure RAntiBan;
begin
Wait(randomrange(200,400));
case random(AntiLevel) of
0 : begin
writeln('Random Wait AntiBan');
Wait(randomrange(1100,2500));
end;
1 : begin
GAntiBan;
end;
2 : begin
writeln('pickup mouse / GMoveMouse');
PickUpMouse;
Wait(randomrange(25,100));
GMoveMouse;
Wait(randomrange(250,300));
end;
3 : begin
writeln('Double GMoveMouse');
GMoveMouse;
Wait(randomrange(45,100));
GMoveMouse;
end;
end;
end;
Procedure ProgressReport;
begin
ClearDebug;
Writeln('********************************************');
Writeln('* Caffinated Killer V1.0 *');
Writeln('********************************************');
Writeln('* Killed ' + AttackingOption + ' NPCs');
Writeln('*You have killed ' + IntToStr(Kills) + ' '+AttackingOption+'');
if AttackingOption = 'Goblin' then
Writeln('*You have Gained ' + IntToStr(Kills*13) + ' EXP');
if AttackingOption = 'Yak' then
Writeln('*You have Gained ' + IntToStr(Kills*266) + ' EXP');
if AttackingOption = 'Zombie' then
Writeln('*You have Gained ' + IntToStr(Kills*213) + ' EXP');
if AttackingOption = 'Fire' then
Writeln('*You have Gained ' + IntToStr(Kills*592) + ' EXP');
if AttackingOption = 'Gaurd' then
Writeln('*You have Gained ' + IntToStr(Kills*69) + ' EXP');
if AttackingOption = 'Hill' then
Writeln('*You have Gained ' + IntToStr(Kills*187) + ' EXP');
if AttackingOption = 'Moss' then
Writeln('*You have Gained ' + IntToStr(Kills*426) + ' EXP');
if AttackingOption = 'Cow' then
Writeln('*You have Gained ' + IntToStr(Kills*39) + ' EXP');
Writeln('* Ran for ' + TimeRunning + '');
Writeln('********************************************');
end;

procedure KCount;
begin
Inc(Kills);
end;


//finding and killing NPC's
procedure Killing;
var
sX,sY: Integer;
label
fighting;
begin
if AttackingOption = 'Cow' then
FindObjSimple_F([5926535, 11975871], ['ttck','Cow (level: 2)'], MSCX, MSCY);
if AttackingOption = 'Moss' then
FindObjSimple_F([4282722, 4151133], ['ttck','Moss'], MSCX, MSCY);
if AttackingOption = 'Hill' then
FindObjSimple_F([8897008, 8042457], ['ttck','Hill'], MSCX, MSCY);
if AttackingOption = 'Goblin' then
FindObjSimple_F([8694679, 4561806, 7838343, 3570036, 4429456, 6328178], ['ttck','Goblin (level: 2)'], MSCX, MSCY);
if AttackingOption = 'Yak' then
FindObjSimple_F([4869718, 1908774], ['ttck','Yak'], MSCX, MSCY);
if AttackingOption = 'Gaurd' then
FindObjSimple_F([3491141, 2851467], ['ttck','Guard (level: 21)'], MSCX, MSCY);
if AttackingOption = 'Zombie' then
FindObjSimple_F([3091999, 3618340], ['ttck','Zombie (level: 44)'], MSCX, MSCY);
if AttackingOption = 'Fire' then
FindObjSimple_F([6279659, 4877737, 3168927], ['ttck','Fire'], MSCX, MSCY);
writeln('Killing NPC!');
fighting:
While IsMoving do
wait(1);
KCount;
FindNormalRandoms;
wait(randomrange(1400,2000));
if FindBlackChatMessage('omeone else is fighting') then
begin
writeln('Someone else is destroying that hoe!');
case random(4) of
0 : begin
sX := MSX1;
sY := MSY1;
end;
1 : begin
sX := MSX1;
sY := MSY2;
end;
2 : begin
sX := MSX2;
sY := MSY1;
end;
3 : begin
sX := MSX2;
sY := MSY2;
end;
end;
if AttackingOption = 'Cow' then
FindObjSimple_F([5926535, 11975871], ['ttck','Cow (level: 2)'], MSCX, MSCY);
if AttackingOption = 'Hill Giant' then
FindObjSimple_F([8897008, 8042457], ['ttck','Hill Giant(level: 28)'], MSCX, MSCY);
if AttackingOption = 'Goblin' then
FindObjSimple_F([8694679, 4561806, 7838343, 3570036, 4429456, 6328178], ['ttck','Goblin (level: 2)'], MSCX, MSCY);
if AttackingOption = 'Yak' then
FindObjSimple_F([4869718, 1908774], ['ttck','Yak'], MSCX, MSCY);
if AttackingOption = 'Guard' then
FindObjSimple_F([3491141, 2851467], ['ttck','Guard (level: 21)'], MSCX, MSCY);
if AttackingOption = 'Zombie' then
FindObjSimple_F([3091999, 3618340], ['ttck','Zombie (level: 44)'], MSCX, MSCY);
if AttackingOption = 'Fire' then
FindObjSimple_F([6279659, 4877737, 3168927], ['ttck','Fire'], MSCX, MSCY);
GetOutF;
goto fighting;
end else
begin
if InFight then
begin
repeat
FindNormalRandoms;
writeln('CAFFINE...');
Eat('Eat');
RAntiBan;
until (not InFight) or (not OthersInFight) or (not LoggedIn)
end;
writeln('One Hoe killed 500 to go!');
wait(randomrange(200,400));
end;
end;

Procedure FreeAllDTMs;
begin
FreeDTM(RBones);
Writeln('Freed all DTMs');
end;

Procedure DeclareVars;
begin
ClearDebug;
if PickupBone = 'Regular' then
begin
RBones := DTMFromString('mggAAAHicY2NgYEgA4nQgzgDieCCOgeIsIM4E4lwgLgHifKi6HRs2AEkmDMzKgB0w4sAQAACaqgcE');
BoneColor := 8158338;
end;
if PickupBone = 'Big' then
begin
RBones := DTMFromString('mlwAAAHicY2dgYLBhYmCwB2IPIPYBYncgdmGCiN8Byt8F4ntA/BiInwHxSyB+wQACTHgwbsCIB0MBAJ4xCDI=')
BoneColor := 7040112;
end;
writeln('Declared Variables');
end;

procedure Bury;
var
Slots: TIntegerArray;
i: integer;
begin
if not LoggedIn then Exit;
GameTab(Tab_inv);
Slots := [1, 2, 3, 4, 8, 7, 6, 5, 9, 10, 11, 12, 16, 15, 14, 13, 17, 18, 19,
20, 24, 23, 22, 21, 25, 26, 27, 28];
for i := InvNumber to 27 do
begin
if not ExistsItem(Slots[i]) then Continue;
Status('Burying Bones');
MouseItem(Slots[i], True);
Wait(450 + random(80));
FindNormalRandoms;
end;

end;

Function PickupBones:Boolean;
Var
X, Y: Integer;
Begin
If PickupBone = 'Yes' then
begin
FindNormalRandoms;
If FindObj(x,y,'ake',14014430,10) then
begin
x:=MSCX;
y:=MSCY;
end;
Begin
writeln('You have found the some remains!');
GetMousePos(x, y);
Mouse(X, Y, 5, 5, False);
WaitOption('Bones', 5000);
While IsMoving do
Wait(500);
FindNormalRandoms;
Wait(RandomRange(1400,2000));
End;
end;
end;

Function Charms:Boolean;
Var
X, Y: Integer;
begin
If Charmer = 'Yes' then
Begin
FindNormalRandoms;
If FindObj(x,y,'ake',6907694,10) then
else If FindObj(x,y,'ake',3359859,10) then
else If FindObj(x,y,'ake',5672346,10) then
begin
x:=MSCX;
y:=MSCY;
end;
Begin
writeln('You Found some Charms');
GetMousePos(x, y);
Mouse(X, Y, 5, 5, False);
WaitOption('harm', 5000);
While IsMoving do
Wait(500);
FindNormalRandoms;
Wait(RandomRange(1400,2000));
End;
end;
end;

//script startup
procedure Startup;
begin
Smart_Server := SWorld;
Smart_Members:= true;
Smart_Signed := true;
Smart_SuperDetail := false;
SetupSRL;
DeclarePlayers;
LogInPlayer;
MouseSpeed := CaffinatedMouse;
wait(100+random(100));
end;


begin
Startup;
SetupChar;
repeat
repeat
Killing;
PickupBones;
Charms;
FindNormalRandoms;
until InvFull
Bury;
Until not loggedin
writeln('stopping script');
ProgressReport;
TerminateScript;
end.

Main

2012-01-01 20:57:22

Got the stuff, got the knowledge and got the gift! (ADHD)

Yes from me!



EDIT: Guess your standards could use a bit more work, but should be alright. See if you can fix the problems (edit button).

Dynamite

2012-01-01 20:57:51

No from me, you don't really show any of your own object finding initiative, you use Flights

-Boom

BraK

2012-01-01 21:07:23

Your standards are slightly off. Just thought I'd point that out. Your procedure KCount is kinda useless because where ever you call it you could have just added that one line of Inc() there instead. You also have a lot of borrowed material in there while it's good that you credit it. I'll say no this time but keep up the good work and you could see members in a few months. Good luck in the future.

Emaziz

2012-01-01 21:14:39

The object finding is (if not the most) a very important feature, and it should be written by yourself completely. That makes it no from me.

Also, I notice you use very long "if (…) then (…); if (…) then (…);" chains. Actually I see three of them… That's very inefficient, and you should at least add the else statement so you won't perform the rest of the checks if the first one turns out to match.
For example you should chage
if AttackingOption = 'Cow' then
FindObjSimple_F([5926535, 11975871], ['ttck','Cow (level: 2)'], MSCX, MSCY);
if AttackingOption = 'Hill Giant' then
FindObjSimple_F([8897008, 8042457], ['ttck','Hill Giant(level: 28)'], MSCX, MSCY);
if AttackingOption = 'Goblin' then
FindObjSimple_F([8694679, 4561806, 7838343, 3570036, 4429456, 6328178], ['ttck','Goblin (level: 2)'], MSCX, MSCY);
if AttackingOption = 'Yak' then
FindObjSimple_F([4869718, 1908774], ['ttck','Yak'], MSCX, MSCY);
if AttackingOption = 'Guard' then
FindObjSimple_F([3491141, 2851467], ['ttck','Guard (level: 21)'], MSCX, MSCY);
if AttackingOption = 'Zombie' then
FindObjSimple_F([3091999, 3618340], ['ttck','Zombie (level: 44)'], MSCX, MSCY);
if AttackingOption = 'Fire' then
FindObjSimple_F([6279659, 4877737, 3168927], ['ttck','Fire'], MSCX, MSCY);
GetOutF;
to

case AttackingOption of
'Cow':
writeln('Some action');
'Hill Giant':
writeln('Some other action');
'Goblin':
writeln('Some other action');
end;
etc.

nickrules

2012-01-01 22:06:26

So close! But it's gonna have to be a no for now :c


What I noticed:

  • Use cases, instead of long chains of if..then (like said above)
  • Use booleans for "Charmer" and "PickupBone" (well, depending on if you want picking up bones to be one type only [do what you did], or just pickup all regardless of type [then use booleans])
  • Make your own object finding functions. For me, using the SRL object finders, or borrowing them from elsewhere is a no - because it's the core of almost every script. (*cough*TPAs*cough*)
  • On that note, if you made your own eating function, that would be good. But atleast you gave credit where it was needed.
  • for things like
      if AttackingOption = 'Cow' then
    you should do
      if lowercase(AttackingOption) = 'cow' then
    Why? So that it's no longer case sensitive. It's a small thing, but it helps, I guess.
  • The function KCount is a bit pointless, tbh
  • Your antiban looks pretty good/well thought out
  • While I can't say I'd ever vote no for it, your standards could use some work. Not terrible, but nowhere close to good.

Good luck man. I bet that whenever you apply next, if you clean up a few basic things and make your own object finder, you'll get in (bonus points for walking ;))

laakerules

2012-01-01 22:09:31

Damn delete this stupid thing. Too many NO's for it to be up.

Emaziz

2012-01-01 22:12:47

From: laakerules
Damn delete this stupid thing. Too many NO's for it to be up.


Don't worry mate, read our comments and learn from them. Most people get it right on their second try! :)

laakerules

2012-01-01 22:19:17

Ya, main comment i took from that was the Kcount;

All the other, i am starting to turn into my own code and make it run faster. Just trying to convert all my major java knowledge into this Simba Knowledge. Coding Many Many Many Great RSPS and my own games from java.

Bam Bam

2012-01-01 22:24:02

Yes from me.

BraK

2012-01-01 23:09:52

From: Emaziz
Don't worry mate, read our comments and learn from them. Most people get it right on their second try! :)


This is the very reason I thought to leave it open after I posted. Closing the thread wouldn't give you any serious help on improving yourself for the future. So just be patient and learn from your mistakes. ;)

nielsie95

2012-01-13 14:54:41

Looks like you're not getting in this time.
You may try again in a week!