Results 1 to 3 of 3

Thread: Need to learn how to do login player and where it should go

  1. #1
    Join Date
    Jan 2012
    Posts
    121
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default Need to learn how to do login player and where it should go

    Simba Code:
    //Script by rol Prodigy
    //Version 1.0
    program AirBattlestaffMaker;

      {$DEFINE SMART}
      {$i SRL\SRL.simba}


      {$i SPS/sps.simba}
      {$i SRL/SRL/misc/paintsmart.simba}

    const
    //  ----------------SETUP-----------------------------
    //For now you gotta be in swbank
    loadcount= 1000  ;  //how many cycles you need (14 to a cycle)
    colb=  2                 ;  //Battlestaff col
    rowb=  1                 ;  //Battlestaff Row
    cola=  3                 ;  //AirOrb col
    rowa=  1                 ;  //AirOrb row


    bankty= 2                ;
    //0 for any npc bank, 1 for specific bank, 2 for soul wars chest
    specific='fwb'           ; //some valed inputs are: 'veb', 'vwb' 'feb'


    var
      x, y: integer;
    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
      with Players[0] do
      begin
        Name := '';  //set username
        Pass := '';       //set password
        Pin  := '';          //set pin
        Active := True;
        LampSkill := 'Crafting'; // If you set the script to choose an experience lamp from a random event box, it will use the exp on the Crafting skill
    //  ---------------END SETUP----------------------------------------
      end;
    end;


    procedure AntiRandoms;
    begin
      ClickToContinue;
      FindNormalRandoms; // Whenever this is called, the script will check to see if your character is in a random event
      LevelUp; // This is an Antiban procedure, but I find it more useful when called here because AntiRandoms is usually called more often than Antiban
    end;

    procedure Antiban;
    begin
      case Random(60) of // Random(60) generates a random integer from 0 to 59
        10: RandomRClick;
        20: HoverSkill('Fletching', False);
        30: PickUpMouse;
        40: RandomMovement;
        50: BoredHuman;
        59: ExamineInv;
      end;
    end;

    Procedure banksw;

    var
      X, Y: Integer;
      begin
      FindNormalRandoms;
      if (FindObjCustom(X, Y, ['Bank','nk ch','k che','chest'], [2963780,10724266,10000542,5592409], 3)) then
        Mouse(X, Y, 0, 0, True);
        Wait(1500 + Random(300));
    end;

    Procedure MakeStaff;
    begin
      WriteLn('opening sw bank');
      mousespeed:=(7+random(3));
      wait(200);
      if bankty=2 then
        banksw;
      wait(500+random(600))
      depositall;
      wait(800+random(300));
      WithdrawEx(colb,rowb,14,[]);
      wait(500+random(500));
      withdraw(cola,rowa,0);
      wait(500+random(1000));
      closebank;
      wait(1800+random(500));
      invmouse((random(13)+1),1);
      wait(700+random(300));
      Invmouse((15+random(14)),1)
      wait(1000+random(1000));
      mmouse(359,408,200,200);
      mmouse(259,408,30,30);
      wait(100+random(200));
      getmousepos(x,y);
         begin
          if ( WaitUpTextMulti(['Mak', 'tions'], 200) ) then
          Mouse(x,y,1,1,true)else
          exit;
          end;
      repeat
        wait(1000);
        Antirandoms;
      until invcount=14
      Antiban;
      wait(random(5000));
      if random(2)=1 then
        begin
          writeln('taking mini break');
          wait(random(20000));
          Antiban;
          AntiRandoms;
        end;
      writeln('14 more  staffs made');
    end;

    Procedure mainloop;
    var
      counter:integer;
    begin
      counter:=0;
       SetupSRL;
      Smart_Server := 35;

    repeat
        counter:=1+counter;
        findnormalrandoms;
          MakeStaff;
        writeln(loadcount-counter);
        writeln('loads to go');
      until counter=loadcount
      writeln('Another set, problem free');
    end;

    begin
    mainloop;
    end.
    Last edited by rol prodigy; 01-26-2012 at 05:09 AM.

  2. #2
    Join Date
    Dec 2011
    Posts
    353
    Mentioned
    3 Post(s)
    Quoted
    8 Post(s)

    Default

    In your loop add:

    Simba Code:
    if not LoggedIn then
          LogInPlayer;

  3. #3
    Join Date
    Jan 2012
    Location
    I live in Australia.
    Posts
    137
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    you have to declare them first, put this at the top of your script, and in the main loop use the procedure 'DeclarePlayers;' followed by 'LoginPlayer;' where you want to login.

    Simba Code:
    Procedure DeclarePlayers;
      begin
        HowManyPlayers := 1;
        NumberOfPlayers(HowManyPlayers);
        CurrentPlayer := 0;
        with Players[0] do
        begin
          Name        := '';
          Pass        := '';
          Pin         := '';
          BoxRewards  := ['XP','xp','lamp'];
          LampSkill   := '';
          Active      := True;
        end;
      end;

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
  •