Results 1 to 10 of 10

Thread: DropProcedures

  1. #1
    Join Date
    Jan 2007
    Posts
    248
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default DropProcedures

    Hey,
    I'm currently working on a powerminer, and I'm wondering what would be a basic way of dropping the ores, and having a boolean const for DroppingGems.
    Say if you dont want to drop gems, but only the ores you power mine.

    If someone can post a basic way of scripting something like that. What I thought might work was using bitmap
    E.g
    If findbitmap(blabla,x,y);
    then
    blablabla
    *the blabla functions as skip in the drop procedure.
    ---------
    Only problem in my point of view, you'd need a bitmap for every gem from saph - diamond, and in some of my cases bitmaps lagg the script and have a rate of malfucntioning.

    Thanks if you help me guys.

  2. #2
    Join Date
    Sep 2006
    Posts
    916
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    PHP Code:
    DropTo(2,28); 
    Drops everything but the first inventory slot.

    PHP Code:
    DropAll
    Self explanatory

    PHP Code:
    If (FindBitmap(Ore,x,yThen
    ChooseOption
    (x,y,'Drop'
    That's a list of useful drop commands. Although, DTM's are better and faster BMP's are easier to use I find.

  3. #3
    Join Date
    Dec 2006
    Location
    Ky
    Posts
    390
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I would definitely use DTM's for all the gems I can make you a DTM for diamonds right now if you want an example..

    SCAR Code:
    Diamond:= DTMFromString('78DA633CC5C4C0D0CFC8800CCE9F3801A661A' +
           '28C97806A7A50D5C064E16A2E03D54C21A00664D70C026AF603D5' +
           '4C20A0E630504D0B013517806A5AF1AB010079080BF4');

    I would say this is what you need
    SCAR Code:
    DropExcept(I: Array of Integer);

    But I'm not exactly sure if it would work right becuase it is based off of inventory location.. To use it you may need to first have a procedure that clicks the gem based off finding the DTM and then holds mouse and moves to 1,2,3... inv position. And then after that drop all items except inv position of gem! Sounds like some work but if you put in the time it can happen.
    SUMMER BREAK be back when I want to

  4. #4
    Join Date
    Jan 2007
    Location
    USA
    Posts
    1,782
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    lol

    SCAR Code:
    function DropOres : boolean;
    var Orex, Orey : integer;
    begin
      repeat
      if(FindItemName((OreName)))then
        begin
        GetMousePos(Orex,Orey);
        MMouse(Orex,Orey,0,0);
       wait(600);
        Mouse(Orex,Orey,0,0,false);
        wait(600);
        ChooseOption(x,y,'rop');
       until(not(FindItemName((OreName)))or(etc..);
    end;
    simple as that ?

    Join the fastest growing merchanting clan on the the net!

  5. #5
    Join Date
    Dec 2006
    Location
    Ky
    Posts
    390
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Eek major .. lol yea use that.

    [
    SUMMER BREAK be back when I want to

  6. #6
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    GetMousePos(Orex,Orey);
    MMouse(Orex,Orey,0,0);
    wait(600);

    What's that for???


    Make a DTM of any ore (not clay), by clicking the black (65536) outline in about 10 places, with the first dot being near the top. Test it to make sure it picks up on ores but not gems. You'll have to add in clay separately if you want to.
    SCAR Code:
    function CoordsToInvSpot(gx,gy:integer):integer;
    var col,row:integer;
    begin
    if ((gx>569) and(gx<600)) then col:=1;
    if ((gx>611) and(gx<642)) then col:=2;
    if ((gx>653) and(gx<684)) then col:=3;
    if ((gx>695) and(gx<723)) then col:=4;

    if ((gy>213) and(gy<244)) then row:=1;
    if ((gy>249) and(gy<280)) then row:=2;
    if ((gy>285) and(gy<316)) then row:=3;
    if ((gy>322) and(gy<352)) then row:=4;
    if ((gy>357) and(gy<387)) then row:=5;
    if ((gy>393) and(gy<424)) then row:=6;
    if ((gy>429) and(gy<459)) then row:=7;

    result:=((row-1)*4)+col;
    end;

    procedure DropOres;
    var ex,ey:integer;
    begin
      repeat
        if finddtm(dtmOre,ex,ey,MIX1, MIY1, MIX2, MIY2) then
        begin
          mouseitem(coordstoinvspot(ex,ey+10),false);
          chooseoption(x,y,'rop');
        end;
      until not(finddtm(dtmOre,ex,ey,MIX1, MIY1, MIX2, MIY2));
    end;

  7. #7
    Join Date
    Dec 2006
    Location
    Ky
    Posts
    390
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Boreas View Post
    GetMousePos(Orex,Orey);
    MMouse(Orex,Orey,0,0);
    wait(600);

    What's that for???
    Lol I think he just wanted his own vars... But x, y would work fine too. Nice procedure Boreas!
    SUMMER BREAK be back when I want to

  8. #8
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    No the point is, its moving to where it is already, doing nothing. ty

  9. #9
    Join Date
    Jan 2007
    Location
    USA
    Posts
    1,782
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    lol i know but i like to make sure it gets there I Have a habit of doin that, and i prefer names over DTM's because i believe names are reliable longer

    Join the fastest growing merchanting clan on the the net!

  10. #10
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by pwnaz0r View Post
    lol i know but i like to make sure it gets there
    But the whole point of getmousepos is that is is already there.

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
  •