Results 1 to 13 of 13

Thread: loggedin returning 1 always?

  1. #1
    Join Date
    Feb 2007
    Posts
    143
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default loggedin returning 1 always?

    Edit: whoever stole my account your total tool, as well as an asshat... i left the name and pass in there because i wasnt paying attention and you stole it... really? its highest skill was like 40 douchebag.

    okay so im not sure what the problem is here, for some reason regardless of wether im logged in or not the loggedin returns 1, saying that im logged in (i guess) here is my code

    Code:
    program RoguesAFKBloodbath;
    {.Include SRL\SRL.Scar}
    {.Include SRL\SRL\skill\Fighting.Scar}
    
    const
    monsterstokill = 50;      // placeholder will use time later
    greenatt = 65280;         //dont touch this one
    
    
    
    var
    howmany,total,totnames,totcolors,foodcolor,tolerance:integer;
    foodname:String;
    mcolor: Array of Integer;
    mname: Array of String;
    
    
    
    procedure declareplayers;
    begin
      howmany:= 1;                  // How many characters??? currently it only supports one
      CurrentPlayer:= 0;
      NumberOfPlayers(howmany);
    
      totnames:= 1;                 // number of names -1 placeholder until i get length to work
      totcolors := 2;               // number of colors -1
      mname:=['inotaur','olf'];
      mcolor:=[9345434,8488587,11319223];              // monster colors
      foodcolor := 0;                 // color of the food
      foodname := ' ';                // name of the food
      tolerance := 40;
    
      Players[0].Name        := '';      //User Name
      Players[0].Pass        := '';      //Password
      Players[0].Nick        := 'irty';          //Nick Name
      Players[0].Active      := True;            //Use This Player [ True / False ]
     // Players[0].Strings[0]  := 'strength';              //attack,strength,defence
    end;
    
    
    
    procedure report;
    begin
    Writeln('------------------------');
    Writeln('...- AFK Blood Bath -...');
    Writeln('...- By:Rogue Poser -...');
    Writeln('                        ');
    Writeln('.-Ran for: ' +TimeRunning+ '-.');
    // Writeln('.-Total exp gained: ' +intToStr(expgained)+ '');
    Writeln('------------------------');
    end;
    
    
    
    Procedure antiban;
    begin
      if not LoggedIn then Exit;
      case random(7) of
        0: MakeCompass('E');
        1: PickUpMouse;
        2: HoverSkill('Random', false);
        3: BoredHuman;
        4: MakeCompass('N');
        5: MakeCompass('W');
        6: MakeCompass('S');
        end;
      wait(300+random(30));
    end;
    
    
    
    
    procedure findmob;
    
    Var
    i,j,x,y,tempx,tempy:Integer;
    found:boolean;
    
    begin
    if not LoggedIn then Exit;
    found := False;
    
       repeat
          tempx := 25 + random(430);
          tempy := 25 + random(245);
          for i:=0 to totcolors do
             if(FindColorTolerance(x,y,mcolor[i],tempx,tempy,tempx+50,tempy+50,tolerance)) then
                begin
                   if(found) then  exit;
                   MMouse(x,y,1,1)
                   for j := 0 to totnames do
                      begin
                         wait(200+random(50));
                         if(isuptext(mname[j])) then
                            begin
                               case random(3) of
                                  0..1: Mouse(x,y,2,2,True);
                                  2: begin
                                        Mouse(x,y,2,2,False);
                                        ChooseOption('ttack');
                                     end;
                               end;
    	                         found := True;
    	                         wait(4000+random(500));
                                   repeat
                                      wait(3000+random(500));
                                   until(not(InFight));
    	                         if(found) then  exit;
                            end;
                     end;
                end;
       until(found);
    end;
    
    
    
    procedure hplow;
    var
    ytop,ybottom,x,y:integer;
    begin
    if not LoggedIn then Exit;
    ytop :=210;
    ybottom:=240;
    
    if(Findcolor(x,y,255,721,21,739,34)) then
      repeat
         Mouse(642,182,9,9,True);
         wait(300+random(80));
         if(Findcolor(x,y,foodcolor,551,ytop,733,ybottom))then
            begin
               Mouse(x,y,3,3,True);
               ybottom := 500;
               wait(300+random(80));
            end;
         ytop := ytop +30;
         ybottom := ybottom +30;
         if(ybottom = 480)then
            begin
               Writeln('Out of food, low hp, Exiting');
               total:=monsterstokill + 1;
            end;
       until(ybottom > 460);
    end;
    
    
    
    
    begin
      setupSRL;
      MouseSpeed := 16;
      total:=0;
      clearDebug;
      declareplayers;
      ActivateClient;
      if not LoggedIn then LoginPlayer;
      if loggedin then writeln(LoggedIn);  //*****heres the issue, it returns 1 here wether im logged in or not, so its always returning true?
      repeat
           findmob;
           antiban;
           hplow;
           FindNormalRandoms;
       until(total > monsterstokill)
      logout;
      report;
    end.
    im fairly certain its an error on my part.... any suggestions?
    Last edited by rogue poser; 06-10-2009 at 07:48 AM.

  2. #2
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    In your code you do
    SCAR Code:
    WriteLN(LoggedIn);
    This shouldn't actually compile because your trying to get a boolean to output a string.

    Try this:

    SCAR Code:
    WriteLN(BoolToStr(LoggedIn));

  3. #3
    Join Date
    Feb 2007
    Posts
    143
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I changed them both to this
    Code:
      if not LoggedIn then writeln(BoolToStr(LoggedIn));
      if loggedin then writeln(BoolToStr(LoggedIn));
    and it returns true when im not logged in???

    obviously i get the same results when i replace both of those lines with
    Code:
     writeln(BoolToStr(LoggedIn));

  4. #4
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    Well, I heard in the new update that the screen has shifted slightly, maybe they changed colours too, I'll look into it and see if I have the same problem.

  5. #5
    Join Date
    Feb 2007
    Posts
    143
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Richard View Post
    Well, I heard in the new update that the screen has shifted slightly, maybe they changed colours too, I'll look into it and see if I have the same problem.
    whats the verdict chief?

  6. #6
    Join Date
    Jun 2009
    Posts
    177
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I made a test program:
    Code:
    program LoginTest;
    
    {.Include SRL\SRL.Scar}
    
    begin
    repeat
          if (LoggedIn) then
             Writeln('Logged in: true');
          if not (LoggedIn) then
             Writeln('Logged in: false');
          Wait(5000);
    until (false)
    end.
    Running it will give me wanted results: if I'm logged in it prints "Logged in: true" and if I'm logged out it prints "Logged in: false".

    Thus, it's no doubt a problem on your behalf. Did you forget to target the client? Also, a update/re-install of SRL might do the trick.
    Last edited by LolL; 06-10-2009 at 05:51 PM.

  7. #7
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Richard View Post
    In your code you do
    SCAR Code:
    WriteLN(LoggedIn);
    This shouldn't actually compile because your trying to get a boolean to output a string.

    Try this:

    SCAR Code:
    WriteLN(BoolToStr(LoggedIn));
    with 3.20d you don't need to use IntToStr, BoolToStr, or whatever. :] does it automatically.

  8. #8
    Join Date
    Jun 2007
    Location
    Greenville, SC
    Posts
    1,149
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    99_, this is offtopic, but would using inttostr cause an access violation if it really does it automatically?

  9. #9
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    begin
      Writeln(IntToStr(7));
    end.
    idk.. does it?

    no it doesn't btw.. I read your thread.. looking through script now.. SmartSetup should go before SetupSRL; but it still gives an error D:

  10. #10
    Join Date
    Feb 2007
    Posts
    143
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    that is the weirdest thing ever.... i deleted the "if not loggedin then loginplayer" and the "writeln(booltostr(loggedin))" and rewrote it, and now it works? thats goofy...

  11. #11
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    Are you using a web browser for the script? If so, which browser?

  12. #12
    Join Date
    Mar 2007
    Posts
    3,116
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    When you get your account back, pm a screen of the last login to a admin. They will ban them for you.

  13. #13
    Join Date
    Feb 2007
    Posts
    143
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Richard View Post
    Are you using a web browser for the script? If so, which browser?
    Im using firefox on a VM of tinyxp... heres some more weird crap.

    this is my main loop as of right now
    Code:
    begin
      setupSRL;
      MouseSpeed := 16;
      total:=0;
      clearDebug;
      declareplayers;
        writeln('really?');
      ActivateClient;
      if not LoggedIn then LoginPlayer;
      //setfightstuff;
      writeln('really?'); // when i delete this, it will compile then just say executed? and now even print it? wtf?
      SetFightMode('strength');
    
      repeat
           findmob;
           antiban;
           hplow;
           FindNormalRandoms;
           total := total + 1;
       until(total > monsterstokill)
      report;
      logout;
    end.
    maybe its a firefox thing, i downloaded the RS client from their site and it seems to be working now.... we'll see
    Last edited by rogue poser; 06-11-2009 at 06:46 AM.

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
  •