Results 1 to 7 of 7

Thread: Trade Accepter

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

    Default Trade Accepter

    I am trying to come up with a very simple script that accepts trades. All I want it to do is when it gets a trade offer clicks it, accepts the first trade window when something is offered, and then accepts the second trade window.

    I figured I'd start with something unique and simple, and this will also be useful to be for certain skilling tasks.

    I read the tutorials and I have a very very limited understanding of scripting here, but I hard there is a built in trade function in Simba.

    If I could get any help/suggestions I would appricate it!

    I have seen some "begging" scripts and I have tried to learn off of those but they all seem outdated and I think they have just made me amazingly confused.

    I have found this which is apparently a code to accept trades, but I have only run Simba and I'm not even sure what the difference is but I think this is Scar? And it may be outdated I really don't have a clue but I figured this would be a good starting point:

    SCAR Code:
    procedure TradeIn;  // Thanks MasterKill, Rikjess, and Hy71194!!!
    begin
      repeat
        begin
          if (not (FindColorTolerance (x, y, 8388736, 23, 437, 294, 459, 5))) then
          begin
            exit;
          end;
          if (FindColorTolerance (x, y, 8388736, 23, 437, 294, 459, 5)) then
          begin
            MMouse(x,y,0,0);
            Wait(200+Random(300));
            if IsUpTextMultiCustom(['ccept', 'rade', 'Accept']) then
            Mouse(x, y, 1, 1, True);
            begin
              TradeTimeTicking := 0
              Wait(10000+Random(5000));
            end;
          end;
        end;
        if (not (FindColorTolerance (x, y, 3358280, 31, 34, 82, 50, 5))) then
        begin
          WriteLn('Trading: Error!');
          MFF(MMCX + Random(10), MMCY + Random(10), 7, 7); // MiniMap 'blind click' so just in case you get a trade somehow, you wont get a NoGameTab.
          Inc(TradesError);
          Inc(ReportVars[2]);
          SRLRandomsReport;
          exit;
        end;
        if (FindColorTolerance (x, y, 3358280, 31, 34, 82, 50, 5)) then
        begin
          WriteLn('Trading! Now wait for an Accept. Max Wait: 25 sec.');
          repeat
            if (FindColorTolerance (x, y, 16777215, 180, 296, 341, 317, 5)) then
            begin
              WriteLn('Other player accepted! Now we''ll accept too!');
              Mouse(256, 164, 6, 6, True);
              Wait(2000);
              if (FindColorTolerance (x, y, 4214871, 30, 65, 64, 73, 5)) then
              begin
                WriteLn('We made it to the seccond window!');
                WriteLn('Now wait for an second accept. Max Wait 20 sec.');
                Wait(1500);
                TradeTimeTicking := 0
                repeat
                  if (FindColorTolerance (x, y, 16776960, 301, 38, 303, 42, 5)) then
                  begin
                    WriteLn('Accepted! all we need to do now is say thx :D');
                    Mouse(223, 309, 3, 3, True);
                    case random (5) of
                      0: TypeSend('ty');
                      1: TypeSend('thx');
                      2: TypeSend('thanks for your kindness');
                      3: TypeSend('thank you');
                      4: TypeSend('thanks');
                    end;
                    WriteLn('Trade sloved!');
                    Inc(TradeWin);
                    Inc(ReportVars[0]);
                    SRLRandomsReport;
                    Wait(100+Random(500));
                    exit;
                  end;
                  if (not (FindColorTolerance (x, y, 4214871, 30, 65, 64, 73, 5))) then
                  begin
                    WriteLn('The noob is not giving anything ... Decline.');
                    case random (5) of
                      0: TypeSend('hit accept pl0x');
                      1: TypeSend('give me stuff');
                      2: TypeSend('no thanks');
                      3: TypeSend('hit accept');
                      4: TypeSend('-.-');
                    end;
                    Inc(TradeBad);
                    Inc(ReportVars[1]);
                    SRLRandomsReport;
                    exit;
                  end;
                  if (FindColorTolerance (x, y, 4214871, 30, 65, 64, 73, 5)) then
                  begin
                    Wait(1000);
                    TradeTimeTicking := TradeTimeTicking + 1
                  end;
                  if ( TradeTimeTicking = 20 ) then
                  begin
                    WriteLn('Took to long... Now Decine.');
                    Mouse(297, 310, 2, 2, True);
                    case random (5) of
                      0: TypeSend('i dont have time for you');
                      1: TypeSend('no thanks');
                      2: TypeSend('-.-');
                      3: TypeSend('no thanks');
                      4: TypeSend('get lost');
                    end;
                    Inc(TradeBad);
                    Inc(ReportVars[1]);
                    SRLRandomsReport;
                    exit;
                  end;
                until(false);
              end;
            end;
            TradeTimeTicking := TradeTimeTicking + 1
            Wait(1000);
            if (not (FindColorTolerance (x, y, 3358280, 31, 34, 82, 50, 5))) then
            begin
              WriteLn('The noob is not giving anything ... Decline.');
              case random (5) of
                0: TypeSend('hit accept');
                1: TypeSend('accept');
                2: TypeSend('-.-');
                3: TypeSend('???');
                4: TypeSend('go away');
              end;
              Inc(TradeBad);
              Inc(ReportVars[1]);
              SRLRandomsReport;
              exit;
            end;
            if ( TradeTimeTicking = 25 ) then
            begin
              WriteLn('Took to long ... Decine');
              Mouse(258, 217, 5, 5, True);
              case random (5) of
                0: TypeSend('-.-');
                1: TypeSend('hit accept');
                2: TypeSend('nah');
                3: TypeSend('no thanks');
                4: TypeSend('get lost');
              end;
              Inc(TradeBad);
              Inc(ReportVars[1]);
              SRLRandomsReport;
              exit;
            end;
          until (false);
        end;
      until (false);
      Exit; // So the script doesn't "hang" for some reason.
    end;
    Last edited by Nig; 07-16-2012 at 06:55 PM.

  2. #2
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    Simba and SCAR are about the same.

    That snippet above I think I wrote a couple years ago. Outdated for sure due to lots of RS chatbox and trade window changes. So no that won't really work.

    PS: I deleted your other thread, please keep it to one thread.


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

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

    Default

    Okay thanks, do you think I could find a way to update it? I really don't know where to start

  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 Nig View Post
    Okay thanks, do you think I could find a way to update it? I really don't know where to start
    Go through the beginner tutorials on the site.

    EDIT: Tbh, shouldn't be too hard at all to update this, in fact it's a very good starting point to learn.

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

    Default

    I spent about 2 days reading and to be honest I'm massively confused, I'll try to re-read everything but any help/suggestions is appricated

  6. #6
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    When I get some time tomorrow, I can write you a trade accepter. Just to make sure, you want it to accept the trade, wait until an item is added into the trade, then accept both windows? I think Its do-able.
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

  7. #7
    Join Date
    Feb 2012
    Location
    Denver, CO
    Posts
    863
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    So this is for begging? I just don't see the practicality. Just curious

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
  •