Results 1 to 8 of 8

Thread: How to add Walking and Banking function to my script?

  1. #1
    Join Date
    Apr 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default How to add Walking and Banking function to my script?

    I wanted to make a Magic Tree Cutter at the Mage Arena because nobody else had yet. I had a little knowledge in Java programming, but none in SRL. I was hoping that someone could let me know how...
    1) I could make my character walk to the bank and deposit there.
    2) How I could make my character walk to the 2nd Magic Tree after they cut down the first one, and vice versa.

    Here is the script if you want to look at it (I know it's very bad but it's my first time ever programming in simba)

    Code:
    program MagiCutter;
    
    {$i srl/srl/misc/Smart.simba}
    {$i srl/srl.simba}
    {$i SRL/SRL/Misc/Reports.simba}
    {$i srl/srl/misc/paintsmart.simba}
    {$i sps/sps.simba}
    
    CONST
      SRLStats_Username = '';// Your SRL Stats Username
      SRLStats_Password = '';// Your SRL Stats Password
      BreakEvery        = '120';//How often would you like to take a break (minutes)
      BreakFor          = '10';//How long would you like to break for
      Version           = '1.0';
      NumbOfPlayers     = 1;//How many players are autoing
      StartPlayer       = 0;//Player to start autoing with (0 is first player)
    
    
    
    
    procedure DeclarePlayers;
    var i: integer;
    begin
      NumberOfPlayers(NumbofPlayers);
      CurrentPlayer := StartPlayer;
      for i :=0 to NumbofPlayers-1 do
        Players [i]. BoxRewards   := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];
    
      with Players[0] do
      begin
        Name          := '';       //Player Username
        Pass          := '';       //Player Password
        Nick          := '';       //Player nickname (3-4 letters of Username)
        Active        := True;
           end;
    end;
    
    
    Procedure StatsGuise (wat:String);
    Begin
      Status(wat);
      Disguise(wat);
    End;
    
    Function CheckAndClick(UpText, Option:String; X,Y:Integer; RClick:Boolean) :Boolean;
    Begin
      MMouse(x, y, 5, 5);
      If WaitUptext(UpText, 1500+Random(500)) Then
      Begin
        Result:=True;
        GetMousePos(x, y);
        If RClick Then
        Begin
          Mouse(x, y, 0, 0, False);
          Result:= WaitOption(Option, 2000);
          If Result Then FFlag(0);
        End Else
        Begin
          Mouse(x, y, 0, 0,True);
          Wait(100+Random(50));
          FFlag(0);
        End;
      End;
    End;
    
    
    Procedure Antiban;
    Begin
      Case Random(250) Of
        0: Begin StatsGuise('AntiBan') GameTab (tab_Stats) HoverSkill ('Woodcutting', False) GameTab(28) End;
        1: Begin StatsGuise('AntiBan') SleepAndMoveMouse(7000 + Random(500)); End;
        2: Begin StatsGuise('AntiBan') GameTab(tab_Inv) ExamineInv; GameTab(28); End;
        3: Begin StatsGuise('AntiBan') RandomAngle(1); End;
        4: Begin StatsGuise('AntiBan') GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab (28); End;
        5: Begin StatsGuise('AntiBan') GameTab(Tab_Stats); HoverSkill('random', False); GameTab(28); End;
        end;
    end;
    
    Procedure FailSafe(Reason:String);
    Begin
      Players[CurrentPlayer].Loc:=Reason;
      Logout;
      Stats_Commit;
      //ProgressReport;
      TerminateScript;
    End;
    
    procedure SetCustomAngle(Highest: Boolean);
    begin
      KeyDown((Integer(not Highest) * 2) + 38);
      Sleep(1000 + Random(300));
      KeyUp((Integer(not Highest) * 2) + 38);
    end;
    
    
    Function
     Chopper:Boolean;
    Var
      x, y, TreeCounter: Integer;
    Begin
      If FindObjCustom(x, y, ['Chop', 'down', 'p d'], [5133915, 4673893, 2697515], 15) Then
      Begin
        StatsGuise('Found Magic Tree');
        GetMousePos(x, y);
        Case Random(2) Of
          0: Mouse(x, y, 5, 5, True);
          1: Begin
              Mouse(x, y, 5, 5, False);
              Wait(100 + Random(100));
              ChooseOption('Chop');
          end;
        end;
    
        Flag;
    
        Repeat
          MarkTime(TreeCounter);
          Antiban;
          Wait(15000);
          Until (TimeFromMark(TreeCounter) > 120000 + Random(30000)) OR (InvFull);
    
      end;
    end;
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    begin
      SetupSRL;
      DeclarePlayers;
      Repeat
        Chopper;
      Until(False);
    
    end.

  2. #2
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    Take a look at some tutorials on walking:

    http://villavu.com/forum/search.php?searchid=2087098


    And for Banking functions.

    - Open Simba
    - Type 'openbank' into your functions list
    - Double click one of the functions that come up
    - Now you will have a list of banking functions
    Last edited by Abu; 05-28-2012 at 04:36 AM.

  3. #3
    Join Date
    Apr 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thanks for the bank function didn't know about that. Also, is there a specific type of walking that is more effective than another? Or are they all essentially the same?

  4. #4
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    Quote Originally Posted by FarmerKyle View Post
    thanks for the bank function didn't know about that. Also, is there a specific type of walking that is more effective than another? Or are they all essentially the same?
    They are all essentially the same I guess. But it's best to use the other as a backup walking method.

  5. #5
    Join Date
    Oct 2011
    Location
    UK
    Posts
    1,322
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by FarmerKyle View Post
    thanks for the bank function didn't know about that. Also, is there a specific type of walking that is more effective than another? Or are they all essentially the same?
    I find the best is object dtm or radial with SPS as a backup in either case

  6. #6
    Join Date
    Dec 2009
    Location
    R_GetPlayerLoc;
    Posts
    2,235
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    Quote Originally Posted by abu_jwka View Post
    Take a look at some tutorials on walking:

    http://villavu.com/forum/search.php?searchid=2087098
    The link seems dead... I'm also looking into new walking methods
    "Logic never changes, just the syntax" - Kyle Undefined?

    Remember, The Edit Button Is There For A Reason!!!

  7. #7
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    Quote Originally Posted by Yago View Post
    The link seems dead... I'm also looking into new walking methods
    Yes it's expired but he managed to get the link. It was just a search for walking that's all

  8. #8
    Join Date
    Dec 2009
    Location
    R_GetPlayerLoc;
    Posts
    2,235
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    Quote Originally Posted by abu_jwka View Post
    Yes it's expired but he managed to get the link. It was just a search for walking that's all
    I ended up resorting to good old findcolorstolerancespiral
    "Logic never changes, just the syntax" - Kyle Undefined?

    Remember, The Edit Button Is There For A Reason!!!

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
  •