Page 2 of 2 FirstFirst 12
Results 26 to 43 of 43

Thread: Surfaces! - Accurate way of locating objects in RuneScape.

  1. #26
    Join Date
    Nov 2011
    Location
    United States
    Posts
    815
    Mentioned
    6 Post(s)
    Quoted
    284 Post(s)

    Default

    Quote Originally Posted by superuser View Post
    Yes, it works with one part as well. You can define as many parts as you wish. And yes, it works with mithril ore as well.
    Two questions.

    1. Would this work on monsters? Or can it only be objects that are always in the same spot

    2. If the object your looking for does not have 2 colors (un-Like how a rock is two objects, empty and full.) How to do make a function for that? Do you use both like for the iron rock? An example of using it on 1 color item(like finding a waterfiend, who only is one color, blue) would be helpful if you have the time cheers

  2. #27
    Join Date
    Mar 2013
    Location
    Freedomville.
    Posts
    155
    Mentioned
    2 Post(s)
    Quoted
    107 Post(s)

    Default

    Quote Originally Posted by Officer Barbrady View Post
    I'm confused, how do you make 2 parts?

    Does not seem to work?
    Simba Code:
    parts[1] := CopySurfacePart(surface_bank);

    should be

    Simba Code:
    parts[0] := CopySurfacePart(surface_bank);

    since you've defined 2 objects at
    Simba Code:
    CreateSurfaceParts(obj_Deposite, 2);

    Simba Code:
    parts[1].maxw         := parts[1].maxw;
    parts[1].minh         := 5;
    parts[1].maxh         := parts[1].maxh;
    parts[1].step         := 16;
    parts[1].max_distance := parts[1].max_distance;

    Those should be changed accordingly, since you've made them equal to themselves?

  3. #28
    Join Date
    Feb 2013
    Location
    Narnia
    Posts
    615
    Mentioned
    8 Post(s)
    Quoted
    252 Post(s)

    Default

    super cool! can u use with DTM's so it can be found at different angles or objects that aren't a static x,y?
    Last edited by Sk1nyNerd; 04-24-2013 at 04:09 AM.

    View my OSR Script Repository!


    Botted to max
    Guides: How to Report Bugs to the Scripter
    ~~~~ Moved to Java. Currently Lurking ~~~~

  4. #29
    Join Date
    Jun 2008
    Location
    United States
    Posts
    818
    Mentioned
    60 Post(s)
    Quoted
    90 Post(s)

    Default

    Quote Originally Posted by Itankbots View Post
    Two questions.

    1. Would this work on monsters? Or can it only be objects that are always in the same spot

    2. If the object your looking for does not have 2 colors (un-Like how a rock is two objects, empty and full.) How to do make a function for that? Do you use both like for the iron rock? An example of using it on 1 color item(like finding a waterfiend, who only is one color, blue) would be helpful if you have the time cheers
    Yes, this will work with monsters.

    If the object you are searching for has only one color, then you need only one surface part for the surface object.

    Quote Originally Posted by ibot_dung11 View Post
    super cool! can u use with DTM's so it can be found at different angles or objects that aren't a static x,y?
    In most cases you really do not need to rotate the camera. In the instances that you do, you just need to make sure the variations of the width and height of the object fall within the min/max of the width and height of your surface object.
    [10/14/13:19:03] <BenLand100> this is special relatively, just cleverly disguised with yachts

  5. #30
    Join Date
    Feb 2013
    Location
    Narnia
    Posts
    615
    Mentioned
    8 Post(s)
    Quoted
    252 Post(s)

    Default

    Quote Originally Posted by superuser View Post
    // c, hm, sm and t can be neatly found with the wonderful ACA.
    whats ACA and how do i access it?
    edit: figured it out

    Quote Originally Posted by euphemism View Post
    Yes, this will work with monsters.

    If the object you are searching for has only one color, then you need only one surface part for the surface object.

    so i wanna try this to find a nearby NPC because other methods have failed to do so/i cant quite figure them out- what if i want to find a human NPC that has multiple colors? do i litterally need to create a surface for every color (skin, clothes, hair, shield, ect) or can i pick a couple colors that help define the NPC over other surrondings?
    Last edited by Sk1nyNerd; 05-01-2013 at 10:26 PM.

    View my OSR Script Repository!


    Botted to max
    Guides: How to Report Bugs to the Scripter
    ~~~~ Moved to Java. Currently Lurking ~~~~

  6. #31
    Join Date
    Mar 2008
    Posts
    426
    Mentioned
    1 Post(s)
    Quoted
    116 Post(s)

    Default

    HELP

    =.=

    im confused..

    Sometimes it will create a box like that... on certain angles n positions...
    .like.. it.. uhh....

    asdfasdf.png

    EDIT: Anybody.. ? Tried changing box sizes etc.. but mmm.. to no avail.
    Last edited by Peanuts; 05-26-2013 at 12:50 PM.

  7. #32
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Quote Originally Posted by Peanuts View Post
    HELP

    =.=

    im confused..

    Sometimes it will create a box like that... on certain angles n positions...
    .like.. it.. uhh....

    asdfasdf.png

    EDIT: Anybody.. ? Tried changing box sizes etc.. but mmm.. to no avail.
    Change the size of the MAX width and height.

  8. #33
    Join Date
    Mar 2008
    Posts
    426
    Mentioned
    1 Post(s)
    Quoted
    116 Post(s)

    Default

    Quote Originally Posted by Officer Barbrady View Post
    I'm confused, how do you make 2 parts?

    @superuser
    Simba Code:
    procedure InitRocks();
    begin
        SMART_ClearMS();

        with surface_rock do begin
            c    := 1070711;
            hm   := 0.02;
            sm   := 0.19;
            t    := 6;
            minw := 4;  // At least 4 pixels wide.
            maxw := 80; // No more than 80 pixels wide.
            minh := 4;  // At least 4 pixels tall.
            maxh := 80; // No more than 80 pixel tall.
            step := 9;
            max_distance := 200;
        end;

        CreateSurfaceParts(obj_coal_rock, 2);

        with obj_coal_rock do begin
            // So, the first part we copy:
            parts[0] := CopySurfacePart(surface_rock);

            // And then the second one, which is the brown part in iron rock when it's not mined yet.
            parts[1].c            := 1251873;
            parts[1].hm           := 1.39;
            parts[1].sm           := 4.49;
            parts[1].t            := 6;
            parts[1].filter       := @SurfaceFilterClosest; // We want to have the closest iron rock next to us.
            parts[1].minw         := 5;
            parts[1].maxw         := parts[0].maxw;
            parts[1].minh         := 5;
            parts[1].maxh         := parts[0].maxh;
            parts[1].step         := 16;
            parts[1].max_distance := parts[0].max_distance;

            name := 'Coal ore';
            uptext := 'Coal';
            filter := @SurfaceFilterClosest;
        end;


         with surface_bank do begin
            c    := 6713206;
            hm   := 0.29;
            sm   := 0.08;
            t    := 5;
            minw := 4;  // At least 4 pixels wide.
            maxw := 40; // No more than 80 pixels wide.
            minh := 4;  // At least 4 pixels tall.
            maxh := 100; // No more than 80 pixel tall.
            step := 9;
            max_distance := 250;
        end;

        CreateSurfaceParts(obj_Deposite, 2);

        with obj_deposite do begin
            // So, the first part we copy:
            parts[1] := CopySurfacePart(surface_bank);

            // And then the second one, which is the brown part in iron rock when it's not mined yet.
            parts[1].c            := 6653336;
            parts[1].hm           := 0.11;
            parts[1].sm           := 0.39;
            parts[1].t            := 3;
            parts[1].filter       := @SurfaceFilterClosest; // We want to have the closest iron rock next to us.
            parts[1].minw         := 5;
            parts[1].maxw         := parts[1].maxw;
            parts[1].minh         := 5;
            parts[1].maxh         := parts[1].maxh;
            parts[1].step         := 16;
            parts[1].max_distance := parts[1].max_distance;

            name := 'Deposite booth';
            uptext := 'deposite';
            filter := @SurfaceFilterClosest;
        end;
    end;

    Does not seem to work?

    Not sure if this is your problem...

    but.. the uptext is deposit box.. Not deposite

    OR

    With the deposit box you will only need one colour so you could you could just use..

    Code:
      CreateSurfaceParts(_object_deposit_box, 1);
    
       with _object_deposit_box do begin
            parts[0].c            := 6719386;
            parts[0].hm           := 0.11;
            parts[0].sm           := 0.51;
            parts[0].t            := 3;
            parts[0].filter       := @SurfaceFilterClosest;
            parts[0].minw         := 6;
            parts[0].maxw         := 30;
            parts[0].minh         := 6;
            parts[0].maxh         := 30;
            parts[0].step         := 16;
            parts[0].max_distance := 999;
    
            name := 'Deposit box';
            uptext := 'box';
        end;
    Last edited by Peanuts; 05-28-2013 at 10:29 AM.

  9. #34
    Join Date
    Mar 2008
    Posts
    426
    Mentioned
    1 Post(s)
    Quoted
    116 Post(s)

    Default

    any idea how i would get the mouse to hover over box?

    Solved. Edited a surfaces.srl function..
    So simple..
    Gotta think more peanuts!
    Last edited by Peanuts; 05-29-2013 at 06:30 PM.

  10. #35
    Join Date
    Apr 2013
    Posts
    26
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    First off, VERY cool stuff here!

    I tried messing around with it in a goblin script I am working on and a weird glitch
    http://imgur.com/kGL1zPu
    Simba Code:
    procedure Init();
    begin

        SMART_ClearMS();

        with surface_Goblin do begin
            c    := 3299668;
            hm   := 0.11;
            sm   := 0.07;
            t    := 10;
            minw := 5;  // At least 4 pixels wide.
            maxw := 25; // No more than 80 pixels wide.
            minh := 20;  // At least 4 pixels tall.
            maxh := 60; // No more than 80 pixel tall.
            step := 9;
            max_distance := 200;
        end;

        CreateSurfaceParts(obj_Green_Goblin, 2);

        with obj_Green_Goblin do begin
            // So, the first part we copy:
            parts[0] := CopySurfacePart(surface_Goblin);

            // And then the second one, which is the brown part in iron rock when it's not mined yet.
            parts[1].c            := 3299668;
            parts[1].hm           := 0.11;
            parts[1].sm           := 0.07;
            parts[1].t            := 10;
            parts[1].filter       := @SurfaceFilterClosest; // We want to have the closest iron rock next to us.
            parts[1].minw         := 1;
            parts[1].maxw         := parts[0].maxw;
            parts[1].minh         := 1;
            parts[1].maxh         := parts[0].maxh;
            parts[1].step         := 16;
            parts[1].max_distance := parts[0].max_distance;

            name := 'Goblin';
            uptext := 'Goblin';
            filter := @SurfaceFilterClosest;
        end;
    end;

    Simba Code:
    if FindSurfaceObject(obj_Green_Goblin, MSX1, MSY1, MSX2, MSY2) then
          begin
          with obj_Green_Goblin do
            Mouse(p.x, p.y, 2, 2, mouse_left);


    Any idea on what I messed up??

  11. #36
    Join Date
    May 2007
    Posts
    526
    Mentioned
    12 Post(s)
    Quoted
    109 Post(s)

    Default

    Quote Originally Posted by armthehomeless View Post
    First off, VERY cool stuff here!

    I tried messing around with it in a goblin script I am working on and a weird glitch
    http://imgur.com/kGL1zPu
    Simba Code:
    procedure Init();
    begin

        SMART_ClearMS();

        with surface_Goblin do begin
            c    := 3299668;
            hm   := 0.11;
            sm   := 0.07;
            t    := 10;
            minw := 5;  // At least 4 pixels wide.
            maxw := 25; // No more than 80 pixels wide.
            minh := 20;  // At least 4 pixels tall.
            maxh := 60; // No more than 80 pixel tall.
            step := 9;
            max_distance := 200;
        end;

        CreateSurfaceParts(obj_Green_Goblin, 2);

        with obj_Green_Goblin do begin
            // So, the first part we copy:
            parts[0] := CopySurfacePart(surface_Goblin);

            // And then the second one, which is the brown part in iron rock when it's not mined yet.
            parts[1].c            := 3299668;
            parts[1].hm           := 0.11;
            parts[1].sm           := 0.07;
            parts[1].t            := 10;
            parts[1].filter       := @SurfaceFilterClosest; // We want to have the closest iron rock next to us.
            parts[1].minw         := 1;
            parts[1].maxw         := parts[0].maxw;
            parts[1].minh         := 1;
            parts[1].maxh         := parts[0].maxh;
            parts[1].step         := 16;
            parts[1].max_distance := parts[0].max_distance;

            name := 'Goblin';
            uptext := 'Goblin';
            filter := @SurfaceFilterClosest;
        end;
    end;

    Simba Code:
    if FindSurfaceObject(obj_Green_Goblin, MSX1, MSY1, MSX2, MSY2) then
          begin
          with obj_Green_Goblin do
            Mouse(p.x, p.y, 2, 2, mouse_left);


    Any idea on what I messed up??
    Hi,

    Yeah, you are not experiencing a glitch, but misconfiguration instead For instance, I can see that the second part is having the same color as first one. What I would do, is that have only one part, which is the greenish one.

  12. #37
    Join Date
    Apr 2013
    Posts
    26
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Thanks for the fast rely How exactly would that syntax look? Do I still need the parts or can I pretty much comment out the second half (starting with CreateSurfacePart)?

    Probably missing something super obvious, been up a few to many hours lol

    EDIT: Got it figured out. had to add SMART_ClearMS(); an extra time inside my loop and change it to one part.
    Last edited by armthehomeless; 07-02-2013 at 01:56 PM.

  13. #38
    Join Date
    Jan 2012
    Location
    Michigan, US
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    EDIT: Ignore all this, was able to get it working after looking through the surfaces include in the OP. My new question is how I could check within the drawn object repeatedly for when it no longer has a color. In other words: When I start siphoning an esshound, how do I get it to recheck the box periodically for the esshound colors and if it doesn't find them, find another esshound to siphon?

    Hey!

    I'm attempting to get this working currently for a runespan script, but I'm having uptext issues (I think) that I'm finding hard to troubleshoot. Here's the relevant bits of my code:

    Simba Code:
    //Cosmic Esshound
        with surface_cosmic_essling do begin
            c    := 8441417;
            hm   := 0.95;
            sm   := 1.45;
            t    := 26;
            minw := 20;
            maxw := 50;
            minh := 20;
            maxh := 50;
            step := 16;
            max_distance := 200;
        end;

        CreateSurfaceParts(obj_cosmic_essling, 3);

        with obj_cosmic_essling do begin
            parts[0] := CopySurfacePart(surface_cosmic_essling);

            parts[1].c            := 9229402;
            parts[1].hm           := 1.37;
            parts[1].sm           := 2.13;
            parts[1].t            := 18;
            parts[1].filter       := @SurfaceFilterClosest;
            parts[1].minw         := 4;
            parts[1].maxw         := parts[0].maxw;
            parts[1].minh         := 4;
            parts[1].maxh         := parts[0].maxh;
            parts[1].step         := 16;
            parts[1].max_distance := parts[0].max_distance;

            parts[2].c            := 7519801;
            parts[2].hm           := 1.30;
            parts[2].sm           := 2.19;
            parts[2].t            := 19;
            parts[2].filter       := @SurfaceFilterClosest;
            parts[2].minw         := 4;
            parts[2].maxw         := parts[0].maxw;
            parts[2].minh         := 4;
            parts[2].maxh         := parts[0].maxh;
            parts[2].step         := 16;
            parts[2].max_distance := parts[0].max_distance;

            name := 'Cosmic Esshound';
            uptext := 'Cosmic';
            filter := @SurfaceFilterClosest;
        end;

    And:

    Simba Code:
    procedure Harvestessence;

    begin

       begin
         SMART_ClearMS();
        if FindSurfaceObject(obj_cosmic_essling, MSX1, MSY1, MSX2, MSY2) then

        begin
          with obj_cosmic_essling do
            Mouse(p.x, p.y, 2, 2, mouse_left);

            wait(5000+random(7042));
          end else
            begin
            RotateMap;
            Harvestessence;
          end;
       end;
       Harvestessence;
    end;

    I've tried both the FindSurfaceObject and the ClickSurfaceObject approaches. The first finds the esshounds near flawlessly, but also is finding the vine platforms and chaos esshounds due to the yellow color. It's completely ignoring the uptext string I enter when creating the surface object initially and I'm not really sure why. I attempted to put in some other manual uptext detection stuff as a secondary "if" statement to force it to find the surface, then verify the uptext before clicking with no luck. It would find the wraith perfectly, but wouldn't find the uptext and thus never clicked.

    Using ClickSurfaceObject was acting strangely in that it opened the menu for everything it did and would then check for the text in the right click options. So it was effective (I guess) in not clicking the platforms, but would still end up repeatedly right clicking the platform and then not selecting anything.

    It's late here and I'm tired so I hope that covers it well enough. Any help would be very much appreciated as I feel like I've hit something of a brick wall. Thanks in advance.
    Last edited by Omniusaspirer; 07-03-2013 at 03:13 PM.

  14. #39
    Join Date
    Nov 2011
    Posts
    335
    Mentioned
    0 Post(s)
    Quoted
    68 Post(s)

    Default

    Can this be applied for finding moving objects (like NPCs in combat training)?

  15. #40
    Join Date
    Mar 2012
    Posts
    50
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Very nice man !
    Previously known as nikaa

  16. #41
    Join Date
    Mar 2012
    Posts
    50
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Can i Use this in OSR
    Previously known as nikaa

  17. #42
    Join Date
    Nov 2012
    Location
    USA
    Posts
    153
    Mentioned
    1 Post(s)
    Quoted
    33 Post(s)

    Default

    Quote Originally Posted by nickyvh View Post
    Can i Use this in OSR
    I see no reason why you could not.

  18. #43
    Join Date
    Jul 2013
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Has anyone tried using this to find banks? I know there is a FindBank function but it does not have the bank I'm looking for.

Page 2 of 2 FirstFirst 12

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
  •