SRL Archive - Archive

ggzz - SRL Member Application


Brandon

2011-12-27 06:30:29

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


Are you affilated in anyway with Jagex LTD?
no

Were you Referred to SRL?



What is your general programming knowledge?
C++, C#, Objective-C, Javascript, HTML, PHP, Lua, Pascal, Delphi.

C++.Net (Managed).. C++ Win32-API


Are you a member of any other communities?
Xsellize


Tell us about yourself…
From: ggzz
Taking Mech Engineering.. Took Programming Already.

Highschool:
Physics, Adv Calc, Chem, etc.

Interests:
:S



Please show us one (or multiple) of your scripts.
//Kills Armoured Zombies.. Works flawlessly except for item picking up..
//Eating not yet implemented/finished. Start at Hartwin, chaos altar, zombie dungeon.. Anyone of those.

program ZombieKiller;
{$define SMART}
{$i srl/srl.scar}
{$i srl/srl/skill/fighting.scar}
{$i sps/sps.simba}
{$i SRL/SRL/misc/paintsmart.scar}

var
Prayers, Food: TStringArray;
SaveMe: Boolean;


//FILL THESE IN!


const
WTP = 50; //What prayer level to pray at? If prayer gets below this number, the bot will go prayer.
HPL = 99; //HP Level of your character.

FFS = True; //FlagFailSafe.. If FFlag is not working, set to true; otherwise false. HIGHLY recommended to set True..
NoSS = True; //Set to FALSE if using SoulSplit.. Again.. If you are NOT using soulsplit, leave this True.
QP = True; //QuickPrayer.. HIGHLY Recommended (MUCH FASTER & SAFER).. Set this before starting the bot.

Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := '';
Pass := '';
Pin := '';
WorldInfo := [27, 42, 45, 46, 48, 52, 59, 70, 72, 78, 79, 87, 104, 115, 117];
BoxRewards := ['XP','xp','lamp'];
LampSkill := 'Slayer';
Active := True;
//PLEASE FILL THESE TWO LINES IN..

Strings := ['harm', 'eath rune', 'lood rune', 'oul rune']; //Items to pickUp. DOES NOT WORK PERFECTLY.. Needs work badly!
Prayers := ['SS', 'Turm']; //Supports SS, Turmoil, Deflect melee.. SO FAR.. More to come later..
Food := ['lob', 'sword', 'shark'];
end;
end;


Function FindObjectMM(Colors: TIntegerArray; var X, Y, Dist: Integer; Width, Height, tol: integer): Boolean;
var
I: integer;
TPA: TPointArray;
ATPA: T2DPointArray;

begin
SetLength(TPA, Length(Colors));

For I:= 0 To High(Colors) do
FindColorsSpiralTolerance(MSCX, MSCY, TPA, Colors[i], MMX1, MMY1, MMX2, MMY2, tol); //Find colours starting from the middle outwards..

FilterPointsPie(TPA, 0.0, 360.0, 0.0, 76.0, MMCX, MMCY); //Filter them so they are on the MM itself..
ATPA:= TPAToATPAEx(TPA, Width, Height); //Group TPA into cirles by Distance..
SortATPAFromFirstPoint(ATPA, Point(MMCX, MMCY)); //Sort the colours from the closest to the center.. AKA Me..
if(Length(ATPA) = 0) then
Exit;

MiddleTPAEx(ATPA[0], X, Y); //In that 2D Array, Pick out the closest to the middle a.k.a. the first one..
MMouse(X, Y, 0, 0); //Move the mouse to the colours found..

Wait(randomrange(200, 500));
begin
Dist:= Distance(X, Y, MMCX, MMCY);
Result:= True;
end;
GetMousePos(X, Y);
end;

Function FindObjectFX(Colors: TIntegerArray; Uptext: TStringArray; X1, Y1, X2, Y2, Width, Height, tol: integer): Boolean;
var
X, Y, I: integer;
TPA: TPointArray;
ATPA: T2DPointArray;

begin
SetLength(TPA, Length(Colors));

For I:= 0 To High(Colors) do
FindColorsSpiralTolerance(MSCX, MSCY, TPA, Colors[i], X1, Y1, X2, Y2, tol); //Find colours starting from the middle outwards..

ATPA:= TPAToATPAEx(TPA, Width, Height); //Group TPA into cirles by Distance..
SortATPAFrom(ATPA, Point(MSCX, MSCY)); //Sort the colours from the closest to the center..
if(Length(ATPA) = 0) then
Exit;

MiddleTPAEx(ATPA[0], X, Y); //In that 2D Array, Pick out the closest to the middle a.k.a. the first one..
MMouse(x, y, 5, 5); //Move the mouse to the colours found..

Wait(randomrange(200, 500)); //Wait for the uptext to show..
If(IsUpTextMultiCustom(UpText)) then
begin
ClickMouse2(False); //If it finds it, click the object/item..
wait(500);
if ChooseOptionMulti(UpText) then
begin
Result := True; //If it clicks the object, return true..
Exit;
end;
end else
Result := False; //Cannot find the uptext then its the wrong object, return false..
end;

Function FindColorMM(Colors: TIntegerArray; var X, Y: Integer; Width, Height, tol: integer): Boolean;
var
I: integer;
TPA: TPointArray;
ATPA: T2DPointArray;

begin
SetLength(TPA, Length(Colors));

For I:= 0 To High(Colors) do
FindColorsSpiralTolerance(MSCX, MSCY, TPA, Colors[i], MMX1, MMY1, MMX2, MMY2, tol); //Find colours starting from the middle outwards..

FilterPointsPie(TPA, 0.0, 360.0, 0.0, 76.0, MMCX, MMCY); //Filter them so they are on the MM itself..
ATPA:= TPAToATPAEx(TPA, Width, Height); //Group TPA into cirles by Distance..
SortATPAFromFirstPoint(ATPA, Point(MMCX, MMCY)); //Sort the colours from the closest to the center.. AKA Me..
if(Length(ATPA) = 0) then
Exit;

MiddleTPAEx(ATPA[0], X, Y); //In that 2D Array, Pick out the closest to the middle a.k.a. the first one..
if(X AND Y <> 0) then
Result:= True;
end;


//Written By Flight..
Function FoundSymbol(Ident: Integer; var X, Y, Dist: Integer): Boolean;
var
B: TBox;
TPA: TPointArray;
L,i,CTS: Integer;
ATPA,ATPA2: T2DPointArray;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsTolerance(TPA, 12632256, MMX1, MMY1, MMX2, MMY2, 10);
ColorToleranceSpeed(CTS);
if Length(TPA) < 1 then
Exit;
ATPA := TPAtoATPAEx(TPA, 8, 8);
L := High(ATPA);
SetArrayLength(ATPA2, L+1);
for i := 0 to L do
begin
B := GetTPABounds(ATPA[i]);
with B do
begin
if (Ident = 1) then
FindColorsTolerance(ATPA2[i], 16777215, B.X1-8, B.Y1-8, B.X2+8, B.Y2+8, 10) //Prayer Altar Symbol..
else if (Ident = 2) then
FindColorsTolerance(ATPA2[I], 1179385, B.X1-8, B.Y1-8, B.X2+8, B.Y2+8, 10);

Result := (Length(ATPA2[i]) > 0);
if Result then
begin
MiddleTPAEx(ATPA2[i], X, Y);
Dist := Distance(MMCX, MMCY, X, Y);
Exit;
end;
end;
end;
end;

//Edited from the Fighting.Scar include..
function AttackZombies(Colors: TIntegerArray; Tol, TimeOut: Integer): Boolean;
var
Mark: LongWord;
begin
Result := False;
if (not LoggedIn) or (FindDead) then exit;
if FindObjectFX(Colors, ['ttack', 'zombie', 'rmoured'], MSX1, MSY1, MSX2, MSY2, 10, 10, Tol) then
begin
Result := True;
Wait(1000 + Random(500));
FFlag(10);
Mark := GetSystemTime;
while (srl_InFight) and (TimeFromMark(Mark) < TimeOut) and (not FindNormalRandoms) do
begin
Wait(1000 + Random(500));
end;
end;
end;

Function PrayAltar: Boolean;
begin
if FindObjectFX([3816279, 8687513, 1711911], ['ray-at', 'haos altar', 'altar'], MSX1, MSY1, MSX2, MSY2, 20, 20, 5) then
Result:= True
else
Result:= False;
end;

Function PrayerLevel: Integer;
var
Prayer: Integer;
ColourString: String;
begin
Prayer:= GetMMLevels('Prayer', ColourString);
Result:= Prayer;
end;

Function WalkToLadder: Boolean;
var
Dist, X, Y: Integer;
begin
FindObjectMM([601693], X, Y, Dist, 10, 10, 10);
if ((Dist > 32) or ((PrayerLevel <= WTP) and (Dist > 8))) then
begin
FindObjectMM([601693], X, Y, Dist, 10, 10, 10);
ClickMouse2(true);
while isMoving do
wait(50);
Result:= (Dist < 10);
end;
end;

Function UpLadder: Boolean;
var
X, Y, Dist: Integer;
begin
ColorToleranceSpeed(2);
Repeat
WalkToLadder
FindObjectFX([2377298], ['adder'], MSX1, MSY1, MSX2, MSY2, 10, 10, 4);
wait(1000);
while IsMoving do
wait(100);
Until(FoundSymbol(1, X, Y, Dist) or PrayAltar);
Result:= True;
wait(2000);
end;

Function DownLadder: Boolean;
var
X, Y, Dist: Integer;
begin
MakeCompass('S');
ColorToleranceSpeed(2);
wait(2000);
repeat
if FindObjectFx([4473927, 6118754], ['rapdoor'], MSX1, MSY1, MSX2, MSY2, 10, 10, 5) then
begin
MMouse(X, Y, 0, 0);
wait(500);
ClickMouse2(True);
if(DidRedClick) then
break;
end;
until(FoundSymbol(1, X, Y, Dist) = False);

MakeCompass('W');
Result:= True;
end;

Function IsPrayerOn: Boolean;
var
TPA: TPointArray;
begin
ColorToleranceSpeed(2);
if FindColorsSpiralTolerance(723, 70, TPA, 7650956, 708, 53, 737, 85, 32) then
Result:= True
else
Result:= False;
end;

Function OutOfPrayer: Boolean;
var
TPA: TPointArray;
begin
ColorToleranceSpeed(2);
if FindColorsSpiralTolerance(723, 70, TPA, 6433597, 706, 55, 739, 81, 8) or IsPrayerOn or (PrayerLevel = 0) then
Result:= False
else
Result:= True;
end;

Procedure TurnPrayerOn(Prayer: TStringArray; QuickPrayer: Boolean);
begin
GameTab(Tab_Inv);
wait(1000);
if(QuickPrayer = True) then
begin
repeat
if OutOfPrayer Then
break;
MouseBox(706, 55, 739, 87, 1);
wait(1500);
Until(IsPrayerOn);
end;
end;

Procedure TalkHartwin;
var
X, Y, Dist: Integer;
begin
if FindObjectFX([6711915, 3954010, 855310, 6194317], ['alk-To Hart', 'Hartwin', 'artwin', 'o Hartwin'], MSX1, MSY1, MSX2, MSY2, 10, 10, 10) then
Repeat
repeat
ClickToContinue;
until(ClickToContinue = False);
wait(500);
FindNPCChatText('es', ClickLeft);
wait(2000);
Until(FoundSymbol(1, X, Y, Dist));
end;

Function HPLevel: Integer;
var
ColourString: String;
HP: Integer;
begin
HP:= GetMMLevels('HP', ColourString);
Result:= HP;
end;

Procedure PickUpItems(Items: TStringArray);
var
x, y: Integer;
Item: TPoint;
MS: TBox;
begin
if FindColorMM([591083], X, Y, 10, 10, 20) then
begin
Item:= MMToMS(Point(X, Y));
MS:= IntToBox(MSX1, MSY1, MSX2, MSY2);
if PointInBox(Item, MS) then
begin
MMouse(Item.X, Item.Y, 0, 0);
if IsUpTextMultiCustom(Items) then
ClickMouse2(True)
else
begin
ClickMouse2(False);
WaitOptionMulti(Items, 500);
end;
end;
end;
end;

Procedure SOS;
begin
if ((SaveMe = True) And (NoSS = True)) then
begin
repeat
writeln('Out of food AND not using SoulSplit.. Running Away..');
WalkToLadder;
UpLadder;
Logout;
until(Not LoggedIn);
writeln('Successfully Ran Away..');
TerminateScript;
end;
end;

Procedure RefillPrayer;
var
X, Y, Dist: Integer;
begin
if (PrayerLevel < WTP) then
begin
UpLadder;
while(FoundSymbol(1, X, Y, Dist) = False) do
wait(100);
repeat
PrayAltar;
while IsMoving do
wait(100);
Until(PrayerLevel > WTP);
if(FoundSymbol(1, X, Y, Dist) or (PrayerLevel > WTP)) then
DownLadder;
if (IsPrayerOn = False) then
TurnPrayerOn(Prayers, QP);
end;
end;

Procedure HealPlayer(Food: TStringArray);
var
Item, I, X, Y: Integer;
begin
if (HPLevel < ((HPL * 10)/2)) then
begin
GameTab(Tab_Inv);
wait(1000);
For I:= 0 To High(Food) do
begin
Case LowerCase(Food[I]) of
'shark':
Item:= DTMFromString('');
'lob', 'lobs', 'lobster', 'lobby', 'lobbies':
Item:= DTMFromString('');
'tuna':
Item:= DTMFromString('');
'sardine':
Item:= DTMFromString('');
'rocktail', 'rock', 'tail':
Item:= DTMFromString('');
'trout', 'cod', 'pike', 'salmon':
Item:= DTMFromString('');
'cake':
Item:= DTMFromString('');
'bass':
Item:= DTMFromString('');
'sword', 'swordy', 'swordfish', 'swords',
'swordies', 'sword fish':
Item:= DTMFromString('');
'monk', 'monkfish', 'monk fish', 'monks':
Item:= DTMFromString('');
'cave', 'cavefish', 'cave fish':
Item:= DTMFromString('');
'pizza', 'anchovies', 'anchovies pizza',
'pineapple pizza':
Item:= DTMFromString('');
'turtle', 'sea', 'sea turtle', 'squirtle':
Item:= DTMFromString('');
'manta', 'ray', 'manta ray', 'mantaray':
Item:= DTMFromString('');
'trout', 'cod', 'pike', 'salmon':
Item:= DTMFromString('');
'cake':
Item:= DTMFromString('');
'bass':
Item:= DTMFromString('');
end;

GameTab(Tab_Inv);
wait(500);
if FindDTM(Item, X, Y, MIX1, MIY1, MIX2, MIY2) then
repeat
MMouse(X, Y, 5, 5);
WaitUptextMulti(['at', 'eat', 'Eat'], 500);
ClickMouse2(true);
wait(2000);
Until((HPLevel > ((HPL * 10)/2)) or (FindDTM(Item, X, Y, MIX1, MIY1, MIX2, MIY2) = False));

if((HPLevel > ((HPL * 10)/2)) or (FindDTM(Item, X, Y, MIX1, MIY1, MIX2, MIY2) = False)) then
SaveMe:= True;

FreeDTM(Item);
end;
end;
end;

Procedure FightZombies;
begin
GameTab(Tab_Inv);
while (srl_InFight) do
begin
wait(50);
RefillPrayer;
HealPlayer(Food);
if ((IsPrayerOn = False) and (PrayerLevel > WTP)) then
TurnPrayerOn(Prayers, QP);
end;

if (not srl_InFight) then
begin
PickUpItems(Players[CurrentPlayer].Strings);
RefillPrayer;
HealPlayer(Food);
if ((IsPrayerOn = False) and (PrayerLevel > WTP)) then
TurnPrayerOn(Prayers, QP);
if Not srl_InFight then
AttackZombies([7301994, 4672074, 8229258], 5, 1000);
end;
end;

Procedure MainLoop;
var
X, Y, Dist: Integer;
begin
SOS;
TalkHartwin;
SOS;
RefillPrayer;
SOS;
if((IsPrayerOn = False) and (PrayerLevel > WTP)) then
TurnPrayerOn(Prayers, QP);
SOS;
HealPlayer(Food);
SOS;
if(FoundSymbol(1, X, Y, Dist) and (PrayerLevel > WTP)) then
DownLadder;
SOS;
FightZombies;
end;

begin
Smart_Server := 45;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;

SetupSRL;
DeclarePlayers;
LoginPlayer;
cleardebug;
SetAngle(True);

repeat
MainLoop;
until(false);
end.

Gu3st...

2011-12-27 08:00:40

What's up with all empty DTM strings in HealPlayer?

Also, I'm not 100% sure if I'm going to vote yes even though (imo) your script shows enough scripting capabilities… I'm holding my vote for now.

jakeyboy29

2011-12-27 08:46:39

yea

NCDS

2011-12-27 08:53:50

Couple things..

I personally would much rather see you have one generalized object finding function that a separate one for everything that needs to be found. Looks cleaner.


Also,

Repeat
WalkToLadder
FindObjectFX([2377298], ['adder'], MSX1, MSY1, MSX2, MSY2, 10, 10, 4);
wait(1000);
while IsMoving do //this is a possible
wait(100); //endless loop
Until(FoundSymbol(1, X, Y, Dist) or PrayAltar);
If isMoving never results false for whatever reason, you will continue to just stand there waiting.

In your prayer functions you set the cts, but never reset them to what the users had them set to previously.


Function IsPrayerOn: Boolean;
var
TPA: TPointArray;
begin
ColorToleranceSpeed(2);
if FindColorsSpiralTolerance(723, 70, TPA, 7650956, 708, 53, 737, 85, 32) then
Result:= True
else
Result:= False;
end;
You can also set results like so..

result := findColorsTolerance();
To save a line here and there.

That's all I really have time for now. I would really like to see you in the members area though your script still has some potentially 'dangerous' flaws.

Regardless, I'm going to vote yes as I've enjoyed your presence around the forums and you're a fairly knowledgeable guy. :)


Good luck.

RISK

2011-12-27 09:11:25

I'm not going to vote, but I'll go ahead and say it:
Your attitude could be improved dramatically, ggzz. When you are challenged or someone gets in your face, you retaliate in a way that is unneeded. You don't like being told that you are wrong and that can get messy pretty fast in a community like ours.

You are for sure knowledgeable though and you have a bright future ahead of you, but you should not have to go out of your way to prove everyone that challenges you wrong. It's unneeded and it is childish in my opinion.

I'm not sure everyone has the same view on the attitude thing as me, but no one has addressed it yet, so.

Great job though, ggzz.

BraK

2011-12-27 09:25:26

From: RISK
I'm not going to vote, but I'll go ahead and say it:
Your attitude could be improved dramatically, ggzz. When you are challenged or someone gets in your face, you retaliate in a way that is unneeded. You don't like being told that you are wrong and that can get messy pretty fast in a community like ours.

You are for sure knowledgeable though and you have a bright future ahead of you, but you should not have to go out of your way to prove everyone that challenges you wrong. It's unneeded and it is childish in my opinion.

I'm not sure everyone has the same view on the attitude thing as me, but no one has addressed it yet, so.

Great job though, ggzz.


I can agree with the Above quote. Your attitude is good at times until someone challenges your opinion with there opinion. Then you pretty much take a dump on the person starting flame wars. If you want your opinion respected you must therefore respect the opinions of others. You also tend to hold grudges over silly things. Your knowledge isn't what is in question as you have plenty enough for members. I will probably be the first to vote no. You also need to stop trying to backseat mod. I got an infraction well why didn't he. That's not the correct response to the situation. Honesty you'll get members eventually I hope that when you do you will take what I have said into consideration and be better because of it.

Flight

2011-12-27 09:49:59

I don't mean to make an echo in here but I really do agree with the previous two posts. ggzz for sure the script looks really nice, I like how it turned out, it's put together smooth an organized, I definitely consider it Members quality, you did a great job with it!

On the other hand you're so easy to flame other people who disagree with you. Sometimes you get to the point to where you truly believe that you are absolutely right no matter what anyone else says and just refuse let it go. You should know by now it's not common for people to behave like that here. Obviously you're not the only one to act like this, I have before in the past and I'm honestly embarrassed about how I acted then, if I could go back and change it I would.

It's really a shame though, I believe you could do alot (or "a lot" so you're happy, YoHoJo :p) of good here if you could work on that, and I sure wish you would.

I'm holding my vote as I'm on a 50-50 here.

Brandon

2011-12-27 10:00:39

From: BraK
I can agree with the Above quote. Your attitude is good at times until someone challenges your opinion with there opinion. Then you pretty much take a dump on the person starting flame wars. If you want your opinion respected you must therefore respect the opinions of others. You also tend to hold grudges over silly things. Your knowledge isn't what is in question as you have plenty enough for members. I will probably be the first to vote no. You also need to stop trying to backseat mod. I got an infraction well why didn't he. That's not the correct response to the situation. Honesty you'll get members eventually I hope that when you do you will take what I have said into consideration and be better because of it.


I'm not arguing around SRL anymore at all. Well at least after that last thing. I don't hold grudges but I don't forget what happened either.. that's my nature :S. Enough people have told me the attitude thing may not get me in and indeed I do believe that but I'll still try my luck anyway as I just want to show I'm capable of writing a decent or semi-decent script like everyone else even if I do not get in.

@the Empty DTM's that was for the food which I said was incomplete because I'm 99 everything and I used soulsplit all the time and just never put it in yet. Probably a lot of infinite loops I forgot to take care of. I tend to use them a lot for testing to see how specific parts work. I would remove them though because I need it to be able to start anywhere and those would probably get it stuck as mentioned.

Anyway I appreciate the feedback.

Dynamite

2011-12-27 10:02:29

Yes.
Reason = I like you.

Good luck.
-Boom

hamster31

2011-12-27 13:07:00

Voting Yes, because i like boom and boom likes you…

Haha joking but you have showed that u knw what ur doing when it comes to scripting

Sabzi

2011-12-28 07:02:02

I was thinking for a few days, I will say yes.
Everything well said above, no need to say the same.(about you)

jakeyboy29

2011-12-28 09:40:04

Yes

edit: welcome

Main

2012-01-01 12:22:49

Yes, along with your script and your encrypting password thing you already proved you got the balls for SRL member:P

Wizzup?

2012-01-02 19:53:45

In!