SRL Archive - First Scripts

Simple Goblin Killer


putonajonny

2011-11-28 18:09:31

Simple Goblin Killer


This script can be started anywhere in the whole of Runescape, it kills Goblins and even Walks back if you die, perfect for low levels.

Please let me know any ways that it could be improved or if you think it would be good enough for SRL membership?


To download see the bottom of this post
//This script kills goblins in lumbridge, It will even walk back if you die. Give me feedback in the forms.

program GoblinKiller;

{.include SRL/SRL/Misc/Smart.scar}
{.include SRL/SRL.scar}
{$i sps/sps.simba}
{$i SRL/SRL/Misc/stats.simba}
{$i SRL/SRL/misc/paintsmart.scar}
{.include SRL/SRL/Skill/Fighting.scar}

Var
ChangePlayerEveryR, BreakEveryR, BreakForR, LastBreaked, LastSwapped, Location, x, y, TimeLast, Time, bones, i, attackedsinceburried, bonesburried, timespentb, TimeLastPainted, z : Integer;
Lumbridge, Goblins1, Goblins2, Goblins3: TPoint;
WalkGoblins: TPointArray;
Colours, BoneColours, PlayersToUse : TIntegerArray;
Ver, CurStatus : String;
DoneAntiban, PermissionToLocate, NoMoreBones, PtoLB, LootBones, JustLootBones : Boolean;

Const
Version = 4;
NCPColour1 = 4363920; //If the script won't fight the goblins then change these
NCPColour2 = 8029837;
NCPColour3 = 5994344;
NCPColour4 = 6516083;
WaitTime = 2000; //Wait Time before attacking another NCP
Tolerance = 3; //Colour Tolerence
HowOften = 0; //How often in seconds should it check the location? If it gets lost a lot lower this, if it is slow and is always checking location increase this
INeedHelp = False; //Do you need help setting this script up?
SRLStats_User = 'IDoNotHaveAnAccount'; // Your SRL Stats ID (If you dont have one then just leave it as it is)
SRLStats_Password = '12345abc'; // Your SRL Stats Password (If you dont have one then just leave it as it is)
TimeSpentBurrying = 10; //How much of the time should be spent burrying bones? Scale 1 to 10
ChangePlayerEvery = 60; //How often should it swap players +/-5
BreakEvery = 30; //Minutes +/-5
BreakFor = 10; //Minutes +/-5
ReusePlayers = True; //Once all the players have been used should it start again or end?
BoneCol1 = 9343124;
BoneCol2 = 11777723;


procedure DeclarePlayers;
begin

LootBones := True; //Loot and bury bones?
JustLootBones := True; //Just loot and bury bones? (no combat) For an explanation of why these aren't constants look here: [url]http://villavu.com/forum/showthread.php?p=863322[/url]

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

Players[0].Name :=''; //use " if you are getting ~
Players[0].Pass :='';
Players[0].Nick :='';//3-4 phrase from your name Ex. "ownage" = "nag"
Players[0].Active := True;


end; //no editing required below here...
Procedure SetBitmaps;
begin
bones := BitmapFromString(21, 18, 'meJx9k1lLQmEQhqVf4g8oiCKIbo' +
'wguu0i2mihbF9tQyRsEdO0PbHEss0WWwxLDGm/if5WDwwMH+dUMBy' +
'G+Wbe953lVLoaKlz1la6G8po6sbLq2hKHIx4/HBubwtGgmaBGodSa' +
'CFQdHV96vX4cp7NcIgr1j0kadnGRDQRWpZzv5dV9LJbUV4ESSYjXw' +
'qenj9u7/MlJBvF+f6DXPSjxQuHt7Ox6fSMWDEZ9vsWJiRmC0qYY+A' +
'eH6c3NOKQLi8H5+WW+pgAwpRDM5pZ2iYMJUTi8wZPHM4eZCrU2my1' +
'EIlsqRuIYdAQHBkdlzjc3j5YesWLxEwpBlioxWgZzaGhcM9/fv0HY' +
'208hFSeff3l9+0Ihc7BgijEKxcTJ5Yqp1Dm9JJOnmUzu4fFZZPf1D' +
'5PJ6IizFOIQ4Wst88eHiHaYA5msXmRPT3sxBKyE1nlNJI7T57cQ0S' +
'b6pQvZHbymNlpg/jgjI5Mzsz58EnZ2E/BChG8/G20E2dG1Hab6a9c' +
'YCs1jFtMrZYAwWqatJtrk8u1Hi7alpVBHZ4+Um2n6v8jhmbVsiplw' +
'twijX6WWqtIql/0HNMvZCNe7vb3HqBsbm/SPU1K7bwKKcnYEdWtbp' +
'1n+F6kFTdYHe1e328JuB/kBYKY/7Q==');
end;

Procedure PrintOnSmart(TP: TStringArray; Placement: TPoint; Colour: integer); //Thanks to BobboHobbo
var
mx, my, Pic, I, B, H, Numb: Integer;
TTP: TPointArray;
Canvas: TCanvas;
begin
SmartSetDebug(True);
GetClientDimensions(mx, my);
Pic := BitmapFromString(mx, my, '');
for I := 0 to High(TP) do
begin
TTP := LoadTextTPA(TP[i], SmallChars, H);
for B := 0 to High(TTP) do
begin
Numb := ((I + 1) * 13);
FastSetPixel(Pic, TTP[b].x + 1, TTP[b].y + Numb + 1,8388736);
FastSetPixel(Pic, TTP[b].x, TTP[b].y + Numb, Colour);
end;
end;
Canvas := TCANVAS.Create;
Canvas.Handle := SmartGetDebugDC;
DrawBitmap(Pic, Canvas, Placement.x, Placement.y);
FreeBitmap(Pic);
end;

Procedure Paint;
begin
If((GetTimeRunning-TimeLastPainted)>5000) then
begin
PrintOnSmart(['Status:', CurStatus ], Point(42, 45), 16695040);
PrintOnSmart(['this script was written by putonajonny'], Point(270,359),16695040);
PrintOnSmart(['Time Running (Perodically Updated)',TimeRunning],Point(563,424),16695040);

TimeLastPainted := GetTimeRunning
end;
end;

function FindHPBars(Sx, Sy, x1, y1, x2, y2: Integer): TBoxArray; //this function is an exact copy of FindAllHPBars except the colours needed changing
var
a, b : TPointArray;
ATPA : T2DPointArray;
H, I : Integer;
begin
FindColorsSpiralTolerance(Sx, Sy, a, 524473, x1, y1, x2, y2, 0);
FindColorsSpiralTolerance(Sx, Sy, b, 51867, x1, y1, x2, y2, 0);
ATPA := TPAToATPAEx(CombineTPA(a, b), 55, 7);
H := High(ATPA);
SetLength(Result, Length(ATPA));
for I := 0 to H do
Result[i] := GetTPABounds(ATPA[i]);
end;
function GetHits(Sx, Sy, x1, y1, x2, y2: Integer): TIntegerArray; //this function is an exact copy of GetHitsIn but i needed to make it call FindHPBars not FindAllHPBars

var
E: Extended;
I, H: Integer;
TBA : TBoxArray;
begin
TBA := FindHPBars(Sx, Sy, x1, y1, x2, y2);
SetArrayLength(Result, GetArrayLength(TBA));
H := High(TBA);
for I := 0 To H Do
begin
E := CountColorTolerance(56488, TBA[i].x1, TBA[i].y1, TBA[i].x2, TBA[i].y2, 43) / 60;
Result[i] := Round(100 * E);
end;
end;

function IsFighting(Tolerance : Integer) : Boolean; //My function
var
Hits : TIntegerArray;
HP : Integer;
begin
Result := False
Hits := GetHits(253, 99, 0, 0, 764, 502);

if GetArrayLength(Hits) = 0 then
Exit;

HP := HPPercent
Result := ((HP-Tolerance) < Hits[0]) and ((HP+Tolerance) > Hits[0]);

if (GetArrayLength(Hits) > 1) and (not Result) then
Result := ((HP-Tolerance) < Hits[1]) and ((HP+Tolerance) > Hits[1]);
end;

Procedure CheckVersion;
Begin
CurStatus := 'Checking that you are running the most recent version'
Ver := GetPage('http://goblinkiller.webuda.com/Ver');
If Version = StrToInt(Ver) then
begin
WriteLn('You are using the most up to date version -Thank you');
end else
begin
If Version > StrToInt(Ver) then
begin
WriteLn('**You seem to be useing some sort of beta version, be careful')
end else
begin
ClearDebug;
WriteLn('Please Update This Script, opening web page...');
OpenWebPage('http://goblinkiller.webuda.com/Redirect');
TerminateScript; //Comment out this to use this version anyway
end;
end;
End;
Procedure CheckRandoms;
begin
CurStatus := 'Checking for Randoms'
Paint;
FindNormalRandoms;
If Not(LoggedIn) Then
begin
WriteLn('I think we failed a random - I will just Check');
LoginPlayer;
FindNormalRandoms;
If Not(LoggedIn) Then
begin
WriteLn('Client has Logged Out So Probably Failed a Random - Terminating Script');
TerminateScript;
end
end;
end;
Procedure CheckLocation;
begin
If((GetTimeRunning<60000) or ((GetTimeRunning-TimeLast)>HowOften*1000) or (PermissionToLocate)) then
begin
CurStatus := 'Checking Location'
Paint;
Wait(4000+Random(2000))
Location := 2;
if (SPS_PosOnMM(Lumbridge)) then
Location := 0; //lumbridge
if (SPS_PosOnMM(Goblins1)) or (SPS_PosOnMM(Goblins2)) or (SPS_PosOnMM(Goblins3)) then
Location := 1; //Goblins
TimeLast := GetTimeRunning
end;
end;
Procedure WalkToGoblins;
begin
CurStatus := 'Walking to Goblins'
Paint;

WalkGoblins := [Point(4708, 3767), Point(4733, 3767), Point(4753, 3761), Point(4759, 3743), Point(4748, 3723),
Point(4731, 3707), Point(4717, 3693), Point(4710, 3676), Point(4698, 3677), Point(4675, 3674),
Point(4648, 3678), Point(4625, 3675), Point(4598, 3677), Point(4580, 3676), Point(4565, 3676), Point(4565, 3650)]

If(SPS_WalkPath(WalkGoblins)) then
WriteLn('At Goblins');
end;
Procedure RectifyLocation;
begin
CurStatus := 'Rectifying Location'
Paint;
Mouse(254, 309, 10, 5, true);
Wait(250+Random(250));
Mouse(544, 24,5,5,true);

If (FindSymbol( x, y, 'fishing shop')) then //attempt 1
begin
WriteLn('using fishing shop to fix location')
CurStatus := 'using fishing shop to fix location'
Paint;
Wait(500+Random(200));
x := x-43
y := y-5
Mouse(x, y,5,5,true);
Wait(2000+Random(2000));
end;

If (FindSymbol( x, y, 'dungeon')) then //attempt 2
begin
WriteLn('using dungeon to fix location')
CurStatus := 'using dungeon to fix location'
Paint;
Wait(500+Random(200));
x := x+66
y := y+7
Mouse(x, y,2,2,true);
Wait(2000+Random(2000));
end;

If (FindSymbol( x, y, 'fish')) then //attempt 3
begin
WriteLn('using fishing spot to fix location')
CurStatus := 'using fishing spot to fix location'
Paint;
Wait(500+Random(200));
x := x+59
y := y+68
Mouse(x, y,2,2,true);
Wait(2000+Random(2000));
end;

If (FindSymbol( x, y, 'water')) then //attempt 4
begin
WriteLn('using water to fix location')
CurStatus := 'using water to fix location'
Paint;
Wait(500+Random(200));
x := x-45
y := y+87
Mouse(x, y,2,2,true);
Wait(2000+Random(2000));
end;

If (FindSymbol( x, y, 'churn')) then //attempt 5
begin
WriteLn('using churn to fix location')
CurStatus := 'using churn to fix location'
Paint;
Wait(500+Random(200));
x := x-52
y := y+108
Mouse(x, y,2,2,true);
Wait(2000+Random(2000));
end;

PermissionToLocate := True
CheckLocation;

case location of //final attempt
2: begin
Mouse(626,152,2,2,True)
Wait(2000+Random(1000));
end;
end;

PermissionToLocate := True
CheckLocation;

case location of
2:
begin
Writeln('Location Not Recognised - Lets Teleport Home')
GameTab(tab_Magic)
Wait(1000+Random(500))
Mouse(575, 230, 5, 5, true)
Time := GetTimeRunning;
Repeat
Wait(2000+Random(500));
If((GetTimeRunning - Time) > 15000) and (Not SPS_PosOnMM(Lumbridge)) then
begin
GameTab(tab_Magic)
Wait(1000+Random(500))
Mouse(575, 230, 5, 5, true)
Time := GetTimeRunning;
end;
Until(SPS_PosOnMM(Lumbridge));
PermissionToLocate := True;
Wait(2000+Random(1000))
end;
end;

end;
Procedure Attack;
begin
CurStatus := 'Attacking'
Paint;
If (FightNPC(Colours, Tolerance, WaitTime)) then
stats_IncVariable('Monsters Killed', 1)
else
SetAngle(True);
DoneAntiban := False;
attackedsinceburried := attackedsinceburried + 1
If (attackedsinceburried>(10-TimeSpentBurrying)) then
begin
PtoLB := True;
attackedsinceburried := 0
end;
end;
Procedure AntiBan;
begin
CurStatus := 'Antiban'
Paint;
If Not(DoneAntiban) then
begin
x := Random(51)
case x of
0: HoverSkill('Attack', False); //Beautiful Antiban
1: HoverSkill('Strength', False);
2: HoverSkill('Defence', False);
3: HoverSkill('hitpoints', False);
4: HoverSkill('smithing', False);
5: HoverSkill('woodcutting', False);
6: HoverSkill('firemaking', False);
7: HoverSkill('magic', False);
8: HoverSkill('woodcutting', False);
9: HoverSkill('fishing', False);
10: HoverSkill('prayer', False);
11: HoverSkill('runecrafting', False);
12..15: PickUpMouse;
16..25: RandomMovement;
26..27: RandomRClick;
28..32: BoredHuman;
33: ExamineInv;
34: RandomAngle(True);
35..48: Wait(1000+random(1000));
49..50: Wait(1000+Random(20000));
end;
DoneAntiban := True;
Wait(2000+Random(500));
end;
end;
Procedure Rest;
begin
If(TimeFromMark(LastBreaked) > (BreakEveryR*60000)) then
begin
WriteLn('Breaking For '+IntToStr(BreakForR)+' Minutes')
If(LoggedIn) then
Logout;
Wait(BreakForR*60000);
BreakEveryR := BreakEvery - 5 + Random(10);
BreakForR := BreakFor - 5 +Random(10);
WriteLn('Break Done!')
WriteLn('We will break in '+IntToStr(BreakEveryR)+' minutes, for '+IntToStr(BreakForR)+' minutes.')
LogInPlayer;
MarkTime(LastBreaked)
end;
end;
Procedure BuryBones;
begin
CurStatus := 'Burying Bones'
Paint;
TimeSpentB := TimeSpentBurrying;
GameTab(25);
for i := 1 to 28 do
begin
If (ExistsItem(i)) then
begin
Repeat
InvMouse(i, 3);
If(WaitUptextMulti(['ury','one'],1000)) then
begin
ClickMouse2(True);
bonesburried := bonesburried + 1;
stats_IncVariable('Bones (Burried)',1);
end;
Wait(500+Random(800));
Until(not ExistsItem(i) or not(WaitUptextMulti(['ury','one'],1000)))
end;
end;
end;
Procedure Loot;
begin
CurStatus := 'Looting'
Paint;
BuryBones;
If((LootBones and PtoLB) or (JustLootBones)) then
begin
for i := 0 to High(BoneColours) do
begin
IF(FindColorTolerance(x, y, BoneColours[i], 0, 0, 516, 338, 10)) then
begin
Wait(400+Random(200))
Mouse( x, y, 2, 2, False);
If (WaitOption('one', 2000)) then
stats_IncVariable('Bones (Collected)',1);
BuryBones;
end;
end;
Wait(3000+Random(500));
end;
end;
Procedure BonesProgress;
begin
CurStatus := 'Progress Report'
Paint;
If((((GetTimeRunning-Time)>15000) and (JustLootBones)) or ((GetTimeRunning-Time)>60000)) then
begin
WriteLn('')
WriteLn('')
WriteLn('[-------------------------------------------------------------------------------]');
WriteLn('[' + padr(padl('Bone Burrier by Putonjonny', 38 + Length('Bone Burrier by Putonjonny') / 2), 79) + ']');
WriteLn('[-------------------------------------------------------------------------------]');
WriteLn(PadR('[ Time Running: ' + TimeRunning, 80) + ']');
WriteLn(PadR('[ Bones Burried: ' + IntToStr(bonesburried), 80) + ']');
Writeln('[-------------------------------------------------------------------------------]');
WriteLn('')
Time := GetTimeRunning;
end;

end;
Procedure ChangePlayer;
begin
MarkTime(LastSwapped)
z := z+1
If(LoggedIn) then
Logout;
if(z = GetArrayLength(PlayersToUse)) then
begin
case ReusePlayers of
True: z := 0;
False: begin
WriteLn('****All players Used and ReusePlayers is False so Ending Script****')
TerminateScript;
end;
end;
end;
SwitchToPlayer(PlayersToUse[z],ReusePlayers)
Repeat
LoginPlayer;
Wait(2000);
Until(LoggedIn)

ChangePlayerEveryR := ChangePlayerEvery - 5 + Random(10)
WriteLn('We will change players again in '+IntToStr(ChangePlayerEveryR)+' minutes.')

end;
Procedure OpenHelpPage;
begin
ClearDebug;
WriteLn('You have not uncommented lines 11 and 44 or you have not setup the script correctly')
Wait(1000+Random(100)); //why have I put a random on this :S
WriteLn('You obvoiusly need some help...')
Wait(1000+Random(100));
WriteLn('Reaching out for help...')
Wait(1000+Random(100));
WriteLn('I cant find any...')
Wait(1000+Random(100));
WriteLn('It seems that nobody can help you now...')
Wait(1000+Random(100));
WriteLn('Oh wait...')
Wait(1000+Random(100));
WriteLn('Here we go... :)')
Wait(1000+Random(100));
OpenWebPage('http://putonajonnyscripts.hostoi.com/Help.htm')
WriteLn('')
WriteLn('')
WriteLn('')
Wait(250)
WriteLn('To Clarify: You have not uncommented lines 11 and 44 or you have not setup the script correctly.')
WriteLn('Please set up script again then restart.')
WriteLn('The Webpage that Just Opened should help.')
TerminateScript;
end;

Procedure EndScript;
begin
BonesProgress;
Status('Goodbye... I will miss you :(')
WriteLn('Goodbye...')
WriteLn('Script Ran For: '+TimeRunning)
FreeBitmap(3)
end;

begin
ClearDebug;
If (IneedHelp) then
begin
WriteLn('Opening Help Page');
OpenWebPage('http://goblinkiller.webuda.com/Help');
TerminateScript;
end;

CheckVersion;

AddOnTerminate('EndScript');

CurStatus := 'Setting Up'
Lumbridge := Point(4706, 3767);
Goblins1 := Point(4570, 3650);
Goblins2 := Point(4570, 3650);
Goblins3 := Point(4570, 3650);
Colours := [NCPColour1,NCPColour2,NCPColour3,NCPColour4];
BoneColours := [BoneCol1, BoneCol2, 9737883, 12962254,13159633,13948382,11974847,9803164,9671578,8421510,14211810];
bonesburried := 0;
z := 0
ChangePlayerEveryR := ChangePlayerEvery - 5 + Random(10)
BreakEveryR := BreakEvery - 5 + Random(10)
BreakForR := BreakFor - 5 + Random(10)

Smart_Server := 11;
Smart_Members := False;
Smart_Signed := False;
Smart_SuperDetail := False;
SetupSRL;
SetupSRLStats(305, SRLStats_User, SRLStats_Password);
cleardebug;
Paint;
WriteLn('***************Goblin Killer by Putonajonny Version '+IntToStr(Version)+'***************');
CheckVersion;
SetBitmaps;


DeclarePlayers;

LoginPlayer;
WriteLn('We will break in '+IntToStr(BreakEveryR)+' minutes, for '+IntToStr(BreakForR)+' minutes.');
WriteLn('We will change players in '+IntToStr(ChangePlayerEveryR)+' minutes.')

SPS_Areas := ['11_9'];
SPS_Setup(RUNESCAPE_SURFACE, SPS_Areas);

MarkTime(LastSwapped);
MarkTime(LastBreaked);

If (JustLootBones) then
begin
SetAngle(True)
Repeat
If(TimeFromMark(LastSwapped)>(60000*ChangePlayerEveryR)) then
ChangePlayer;
Loot;
BonesProgress;
CheckRandoms;
Stats_Commit;
Until(false)
end;

Repeat
If(TimeFromMark(LastSwapped)>60000*ChangePlayerEveryR) then
ChangePlayer;
Rest;
Paint;
SetAngle(True);
CheckRandoms;
Rest;
Stats_Commit;
CheckLocation;
case location of
0: WalkToGoblins;
1:begin
Loot;
If(bonesburried>0) then
BonesProgress;
If(isfighting(10)) then
AntiBan
else
Attack;
end;
2: RectifyLocation;
else
RectifyLocation;
end;
until(false)
end.

[XoL]

2011-11-28 18:14:57

I think its a good script, much better than what I could put out at this stage

Try to get some professional options though perhaps IRC.
Then apply! :P

putonajonny

2011-11-28 18:24:52

From: R4nd0m
I think its a good script, much better than what I could put out at this stage

Try to get some professional options though perhaps IRC.
Then apply! :P


Thanks very much

[XoL]

2011-11-28 21:06:03

Could you actually explain how you put in the home teleport function, looks like a great failsafe.

Like what is this

Mouse(254, 309, 10, 5, true);
Wait(500+Random(500));
Mouse(544, 24,5,5,true);
Wait(1000+Random(200))

I remember reading something about large numbers near mouse something about a map?
If so how did you create it?

Heavenguard

2011-11-29 13:20:59

Mouse is a procedure that moves the mouse cursor to the coordinate specified. Great first script, very creative.

putonajonny

2011-11-29 13:40:33

From: R4nd0m
Could you actually explain how you put in the home teleport function, looks like a great failsafe.

Like what is this

Mouse(254, 309, 10, 5, true);
Wait(500+Random(500));
Mouse(544, 24,5,5,true);
Wait(1000+Random(200))

I remember reading something about large numbers near mouse something about a map?
If so how did you create it?


If you look at this procedure :
Procedure CheckLocation;
begin
Wait(4000+Random(2000))
Location := 2;
if (SPS_PosOnMM(Lumbridge)) then
Location := 0; //lumbridge
if (SPS_PosOnMM(Goblins1)) or (SPS_PosOnMM(Goblins2)) or (SPS_PosOnMM(Goblins3)) then
Location := 1; //Goblins
end;

What that does is tries to find the current location, if it is at lumbridge castle it returns 0 if it is at the goblins it returns 1 and if it is at neither/can't detect the location it returns 2, then in my main loop you will see:




case location of
0: WalkToGoblins;
1: Attack;
2: RectifyLocation;
else
RectifyLocation;
end;
What this does is checks for that number, if it is 0 (i.e. at lumbridge castle) then it walks to the goblins, if it is 1 (i.e. at the goblins) then it starts attacking, if it is 2 or any other number then it attempts to 'rectify location'.



Procedure RectifyLocation;
begin
Mouse(254, 309, 10, 5, true);
Wait(500+Random(500));
Mouse(544, 24,5,5,true);
Wait(1000+Random(200));
If (FindSymbol( x, y, 'fishing shop')) then
begin
x := x-43
y := y-5
Mouse(x, y,5,5,true);
Wait(2000+Random(2000));
end;

CheckLocation;

case location of
2:
begin
Writeln('Location Not Recognised - Lets Teleport Home')
Mouse(748, 187,5,5,true)
Wait(1000+Random(500))
Mouse(575, 230, 5, 5, true)
Wait(16000+Random(2000))
end;
end;

This is the attempt to rectify the location:



  Mouse(254, 309, 10, 5, true);
this clicks continue just incase you have died,


Mouse(544, 24,5,5,true);
This aligns the map to north,


If (FindSymbol( x, y, 'fishing shop')) then
begin
x := x-43
y := y-5
Mouse(x, y,5,5,true);
Wait(2000+Random(2000));
end;
This looks for the symbol of the fishing shop, if it finds it it performs some calculations to work out the co-ordinates of the goblin hill and then clicks on it, it then checks the location again, if it still doesn't know where it is then it teleports home. Once there it will walk to the goblins again.

[XoL]

2011-11-29 17:03:00

Ah I see! Thank you :)
+Rep

TrLoLoLoL

2011-11-29 17:17:53

dose your script work in lumby?

[XoL]

2011-11-29 17:18:56

From: i hate fagex
dose your script work in lumby?


Yes…
All of the code is based for Lumbridge.

TrLoLoLoL

2011-11-29 17:21:12

From: R4nd0m
Yes…
All of the code is based for Lumbridge.
Sweet Dude! :D

TrLoLoLoL

2011-11-29 18:18:57

Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
Error: Out Of Range at line 142. what is this ?

RISK

2011-11-29 18:20:40

Make sure your SRL is updated to the latest revision, please.

From: i hate fagex
[Error] (204:9): Unknown identifier 'Mouse' at line 203 i got this error when i went to go and get something to eat what is this ??

TrLoLoLoL

2011-11-29 18:21:18

Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
Error: Out Of Range at line 142

[XoL]

2011-11-30 17:25:55

I wish I knew what that was as well I get it in my script too :(

putonajonny

2011-12-03 13:10:41

From: R4nd0m
I wish I knew what that was as well I get it in my script too :(


Please use the debug version and then post the full error box

sander70

2011-12-05 05:55:29

can you maby make also a fighting script for cows?


sorry for my bad english im dutch:P

sickboy84

2011-12-08 20:11:06

This is a great script, I'm new here and so far it's the best one I found to train fighting in low level chars. It could be improved a lot though. Please keep working on it !

putonajonny

2011-12-09 19:11:25

From: sander70
can you maby make also a fighting script for cows?


sorry for my bad english im dutch:P


Yes I could, would you want it looting though? that would make it a bit harder, PM me about this

From: sickboy84
This is a great script, I'm new here and so far it's the best one I found to train fighting in low level chars. It could be improved a lot though. Please keep working on it !


Thanks, what improvements do you think would be good?

Mark

2011-12-09 19:18:29

nice first script

      4: HoverSkill('smithing', False);
5: HoverSkill('woodcutting', False);
6: HoverSkill('firemaking', False);
7: HoverSkill('magic', False);
8: HoverSkill('woodcutting', False);
9: HoverSkill('fishing', False);
10: HoverSkill('prayer', False);
11: HoverSkill('runecrafting', False);
dont realy see the point would just slow the script down as your not even training these skills

sickboy84

2011-12-10 15:21:18

From: putonajonny

Thanks, what improvements do you think would be good?


  • Fixing this error:
  • Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Although is isn't a big problem, it could affect performance.
  • Detecting the goblins even faster.
  • And of course, you could always reuse your script to match things other than goblins, like cow, rats, etc.

putonajonny

2011-12-10 16:35:55

Version 2 Submitted, added a few more features.

sickboy84

2011-12-11 01:03:26

Really really great script. And lessing the random waits a bit makes much more efficient (although more prone to a ban).

Can you remake it for other stuff like cows, giant rats, minotaurs, etc.?

omegaangelz

2011-12-11 08:02:02

I agree with sickboy, this is a wonderful script coded beautifully for a beginner. +1 for a first script. I also agree that a cow killer would be useful, and seeing your comment about looting, would be a nice update if you were to initially release the cow killer itsself, then later an option to bank hides or even hides bones and raw beef.

driftz

2011-12-11 22:10:32

IT wont attack the goblins or anything

Paula_Deen

2011-12-15 20:51:43

How exactly do you uncomment 11 and 44?

putonajonny

2011-12-15 20:52:29

updated to version 3

Paula_Deen

2011-12-15 21:02:06

I figured it out.
Why don't you just use plain English and tell people to delete all of the text on lines 11 and 44? :/

I'm really not quite sure why you're trying to implement a quicker way to enter the information right now…
They are going to release a script manager soon, so this system of entering in your information is going to be obsolete in a few weeks.

jakethemuss

2011-12-15 21:04:00

Exception in Script: Unable to find file 'SRL/DeclarePlayers.scar' used from ''

im trying to start it and thats what is popping up , please help ?

Paula_Deen

2011-12-15 21:05:58

Error: Exception: The bitmap[2] does not exist at line 425
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap]

Am I doing something wrong or is it not working right?

When the script starts, after logging in, it starts trying to loot bones … even though I have BOTH looting options on False.

trials6112

2011-12-16 10:34:19

Just change the Declare Players Procedure if you are having difficulties, i switched the declare player procedure from V1 into this newly implemented version viola magic it works like a bawsssssss

Thanks again johnyy =)

Xmile

2011-12-16 14:55:34

***************Goblin Killer by Putonajonny Version 3***************
You are using the most up to date version -Thank you
Error: Exception: The bitmap[2] does not exist at line 424
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap]


my line is

If (FindBitmapToleranceIn(bones, x, y, 546, 206, 735, 465, 15)) then

lambo0622

2011-12-16 15:30:29

From: Xmile
***************Goblin Killer by Putonajonny Version 3***************
You are using the most up to date version -Thank you
Error: Exception: The bitmap[2] does not exist at line 424
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap]


my line is

If (FindBitmapToleranceIn(bones, x, y, 546, 206, 735, 465, 15)) then


im having the exact same issue

Expendus

2011-12-18 19:25:16

How do do add it to my SIMBA Bot

mxtrix

2011-12-20 08:50:42

Heres the fix, just add the Declare player section from V1 to V3 and run

okokokok

2011-12-20 19:04:59

It just logs in and after that it immediately logs out :S
Any suggestions how to fix it?
This is the error im getting:

Error: Out Of Range at line 497
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]

Configz

2011-12-21 09:55:16

Here it just logs in and then log out straigt after?

- Configz

kaal

2011-12-24 06:11:44

I got error: Exception in Script: Unable to find file 'SRL/DeclarePlayers.scar' used from ''
so I copied the declareplayers procedure from V1 to V3 and now I still get the exact same problem..

Demondog

2011-12-24 07:35:17

I am getting this:

Error: Exception: The bitmap[3] does not exist at line 425
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]

Any ideas on how to get around this?

okokokok

2011-12-24 12:02:35

From: Demondog
I am getting this:

Error: Exception: The bitmap[3] does not exist at line 425
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]

Any ideas on how to get around this?


Im just a beginning scripter and have to learn a lot about bitmaps, but i saw that in the script it says "FreeBitmap". Try to change it to "FreeBitMap" and see if that works. Again im not a very experienced scripter yet :)

Valkyrie

2011-12-24 18:31:10

Paint;
If Not(DoneAntiban) then
begin
x := Random(51)
case x of
0: HoverSkill('Attack', False); //Beautiful Antiban
1: HoverSkill('Strength', False);
2: HoverSkill('Defence', False);
3: HoverSkill('hitpoints', False);
4: HoverSkill('smithing', False);
5: HoverSkill('woodcutting', False);
6: HoverSkill('firemaking', False);
7: HoverSkill('magic', False);
8: HoverSkill('woodcutting', False);
9: HoverSkill('fishing', False);
10: HoverSkill('prayer', False);
11: HoverSkill('runecrafting', False);
12..15: PickUpMouse;
16..25: RandomMovement;
26..27: RandomRClick;
28..32: BoredHuman;
33: ExamineInv;
34: RandomAngle(True);
35..48: Wait(1000+random(1000));
49..50: Wait(1000+Random(20000));
end;
DoneAntiban := True;
Wait(2000+Random(500));
end;
Approved and epic antiban! :spongebob:

iScream

2011-12-28 02:44:16

Why does it just keep logging me in then logging me out? Please help, I'm new.

MuffinMan

2011-12-28 15:35:12

[Hint] C:\Simba\Includes\SRL/SRL/core/gametab.scar(1607:3): Variable 'PREVIOUS' never used at line 1606
Compiled successfully in 468 ms.
Please Update This Script, opening web page…
Successfully executed.

Michaud

2011-12-29 21:02:31

Hmmm.. ima test this script. :)

Toby1

2011-12-29 21:28:07

Tried it, it worked great! first script I executed thanks ;D

TheNutKicker

2011-12-31 02:59:43

i get this error

[Error] C:\Simba\Includes\SRL/DeclarePlayers.scar(14:19): Unknown identifier 'Terabinladen' at line 13
Compiling failed.

Giant Panda

2012-01-04 09:13:43

just stands there doing nothing :/

gember

2012-01-14 16:47:16

could you update it pls.

tank3

2012-01-15 20:13:03

Sorry don't work, won't let you attact the npc

Shatterhand

2012-01-17 06:09:57

Can someone please share me this function?
function FightNPC(Colours : TIntegerArray; Tolerance, WaitTime : Integer) : Boolean
This script uses it, but I cant find it. This is a great function.

usb1y

2012-01-22 17:28:51

Hey i'm trying to run this script and its saying it cannot find some file can someone link me a tut or video on how to setup custom scripts this is the first time i used one so idk what to do

usb1y

2012-01-22 17:29:58

???

wolkano

2012-01-22 17:48:11

same problem please help we need the simba version please some one help

usb1y

2012-01-22 18:48:39

I get this error Exception in Script: Unable to find file 'C:\Simba\Includes\SRL/SRL/core/misc/smart.scar' used from if anyone knows how to fix this ill love you i tryed pressing the green button still the same error :(

usb1y

2012-01-22 18:53:08

ill +rep

usb1y

2012-01-22 18:55:14

I have teamviewer if you wanna take a look
ID: 964 393 902
Password: 2620 :garfield:

lilpjer

2012-01-22 19:17:42

It takes a while to find the goblin and kill it.

zgraham

2012-02-16 13:02:33

Does this bot pick up charms?

kingsleyeng

2012-02-17 03:15:16

ok needs an update i think smart.scar error again :/

yakumo885

2012-02-19 03:38:19

From: kingsleyeng
ok needs an update i think smart.scar error again :/


same problem :(

siyao

2012-02-25 04:00:03

Does this script take charms??

SXxR

2012-02-25 07:41:07

Does this work in the goblin village?

Nukewire

2012-02-25 19:47:06

Was the FightNPC function removed from SRL/Skills/fighting.simba?
Or am I just an idiot?

cool13bro

2012-04-01 20:41:52

From: SXxR
Does this work in the goblin village?


Nope, only lumby.. it's kind of outdated though.

Anyways, I was going to comment on this saying wow.. Putonajonny is a natural.. this as his first script. I was just using another one of his scripts.. and that one is flawless. Hopefully, by practicing I can be half as good as him one day. Great work man

putonajonny

2012-04-06 10:15:13

From: cool13bro
Nope, only lumby.. it's kind of outdated though.

Anyways, I was going to comment on this saying wow.. Putonajonny is a natural.. this as his first script. I was just using another one of his scripts.. and that one is flawless. Hopefully, by practicing I can be half as good as him one day. Great work man


Yeah, if the demand is there I will update… but thanks :)

DivineOli

2012-06-02 06:59:12

Excellent script!

mighall31

2012-06-03 10:33:33

i have just downloaded simba and do not know how to add scripts? where is the download link? plz help

mighall31

2012-06-03 10:37:40

i have just downloaded your script 4 and it sais ' unable to find file srl/srl/misc/smart.scar please help!

Mufasa

2012-06-03 10:48:36

From: mighall31
i have just downloaded your script 4 and it sais ' unable to find file srl/srl/misc/smart.scar please help!


The script is out of date. You can try changing everything that says ".scar" to ".simba" and adding {$DEFINE SRL5} at the top but I massively doubt it will fix it.

I know next to nothing about scripting so I can't really give any reliable advice except;

  • Wait for the script to be updated
  • Go learn to script yourself so you can fix it
  • Use another fighter (like Narcle's)


Devils_Curse666

2012-06-03 19:48:19

ok i am new to this and it keeps saying error i dont under stand how to make it work plz help

putonajonny

2012-06-04 04:37:49

From: Devils_Curse666
ok i am new to this and it keeps saying error i dont under stand how to make it work plz help


This is very outdated, if you want to use it you will have to fix it

OnMyOwnLevel

2012-06-12 01:40:13

I get this error on the latest version, Exception in Script: Unable to find file 'SRL/SRL/Misc/Smart.scar' used from ''

putonajonny

2012-06-12 05:31:34

From: OnMyOwnLevel
I get this error on the latest version, Exception in Script: Unable to find file 'SRL/SRL/Misc/Smart.scar' used from ''


This script is outdated, there are many other working combat scripts, you could try one of those or fix it up :)

xboxjason

2012-07-21 04:11:51

Exception in Script: in file "!addGlobalType"

alucard123

2012-09-11 17:53:04

wouldve used it if it didnt bury bone

Stevenbest4

2013-03-28 12:13:22

Exception in Script: Unable to find file 'SRL/SRL/Misc/Smart.scar' used from 'C:\Users\BOY'S ROOM\Downloads\Simba\GoblinKiller Version 4.simba'

Help Please!!