PDA

View Full Version : Problem with simplefightcave



Bradb
03-28-2013, 11:24 AM
close found the problem

marijuana420
03-28-2013, 11:28 AM
dude really? come on.. read.. READ!!!! DUDE READ!!!!!!!!


Procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;
End;


would help if u filled every thing in...

some one close this.. this guy does not even try

Justin
03-28-2013, 11:29 AM
It seems you removed the

{$DEFINE SMART}
{$i SRL-OSR/Srl.simba}

when you copy-pasted the script, Can you try to copy and paste the script (Into Simba) and try again?

Runehack123
03-28-2013, 11:37 AM
I hope it works for you now after all the awesome help
:o :o :o :o :o :o :o :o :o :o :o :o :o
:o :o :o :o :o :o :o :o :o :o :o :o :o
:o :o :o :o :o :o :o :o :o :o :o :o :o

Bradb
03-28-2013, 12:26 PM
program FightCaveTrainer;

{$DEFINE SMART}
{$i SRL-OSR/Srl.simba}

Const
caveTol = 2;
version = '0.6';

Var
counter, caveEntrances: Integer;
caveEntranceWhite: TIntegerArray;

Procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := 'user';
Players[0].Pass := 'pass';
Players[0].Nick := 'display name';
Players[0].Active := True;
End;

Function FightCaveSleep(sleepx, sleepy: Integer; retaliate: Boolean): Boolean;
Var
x , y, sleepTime: Integer;
loop : Boolean;
Begin
loop := true;
counter := 0;
sleepTime := RandomRange(sleepx, sleepy);
While loop Do
Begin
If FindObjCustom(x, y, [' '], caveEntranceWhite, caveTol) Then
Begin
Result := false;
loop := false;
WriteLn('We see cave entrance!');
End Else If (not (InRange(Length(GetFightBarTPA(IntToBox(MSX1, MSY1, MSX2, MSY2))), 30, 150))) and (retaliate) Then
Begin
Result := false;
loop := false;
End Else If (sleepTime - counter > 0) and loop = true Then
Begin
wait(10);
counter := (counter + 10);
End Else
Begin
Result := True;
loop := False;
End;
End;
End;

Procedure FightCaveLoop;
Var
x, y : Integer;
Begin
If FindObjCustom(x, y, ['nter'], caveEntranceWhite, caveTol) Then
Begin
WriteLn('Found correct cave!');
ClickMouse2(True);
While FindObjCustom(x, y, ['nter'], caveEntranceWhite, caveTol) Do
Begin
ClickMouse2(true);
Wait(RandomRange(500, 1000));
End;
If RandomRange(1, 10) > 8 Then
Begin
SetRun(true);
GameTab(tab_Stats);
End;
caveEntrances := (caveEntrances + 1);
WriteLn('Entered cave.');
ClearDebug;

WriteLn('-* FightCaveTrainer v'+version);
WriteLn('-* ');
WriteLn('-* Entered: ' + intToStr(caveEntrances));
WriteLn('-* Runtime: ' + TimeRunning);

Wait(RandomRange(4000, 5000));
SetAngle(0);
End Else
If (Not FindObjCustom(x, y, ['nter'], caveEntranceWhite, caveTol)) and (CountDots('yellow') > 0) Then
Begin
FightCaveSleep(200,500,False);
If InRange(Length(GetFightBarTPA(IntToBox(MSX1, MSY1, MSX2, MSY2))), 30, 150) Then
Begin
If (FightCaveSleep(3000,5000,True)) Then
Begin
If InRange(Length(GetFightBarTPA(IntToBox(MSX1, MSY1, MSX2, MSY2))), 30, 150) Then
Begin
Retaliate(False);
Wait(RandomRange(500,700));
Retaliate(True);
GameTab(tab_Stats);
FightCaveSleep(3000,5000,False);
End;
End;
End;
End Else MakeCompass(185);
End;

Begin
SetupSRL;
DeclarePlayers;
SetRun(True);
GameTab(tab_Stats);
caveEntranceWhite := [7763583, 8553356];
MouseSpeed := 15;

While(True) Do
Begin
If not LoggedIn Then
Begin
LogInPlayer;
SetRun(True);
GameTab(tab_Stats);
MakeCompass(185);
SetAngle(0);
End;
FightCaveLoop;
End;
End.program new;
begin
end.

still didt work updated added the missing code and filled in details.

Runehack123
03-28-2013, 12:33 PM
p[lease edit your post use SImba tag loks so muchnicer
also there is pastebin extension *(call paster) you can use to uppload to pastebin just make sure your password user detail are njot in the script I upload mine by accident once looks really nice on pastebin and we can see the line numbers

Bradb
03-28-2013, 12:41 PM
p[lease edit your post use SImba tag loks so muchnicer
also there is pastebin extension *(call paster) you can use to uppload to pastebin just make sure your password user detail are njot in the script I upload mine by accident once looks really nice on pastebin and we can see the line numbers

http://pastebin.com/SCuzE3Sn uploaded to pastebin my details are removed

Runehack123
03-28-2013, 12:43 PM
okay nice Im loking at it right now so much nicer thank you so much

Bradb
03-28-2013, 01:45 PM
still need someone to have look at this http://pastebin.com/SCuzE3Sn

Bradb
03-28-2013, 07:43 PM
bump