Results 1 to 5 of 5

Thread: DDoSAllButDTM (and SellOrDropTo)

  1. #1
    Join Date
    Jan 2008
    Location
    Alberta
    Posts
    727
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default DDoSAllButDTM (and SellOrDropTo)

    I'm not sure if anyone will use this, but I'm not releasing/finishing the script I made this for, so hopefully it will go to use for someone.

    It Deposits, Drops or Sells all but a selected DTM. I made it for a mining script, where you had to deposit gems, and random items as well as the ores, but it could go to use somewhere else.

    SCAR Code:
    function SellOrDropTo(Which: string; Spot1, Spot2: integer): Boolean;
    var
      i, o, ROFLCATS: integer;
      coString: string;
    begin
      if not LoggedIn then exit;
      case lowercase(Which) of
        'sell': coString := 'All';
        'drop': coString := 'Drop';
      end;
      for i := Spot1 to Spot2 do
      begin
        ROFLCATS := InvCount;
        if ExistsItem(i) then
        begin
          MouseItem(i, false);
          repeat
            if TimeFromMark(o) > 2000 then exit;
            Wait(60 + random(20));
          until((ChooseOption(coString)));
          Result := ROFlCATS < InvCount;
          Wait(750 + random(300));
        end;
      end;
    end;


    procedure DDoSAllButDTM(Which: string; DTM: integer);
    //Deposit, Drop or Sell but a certain DTM (if DTM is not found, it will deposit/drop/sell all)
    var
      cx, cy, cti: integer;
    begin
      if not LoggedIn then exit;
      if FindDTM(DTM, cx, cy, mix1, miy1, mix2, miy2) then
      begin
        cti := CoordsToItem(cx, cy);
        case cti of
          0: case lowercase(Which) of
               'sell': SellorDropTo('sell', 1, 28);
               'deposit': Deposit(1, 28, true);
               'drop': DropAll;
             end;
          1: case lowercase(Which) of
               'sell': SellorDropTo('sell', cti + 1, 28);
               'deposit': Deposit(2, 28, true);
               'drop': SellorDropTo('drop', cti + 1, 28);
             end;
          2..27: case lowercase(Which) of
                   'sell': begin
                             SellorDropTo('sell', 1, cti - 1);
                             SellorDropTo('sell', cti + 1, 28);
                           end;
                   'deposit': begin
                                Deposit(1, cti - 1, true);
                                Deposit(cti + 1, 28, true);
                              end;
                   'drop': begin
                             SellorDropTo('drop', 1, cti - 1);
                             SellorDropTo('drop', cti + 1,  28);
                           end;
                 end;
          28: case lowercase(Which) of
               'sell': SellorDropTo('sell', 1, 27);
               'deposit': Deposit(1, 27, true);
               'drop': SellorDropTo('drop', 1, 27);
             end;
        end;
      end;
    end;




    If you can shorten this, or if I got the inventory spots to start from and to go to wrong, or any other things that could be made better/fixed please tell me. All feedback appreciated.

  2. #2
    Join Date
    Mar 2007
    Posts
    1,700
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Lol, the name DDoS implies something else.

    And I like the use of 'ROFLCATS' as a variable ^.^

    Also, I think CoordsToItem returns 1..28, not 0..27. I can't verify that though, I don't have SRL where I am.

  3. #3
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    Inv is 1 to 28... this is pretty sweet, i might use something like this in my jun mem competition script...

  4. #4
    Join Date
    Jan 2008
    Location
    Alberta
    Posts
    727
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It returns 0 if the item was not found, so it's like a drop/deposit/sell if there is no DTM of it.


    EDIT: ROFLCATS = all around name for a variable.

  5. #5
    Join Date
    Apr 2007
    Posts
    2,593
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I saw DDoS and I was like...WTF!

    Then I saw that it's a good script

    Good job.

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
  •