Lordzsolt
05-04-2012, 05:26 PM
Trying to write my own combat script (first one), and I've followed YoHoJo's video tutorial (this one http://www.youtube.com/watch?v=qfumZWrm_DE&feature=youtu.be&hd=1), and for some reason, when I compile my script, Simba just shuts down.
Here's the script:
program DustDevils;
//{$i DEFINE SMART}
{$i srl/srl/misc/smart.simba}
{$i srl/srl.simba}
{$i srl/srl/misc/debug.simba}
const
Username = 'xxxxxx';
Password = 'xxxxxx';
TrainedSkill = 'Attack'; // Attack, Strength, Defence, Range
XPCounter = 2; // 1,2,3 (1st is usually total xp counter, so set trained level's counter to 2nd)
EatAt = 650;
Version = 1.0;
procedure DeclarePlayers;
begin
NumberOfPlayers(1);
CurrentPlayer := 0;
with Players[0] do
begin
Name := UserName;
Pass := Password;
Active := True; //Blue Charms
end;
end;
procedure Attack;
var
cx,cy :Integer;
begin
//FindObjCustom(var cx, cy: Integer; Text: TStringArray; Color: TIntegerArray; Tol: Integer): Boolean;
If FindObjCustom(cx,cy,['Attack Dust' , 'Dust' , 'Devil', 't d'], ['5810887', '4818599', '4622238', '6006479'], 10) Then
WriteLn('Founda a Dust Devil!');
End;
begin
SetupSRL;
DeclarePlayers;
//Repeat
Attack;
//Until (false);
end.
It's a really basic script, just trying to test how well it can find certain objects (this case, dust devils).
Here's the script:
program DustDevils;
//{$i DEFINE SMART}
{$i srl/srl/misc/smart.simba}
{$i srl/srl.simba}
{$i srl/srl/misc/debug.simba}
const
Username = 'xxxxxx';
Password = 'xxxxxx';
TrainedSkill = 'Attack'; // Attack, Strength, Defence, Range
XPCounter = 2; // 1,2,3 (1st is usually total xp counter, so set trained level's counter to 2nd)
EatAt = 650;
Version = 1.0;
procedure DeclarePlayers;
begin
NumberOfPlayers(1);
CurrentPlayer := 0;
with Players[0] do
begin
Name := UserName;
Pass := Password;
Active := True; //Blue Charms
end;
end;
procedure Attack;
var
cx,cy :Integer;
begin
//FindObjCustom(var cx, cy: Integer; Text: TStringArray; Color: TIntegerArray; Tol: Integer): Boolean;
If FindObjCustom(cx,cy,['Attack Dust' , 'Dust' , 'Devil', 't d'], ['5810887', '4818599', '4622238', '6006479'], 10) Then
WriteLn('Founda a Dust Devil!');
End;
begin
SetupSRL;
DeclarePlayers;
//Repeat
Attack;
//Until (false);
end.
It's a really basic script, just trying to test how well it can find certain objects (this case, dust devils).