Results 1 to 10 of 10

Thread: Archery Ticket Trader

  1. #1
    Join Date
    Dec 2011
    Posts
    237
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default Archery Ticket Trader

    this is a extremely simple script i made cause im to lazy to trade in my archery tickets and thought other people might enjoy it! Prior warining this I am first time scripter so baby sit if u run! All forms of Feedback are very much apriciated!



    Simba Code:
    program TicketMerchant;
    {$define SMART}
    {$i SRl/srl.simba}
    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
      Players[0].Name := '';
      Players[0].Pass := '';
      Players[0].Active := True;
    end;
    procedure Login;
    begin
      ClearDebug;
      Smart_Server := 10;
      Smart_Members := True;
      Smart_Signed := True;
      Smart_SuperDetail := False;
      SetupSRL;
      DeclarePlayers;

      if not LoggedIn then
      begin
        repeat
          LoginPlayerToLob;
        until LobbyScreen;
        begin
          LogInPlayer;
        end;
      end;

      while not LoggedIn do
        wait(250);
    end;
    Procedure Antiban;
    begin
     case random(25) of
     5:PickUpMouse;
     10:RandomRClick;
     15:MMouse(MSX1, MSY1, MSX2, MSY2);
     20:wait(1000+random(500));
     end;
    end;
    Procedure FindMerchant;
    var x, y: integer;
     Begin
      FindNormalRandoms;
      Antiban;
      if FindObj( x, y, 'erchant', 1317953, 10) then
      Mouse(x, y, 10, 10, False);
      wait(250+random(100));
      ChooseOption('rade')
      wait(500+random(500));
      writeln('Found Ticket Merchant')
     end;
    Procedure BuyTickets;
    var x, y: integer;
    begin
     FindNormalRandoms;
     Antiban;
     If not LoggedIn then
      Exit;
      repeat
      FindNormalRandoms;
      if FindObj(x, y, 'rrow', 7629913, 10) then
      Mouse(x, y, 10, 10, False);
      ChooseOption('uy');
      wait(500+random(500));
     Until(not(LoggedIn))
    end;

    begin
    Login;
    SetUpSRL;
    FindMerchant;
    repeat
    BuyTickets;
    until(not(LoggedIn))
    end.
    Last edited by bloopa1; 06-27-2012 at 10:33 PM.
    "The holy grail is to spend less time making the picture then it takes poeple to look at it"- Banksy

  2. #2
    Join Date
    May 2012
    Location
    Texas
    Posts
    365
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    First off, Congratulations on your first script!

    You do need to work on your standards though
    Check out this guide or another one in the Tutorials section

    Another thing I see is using
    Code:
    if FindObj(x, y, 'rrow', 7629913, 10)
    For finding a stationary object, Using DTMs or Bitmaps for this would be a much better option. Check out the Tutorials section or PM me if you need help with them.

    Keep up the work, and if you have any questions please ask
    Mostly Inactive, School

  3. #3
    Join Date
    Dec 2011
    Posts
    237
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Based Lord View Post
    First off, Congratulations on your first script!

    You do need to work on your standards though
    Check out this guide or another one in the Tutorials section

    Another thing I see is using
    Code:
    if FindObj(x, y, 'rrow', 7629913, 10)
    For finding a stationary object, Using DTMs or Bitmaps for this would be a much better option. Check out the Tutorials section or PM me if you need help with them.

    Keep up the work, and if you have any questions please ask
    thank u! I dont know how to use bitmaps, but i tried doing DTMs however i came across the problem of u haveing the same dtm of the arrows being bought as the ones in ur inventory. So i just used FindObj instead
    "The holy grail is to spend less time making the picture then it takes poeple to look at it"- Banksy

  4. #4
    Join Date
    May 2012
    Location
    Texas
    Posts
    365
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    When finding DTMs you can set the X, Y Start and X, Y Finish which specifies where it will look for the DTM
    Example:
    Simba Code:
    If FindDTM(YourDTM, X, Y, MIX1, MIY1, MIX2, MIY2) Then
    This will search for your DTM starting from the Top left of the Inventory (MIX1,MIY1) to the bottom right of the Inventory (MIX2,MIY2). You could also use MSX1, MSY1, ect to search just the main screen

    Let me know if you still need help
    Mostly Inactive, School

  5. #5
    Join Date
    Dec 2011
    Posts
    237
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Based Lord View Post
    When finding DTMs you can set the X, Y Start and X, Y Finish which specifies where it will look for the DTM
    Example:
    Simba Code:
    If FindDTM(YourDTM, X, Y, MIX1, MIY1, MIX2, MIY2) Then
    This will search for your DTM starting from the Top left of the Inventory (MIX1,MIY1) to the bottom right of the Inventory (MIX2,MIY2). You could also use MSX1, MSY1, ect to search just the main screen

    Let me know if you still need help

    hahahahahaha i have specificly used this before....idk what i was thinking when i reponded......
    "The holy grail is to spend less time making the picture then it takes poeple to look at it"- Banksy

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

    Default

    It is a good idea to keep to SRL standards, this means indenting lines like this, it makes them easier to read:
    Simba Code:
    begin
      Login;
      SetUpSRL;
      FindMerchant;
      repeat
        BuyTickets;
      until(not(LoggedIn))
    end.
    Here:
    Simba Code:
    if not LoggedIn then
    begin
      repeat
        LoginPlayerToLob;
      until LobbyScreen;
      begin
        LogInPlayer;
      end;
    end;
    You don't actually need that begin and end, so it could just be:
    Simba Code:
    if not LoggedIn then
      begin
        repeat
          LoginPlayerToLob;
        until LobbyScreen;
        LogInPlayer;
      end;
    This is a simple script, I haven't tried it out but it is a great first script! well done, maybe you could now extend it to be a whole Range Guild Script, any questions just ask around, and you'll be making amazing scripts in no time!

  7. #7
    Join Date
    Dec 2011
    Posts
    237
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by putonajonny View Post
    It is a good idea to keep to SRL standards, this means indenting lines like this, it makes them easier to read:
    Simba Code:
    begin
      Login;
      SetUpSRL;
      FindMerchant;
      repeat
        BuyTickets;
      until(not(LoggedIn))
    end.
    Here:
    Simba Code:
    if not LoggedIn then
    begin
      repeat
        LoginPlayerToLob;
      until LobbyScreen;
      begin
        LogInPlayer;
      end;
    end;
    You don't actually need that begin and end, so it could just be:
    Simba Code:
    if not LoggedIn then
      begin
        repeat
          LoginPlayerToLob;
        until LobbyScreen;
        LogInPlayer;
      end;
    This is a simple script, I haven't tried it out but it is a great first script! well done, maybe you could now extend it to be a whole Range Guild Script, any questions just ask around, and you'll be making amazing scripts in no time!
    i tried to message u this but ur inbox was full so I just wanted to say thanks for always looking out for my thread posts i really appreciate it. Hope all is going well with u. Thanks again
    "The holy grail is to spend less time making the picture then it takes poeple to look at it"- Banksy

  8. #8
    Join Date
    Nov 2011
    Posts
    76
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    its F2P or P2P?
    M1STER


  9. #9
    Join Date
    Apr 2012
    Location
    Seattle
    Posts
    791
    Mentioned
    1 Post(s)
    Quoted
    159 Post(s)

    Default

    Quote Originally Posted by Mister View Post
    its F2P or P2P?
    P2P I think

  10. #10
    Join Date
    Dec 2011
    Posts
    237
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    yes p2p at archery guild in near seers village
    "The holy grail is to spend less time making the picture then it takes poeple to look at it"- Banksy

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •