SRL Archive - RS3 Outdated / Broken Scripts

PowerGoblins 6.2


n3ss3s

2008-04-12 11:40:02

Well I made this goblin killer script mainly for leveling my Pure Autoed Pure, since chickens are a bit crowded and not so good XP after 20 str and attack.

This script has got an auto-eater for the few most popular f2p foods for eating while autofighting, which I think are: Meat, Chicken, Trout, Cod and Salmon.

No point in eating lobster or swordfish while fighting goblins.

Caution: Goblin hut is not a good place to use this script, even there are failsafes, it's pretty stupid when you get a "false flag", that there is a flag but your char wont walk.

I suggest to use it in the Stronghold of Security underneath Barbarian Village, where are 5-13 levels in one room and about 20 lvl ones in another room, so there is plenty of choice for varying levels.

It is very rare, but sometimes it might attack two goblins at the sametime, so

a) Make sure the timeout you have set in Const is high enough.
b) Your char isn't supposed to be like lvl 10 while using this script, defence should be atleast 5 or more.


It's still in quite a beta stage, the 6.2 in the name just looks cool, so report possible bugs/ flaws and post improvements.

No bone burying, it's for noobs, and asking for item pickup is useless.


Place your players near goblins and hit run.

I had a test run yesterday, worked as supposed to, Good Luck & Have Fun.




Program PowerGoblins;
{.include SRL/SRL.scar}
{.include SRL/SRL/Skill/Fighting.scar}


Const MonsterTime = 35000;
Const AmountGoblins = 40;
Const MultiCombatArea = False;


Type
FightStyle = (Accurate, Agressive, Shared, Defence);


Var
Styles: Array of FightStyle;

Var
Meat, Chicken, Trout, Cod, Salmon, Hit, Killed: Integer;

Var
gHP: Extended;


Procedure DeclarePlayers;
Begin

HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

SetArrayLength(Styles, HowManyPlayers);

Players[0].Name := 'Username';
Players[0].Pass := 'Password';
Players[0].Nick := 'ser';
Players[0].Booleans[0] := True; // Eat?
Players[0].Strings[0] := ''; // Food name, if any, valid listed below.

// Valid foods: Meat, Chicken, Trout, Cod, Salmon.

Players[0].Active := True;

Styles[0] := Agressive; // Accurate, Agressive, Controlled, Defence

End;


Procedure LoadDTMs;
Begin

Meat := DTMFromString('78DA6374616060486340017DE18E0CCA409A1' +
'188FF0301A3399091CE8006189148206D05241209A87104127104' +
'D478008930026A7C814408013541402286801A7F209142408D379' +
'0C826A0C61D48141050E340841A6B2091875F0D005CFC0D51');

Chicken := DTMFromString('78DA6374626060B8C58002DA8304189481342' +
'310FF0702460B20E31E031A60442281B41D907840408D0790B84F' +
'408D1FA67B30D4F80289CB04D4F803897344987392801A7722D4D' +
'80389F304D45803894B04D4580289AB04D498110E1F00B0FF136A' +
'');

Trout := DTMFromString('78DA6374666060D8C280027A4AF2199481342' +
'310FF0702467320630F031A60442281B435116A4076ED22A0C60D' +
'486C23A0C60B486C22A0C60F48AC23A0260848AC26A0C607482C2' +
'7A0C61F482C2142CD4A026A5C80C40A026AEC81C47A026AAC80C4' +
'66026ACC80C44EFC6A005BFA141E');

Cod := DTMFromString('78DA6374626060E86440010DCB0A189481342' +
'310FF0702460B206322031A60442281B42B90E825A0C61D487411' +
'50E30524DA09A8090012F504D404813C42408D3F90A824A0C6930' +
'8735C89708F0B90A825A0C60A48741050630624FAF1AB0100FDCB' +
'1022');

Salmon := DTMFromString('78DA6374666060E060644006373CA51994813' +
'448F43F10309A0319BCA86A20B2301248DB020941026A5C81041F' +
'0135EE40828B801A3F20C14C404D10320F871A7F20F18F01BF9A0' +
'020F19B81B0393F09A8F122C22E50F8301270B30B90F8CB40382E' +
'D80898638519EFE86A00E1A40EEA');

End;


Procedure ProgressReport;

Var
H, M, S, I: Integer;
GpM: Extended;
Begin
ConvertTime(GetTimeRunning, H, M, S);
Writeln('||---------------------------------------------------||');
Writeln('||------------------Progress Report------------------||');
Writeln(Padr('|| Ran for '+IntToStr(H)+' hours, '+IntToStr(M)+' mins, '+IntToStr(S)+' sec.', 52) + ' ||');
Killed := Killed + Hit;
Hit := 0;
Writeln(Padr('|| Goblins killed: '+IntToStr(Killed), 52) +' ||');
GpM := H * 3600000 + M * 60000 + S * 1000;
GpM := GpM / 60000;
GpM := Killed / GpM;
Writeln(Padr('|| Goblins per minute: '+FloatToStr(GpM), 52) +' ||');
Writeln('||---------------------------------------------------||');
Writeln('|| Thank you for using n3s'' PowerGobliner. ||');
Writeln('||---------------------------------------------------||');
End;


Function FindGoblin(Var X, Y: Integer): Boolean;

Var
CTS, I, C: Integer;
Begin
X := MSCX;
Y := MSCY;
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
For I := 0 To 2 Do
Begin
Case I of
0: C := 4040609;
1: C := 4483121;
2: C := 2715756;
End;
If FindColorSpiralTolerance(X, Y, C, MSX1, MSY1, MSX2, MSY2, 12) Then
If CountColorTolerance(C, X - 5, Y - 5, X + 5, Y + 5, 10) >= 6 Then
Begin
Result := True;
Break;
End;
End;
ColorToleranceSpeed(CTS);
End;


Function Check(X, Y, Rx, Ry: Integer): Boolean;

Begin
Mouse(X, Y, Rx, Ry, False);
Result := ChooseOption('ttac');
End;


Function ClickGoblin: Boolean;

Var
X, Y: Integer;

Begin
If Not FindGoblin(X, Y) Then
Exit;
If ((Not MultiCombatArea) Xor IsFightAt(X, Y)) Then
If Check(X, Y, 2, 2) Then
Begin
Result := true;
FFlag(0);
End;
End;


Function FindAllHPBars: Array of TPointArray;

Var
g, r: TPointArray;

Begin

FindColorsTolerance(g, 65280, MSCX - 60, MSCY - 60, MSCX + 60, MSCY + 60, 0);
FindColorsTolerance(r, 255, MSCX - 60, MSCY - 60, MSCX + 60, MSCY + 60, 0);

Result := TPAToATPAEx(CombineTPA(g, r), 31, 5);

End;


Function GetHits: TIntegerArray;

Var
TPAA: T2DPointArray;
E: Extended;
I: Integer;
TB: TBox;

Begin

TPAA := FindAllHPBars;
SetArrayLength(Result, GetArrayLength(TPAA));

For I := 0 To High(TPAA) Do
Begin
TB := GetTPABounds(TPAA[i]);
E := CountColor(65280, TB.x1, TB.y1, TB.x2, TB.y2) / 150;
Result[i] := Round(100 * E);
End;

End;


Function ChatsBlueText: TStringArray;

Var
TPA: TPointArray;
I: Byte;

Begin
SetArrayLength(TPA, 9);
For I := 1 To 8 Do
TPA[i] := TextCoords(i);

SetArrayLength(Result, 9);
For I := 1 To 8 Do
Result[I] := Trim(GetTextAtEx(TPA[i].x - 2, TPA[i].y - 2, 0, SmallChars, False,
False, 0, 1, 16711680, 80, False, tr_AllChars));
End;


Procedure ChitChat;

Var
TSA, Q: TStringArray;
I, II, Z, X: Integer;
Begin
TSA := ChatsBlueText;
TSA := [TSA[6], TSA[7]];
Q := ['hp', 'hitpoint', 'str', 'strength', 'atk', 'attack', 'def', 'defence'];
For I := 0 To 1 Do
For II := 0 To High(Q) Do
Begin
z := Pos(Q[ii], TSA[i]);
x := Pos('lvl', TSA[i]);
If x = 0 Then
x := Pos('lev', TSA[i]);
If X > Z Then
Begin
Case II Of
0, 1: x := GetSkillInfo('hitpoints', False);
2, 3: x := GetSkillInfo('strength', False);
4, 5: x := GetSkillInfo('attack', False);
6, 7: x := GetSkillInfo('defence', False);
End;
TypeSend(IntToStr(X));
Exit;
End;
End;
End;


Function FightGoblin: Boolean;

Var
Hits: TIntegerArray;
FS, I: Integer;
Begin
If Not ClickGoblin Then Exit;
Result := True;
FS := GetSystemTime;
Wait(250 + Random(50));
If FindNormalRandoms Then
If Not LoggedIn Then
Exit;
Wait(100 + Random(25));
If FindBlackChatMessage('reach') Then Exit;
Wait(25);
If FindBlackChatMessage('someone') Then Exit;
Repeat
Wait(25);
If GetSystemTime - FS > 4000 Then Break;
Hits := GetHits;
Until(GetArrayLength(Hits) >= 0);
If GetArrayLength(Hits) > 0 Then
Result := True
Else
Exit;
FS := GetSystemTime;
Repeat
Hits := GetHits;
If GetArrayLength(Hits) < 1 Then
Exit
Else
For I := 0 To High(Hits) Do
If Hits[i] = 0 Then
Exit;
Wait(100 + Random(50));
If FindNormalRandoms Then
If Not LoggedIn Then
Exit;
Wait(100 + Random(50));
ChitChat;
If GetSystemTime - FS >= MonsterTime Then
Begin
Writeln('Timeout!');
Exit;
End;
Until(Not(LoggedIn));
End;


Function FindNPCs: TPointArray;

Var
CTS: Integer;

Begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsTolerance(Result, 195836, MMCX - 40, MMCY - 40, MMCX + 40, MMCY + 40, 12);
ColorToleranceSpeed(CTS);
RAaSTPA(Result, 4);
End;


Function doCallibrate: Boolean;

Var
Points: T2DPointArray;
X, Y: Integer;
Begin
Points := SplitTPA(FindNPCs, 35);
SortATPASize(Points, True);
Try
MiddleTPAEx(Points[0], X, Y);
MFNF(X, Y, 2, 2);
FFlag(0);
Result := True;
Except
Result := False;
End;
End;


Function NeedHealth: Extended;

Var
CS: String;
Begin
Result := (GetMMLevels('hitpoints', CS) / gHP);
End;


Function Eat: Boolean;

Var
DTM, X, Y: Integer;
CS: String;

Begin

If Players[CurrentPlayer].Strings[0] = '' Then
Begin
Result := True;
Exit;
End;

Case LowerCase(Players[CurrentPlayer].Strings[0]) Of
'meat': DTM := Meat;
'chicken': DTM := Chicken;
'trout': DTM := Trout;
'cod': DTM := Cod;
'salmon': DTM := Salmon;
End;

Repeat
If FindDTM(DTM, X, Y, MIX1, MIY1, MIX2, MIY2) Then
Begin
Mouse(X, Y, 2, 2, True);
Result := True;
End;
Wait(650 + Random(250));
Until(GetMMLevels('hitpoints', CS) >= Round(gHP)) or (Not(Result));

End;


Procedure KillGoblins;

Var
Miss, Callibrate, Count: Integer;
Begin
Callibrate := 0;
Count := 0;
Repeat
If Not FightGoblin Then
Miss := Miss + 1
Else
Begin
Miss := 0;
Callibrate := 0;
Hit := Hit + 1;
Count := Count + 1;
End;
If (Miss >= 10) And (Callibrate = 1) Then
Begin
Writeln('No goblins');
Callibrate := 0;
Logout;
Exit;
End;
If Miss > 10 Then
If Not doCallibrate Then
Begin
Writeln('Failed to callibrate');
Logout;
Exit;
End Else
Begin
Callibrate := 1;
Miss := 0;
End;
If NeedHealth < 0.65 Then
If Not Eat Then
Begin
Writeln('Out of food');
Logout;
Exit;
End;
If FindNormalRandoms Then
If Not LoggedIn Then
Exit;
If Not LoggedIn Then Exit;
Wait(450 + Random(250));
Until(Count >= 10 + Random(20));
End;


Procedure DoStyles;
Begin
Case Styles[CurrentPlayer] Of
Accurate: SetFightMode(1);
Agressive: SetFightMode(2);
Defence: SetFightMode(3);
Shared: SetFightMode(4);
End;
End;


Procedure ScriptTerminate;
Begin
FreeDTM(Meat);
FreeDTM(Chicken);
FreeDTM(Trout);
FreeDTM(Cod);
FreeDTM(Salmon);
End;


Var
I: Integer;


begin
SetupSRL;
LoadDTMs;
DeclarePlayers;
Repeat
LoginPlayer;
For I := 2 To 5 Do
SetChat('off', i);
DoStyles;
gHP := GetSkillInfo('hitpoints', False);
SetAngle(True);
SetRun(True);
SetRetaliate(True);
Repeat
KillGoblins;
ProgressReport;
If Not LoggedIn Then Break;
Until(Hit >= AmountGoblins + Random(20));
NextPlayer(LoggedIn);
ProgressReport;
Until(False);
end.

ShowerThoughts

2008-04-12 12:05:15

Great Mate i will check the code now ;)

Edit: Sweet code ;), Nice read

Naum

2008-04-12 12:07:43

Sigh N3ss3s sometime's you know too much TPA knowledge for your own good :p.

Very nice script for begginers, Registared users.

Rep++ to you

n3ss3s

2008-04-12 12:15:04

Hehe, thanks :)


@Hermpie:

If ((Not MultiCombatArea) Xor IsFightAt(X, Y)) Then


If the character is not in Multicombat Area and there isn't fight at the monster, it can attack it without getting Somebody else is already fighting this monster etc, or if the character is in multi and there is a fight, it also can attack it :)

ZephyrsFury

2008-04-12 12:17:01

Argh why must you shove random lines everywhere. Its hurting me eyes…. :rolleyes:… so much that I can't roll them properly… Other than that its looks good. :D

n3ss3s

2008-04-12 12:17:38

What does shoving random lines mean? :confused:

ZephyrsFury

2008-04-12 12:20:27

From: n3ss3s
What does shoving random lines mean? :confused:


Sorry… Its late here ;):


Function FindAllHPBars: Array of TPointArray;
//Why do you put a line here
Var
g, r: TPointArray;
//and here
Begin
//and here
FindColorsTolerance(g, 65280, MSCX - 60, MSCY - 60, MSCX + 60, MSCY + 60, 0);
FindColorsTolerance(r, 255, MSCX - 60, MSCY - 60, MSCX + 60, MSCY + 60, 0);
//and here
Result := TPAToATPAEx(CombineTPA(g, r), 31, 5);
//and here too?
End;

ShowerThoughts

2008-04-12 12:27:10

It is easy to read duh…

n3ss3s

2008-04-12 12:46:28

I put them because they look uber awesome.

ZephyrsFury

2008-04-12 12:58:27

From: Hermpie
It is easy to read duh…


It makes it harder for me to see where one function/procedure ends and where one begins.

From: n3ss3s
I put them because they look uber awesome.


You just keep thinking that.. ;)

Floor66

2008-04-12 13:09:57

Yeah it makes it more readable then it all stuffed together..
I'm gonna use this on my pure =p

-

Ive tried this in security stronghold, but id didnt find gobs, neither any good in Lumby..

n3ss3s

2008-04-12 13:47:45

Are you sure you have

a) Moved the crosshair
b) Have your screen on 32bit true color?

EvilChicken!

2008-04-12 14:20:02

I'll use this on my pure.

Add lobster as food if you want longer progress reports, and add the script as an attachment to your first post on this thread. But overall it looks REALLY nice, I wish I had your scripting skillZ. Now go write some tuts?
And, how long did this take to write?

Floor66

2008-04-12 14:20:42

Yeah, anyway i changed the case, added a few colors now works like a charm thx!

And yeah, add lobsters, that'd be good.

n3ss3s

2008-04-12 14:37:49

If you know how to make a bitmap, make a bitmap of the lobster, replace some other food with that and use the old foods name. I'm too lazy to go and add =p

ShowerThoughts

2008-04-12 14:50:33

From: EvilChicken!
I'll use this on my pure.

Add lobster as food if you want longer progress reports, and add the script as an attachment to your first post on this thread. But overall it looks REALLY nice, I wish I had your scripting skillZ. Now go write some tuts?
And, how long did this take to write?


Lobster on goblins LOL

Cazax

2008-04-12 16:31:43

||——————Progress Report——————||
|| Ran for 0 hours, 18 mins, 2 sec. ||
|| Goblins killed: 116 ||
|| Goblins per minute: 6,43253234750462 ||
||—————————————————||
|| Thank you for using n3s' PowerGobliner. ||
||—————————————————||
******** FOUND TALKING RANDOM TEXT********: Talk-to Molly
[Runtime Error] : Exception: Access violation at address 006CF23E in module 'scar.exe'. Read of address FFFFFFFC in line 1246 in script C:\Program Files\SCAR 3.15\includes\SRL/SRL/Core/AntiRandoms/AntiRandoms.scar

ShowerThoughts

2008-04-12 16:45:21

From: Cazax
||——————Progress Report——————||
|| Ran for 0 hours, 18 mins, 2 sec. ||
|| Goblins killed: 116 ||
|| Goblins per minute: 6,43253234750462 ||
||—————————————————||
|| Thank you for using n3s' PowerGobliner. ||
||—————————————————||
******** FOUND TALKING RANDOM TEXT********: Talk-to Molly
[Runtime Error] : Exception: Access violation at address 006CF23E in module 'scar.exe'. Read of address FFFFFFFC in line 1246 in script C:\Program Files\SCAR 3.15\includes\SRL/SRL/Core/AntiRandoms/AntiRandoms.scar


You got smashed down by molly xD

trav280

2008-04-13 18:41:09

hmm im downloading now, i am going to try on my pure i made

Striker13

2008-04-13 20:18:49

Line 87: [Hint] (12828:1): Variable 'I' never used in script
Line 460: [Error] (13201:1): Unknown identifier 'SetRetaliate' in script

n3ss3s

2008-04-14 10:05:55

Line 87: [Hint] (12828:1): Variable 'I' never used in script
Line 460: [Error] (13201:1): Unknown identifier 'SetRetaliate' in script


Oops, my bad, I put that after the test run. Change the SetRetaliate to Retaliate.

P1nky

2008-04-14 10:15:52

From: eugenius1
this script is jacking up for me


whats wrong with it …

post the problem lol:stirthepot:

RiboflavinYah

2008-04-14 12:45:02

Works fine for me.

Striker13

2008-04-14 13:33:19

Works perfect now. Thanks!

Floor66

2008-04-15 10:14:24

Is there gonna be any updates? The script is kinda good as it is =p

n3ss3s

2008-04-16 12:47:06

I will update if there occurs some problems, except the ones told in the first post.

lolkk

2008-04-22 04:01:59

ill run tonight and post proggie for u soon =]

x_²

2008-04-22 04:09:45

hmm ill have to make a new account and try this later but ill dl now…well save it ne way lol

yoshi123123

2008-04-29 09:34:28

Ill try it.

n3ss3s

2008-04-29 10:35:46

Okay, you better do so because I'll be waiting for a progress report.

limpan94

2008-04-29 15:52:54

Omg not even this script is working for me :( i rly need help

CH1C0

2008-05-02 14:51:57

Is this ban safe? Will this work for a Def pure?

bak2lumbyplz

2008-05-10 21:59:53

nice, easy script to set up n use.
is there like a colour/npc name to change to fight like minotaurs

y0m0mma0123

2008-05-23 16:53:29

this is a ok script
i had some buggs whith it for a little wile
it got me up a cople lvl but not much
try to work it out

y0m0mma0123

2008-05-23 16:55:53

i am going to mess around with the scrip
i will write back in a little bit
im going to try to c if i can get it to move a little bit faster

y0m0mma0123

2008-05-23 17:08:57

WOOOOOOOOOOOOOOOOOOO
there i feel stupid i had the info in the wrong place
it works fine now
wooooo

Ohmygod

2008-05-24 09:58:29

Hmm, It needs tht feature for multiple accounts really.. i find that much easier.. but nice script.. ill try it out

kylepesce

2008-05-24 23:47:54

i like it's its beastly lol=P i was suing on my bro's laptop

Rizowski

2008-05-28 23:52:25

Thanks for the script this one helped my noobe account to level 20!

spicynachos2

2008-05-29 04:45:54

i have not yet tried the script but i really like your idea. i plan on using this to help make a completely autoed account. mind if i use this in a combined script so i can train from making a new char-level-baned…

kolnel

2008-05-30 05:52:36

About to test it in 3 minuts :p

camarofreak12

2008-06-08 21:32:37

From: n3ss3s
Well I made this goblin killer script mainly for leveling my Pure Autoed Pure, since chickens are a bit crowded and not so good XP after 20 str and attack.

This script has got an auto-eater for the few most popular f2p foods for eating while autofighting, which I think are: Meat, Chicken, Trout, Cod and Salmon.

No point in eating lobster or swordfish while fighting goblins.

Caution: Goblin hut is not a good place to use this script, even there are failsafes, it's pretty stupid when you get a "false flag", that there is a flag but your char wont walk.

I suggest to use it in the Stronghold of Security underneath Barbarian Village, where are 5-13 levels in one room and about 20 lvl ones in another room, so there is plenty of choice for varying levels.

It is very rare, but sometimes it might attack two goblins at the sametime, so

a) Make sure the timeout you have set in Const is high enough.
b) Your char isn't supposed to be like lvl 10 while using this script, defence should be atleast 5 or more.


It's still in quite a beta stage, the 6.2 in the name just looks cool, so report possible bugs/ flaws and post improvements.

No bone burying, it's for noobs, and asking for item pickup is useless.


Place your players near goblins and hit run.

I had a test run yesterday, worked as supposed to, Good Luck & Have Fun.




Program PowerGoblins;
{.include SRL/SRL.scar}
{.include SRL/SRL/Skill/Fighting.scar}


Const MonsterTime = 35000;
Const AmountGoblins = 40;
Const MultiCombatArea = False;


Type
FightStyle = (Accurate, Agressive, Shared, Defence);


Var
Styles: Array of FightStyle;

Var
Meat, Chicken, Trout, Cod, Salmon, Hit, Killed: Integer;

Var
gHP: Extended;


Procedure DeclarePlayers;
Begin

HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

SetArrayLength(Styles, HowManyPlayers);

Players[0].Name := 'Username';
Players[0].Pass := 'Password';
Players[0].Nick := 'ser';
Players[0].Booleans[0] := True; // Eat?
Players[0].Strings[0] := ''; // Food name, if any, valid listed below.

// Valid foods: Meat, Chicken, Trout, Cod, Salmon.

Players[0].Active := True;

Styles[0] := Agressive; // Accurate, Agressive, Controlled, Defence

End;


Procedure LoadDTMs;
Begin

Meat := DTMFromString('78DA6374616060486340017DE18E0CCA409A1' +
'188FF0301A3399091CE8006189148206D05241209A87104127104' +
'D478008930026A7C814408013541402286801A7F209142408D379' +
'0C826A0C61D48141050E340841A6B2091875F0D005CFC0D51');

Chicken := DTMFromString('78DA6374626060B8C58002DA8304189481342' +
'310FF0702460B20E31E031A60442281B41D907840408D0790B84F' +
'408D1FA67B30D4F80289CB04D4F803897344987392801A7722D4D' +
'80389F304D45803894B04D4580289AB04D498110E1F00B0FF136A' +
'');

Trout := DTMFromString('78DA6374666060D8C280027A4AF2199481342' +
'310FF0702467320630F031A60442281B435116A4076ED22A0C60D' +
'486C23A0C60B486C22A0C60F48AC23A0260848AC26A0C607482C2' +
'7A0C61F482C2142CD4A026A5C80C40A026AEC81C47A026AAC80C4' +
'66026ACC80C44EFC6A005BFA141E');

Cod := DTMFromString('78DA6374626060E86440010DCB0A189481342' +
'310FF0702460B206322031A60442281B42B90E825A0C61D487411' +
'50E30524DA09A8090012F504D404813C42408D3F90A824A0C6930' +
'8735C89708F0B90A825A0C60A48741050630624FAF1AB0100FDCB' +
'1022');

Salmon := DTMFromString('78DA6374666060E060644006373CA51994813' +
'448F43F10309A0319BCA86A20B2301248DB020941026A5C81041F' +
'0135EE40828B801A3F20C14C404D10320F871A7F20F18F01BF9A0' +
'020F19B81B0393F09A8F122C22E50F8301270B30B90F8CB40382E' +
'D80898638519EFE86A00E1A40EEA');

End;


Procedure ProgressReport;

Var
H, M, S, I: Integer;
GpM: Extended;
Begin
ConvertTime(GetTimeRunning, H, M, S);
Writeln('||---------------------------------------------------||');
Writeln('||------------------Progress Report------------------||');
Writeln(Padr('|| Ran for '+IntToStr(H)+' hours, '+IntToStr(M)+' mins, '+IntToStr(S)+' sec.', 52) + ' ||');
Killed := Killed + Hit;
Hit := 0;
Writeln(Padr('|| Goblins killed: '+IntToStr(Killed), 52) +' ||');
GpM := H * 3600000 + M * 60000 + S * 1000;
GpM := GpM / 60000;
GpM := Killed / GpM;
Writeln(Padr('|| Goblins per minute: '+FloatToStr(GpM), 52) +' ||');
Writeln('||---------------------------------------------------||');
Writeln('|| Thank you for using n3s'' PowerGobliner. ||');
Writeln('||---------------------------------------------------||');
End;


Function FindGoblin(Var X, Y: Integer): Boolean;

Var
CTS, I, C: Integer;
Begin
X := MSCX;
Y := MSCY;
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
For I := 0 To 2 Do
Begin
Case I of
0: C := 4040609;
1: C := 4483121;
2: C := 2715756;
End;
If FindColorSpiralTolerance(X, Y, C, MSX1, MSY1, MSX2, MSY2, 12) Then
If CountColorTolerance(C, X - 5, Y - 5, X + 5, Y + 5, 10) >= 6 Then
Begin
Result := True;
Break;
End;
End;
ColorToleranceSpeed(CTS);
End;


Function Check(X, Y, Rx, Ry: Integer): Boolean;

Begin
Mouse(X, Y, Rx, Ry, False);
Result := ChooseOption('ttac');
End;


Function ClickGoblin: Boolean;

Var
X, Y: Integer;

Begin
If Not FindGoblin(X, Y) Then
Exit;
If ((Not MultiCombatArea) Xor IsFightAt(X, Y)) Then
If Check(X, Y, 2, 2) Then
Begin
Result := true;
FFlag(0);
End;
End;


Function FindAllHPBars: Array of TPointArray;

Var
g, r: TPointArray;

Begin

FindColorsTolerance(g, 65280, MSCX - 60, MSCY - 60, MSCX + 60, MSCY + 60, 0);
FindColorsTolerance(r, 255, MSCX - 60, MSCY - 60, MSCX + 60, MSCY + 60, 0);

Result := TPAToATPAEx(CombineTPA(g, r), 31, 5);

End;


Function GetHits: TIntegerArray;

Var
TPAA: T2DPointArray;
E: Extended;
I: Integer;
TB: TBox;

Begin

TPAA := FindAllHPBars;
SetArrayLength(Result, GetArrayLength(TPAA));

For I := 0 To High(TPAA) Do
Begin
TB := GetTPABounds(TPAA[i]);
E := CountColor(65280, TB.x1, TB.y1, TB.x2, TB.y2) / 150;
Result[i] := Round(100 * E);
End;

End;


Function ChatsBlueText: TStringArray;

Var
TPA: TPointArray;
I: Byte;

Begin
SetArrayLength(TPA, 9);
For I := 1 To 8 Do
TPA[i] := TextCoords(i);

SetArrayLength(Result, 9);
For I := 1 To 8 Do
Result[I] := Trim(GetTextAtEx(TPA[i].x - 2, TPA[i].y - 2, 0, SmallChars, False,
False, 0, 1, 16711680, 80, False, tr_AllChars));
End;


Procedure ChitChat;

Var
TSA, Q: TStringArray;
I, II, Z, X: Integer;
Begin
TSA := ChatsBlueText;
TSA := [TSA[6], TSA[7]];
Q := ['hp', 'hitpoint', 'str', 'strength', 'atk', 'attack', 'def', 'defence'];
For I := 0 To 1 Do
For II := 0 To High(Q) Do
Begin
z := Pos(Q[ii], TSA[i]);
x := Pos('lvl', TSA[i]);
If x = 0 Then
x := Pos('lev', TSA[i]);
If X > Z Then
Begin
Case II Of
0, 1: x := GetSkillInfo('hitpoints', False);
2, 3: x := GetSkillInfo('strength', False);
4, 5: x := GetSkillInfo('attack', False);
6, 7: x := GetSkillInfo('defence', False);
End;
TypeSend(IntToStr(X));
Exit;
End;
End;
End;


Function FightGoblin: Boolean;

Var
Hits: TIntegerArray;
FS, I: Integer;
Begin
If Not ClickGoblin Then Exit;
Result := True;
FS := GetSystemTime;
Wait(250 + Random(50));
If FindNormalRandoms Then
If Not LoggedIn Then
Exit;
Wait(100 + Random(25));
If FindBlackChatMessage('reach') Then Exit;
Wait(25);
If FindBlackChatMessage('someone') Then Exit;
Repeat
Wait(25);
If GetSystemTime - FS > 4000 Then Break;
Hits := GetHits;
Until(GetArrayLength(Hits) >= 0);
If GetArrayLength(Hits) > 0 Then
Result := True
Else
Exit;
FS := GetSystemTime;
Repeat
Hits := GetHits;
If GetArrayLength(Hits) < 1 Then
Exit
Else
For I := 0 To High(Hits) Do
If Hits[i] = 0 Then
Exit;
Wait(100 + Random(50));
If FindNormalRandoms Then
If Not LoggedIn Then
Exit;
Wait(100 + Random(50));
ChitChat;
If GetSystemTime - FS >= MonsterTime Then
Begin
Writeln('Timeout!');
Exit;
End;
Until(Not(LoggedIn));
End;


Function FindNPCs: TPointArray;

Var
CTS: Integer;

Begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsTolerance(Result, 195836, MMCX - 40, MMCY - 40, MMCX + 40, MMCY + 40, 12);
ColorToleranceSpeed(CTS);
RAaSTPA(Result, 4);
End;


Function doCallibrate: Boolean;

Var
Points: T2DPointArray;
X, Y: Integer;
Begin
Points := SplitTPA(FindNPCs, 35);
SortATPASize(Points, True);
Try
MiddleTPAEx(Points[0], X, Y);
MFNF(X, Y, 2, 2);
FFlag(0);
Result := True;
Except
Result := False;
End;
End;


Function NeedHealth: Extended;

Var
CS: String;
Begin
Result := (GetMMLevels('hitpoints', CS) / gHP);
End;


Function Eat: Boolean;

Var
DTM, X, Y: Integer;
CS: String;

Begin

If Players[CurrentPlayer].Strings[0] = '' Then
Begin
Result := True;
Exit;
End;

Case LowerCase(Players[CurrentPlayer].Strings[0]) Of
'meat': DTM := Meat;
'chicken': DTM := Chicken;
'trout': DTM := Trout;
'cod': DTM := Cod;
'salmon': DTM := Salmon;
End;

Repeat
If FindDTM(DTM, X, Y, MIX1, MIY1, MIX2, MIY2) Then
Begin
Mouse(X, Y, 2, 2, True);
Result := True;
End;
Wait(650 + Random(250));
Until(GetMMLevels('hitpoints', CS) >= Round(gHP)) or (Not(Result));

End;


Procedure KillGoblins;

Var
Miss, Callibrate, Count: Integer;
Begin
Callibrate := 0;
Count := 0;
Repeat
If Not FightGoblin Then
Miss := Miss + 1
Else
Begin
Miss := 0;
Callibrate := 0;
Hit := Hit + 1;
Count := Count + 1;
End;
If (Miss >= 10) And (Callibrate = 1) Then
Begin
Writeln('No goblins');
Callibrate := 0;
Logout;
Exit;
End;
If Miss > 10 Then
If Not doCallibrate Then
Begin
Writeln('Failed to callibrate');
Logout;
Exit;
End Else
Begin
Callibrate := 1;
Miss := 0;
End;
If NeedHealth < 0.65 Then
If Not Eat Then
Begin
Writeln('Out of food');
Logout;
Exit;
End;
If FindNormalRandoms Then
If Not LoggedIn Then
Exit;
If Not LoggedIn Then Exit;
Wait(450 + Random(250));
Until(Count >= 10 + Random(20));
End;


Procedure DoStyles;
Begin
Case Styles[CurrentPlayer] Of
Accurate: SetFightMode(1);
Agressive: SetFightMode(2);
Defence: SetFightMode(3);
Shared: SetFightMode(4);
End;
End;


Procedure ScriptTerminate;
Begin
FreeDTM(Meat);
FreeDTM(Chicken);
FreeDTM(Trout);
FreeDTM(Cod);
FreeDTM(Salmon);
End;


Var
I: Integer;


begin
SetupSRL;
LoadDTMs;
DeclarePlayers;
Repeat
LoginPlayer;
For I := 2 To 5 Do
SetChat('off', i);
DoStyles;
gHP := GetSkillInfo('hitpoints', False);
SetAngle(True);
SetRun(True);
SetRetaliate(True);
Repeat
KillGoblins;
ProgressReport;
If Not LoggedIn Then Break;
Until(Hit >= AmountGoblins + Random(20));
NextPlayer(LoggedIn);
ProgressReport;
Until(False);
end.


mine isnt working it says "failed when compiling"
:(

clayton da man

2008-06-08 23:16:53

alright im gonna test this im pretty sure it will be good ill post later to tell progress.

jacksoni

2008-06-09 08:52:34

nice script!!!

pheonix8d

2008-06-09 14:47:02

n3ss3s,

Thanks for the great script.

At first it often aborted because couldn't find goblins, but then I increased miss count from 10 to 30 and now it runs all night:

||—————————————————||
||——————Progress Report——————||
|| Ran for 9 hours, 31 mins, 1 sec. ||
|| Goblins killed: 3116 ||
|| Goblins per minute: 5.45693353959312 ||
||—————————————————||
|| Thank you for using n3s' PowerGobliner. ||
||—————————————————||

blade12

2008-06-09 21:09:37

lol if i start a new account i am going to use this it looks pretty good and alot of people like it thanks

fPsnx

2008-06-10 06:08:36

ill be goblin master :D

mogio

2008-06-10 17:25:17

Thanks this gave me some lvls

Hugolord

2008-06-10 17:26:42

From: mogio
Thanks this gave me some lvls

Liar, you didn't even try it.. :fiery:

U.S.mann

2008-06-10 20:26:23

[admin]Dear User,
Your post count has been reset on account of your mass of spam posts. Please take the time to read this thread before posting again.
Sticky: Attention Spammers and Leechers...
RAM

Cheers,
Hobbit.[/admin]

it looks fine to me but it comes with an error. i know that it is probably very nooby but help please.

ty

awesome i really need to level my magic. i will post proggie

finally i can get my fishing lvls up. it looks good. i will post proggie

hmm looks great im studying off of this script i will post proggie

yes! i needed an auto fighter. i will post prog

i will post prog

i will post prog

i will post prog

i will post prog

m0n3ym5k3r

2008-06-12 05:10:16

Thanks liked it but I prob won't use it any more :P

dance anthem

2008-06-27 23:17:21

what does it mean when it says fail when compiling:duh:

tompa55

2008-06-28 05:02:19

cool ;)

megaflare203

2008-06-28 07:38:29

LOL, f2p pures were pro back in the old days =)

n3ss3s

2008-06-28 10:42:55

Now you've gotten your cookies, it's time for you to find a new place to spam :)