Results 1 to 10 of 10

Thread: Script problems

  1. #1
    Join Date
    Jun 2012
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Script problems

    I am tryng to make a script that mines and smites in Al- Kharid but it doenst do anything ;S :

    Simba Code:
    Program MineAndSmith;
    {$DEFINE SMART}
    {$i srl/srl.simba}
    {$i sps/sps.simba}
    var IronOre, X ,  Y:integer;


    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
      Players[0].Name := ''; // Username
      Players[0].Pass := ''; // Password
      Players[0].Pin := ''; // Bank Pin. Leave it if you don't have one.
      Players[0].Active := True;
    end;
    Procedure TPToFurnance;
    begin
    If InvFull then
        GameTab(Tab_Magic);
        MouseBox(562, 217, 585, 240, 1);
        wait(1000);
        If WaitColor(191, 155, 9515824, 10, 7000) Then
    Begin
    MMouse(191, 155, 4, 4); // using the same coordinates with a randomness
    Clickmouse2(true); // then click
    Wait(10000 + Random(200));
    end;
        GameTab(Tab_Inv);
    end;
    Procedure DTMSAREPRO;
    begin
    IronOre := DTMFromString('m6wAAAHic42ZgYBAEYhEg5gJiJgYIYAFiHiCWBGIZIJYFYgkg5mNAAA4gFgJiUSCWhtI8UL2sQGypKAk1kTD+z0A8YCQBIwEAlqICyg==');

    end;

    Procedure FreeThem;
    begin
    FreeDTM(IronOre);

    end;
    Procedure WalkToThaMine;
    var ToMine:Tpointarray;
    x, y :Integer;
    Begin

    SPS_Setup(runescape_surface,['12_9', '12_8']);
    ToMine := [Point(118, 401), Point(138, 388), Point(144, 371), Point(147, 355), Point(153, 339), Point(162, 324), Point(162, 304), Point(174, 278), Point(179, 252), Point(184, 233), Point(200, 207), Point(221, 179), Point(229, 146), Point(232, 120), Point(232, 92), Point(234, 61), Point(234, 36), Point(234, 18), Point(241, 451), Point(241, 422), Point(250, 389), Point(242, 363), Point(232, 351), Point(231, 333), Point(231, 316), Point(234, 312)];
    sps_Walkpath(ToMine);
    While  sps_Walkpath(ToMine) do DebugLn('Walking to tha Mine');


    end;

    Procedure Hello;
    begin
    DebugLn('Thanks for using this script!');
    end;
    begin
      Declareplayers;
      Smart_Server := 16;
      Smart_Members := False;
      Smart_Signed := True;
      Smart_SuperDetail := False;

      SetupSRL;
      Hello;
      repeat
      WalkToThaMine;
      Until(False);
    end.

    This one actualy do something :
    Simba Code:
    Program SmithAndMine;
    //{$DEFINE SMART}
    {$i srl/srl.simba}
    {$i sps/sps.simba}
    var IronOre, X ,  Y:integer;


    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
      Players[0].Name := ''; // Username
      Players[0].Pass := ''; // Password
      Players[0].Pin := ''; // Bank Pin. Leave it if you don't have one.
      Players[0].Active := True;
    end;
    Procedure TPToFurnance;
    begin
    If not InvEmpty then
        GameTab(Tab_Magic);
        MouseBox(562, 217, 585, 240, 1);
        wait(1000);
        If WaitColor(365, 226, 3570850 , 10, 7000) Then
    Begin
    MMouse(365, 226, 4, 4); // using the same coordinates with a randomness
    Clickmouse2(true); // then click
    Wait(14000 + Random(200));
    if FindSymbol(x, y, 'water source') then
    MMouse(X, y, 4 ,4);
    Clickmouse2(true);
    Wait(500);
    While IsMoving do Wait(50);
    if FindSymbol(x, y, 'furnace') then
    MMouse(X, y, 4 ,4);
    Clickmouse2(true);
    end;
        GameTab(Tab_Inv);
    end;
    Procedure DTMSAREPRO;
    begin
    IronOre := DTMFromString('m6wAAAHic42ZgYBAEYhEg5gJiJgYIYAFiHiCWBGIZIJYFYgkg5mNAAA4gFgJiUSCWhtI8UL2sQGypKAk1kTD+z0A8YCQBIwEAlqICyg==');

    end;

    Procedure FreeThem;
    begin
    FreeDTM(IronOre);

    end;
    Procedure WalkToThaMine;
    var ToMine:Tpointarray;
    x, y :Integer;
    Begin

    SPS_Setup(runescape_surface,['12_9', '12_8']);
    ToMine := [Point(118, 401), Point(138, 388), Point(144, 371), Point(147, 355), Point(153, 339), Point(162, 324), Point(162, 304), Point(174, 278), Point(179, 252), Point(184, 233), Point(200, 207), Point(221, 179), Point(229, 146), Point(232, 120), Point(232, 92), Point(234, 61), Point(234, 36), Point(234, 18), Point(241, 451), Point(241, 422), Point(250, 389), Point(242, 363), Point(232, 351), Point(231, 333), Point(231, 316), Point(234, 312)];
    sps_Walkpath(ToMine);
    While  sps_Walkpath(ToMine) do DebugLn('Walking to tha Mine');


    end;

    Procedure Hello;
    begin
    DebugLn('Thanks for using this script!');
    end;
    begin
      DeclarePlayers;
      {Smart_Server := 16;
      Smart_Members := False;
      Smart_Signed := False;
      Smart_SuperDetail := False;  }

      SetUpSRL;
      repeat //Does the same thing as up above
        TPToFurnance;
        Hello;
      until(AllPlayersInactive);
    end.
    Last edited by xDutch; 07-10-2012 at 09:21 PM.

  2. #2
    Join Date
    Jan 2008
    Location
    C:\
    Posts
    1,483
    Mentioned
    2 Post(s)
    Quoted
    2 Post(s)

    Default

    You can't call DeclarePlayers before SetupSRL.

  3. #3
    Join Date
    Jun 2012
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I do in both?

  4. #4
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default

    gotta love that parser
    Simba Code:
    program SmithAndMine;
    {$i srl/srl.simba}
    {$i sps/sps.simba}

    var
      IronOre, X, Y: integer;

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
      Players[0].Name := '';
      Players[0].Pass := '';
      Players[0].Pin := '';
      Players[0].Active := True;
    end;

    procedure TPToFurnance;
    begin
      if not InvEmpty then
        GameTab(Tab_Magic);
      MouseBox(562, 217, 585, 240, 1);
      wait(1000);
      if WaitColor(365, 226, 3570850, 10, 7000) then
      begin
        MMouse(365, 226, 4, 4);
        Clickmouse2(true);
        Wait(14000 + Random(200));
        if FindSymbol(x, y, 'water source') then
          MMouse(X, y, 4, 4);
        Clickmouse2(true);
        Wait(500);
        while IsMoving do
          Wait(50);
        if FindSymbol(x, y, 'furnace') then
          MMouse(X, y, 4, 4);
        Clickmouse2(true);
      end;
      GameTab(Tab_Inv);
    end;

    procedure DTMSAREPRO;
    begin
      IronOre := DTMFromString('m6wAAAHic42ZgYBAEYhEg5gJiJgYIYAFiHiCWBGIZIJYFYgkg5mNAAA4gFgJiUSCWhtI8UL2sQGypKAk1kTD+z0A8YCQBIwEAlqICyg==');
    end;

    procedure FreeThem;
    begin
      FreeDTM(IronOre);
    end;

    procedure WalkToThaMine;
    var
      ToMine: Tpointarray;
    begin
      SPS_Setup(runescape_surface, ['12_9', '12_8']);
      ToMine := [Point(118, 401), Point(138, 388), Point(144, 371), Point(147, 355), Point(153, 339), Point(162, 324), Point(162, 304), Point(174, 278), Point(179, 252), Point(184, 233), Point(200, 207), Point(221, 179), Point(229, 146), Point(232, 120), Point(232, 92), Point(234, 61), Point(234, 36), Point(234, 18), Point(241, 451), Point(241, 422), Point(250, 389), Point(242, 363), Point(232, 351), Point(231, 333), Point(231, 316), Point(234, 312)];
      sps_Walkpath(ToMine);
      while sps_Walkpath(ToMine) do
        DebugLn('Walking to tha Mine');
    end;

    procedure Hello;
    begin
      DebugLn('Thanks for using this script!');
    end;

    begin
      SetUpSRL;
      DeclarePlayers;
      repeat
        TPToFurnance;
        Hello;
      until (AllPlayersInactive);
    end.

    all i did is reformat, and switch setupsrl. the post above doesn't use smart, so your computers mouse will be used and you'll have to select the already opened rs window as the main client. + Idk if you shortened your script or not, but there's several places I think I could tip for improvements

  5. #5
    Join Date
    Jun 2012
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Tip me please ;D

    @RunAway see you're thing now to Over looked it
    Last edited by xDutch; 07-10-2012 at 09:44 PM.

  6. #6
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default

    Well, if you are trying to mine and superheat-smelt? (smite is a prayer..) then;
    * I'd remove the SPS walking / symbol finding for AK furnace.. (but if you are AK furn smelting, keep it for now)
    * Add in what to do after you have a full inventory, such as drop the ore/superheat/tele or walk to the furnace south of the AK mine
    * I don't see anything that actually mines the ore in your script.. this is well obv hazardous to your intentions
    (I'll stop short here to say)
    It might be easier to setup MSI's AK miner and just bank the ore & smelt it at the furnace with Narcle's AK smelter later.

  7. #7
    Join Date
    Jun 2012
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Im just started first wanted to let it walk
    And I will just use furnanace instead of Superheat.

    And I am just doing to practise my scripting skills.

  8. #8
    Join Date
    Jun 2012
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    My Script doenst walk to the mine :S ?
    It's just waitintg doing nothing :S?

  9. #9
    Join Date
    Jun 2012
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    bump

  10. #10
    Join Date
    Mar 2012
    Location
    127.0.0.1
    Posts
    3,383
    Mentioned
    95 Post(s)
    Quoted
    717 Post(s)

    Default

    Don't bump, it's double posting.

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
  •