SRL Archive - OSR Help

Unknown Type


cradlefatal

2013-02-27 03:47:55

I get this error
[Error] C:\Simba\Scripts\dragonkiller.simba(12:3): Unknown type 'todragons' at line 11
Compiling failed.

here is my script
program DragonKiller;
{$DEFINE SMART8}
{$i SRL\SRL.simba}
var x,y,kills,z,count,count2,t,waitTime,CurrentHp,TotalHp :Integer;
var ColorString : String;
var Skills :Array of String;
var FightMode,PercentEat:Array of Integer;
var Xp :Array of Array [0..1] of Array [0..3] of Integer;
var todragons:
//{delcare the sps variable}
todragons: tpointarray;

status: string;


procedure DeclarePlayers;
begin
HowManyPlayers := 1; // This is set to the total amount of players (more on multiplayer later ;)), for now, just keep it set as 1
NumberOfPlayers(HowManyPlayers); // This is a procedure in SRL which sets up player arrays (also, more on that later), this will always be the same
CurrentPlayer := 0; // This is the player to start with; the first player will always be 0 (you'll find out when you learn all about arrays)
SetLength(Xp,HowManyPlayers);
SetLength(FightMode,HowManyPlayers);
SetLength(PercentEat,HowManyPlayers);

Players[0].Name := ''; // Username
Players[0].Pass := ''; // Password
Players[0].Nick := ''; // 3-4 lowercase letters from username; used for random event detection
Players[0].Active := True; // Set to true if you want to use Player 0
Players[0].Pin := ''; // Leave blank if the player doesn't have a bank pin
FightMode[0] := 4; // 1 Attack 2 Strength 3 Controlled 4 Defence
// 0 if using your own preset Ex. range or magic
PercentEat[0] := 25; // Percentage to Eat at whole numbers only
//(Health to eat at divided by total health multiplied by 100)
end;




procedure paths;
begin
todragons := [Point(3298, 2931), Point(3342, 2933), Point(3402, 2943), Point(3393, 2976), Point(3328, 3005)]
end;
procedure testpath;
begin
if sps_walkpath(todragons) then
status := 'walking to the dragons'
else begin
status :='failed walking to the dragons';
writeln(status + ' + time running:' +timerunning);
end;
writeln(status + ' + time running:' +timerunning);
end;








// SpiralOut: Basic Antiban Mouse Spiral
Procedure SpiralOut ();
var
z,x,y, endpoint : Integer;
begin
z := 0;
endpoint := randomRange (50,150);
repeat
x := Round(z*Cos(0.5*z)+260);
y := Round(z*Sin(0.5*z)+224);
z := z + 1;
MMouse (x,y,20,20);
until (z >= endpoint)
end;

// Basic Antiban, exmain inventory, Spiral Mouse, Check Level, and Reset View
Procedure AntiBAM ();
begin
FindNormalRandoms;
case random(1000) of
25: examineInv;
30: SpiralOut;
50: begin gameTab (23);
LevelUpEX(False,True);
hoverSkill (Skills[Random(1)],false);
gameTab(25);
wait (100+Random(random(500))) end;
70: MMouse (365, 275,100,100);
99: ClickNorth(0);
end;
end;
Function Eat(HPP, PercentEat:Integer): Boolean;
var
I: Integer;
begin
Result := False;
If Not LoggedIn then Exit;
if (HPP < PercentEat) then
for i := 1 to 28 do
begin
if (ExistsItem(i)) then
begin
InvMouse(I, 3);
if IsUpText('Eat') then
begin
ClickMouse2(True);
Wait(RandomRange(350, 525));
Result := True;
Exit;
end;
end else
if (i = 28) then
Logout;
end;
end;
Procedure Proggy;
Begin
ClearDebug;
writeln('----------------------------------------------------------------');
For count2 := 0 to CurrentPlayer do
Begin
writeln(Players[count2].Name+' has gained the following xp');
for count := 0 to 3 do
begin
if not(Xp[count2][1][count]-Xp[count2][0][count] = 0) then
writeln (Skills[count]+' gained ~ '+ToStr (Xp[count2][1][count]-Xp[count2][0][count])+' XP');
end;
End;
writeln ('You have killed '+ToStr(Kills)+'Blue dragon');
writeln (Players[CurrentPlayer].Name+' has '+ToStr(InvCount)+' Pieces of Food Left');
writeln('----------------------------------------------------------------');
End;

Procedure Main ();
Begin
if not(FightMode[CurrentPlayer] = 0) then
SetFightMode (FightMode[CurrentPlayer]);
for count := 0 to 3 do
Begin
Xp[CurrentPlayer][0][count]:= getXP (Skills[count]);
Xp[CurrentPlayer][1][count]:=Xp[CurrentPlayer][0][count];
End;
Marktime(T);
repeat
RunEnergy(25);
TotalHp:= Max(1, GetSkillInfo('hitpoints', False))*10;
if FindObjCustom(x,y,['ttack','Blu', 'Att', 'lue'],[8410698, 4473370, 4401698, 3354644, 3618325, 3218712, 4012317, 3350297, 9670715, 3218712, 10511185,4275482], 2) then
Begin
ClickMouse2(True);
markTime (t);
repeat
Wait(5);
if (TimeFromMark(t) >= 5000) then Break;
until (not FlagPresent) and srl_InFight;
if (srl_Infight) then
begin
Marktime(T);
waitTime := 1000+RandomRange(300,600);
repeat
wait (100+random (200));
AntiBAM;
CurrentHp:= GetMMLevels('hp', ColorString);
if (z>200) then begin
writeln('Hp: '+ToStr(CurrentHp)+' / '+ToStr(TotalHp));
writeln ('Hp: %'+ToStr(CurrentHp*100/TotalHp));
for count := 0 to 3 do
Begin
Xp[CurrentPlayer][1][count]:= getXP (Skills[count]);
End;
z:=0;
end;
Eat(Round(CurrentHp*100/TotalHp),PercentEat[CurrentPlayer]);
z:= z+1;
If srl_InFight Then Marktime(T);
until (TimeFromMark(T) >= waitTime)
Marktime(T)
Kills := Kills +1;
Proggy;
End;
End;
until (not LoggedIn or (TimeFromMark(T) > 80000))
Players[CurrentPlayer].Active := False;
LogOut;
if not(CurrentPlayer+1 = HowManyPlayers) then
CurrentPlayer := CurrentPlayer + 1;
End;








begin
SetScriptProp(SP_WriteTimeStamp, [True]);
Skills := ['Attack', 'Strength', 'Defence', 'Constitution' ];
activateClient;
SetupSRL;
DeclarePlayers;
Kills := 0;
paths; //{call path variables here}
//{Mistake I see a lot only call the map once, Not in the procedure}
//{If using multiple accounts it will always give an error when trying to pull the map}
sps_setup(runescape_other,['todragons']);
testpath;

repeat
LoginPlayer;
ClickNorth(0);
Main;
until (AllPlayersInactive)
end.

Le Jingle

2013-02-27 03:53:46

probably caused by your variable declarations,
ex.

var todragons:
//{delcare the sps variable}
todragons: tpointarray;

status: string;

would be better with out the todragons : todragons : tpointarray;
thus


var
//{delcare the sps variable}
todragons: tpointarray;

status: string;

notice that a todragons term was removed

Chris!

2013-02-27 04:01:38

Use [noparse]
[/noparse] tags instead of the basic SIMBA tags. It adds line numbers so it helps us help you.

program DragonKiller;
{$DEFINE SMART8}
{$i SRL\SRL.simba}
var x,y,kills,z,count,count2,t,waitTime,CurrentHp,TotalHp :Integer;
var ColorString : String;
var Skills :Array of String;
var FightMode,PercentEat:Array of Integer;
var Xp :Array of Array [0..1] of Array [0..3] of Integer;
var todragons: //You don't have this defined. Basically what you're saying here is that this line
//to the todragons: tpointarray;
//line is apart of the same line.
//So it's like this: var todragons: todragons: tpointarray;
//{delcare the sps variable}
todragons: tpointarray;

Read the commented out parts of the code I placed after var todragons:

Personally, I'd define your SPS walkpath TPointArray's as local variables, this means they are defined under var in the procedure they are used in. Look at any guide in the tutorials section for more help with that.

Also, you don't need var before every global variable, this would look much better:

var 
x, y, kills, z, count, count2, t, waitTime, CurrentHp, TotalHp: Integer;
ColorString: string;
Skills: TStringArray; //TStringArray is the new format instead of Array of String
FightMode, PercentEat: TInteger; //I'm not sure if it's TInteger, someone else can point that one out.
Xp: Array of Array [0..1] of Array [0..3] of Integer; //I don't know.
todragons: TPointArray

Don't know some of them as I haven't coded in awhile.

I hope this helped.

cradlefatal

2013-02-27 04:02:07

okay now I'm getting this
[Error] C:\Simba\Scripts\dragonkiller.simba(45:6): Unknown identifier 'sps_walkpath' at line 44



program DragonKiller;
{$DEFINE SMART8}
{$i SRL\SRL.simba}
var x,y,kills,z,count,count2,t,waitTime,CurrentHp,TotalHp :Integer;
var ColorString : String;
var Skills :Array of String;
var FightMode,PercentEat:Array of Integer;
var Xp :Array of Array [0..1] of Array [0..3] of Integer;

var todragons: tpointarray;
{delcare the sps variable}
status: string;


procedure DeclarePlayers;
begin
HowManyPlayers := 1; // This is set to the total amount of players (more on multiplayer later ;)), for now, just keep it set as 1
NumberOfPlayers(HowManyPlayers); // This is a procedure in SRL which sets up player arrays (also, more on that later), this will always be the same
CurrentPlayer := 0; // This is the player to start with; the first player will always be 0 (you'll find out when you learn all about arrays)
SetLength(Xp,HowManyPlayers);
SetLength(FightMode,HowManyPlayers);
SetLength(PercentEat,HowManyPlayers);

Players[0].Name := ''; // Username
Players[0].Pass := ''; // Password
Players[0].Nick := ''; // 3-4 lowercase letters from username; used for random event detection
Players[0].Active := True; // Set to true if you want to use Player 0
Players[0].Pin := ''; // Leave blank if the player doesn't have a bank pin
FightMode[0] := 4; // 1 Attack 2 Strength 3 Controlled 4 Defence
// 0 if using your own preset Ex. range or magic
PercentEat[0] := 25; // Percentage to Eat at whole numbers only
//(Health to eat at divided by total health multiplied by 100)
end;




procedure paths;
begin
todragons := [Point(3298, 2931), Point(3342, 2933), Point(3402, 2943), Point(3393, 2976), Point(3328, 3005)]
end;
procedure todragon;
begin
if sps_walkpath(todragons) then
status := 'walking to the dragons'
else begin
status :='failed walking to the dragons';
writeln(status + ' + time running:' +timerunning);
writeln(status + ' + time running:' +timerunning);
end;









// SpiralOut: Basic Antiban Mouse Spiral
Procedure SpiralOut ();
var
z,x,y, endpoint : Integer;
begin
z := 0;
endpoint := randomRange (50,150);
repeat
x := Round(z*Cos(0.5*z)+260);
y := Round(z*Sin(0.5*z)+224);
z := z + 1;
MMouse (x,y,20,20);
until (z >= endpoint)
end;

// Basic Antiban, exmain inventory, Spiral Mouse, Check Level, and Reset View
Procedure AntiBAM ();
begin
FindNormalRandoms;
case random(1000) of
25: examineInv;
30: SpiralOut;
50: begin gameTab (23);
LevelUpEX(False,True);
hoverSkill (Skills[Random(1)],false);
gameTab(25);
wait (100+Random(random(500))) end;
70: MMouse (365, 275,100,100);
99: ClickNorth(0);
end;
end;
Function Eat(HPP, PercentEat:Integer): Boolean;
var
I: Integer;
begin
Result := False;
If Not LoggedIn then Exit;
if (HPP < PercentEat) then
for i := 1 to 28 do
begin
if (ExistsItem(i)) then
begin
InvMouse(I, 3);
if IsUpText('Eat') then
begin
ClickMouse2(True);
Wait(RandomRange(350, 525));
Result := True;
Exit;
end;
end else
if (i = 28) then
Logout;
end;
end;
Procedure Proggy;
Begin
ClearDebug;
writeln('----------------------------------------------------------------');
For count2 := 0 to CurrentPlayer do
Begin
writeln(Players[count2].Name+' has gained the following xp');
for count := 0 to 3 do
begin
if not(Xp[count2][1][count]-Xp[count2][0][count] = 0) then
writeln (Skills[count]+' gained ~ '+ToStr (Xp[count2][1][count]-Xp[count2][0][count])+' XP');
end;
End;
writeln ('You have killed '+ToStr(Kills)+'Blue dragon');
writeln (Players[CurrentPlayer].Name+' has '+ToStr(InvCount)+' Pieces of Food Left');
writeln('----------------------------------------------------------------');
End;

Procedure Main ();
Begin
if not(FightMode[CurrentPlayer] = 0) then
SetFightMode (FightMode[CurrentPlayer]);
for count := 0 to 3 do
Begin
Xp[CurrentPlayer][0][count]:= getXP (Skills[count]);
Xp[CurrentPlayer][1][count]:=Xp[CurrentPlayer][0][count];
End;
Marktime(T);
repeat
RunEnergy(25);
TotalHp:= Max(1, GetSkillInfo('hitpoints', False))*10;
if FindObjCustom(x,y,['ttack','Blu', 'Att', 'lue'],[8410698, 4473370, 4401698, 3354644, 3618325, 3218712, 4012317, 3350297, 9670715, 3218712, 10511185,4275482], 2) then
Begin
ClickMouse2(True);
markTime (t);
repeat
Wait(5);
if (TimeFromMark(t) >= 5000) then Break;
until (not FlagPresent) and srl_InFight;
if (srl_Infight) then
begin
Marktime(T);
waitTime := 1000+RandomRange(300,600);
repeat
wait (100+random (200));
AntiBAM;
CurrentHp:= GetMMLevels('hp', ColorString);
if (z>200) then begin
writeln('Hp: '+ToStr(CurrentHp)+' / '+ToStr(TotalHp));
writeln ('Hp: %'+ToStr(CurrentHp*100/TotalHp));
for count := 0 to 3 do
Begin
Xp[CurrentPlayer][1][count]:= getXP (Skills[count]);
End;
z:=0;
end;
Eat(Round(CurrentHp*100/TotalHp),PercentEat[CurrentPlayer]);
z:= z+1;
If srl_InFight Then Marktime(T);
until (TimeFromMark(T) >= waitTime)
Marktime(T)
Kills := Kills +1;
Proggy;
End;
End;
until (not LoggedIn or (TimeFromMark(T) > 80000))
Players[CurrentPlayer].Active := False;
LogOut;
if not(CurrentPlayer+1 = HowManyPlayers) then
CurrentPlayer := CurrentPlayer + 1;
End;








begin
SetScriptProp(SP_WriteTimeStamp, [True]);
Skills := ['Attack', 'Strength', 'Defence', 'Constitution' ];
activateClient;
SetupSRL; todragons
DeclarePlayers;
Kills := 0;
paths; //{todragons}
//{Mistake I see a lot only call the map once, Not in the procedure}
//{If using multiple accounts it will always give an error when trying to pull the map}
sps_setup(runescape_other,['todragons']);

testpath;

repeat
LoginPlayer;
Main;
until (AllPlayersInactive)
end.

Chris!

2013-02-27 04:03:33

You didn't call the SPS.simba extension.

Add

{$i SPS/sps.simba}

Below your {$i SRL/srl.simba}

cradlefatal

2013-02-27 04:10:38

okay I changed it around and it looks like this but I'm getting this error again
[Error] C:\Simba\Scripts\dragonkiller.simba(46:12): Invalid number of parameters at line 45


program DragonKiller;
{$DEFINE SMART8}
{$i SRL\SRL.simba}
{$i SPS/sps.simba}

var x,y,kills,z,count,count2,t,waitTime,CurrentHp,TotalHp :Integer;
ColorString : String;
Skills :Array of String;
FightMode,PercentEat:Array of Integer;
Xp :Array of Array [0..1] of Array [0..3] of Integer;
todragons: tpointarray;
{delcare the sps variable}


procedure DeclarePlayers;
begin
HowManyPlayers := 1; // This is set to the total amount of players (more on multiplayer later ;)), for now, just keep it set as 1
NumberOfPlayers(HowManyPlayers); // This is a procedure in SRL which sets up player arrays (also, more on that later), this will always be the same
CurrentPlayer := 0; // This is the player to start with; the first player will always be 0 (you'll find out when you learn all about arrays)
SetLength(Xp,HowManyPlayers);
SetLength(FightMode,HowManyPlayers);
SetLength(PercentEat,HowManyPlayers);

Players[0].Name := ''; // Username
Players[0].Pass := ''; // Password
Players[0].Nick := ''; // 3-4 lowercase letters from username; used for random event detection
Players[0].Active := True; // Set to true if you want to use Player 0
Players[0].Pin := ''; // Leave blank if the player doesn't have a bank pin
FightMode[0] := 4; // 1 Attack 2 Strength 3 Controlled 4 Defence
// 0 if using your own preset Ex. range or magic
PercentEat[0] := 25; // Percentage to Eat at whole numbers only
//(Health to eat at divided by total health multiplied by 100)
end;




procedure paths;
begin
todragons := [Point(3298, 2931), Point(3342, 2933), Point(3402, 2943), Point(3393, 2976), Point(3328, 3005)]
end;
procedure todragon;
begin
if sps_walkpath(todragons) then
status := 'walking to the dragons'
else begin
status :='failed walking to the dragons';
writeln(status + ' + time running:' +timerunning);
writeln(status + ' + time running:' +timerunning);
end;









// SpiralOut: Basic Antiban Mouse Spiral
Procedure SpiralOut ();
var
z,x,y, endpoint : Integer;
begin
z := 0;
endpoint := randomRange (50,150);
repeat
x := Round(z*Cos(0.5*z)+260);
y := Round(z*Sin(0.5*z)+224);
z := z + 1;
MMouse (x,y,20,20);
until (z >= endpoint)
end;

// Basic Antiban, exmain inventory, Spiral Mouse, Check Level, and Reset View
Procedure AntiBAM ();
begin
FindNormalRandoms;
case random(1000) of
25: examineInv;
30: SpiralOut;
50: begin gameTab (23);
LevelUpEX(False,True);
hoverSkill (Skills[Random(1)],false);
gameTab(25);
wait (100+Random(random(500))) end;
70: MMouse (365, 275,100,100);
99: ClickNorth(0);
end;
end;
Function Eat(HPP, PercentEat:Integer): Boolean;
var
I: Integer;
begin
Result := False;
If Not LoggedIn then Exit;
if (HPP < PercentEat) then
for i := 1 to 28 do
begin
if (ExistsItem(i)) then
begin
InvMouse(I, 3);
if IsUpText('Eat') then
begin
ClickMouse2(True);
Wait(RandomRange(350, 525));
Result := True;
Exit;
end;
end else
if (i = 28) then
Logout;
end;
end;
Procedure Proggy;
Begin
ClearDebug;
writeln('----------------------------------------------------------------');
For count2 := 0 to CurrentPlayer do
Begin
writeln(Players[count2].Name+' has gained the following xp');
for count := 0 to 3 do
begin
if not(Xp[count2][1][count]-Xp[count2][0][count] = 0) then
writeln (Skills[count]+' gained ~ '+ToStr (Xp[count2][1][count]-Xp[count2][0][count])+' XP');
end;
End;
writeln ('You have killed '+ToStr(Kills)+'Blue dragon');
writeln (Players[CurrentPlayer].Name+' has '+ToStr(InvCount)+' Pieces of Food Left');
writeln('----------------------------------------------------------------');
End;

Procedure Main ();
Begin
if not(FightMode[CurrentPlayer] = 0) then
SetFightMode (FightMode[CurrentPlayer]);
for count := 0 to 3 do
Begin
Xp[CurrentPlayer][0][count]:= getXP (Skills[count]);
Xp[CurrentPlayer][1][count]:=Xp[CurrentPlayer][0][count];
End;
Marktime(T);
repeat
RunEnergy(25);
TotalHp:= Max(1, GetSkillInfo('hitpoints', False))*10;
if FindObjCustom(x,y,['ttack','Blu', 'Att', 'lue'],[8410698, 4473370, 4401698, 3354644, 3618325, 3218712, 4012317, 3350297, 9670715, 3218712, 10511185,4275482], 2) then
Begin
ClickMouse2(True);
markTime (t);
repeat
Wait(5);
if (TimeFromMark(t) >= 5000) then Break;
until (not FlagPresent) and srl_InFight;
if (srl_Infight) then
begin
Marktime(T);
waitTime := 1000+RandomRange(300,600);
repeat
wait (100+random (200));
AntiBAM;
CurrentHp:= GetMMLevels('hp', ColorString);
if (z>200) then begin
writeln('Hp: '+ToStr(CurrentHp)+' / '+ToStr(TotalHp));
writeln ('Hp: %'+ToStr(CurrentHp*100/TotalHp));
for count := 0 to 3 do
Begin
Xp[CurrentPlayer][1][count]:= getXP (Skills[count]);
End;
z:=0;
end;
Eat(Round(CurrentHp*100/TotalHp),PercentEat[CurrentPlayer]);
z:= z+1;
If srl_InFight Then Marktime(T);
until (TimeFromMark(T) >= waitTime)
Marktime(T)
Kills := Kills +1;
Proggy;
End;
End;
until (not LoggedIn or (TimeFromMark(T) > 80000))
Players[CurrentPlayer].Active := False;
LogOut;
if not(CurrentPlayer+1 = HowManyPlayers) then
CurrentPlayer := CurrentPlayer + 1;
End;








begin
SetScriptProp(SP_WriteTimeStamp, [True]);
Skills := ['Attack', 'Strength', 'Defence', 'Constitution' ];
activateClient;
SetupSRL; todragons
DeclarePlayers;
Kills := 0;
paths; //{todragons}
//{Mistake I see a lot only call the map once, Not in the procedure}
//{If using multiple accounts it will always give an error when trying to pull the map}
sps_setup(runescape_other,['todragons']);

testpath;

repeat
LoginPlayer;
Main;
until (AllPlayersInactive)
end.

Chris!

2013-02-27 04:15:08

You haven't defined 'status' as a variable. It would be a string, though.

Don't forget to add an extra end; to that procedure, by the way. You don't have enough.

cradlefatal

2013-02-27 04:16:58

what do you mean I haven't defined status?

tealc

2013-02-27 04:18:42

declare status as a variable

cradlefatal

2013-02-27 04:19:36

how do I do that?

Chris!

2013-02-27 04:21:12

Where you have all your global variables, place status in the :string; line, after ColorString. 'ColorString, status: string'.

Or, you could have it as a local variable by doing this:

procedure todragon;
var
status: string;
begin
if sps_walkpath(todragons) then
status := 'walking to the dragons'
else
begin
status :='failed walking to the dragons';
writeln(status + ' + time running:' +timerunning);
writeln(status + ' + time running:' +timerunning);
end;
end;

cradlefatal

2013-02-27 04:27:49

okay just wanting to make sure I put it in the right spot and when I got that fixed I got a problem

[Error] C:\Simba\Scripts\dragonkiller.simba(64:1): Identifier expected at line 63
Compiling failed.




program DragonKiller;
{$DEFINE SMART8}
{$i SRL\SRL.simba}
{$i SPS/sps.simba}

var x,y,kills,z,count,count2,t,waitTime,CurrentHp,TotalHp :Integer;
ColorString : String;
Skills :Array of String;
FightMode,PercentEat:Array of Integer;
Xp :Array of Array [0..1] of Array [0..3] of Integer;
todragons: tpointarray;
{delcare the sps variable}


procedure DeclarePlayers;
begin
HowManyPlayers := 1; // This is set to the total amount of players (more on multiplayer later ;)), for now, just keep it set as 1
NumberOfPlayers(HowManyPlayers); // This is a procedure in SRL which sets up player arrays (also, more on that later), this will always be the same
CurrentPlayer := 0; // This is the player to start with; the first player will always be 0 (you'll find out when you learn all about arrays)
SetLength(Xp,HowManyPlayers);
SetLength(FightMode,HowManyPlayers);
SetLength(PercentEat,HowManyPlayers);

Players[0].Name := ''; // Username
Players[0].Pass := ''; // Password
Players[0].Nick := ''; // 3-4 lowercase letters from username; used for random event detection
Players[0].Active := True; // Set to true if you want to use Player 0
Players[0].Pin := ''; // Leave blank if the player doesn't have a bank pin
FightMode[0] := 4; // 1 Attack 2 Strength 3 Controlled 4 Defence
// 0 if using your own preset Ex. range or magic
PercentEat[0] := 25; // Percentage to Eat at whole numbers only
//(Health to eat at divided by total health multiplied by 100)
end;




procedure paths;
begin
todragons := [Point(3298, 2931), Point(3342, 2933), Point(3402, 2943), Point(3393, 2976), Point(3328, 3005)]
end;
procedure todragon;
var
status: string;
begin
if sps_walkpath(todragons) then
status := 'walking to the dragons'
else begin
status :='failed walking to the dragons';
writeln(status + ' + time running:' +timerunning);
writeln(status + ' + time running:' +timerunning);
end;









// SpiralOut: Basic Antiban Mouse Spiral
Procedure SpiralOut ();
var
z,x,y, endpoint : Integer;
begin
z := 0;
endpoint := randomRange (50,150);
repeat
x := Round(z*Cos(0.5*z)+260);
y := Round(z*Sin(0.5*z)+224);
z := z + 1;
MMouse (x,y,20,20);
until (z >= endpoint)
end;

// Basic Antiban, exmain inventory, Spiral Mouse, Check Level, and Reset View
Procedure AntiBAM ();
begin
FindNormalRandoms;
case random(1000) of
25: examineInv;
30: SpiralOut;
50: begin gameTab (23);
LevelUpEX(False,True);
hoverSkill (Skills[Random(1)],false);
gameTab(25);
wait (100+Random(random(500))) end;
70: MMouse (365, 275,100,100);
99: ClickNorth(0);
end;
end;
Function Eat(HPP, PercentEat:Integer): Boolean;
var
I: Integer;
begin
Result := False;
If Not LoggedIn then Exit;
if (HPP < PercentEat) then
for i := 1 to 28 do
begin
if (ExistsItem(i)) then
begin
InvMouse(I, 3);
if IsUpText('Eat') then
begin
ClickMouse2(True);
Wait(RandomRange(350, 525));
Result := True;
Exit;
end;
end else
if (i = 28) then
Logout;
end;
end;
Procedure Proggy;
Begin
ClearDebug;
writeln('----------------------------------------------------------------');
For count2 := 0 to CurrentPlayer do
Begin
writeln(Players[count2].Name+' has gained the following xp');
for count := 0 to 3 do
begin
if not(Xp[count2][1][count]-Xp[count2][0][count] = 0) then
writeln (Skills[count]+' gained ~ '+ToStr (Xp[count2][1][count]-Xp[count2][0][count])+' XP');
end;
End;
writeln ('You have killed '+ToStr(Kills)+'Blue dragon');
writeln (Players[CurrentPlayer].Name+' has '+ToStr(InvCount)+' Pieces of Food Left');
writeln('----------------------------------------------------------------');
End;

Procedure Main ();
Begin
if not(FightMode[CurrentPlayer] = 0) then
SetFightMode (FightMode[CurrentPlayer]);
for count := 0 to 3 do
Begin
Xp[CurrentPlayer][0][count]:= getXP (Skills[count]);
Xp[CurrentPlayer][1][count]:=Xp[CurrentPlayer][0][count];
End;
Marktime(T);
repeat
RunEnergy(25);
TotalHp:= Max(1, GetSkillInfo('hitpoints', False))*10;
if FindObjCustom(x,y,['ttack','Blu', 'Att', 'lue'],[8410698, 4473370, 4401698, 3354644, 3618325, 3218712, 4012317, 3350297, 9670715, 3218712, 10511185,4275482], 2) then
Begin
ClickMouse2(True);
markTime (t);
repeat
Wait(5);
if (TimeFromMark(t) >= 5000) then Break;
until (not FlagPresent) and srl_InFight;
if (srl_Infight) then
begin
Marktime(T);
waitTime := 1000+RandomRange(300,600);
repeat
wait (100+random (200));
AntiBAM;
CurrentHp:= GetMMLevels('hp', ColorString);
if (z>200) then begin
writeln('Hp: '+ToStr(CurrentHp)+' / '+ToStr(TotalHp));
writeln ('Hp: %'+ToStr(CurrentHp*100/TotalHp));
for count := 0 to 3 do
Begin
Xp[CurrentPlayer][1][count]:= getXP (Skills[count]);
End;
z:=0;
end;
Eat(Round(CurrentHp*100/TotalHp),PercentEat[CurrentPlayer]);
z:= z+1;
If srl_InFight Then Marktime(T);
until (TimeFromMark(T) >= waitTime)
Marktime(T)
Kills := Kills +1;
Proggy;
End;
End;
until (not LoggedIn or (TimeFromMark(T) > 80000))
Players[CurrentPlayer].Active := False;
LogOut;
if not(CurrentPlayer+1 = HowManyPlayers) then
CurrentPlayer := CurrentPlayer + 1;
End;








begin
SetScriptProp(SP_WriteTimeStamp, [True]);
Skills := ['Attack', 'Strength', 'Defence', 'Constitution' ];
activateClient;
SetupSRL; todragons
DeclarePlayers;
Kills := 0;
paths; //{todragons}
//{Mistake I see a lot only call the map once, Not in the procedure}
//{If using multiple accounts it will always give an error when trying to pull the map}
sps_setup(runescape_other,['todragons']);

testpath;

repeat
LoginPlayer;
Main;
until (AllPlayersInactive)
end.

Chris!

2013-02-27 04:30:26

Like I said in a previous post: "Don't forget to add an extra end; to that procedure, by the way. You don't have enough."

In that procedure, you have one end; for two begins.

Try adding an end; at line 53 under the other end;

cradlefatal

2013-02-27 04:34:00

okay now I'm getting this at DeclarePlayers;

[Error] C:\Simba\Scripts\dragonkiller.simba(202:11): Identifier expected at line 201
Compiling failed.


begin
SetScriptProp(SP_WriteTimeStamp, [True]);
Skills := ['Attack', 'Strength', 'Defence', 'Constitution' ];
activateClient;
SetupSRL: todragons;
DeclarePlayers;
Kills := 0;
paths; //{todragons}
//{Mistake I see a lot only call the map once, Not in the procedure}
//{If using multiple accounts it will always give an error when trying to pull the map}
sps_setup(runescape_other,['todragons']);

testpath;

repeat
LoginPlayer;
Main;
until (AllPlayersInactive)
end.

Sjoe

2013-02-27 04:34:54

From: Chris!
Like I said in a previous post: "Don't forget to add an extra end; to that procedure, by the way. You don't have enough."

In that procedure, you have one end; for two begins.

Try adding an end; at line 53 under the other end;


Link him to the tutorial section please

cradlefatal

2013-02-27 04:36:57

I've spent hours there and I had it logging in and attacking the dragons until I put in my path from the bank to the dragon and sorry I'm new at this and I'm better at hands on xp

Sjoe

2013-02-27 04:38:25

From: cradlefatal
I've spent hours there and I had it logging in and attacking the dragons until I put in my path from the bank to the dragon and sorry I'm new at this and I'm better at hands on xp


Right, u never read a thing ..

Chris!

2013-02-27 04:39:25

begin
SetScriptProp(SP_WriteTimeStamp, [True]);
Skills := ['Attack', 'Strength', 'Defence', 'Constitution' ];
activateClient;
SetupSRL;
DeclarePlayers;
Kills := 0;
paths; //{todragons}
//{Mistake I see a lot only call the map once, Not in the procedure}
//{If using multiple accounts it will always give an error when trying to pull the map}
sps_setup(runescape_other,['todragons']);

todragon;

repeat
LoginPlayer;
Main;
until (AllPlayersInactive);
end.

That compiles for me. Please take a look here: http://villavu.com/forum/forumdisplay.php?f=492. It'll help I promise.

cradlefatal

2013-02-27 04:43:49

awesome thank you