Results 1 to 10 of 10

Thread: Problem with simplefightcave

  1. #1
    Join Date
    Dec 2011
    Location
    Uk
    Posts
    40
    Mentioned
    0 Post(s)
    Quoted
    17 Post(s)

    Default Problem with simplefightcave

    close found the problem
    Last edited by Bradb; 03-28-2013 at 10:51 PM.

  2. #2
    Join Date
    Mar 2012
    Posts
    86
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    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

  3. #3
    Join Date
    Mar 2007
    Posts
    5,125
    Mentioned
    275 Post(s)
    Quoted
    901 Post(s)

    Default

    It seems you removed the
    Simba Code:
    {$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?

    Forum account issues? Please send me a PM

  4. #4
    Join Date
    Oct 2012
    Posts
    758
    Mentioned
    6 Post(s)
    Quoted
    282 Post(s)

    Default

    I hope it works for you now after all the awesome help



  5. #5
    Join Date
    Dec 2011
    Location
    Uk
    Posts
    40
    Mentioned
    0 Post(s)
    Quoted
    17 Post(s)

    Default

    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.
    Last edited by Bradb; 03-28-2013 at 12:39 PM.

  6. #6
    Join Date
    Oct 2012
    Posts
    758
    Mentioned
    6 Post(s)
    Quoted
    282 Post(s)

    Default

    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

  7. #7
    Join Date
    Dec 2011
    Location
    Uk
    Posts
    40
    Mentioned
    0 Post(s)
    Quoted
    17 Post(s)

    Default

    Quote Originally Posted by Runehack123 View Post
    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

  8. #8
    Join Date
    Oct 2012
    Posts
    758
    Mentioned
    6 Post(s)
    Quoted
    282 Post(s)

    Default

    okay nice Im loking at it right now so much nicer thank you so much

  9. #9
    Join Date
    Dec 2011
    Location
    Uk
    Posts
    40
    Mentioned
    0 Post(s)
    Quoted
    17 Post(s)

    Default

    still need someone to have look at this http://pastebin.com/SCuzE3Sn

  10. #10
    Join Date
    Dec 2011
    Location
    Uk
    Posts
    40
    Mentioned
    0 Post(s)
    Quoted
    17 Post(s)

    Default

    bump

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •