Results 1 to 4 of 4

Thread: Script works in browser, but not in SMART

  1. #1
    Join Date
    Mar 2013
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default Script works in browser, but not in SMART

    Hey orginally i wrote this script to run in browser but i decided i wanted to minimize it so i added {$DEFINE SMART8} and then script loads up fine, it even chops willows fine, but with the sps walkpath it doesn't do what it's supposed to do(doesn't walk in the right place), heres the script
    ~~~~~~~~~~~CHOPS WILLOWS AND BANKS AT CATHERBY~~~~~~~~~~~~~~~~~~~~~~~~~
    Code:
    program new;
    {$DEFINE SMART8}
    {$i srl-osr/srl.simba}
    {$I SPS/sps-osr.simba}
    
    Procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
    
      Players[0].Name :=''; // Enter your Username
      Players[0].Pass :='';      // Enter your Password
      Players[0].Nick :='aid';                // Enter 2nd 3 letters of your NickName
      players[0].Active:=True;
    end;
    
    
    //Don't forget to credit Solidone40
    
    Procedure Antiban;
    Begin
    
      Case Random(100) Of
        1: HoverSkill('Woodcutting', False);  //replace 'magic' with 'skill'
        2: HoverSkill('random', False);
        3: Boredhuman;
        4: Wait(2500 + random(4500));
        5: HoverSkill('smithing', False); // replace 'smithing' with 'skill', or delete.
        6: PickUpMouse;
        7: RandomMovement;
        8: RandomRClick;
      end;
    end;
    
    Procedure MiniBreaker;
    Begin
    
      Case Random (160) Of
        1: Wait(40000 + random(7400));
        2: Wait(25500 + random(8550));
        3: Wait(60040 + random(6759));
        4: Wait(20400 + random(2549));
      end;
    end;
    
    Procedure ChopTree;   // Chops willows south west of Catherby
    var x, y: integer;
    begin
      repeat
      FindNormalRandoms;
      if FindObjCustom(x, y, ['hop', 'Chop', 'down', 'hop down illow', 'Chop Down Willow'], [1847350, 3297881, 3825769, 4221299, 4352885, 2308413], 5) then
      MMouse(x, y, 4, 4);
      ClickMouse2(True);
      AntiBan;
      LevelUp;
      FindNormalRandoms;
        repeat
          Wait(1500 + Random(250))
          FindNormalRandoms;
          LevelUp;
          AntiBan;
        until not IsUpText ('hop') or InvFull;
      until InvFull;
    end;
    
    Procedure EmptyInventory;     // OLD METHOD OF BANKING DO NOT USE
    begin
      if InvFull then
        if OpenBank('db', false, true) then
        DepositAll;
        FindNormalRandoms;
        AntiBan;
    end;
    
    Procedure WalkToBank; //RADIALWALK, ONLY USE IF SPS DOESN'T WORK
    var x, y, xs, xe, ye: integer;
    begin
      GameTab(tab_Stats);
      MakeCompass('N');
      RadialWalkTolerance(7236982, 44, 77, 53, 1, 1, 5);
      RadialWalkTolerance(7236982, 86, 120, 62, 1, 1, 5);
      RadialWalk(13356748, 51, 62, 52, 1, 1);
      OpenBankNPCEx('Gray');
      DepositAll;
    end;
    
    Procedure SPSWalktoBank;
    var
      ToCatherbyBank: tpointarray;
      ToWillows: tpointarray;
      MyLoc: TPoint;
    begin
      MakeCompass('S');
      SPS_AnyAngle := True
      SPS_Debug := True;
      ToCatherbyBank := [Point(157, 144), Point(201, 139), Point(217, 104)]
      ToWillows := [Point(216, 109), Point(201, 139), Point(157, 144), Point(123, 164)]
      SPS_Setup(runescape_other, ['Catherby']);
      MyLoc:=sps_getMyPos;
      writeln('SPS returns '+inttostr(myloc.x)+','+inttostr(myloc.y));
      SPS_WalkPath(ToCatherbyBank);
      MakeCompass(Random(10));
      OpenBankNPCEx('Gray');
      Deposit(2, 28, True);
      CloseBank();
      MiniBreaker;
      MakeCompass('S');
      SPS_WalkPath(ToWillows);
      MyLoc:=sps_getMyPos;
      if(not (MyLoc = Point(123, 164))) then
      SPS_WalkPath([Point(123, 164)]);
    end;
    
    begin
      ClearDebug;
      SetUpSRL;
      DeclarePlayers;
      SetScreenName(Players[0].Nick)
      LoginPlayer;
      repeat
      ChopTree;
      SPSWalkToBank;
      MiniBreaker;
      until(false);
    end.
    Last edited by akadhox; 04-07-2013 at 03:33 PM.

  2. #2
    Join Date
    Jan 2013
    Posts
    294
    Mentioned
    1 Post(s)
    Quoted
    121 Post(s)

    Default

    wheres ur define smart8?

  3. #3
    Join Date
    May 2012
    Location
    John's Creek, Georgia, United States
    Posts
    392
    Mentioned
    0 Post(s)
    Quoted
    86 Post(s)

    Default

    sps-osr isnt working correctly, i think

  4. #4
    Join Date
    Mar 2013
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by Physic View Post
    sps-osr isnt working correctly, i think
    no its working fine, in browser the script walks to bank FLAWLESSLY but in SMART SPS getpos returns (-1, -1).....SMART is the problem here

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
  •