Results 1 to 17 of 17

Thread: Using item??????Need help

  1. #1
    Join Date
    Aug 2006
    Posts
    151
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Using item??????Need help

    IM at the final stage of my vial filler and now im stuck on using the vial with the fountain i have no clue how to do it?

    So how exactly would u do use 1st item in inventory with fountain thats outside of inventory???

    thnx for any1 who helps script will be realesed once i figure this out


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

    Default

    OffTopic: Oooooo a man molester!

    OnTopic: Could you use a bmp of the vial or whatever your filling then a small bmp of the fountain? Like the top of the fountain or something?

  3. #3
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    6,136
    Mentioned
    28 Post(s)
    Quoted
    17 Post(s)

    Default

    Copy Vial BitmapMask from SRL/misc/allitems.scar.
    Scan for the Vial using FindBitMapMaskTolerance

    Or, make 2 bitmaps (BMP 32-bits 8*8 pixels should do....) of the Vial (Filled and Empty), and scan using FindBitMapTolerance. When found, click on the (Empty) Vial.

    Scan the Mainscreen (using FindColorSPIRALtolerance) for a color BLue-ish. Click it and the Vial is filled. (Save the coords of fountain for later )

    Check the chattext for text like...:
    You managed fill the vial.
    and make that your exit (loop) conditions, or count the Bitmaps both empty and filled using:
    CountAllItemsBitmapTolWait (dont recall exactly the function )

    Or you can use RsN's UseItem.

    voila, ad infinitum


    TIP:

    Before programming the logic of a script, first manually go through all the steps neccesary to make the script. I usually spend hours just rehearsing and looking and finding out the correct procedural logic.
    SRL is a Library of routines made by the SRL community written for the Program Simba.
    We produce Scripts for the game Runescape.

  4. #4
    Join Date
    Aug 2006
    Posts
    151
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thnx alot WT but im not to good at scripting yet and all i know how to do is declare bitmaps then click on them(read in the funwithbitmaps tut)so im not quite following the bitmap mask thing i guess im just going to be stuck with useitmen but feel free to hit me up on msn at crazyirishman84@hotmail.com and give me some pointers!

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

    Default

    you can also use dtms of the black (65536) outline

    finddtm(dtmbucket,ex,ey,554, 205, 743, 465);
    useitem(coordstoinvspot(ex,ey+10));

    (the +10 is because the parent dot was at '12 o clock', so I wanted to make sure it was nearer the center)


    for that you need to have this before
    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;

  6. #6
    Join Date
    Aug 2006
    Posts
    151
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok bores i kind of understand but im trying to use a vial on the fountain in varock whihc is outside invintory i found this
    SCAR Code:
    begin
    useitem(1);
    wait(1000+random(100));
    finddtm(dtmunvial,ex,ey,554, 205, 743, 465);
      useitem(coordstoinvspot(ex,ey+10));
    wait(500+random(100));
    until countitemdtm(dtmunvial)=0;
    end;
    end;
    how would i make it click outside of inventory on a fountain though?

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

    Default

    Ahh. You want
    SCAR Code:
    repeat

    finddtm(dtmunvial,ex,ey,554, 205, 743, 465);
      useitem(coordstoinvspot(ex,ey+10));
    wait(500+random(100));
    clickfountain;

    until countitemdtm(dtmunvial)=0;

    making sure that the dtm works for empty but not filled

    Then you need a procedure called ClickFountain. Which you will have to write. Which will probably be a pain in the ass, and the hardest part of the script.

    Unless you can come up with a unique color or something, try FindObj.

  8. #8
    Join Date
    Aug 2006
    Posts
    151
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Do i have to mkae my own DTM or are there some loaded into SRL and where would they be in there?

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

    Default

    main screen stuff is also harder than inventory

    being the only blue thing helps a lot though

  10. #10
    Join Date
    Aug 2006
    Posts
    151
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by wtf i sp4nk View Post
    Do i have to mkae my own DTM or are there some loaded into SRL and where would they be in there?
    How do u solve this

    and for the fountain do u think this would work?

    SCAR Code:
    If(FindColorSpiralTolerance(x,y,FountainColor,msx1,msy1,msx2,msy2,15))Or
             (FindColorSpiralTolerance(x,y,FountainColor1,msx1,msy1,msx2,msy2,15))Or
               (FindColorSpiralTolerance(x,y,FountainColor2,msx1,msy1,msx2,msy2,15))Then
                 mmouse(x,y,3,3)
                begin
                 GetMousePos(x,y)
                    mouse(x,y,1,1,true)

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

    Default

    Yes make your own. Make sure you have a dot where the water would be, and give it some tolerance. Test it a lot by doing if finddtm(....) then writeln('yea') or something, switch worlds, make sure it works for empty vial but not for filled.

    Looks like it would work. Put in an uptext check just to make sure. Also check out FindObj in object.scar

  12. #12
    Join Date
    Aug 2006
    Posts
    151
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thnx im ive never made my own DTm before so this should be a good learning expeirence (gonna go look at tuts to refresh me momory)

    ps:wheres findOBJ in scar is it in SRL includes folder or what cause i didnt see it

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

    Default

    srl/core/object.scar

  14. #14
    Join Date
    Aug 2006
    Posts
    151
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thnx again but i seem to keep getting this error while trying to make my DTM i read a short tut(only 1 i could find on DTMs) and heres what i made but when i try to compile it gives me an error(Line 14: [Error] (14:12): Unknown identifier 'vial' in script) any idea why and is that whatd id do to make the dtm or should i have clicked more red dots?

    Thnx for all the help so far though

    SCAR Code:
    program New;

    Procedure LoadDTM;
    var
    vial,  x, y :Integer;
    begin
      vial := DTMFromString('78DA63FCC2C4C050CFC8800C121252C0344C9' +
           '4F113504D1DAA9A8A8A4A54351F816A9A50D5949595639AD382AA' +
           'A6B4B40C55CD67A09A6A5435CB97AF4451030045A70E9B');
    end;

    Procedure FindTree;
    begin
      if(FindDTM(vial, x, y, 558, 2, 732, 164))then
       WriteLn('Tree Found! :D');
    end;

    begin
      LoadDTM;
      FindTree;
    end.

  15. #15
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    you need to make vial a globar variable,
    put it at top of script like this

    SCAR Code:
    program New;
     var
    vial, x, y :Integer;
    Procedure LoadDTM;
    begin
    vial := DTMFromString('78DA63FCC2C4C050CFC8800C121252C0344 C9' +
    '4F113504D1DAA9A8A8A4A54351F816A9A50D5949595639AD3 82AA' +
    'A6B4B40C55CD67A09A6A5435CB97AF4451030045A70E9B');
    end;

    Procedure FindTree;
    begin
    if(FindDTM(vial, x, y, 558, 2, 732, 164))then
    WriteLn('Tree Found! ');
    end;

    begin
    LoadDTM;
    FindTree;
    end.

    Did you read MY dtm tut =)?
    And please use scar tags =)

  16. #16
    Join Date
    Aug 2006
    Posts
    151
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    sorry i couldnt find ur DTM tut i used one that said 10 steps to learning DTms but now my dtm editor doesnt seem to want to work since everytime it comes up with a black screen any idea why? i guess my first dtm didnt work cause it never said anything to chatr box and now i cnat make a new 1

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

    Default

    set cross hairs right before opening editor

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. item droper
    By elobire in forum NOTA
    Replies: 0
    Last Post: 12-14-2008, 03:16 PM
  2. item spawner
    By BenMan in forum News and General
    Replies: 14
    Last Post: 04-30-2008, 11:14 PM
  3. Best F2P alch item?
    By Harry in forum RuneScape News and General
    Replies: 6
    Last Post: 02-27-2008, 12:16 AM
  4. Most Valuable Rs Item you have?
    By Mikool in forum RuneScape News and General
    Replies: 35
    Last Post: 01-18-2008, 07:11 AM

Posting Permissions

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