Results 1 to 2 of 2

Thread: Script Issues

  1. #1
    Join Date
    Dec 2011
    Posts
    164
    Mentioned
    4 Post(s)
    Quoted
    23 Post(s)

    Default Script Issues

    I'm attempting to make a Flax + Bowstringer

    Simba Code:
    program FlaxSpin;
    {$DEFINE SMART}
    {$i SRL\SRL.simba}
    {$i sps/sps.simba}

    var
      x, y, k, walks, flax, BowString: integer;
      ToFlax, ToWheel, ToBank, FromFlaxToBank: TPointArray;

      const
     AntibanFrequency = 28;

    Procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;            // Don't touch this
      NumberOfPlayers(HowManyPlayers);// Don't touch this
      CurrentPlayer := 0;             // Don't touch this
      Players[0].Name := '';// Username
      Players[0].Pass := ''; // Password
      Players[0].Active := True;      // Don't touch this
      Players[0].Pin := '';           // Bank Pin, Leave blank if you don't have one
      Wait(randomrange(1500,5000));
    end;
    Procedure AntiBan;
    begin
      Case Random(AntibanFrequency) of
        1: Setangle(RandomRange(0, 30));
        2: MakeCompass(RandomRange(260, 280));
        3: RandomRClick;
        4: RandomMovement;
        5: begin
             HoverSkill('Crafting', false);
             Wait(RandomRange(2000, 7000));
             Gametab(Tab_Inv);
           end;
        end;
    end;
    Procedure Bank;
     begin
     BowString := DTMFromString('m1gAAAHic42JgYLBlYmAwAWIXIPYFYjcgdgBiMyC2AmIbIPYA4idAtR+h+C0QXwfim0B8D4jvA/F7IH4GxJlJAUCSCYx5eXnhbHTMxkAcYCQSIwAA8lgM8g==');
     MakeCompass('E');
     Wait(randomrange(200,250));
     //FindObjCustom(x,y,['ank','ooth'],[4218737,4218737],8);
     FindObjTPA(x, y, 4153201, 10, 1, 25, 8, 120, ['ank']);
     Mouse(x, y, 2, 2, true);
     Wait(randomrange(600,800));
     DepositAll;
     wait(randomrange(200,250));
     Repeat
     Wait(randomrange(50,75));
      DepositAll;
     until(Not  FindDTM(BowString, x, y, MIX1, MIY1, MIX2, MIY2));
     Wait(randomrange(200,300));
     CloseWindow;
     Wait(randomrange(200, 300));
     Gametab(Tab_Inv);
     Wait(randomrange(400, 500));
     end;

    Procedure WalkToFlax;

    begin


      SPS_Setup(RUNESCAPE_SURFACE,['6_6','6_7','7_7']);
      ToFlax := [Point(2738, 2682), Point(2740, 2700),
                 Point(2740, 2712), Point(2743, 2729),
                 Point(2743, 2748), Point(2754, 2768),
                 Point(2752, 2789), Point(2762, 2812),
                 Point(2755, 2824), Point(2755, 2850),
                 Point(2756, 2869), Point(2770, 2873),
                 Point(2791, 2873), Point(2810, 2869)];
      SPS_WalkPath(ToFlax);


    end;

    Procedure Pick;

    begin

    while (InvCount < 28) do
      begin
    FindObjCustom(x,y,['ick','lax'],[1458965,1458965],15);
      Mouse(x, y, 5, 5, true);
      Wait(randomrange(500,520));
      end
    end;

    Procedure WalkToWheel;
    begin
      SPS_Setup(RUNESCAPE_SURFACE, ['7_7','6_7','6_6']);
      ToWheel := [Point(2802, 2869), Point(2779, 2873), Point(2765, 2866),
                 Point(2754, 2844), Point(2737, 2833), Point(2714, 2820),
                 Point(2730, 2800), Point(2727, 2768), Point(2703, 2764)];
      SPS_WalkPath(ToWheel);
    end;

    Procedure ClickLadder;
    begin
    Wait(randomrange(600,800));
      repeat
        Wait(RandomRange(400,700));
        x:= (MSCX-80)
        y:= (MSCY-55)
         FindObjTPA(x, y, 6186861, 20, 2, 5, 18, 25,['Climb'])
        until(true);
      Mouse(x, y, 0, 0, true);
      Wait(RandomRange(1500,1800));
    end;


    Procedure DealWithDoor;
    begin
    wait(randomrange(400,600));
      MakeCompass('W');
    //  If FindObjCustom(x, y, ['pen Do'],[6450033] , 5) then
      wait(randomrange(400,600));
        x:= MSCX
        y:= MSCY
        If (FindObjTPA(x, y, 5462880 , 10, 2, 20, 15, 250 ,['pen Do'])) then
      begin
         Mouse(x, y, 0, 0, true);
         wait(randomrange(600,800));
         ClickLadder;
      end else
      ClickLadder;
      Wait(randomrange(600,800));
    end;
    Procedure Spin;
    begin
    Flax := DTMFromString('m6wAAAHic42ZgYLBnYmCwAWJXIDYFYmsgdgJiDyD2B2IfKAbJPweqfwfE74H4GRA/AOLbQHwXiO9AxV4B8Rsg5nLlBpJMRGF+BuIBIwkYCQAALrgNag==');
       x:= MSCX
       y :=MSCY
      MakeCompass('N');
      Wait(randomrange(200,350));
      Mouse(116, 178, 1, 1, true);
      Wait(randomrange(900, 1050));
      FindObjCustom(x,y,['nnin','eel'],[6186861,6450033],6);
      Mouse(x, y, 0, 0, false);
      WaitOption('Spin', 200);
      Wait(randomrange(1400,1600));
      Mousebox(124, 399, 186, 451, 1)
         Repeat
            Wait(randomrange(1500,3000));
            Antiban;
          until(Not  FindDTM(Flax, x, y, MIX1, MIY1, MIX2, MIY2));
          Wait(randomrange(200,300));
      end;
        Procedure GetOutOfHouse;
        begin
        MakeCompass('S');
        Wait(randomrange(600,700));
        Mouse(182, 167, 0, 0, true);
        Wait(randomrange(1000,1200));
        x:= (MSCX-80)
        y:= (MSCY-55)
        FindObjTPA(x, y, 6186861, 20, 2, 5, 18, 25,['-dow'])
        Mouse(x, y, 0, 0, true);
        Wait(randomrange(2000,2200));
        x:= MSCX
        y:= MSCY
        Mouse(210, 250, 0, 0, true);
        MakeCompass('W');
        Wait(randomrange(800,1000));
        If (FindObjTPA(x, y, 5462880 , 10, 2, 20, 15, 250 ,['pen Do'])) then
      begin
         Mouse(x, y, 0, 0, true);
         Wait(randomrange(600,700));
         Mouse(261, 221, 0, 0, true);
      end else
          Wait(randomrange(600,700));
          Mouse(261, 221, 0, 0, true);
        end;
     Procedure GetToBank;
      begin
       SPS_Setup(RUNESCAPE_SURFACE, ['7_7','6_7','6_6']);
       FromFlaxToBank := [Point(2803, 2871), Point(2764, 2872), Point(2750, 2846),
                  Point(2746, 2821), Point(2748, 2792), Point(2749, 2762),
                  Point(2738, 2737), Point(2752, 2715), Point(2739, 2695),
                  Point(2736, 2678)];
      SPS_WalkPath(FromFlaxToBank);
      Wait(randomrange(400,500));
      end;
      Procedure FlaxToBank;
      begin
         SPS_Setup(RUNESCAPE_SURFACE, ['6_6']);
       ToBank := [Point(2702, 2762), Point(2713, 2762), Point(2726, 2758),
                  Point(2733, 2746), Point(2737, 2735), Point(2737, 2722),
                  Point(2729, 2708), Point(2739, 2691), Point(2738, 2681)];
      SPS_WalkPath(ToBank);


      end;
      Procedure FreeDTMs;
      begin
      FreeDTM(Bowstring);
      FreeDTM(Flax);
      end;


    begin
    MouseSpeed := RandomRange(14,16);
      smart_server := 91;
      smart_members := false;
      smart_signed := true;
      smart_superDetail := false;
      ClearDebug;
      SetupSRL;
      DeclarePlayers;
      LoginPlayer;
      repeat
       inc(walks);
         Bank;
         WalkToFlax;
         Pick;
         WalkToWheel;
         DealWithDoor;
         Spin;
         GetOutOfHouse;
         GetToBank;
        //FlaxToBank;
        FreeDTMs;
      until(walks=8);
    end.


    I'm currently having issues with these 3 Procedures
    DealWithDoor; (including ClickLadder)
    GetOutOfHouse;
    I've had quite a few issues with these parts of the script. For example, on dealwithdoor, it's only supposed to click the door if the uptext is 'pen Do' or O'pen Do'or and leave it alone if it's not, but it clicks the door every single time. The script also usually skips ahead to the ClickLadder part of the script, sometimes after clicking the ladder, clicking the door, screwing everything up. If it gets upstairs and does the spinning, it rushes the GetOutOfHouse procedure, even if I put gigantic waits in between everything.


    If someone could help me with any of these issues, I'd appreciate it!

  2. #2
    Join Date
    Dec 2011
    Location
    New York, USA
    Posts
    1,242
    Mentioned
    12 Post(s)
    Quoted
    193 Post(s)

    Default

    I helped him fix it via pms.

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
  •