Results 1 to 9 of 9

Thread: Question about NPC finding & randoms

  1. #1
    Join Date
    May 2008
    Posts
    203
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default Question about NPC finding & randoms

    Hello!

    Been a bit busy IRL the last few weeks so I paused my script making but I've been near completed my script (working on a goblin suicider in lumby) and had some questions:

    1.) Randoms - Has anyone ever made a function that detects text on the screen with your name on it (randoms say your full name) and try to right-click & dismiss the NPC? Haven't tried doing it myself yet and was wondering if that was a function ... didn't immediately see anything like that in AL.

    2.) NPC finding. I want to set up multiple TMSObjects for different goblins (they look a lil different) and I was using the tutorial by @Flight found here. Question is: does the inner and outer colors truly have to be "inner" or "outer"? In the case of goblins, I want to find the body and head colors, respectively, with some sort of tolerance ... so would I use the body color as the inner color & head as outer? Also the tutorial doesn't really elaborate how the hue and saturation tolerance affects its findings ... is there a tutorial that elaborates on those? I have a basic understanding of both but would like to read up more on it & if certain values are recommended in different cases.

    Thanks!

  2. #2
    Join Date
    Jan 2012
    Location
    Sydney, Australia
    Posts
    877
    Mentioned
    12 Post(s)
    Quoted
    368 Post(s)

    Default

    Quote Originally Posted by Queso View Post
    Hello!

    Been a bit busy IRL the last few weeks so I paused my script making but I've been near completed my script (working on a goblin suicider in lumby) and had some questions:

    1.) Randoms - Has anyone ever made a function that detects text on the screen with your name on it (randoms say your full name) and try to right-click & dismiss the NPC? Haven't tried doing it myself yet and was wondering if that was a function ... didn't immediately see anything like that in AL.

    2.) NPC finding. I want to set up multiple TMSObjects for different goblins (they look a lil different) and I was using the tutorial by @Flight found here. Question is: does the inner and outer colors truly have to be "inner" or "outer"? In the case of goblins, I want to find the body and head colors, respectively, with some sort of tolerance ... so would I use the body color as the inner color & head as outer? Also the tutorial doesn't really elaborate how the hue and saturation tolerance affects its findings ... is there a tutorial that elaborates on those? I have a basic understanding of both but would like to read up more on it & if certain values are recommended in different cases.

    Thanks!
    I believe hue/sat provides you with a more accurate colour finding. Use Auto Colour Aid to identify colour with Hue/Sat.

    There is a function in Aerolib that finds randoms called foundRandoms (C:\Simba\Includes\AeroLib\misc\randomsolvers). You need to have your nick name setup as part of your display name.
    Simba Code:
    program new;
    {$i AeroLib/AeroLib.Simba}

    Procedure PlayerSetup;
    begin
      Me.Active := True;
      Me.Name := '';
      Me.Pass := '';
      Me.Nick := 'lah'; // Display name is Blah
      Me.Member := True;
    end;

    begin
      InitAL;
      PlayerSetup;
      if foundRandoms then
        writeln('Found and dismissed random');
    end.
    Flight would be the best person to explain the TMSObject question, but I think there is a distance modifier in the FindAll function.

  3. #3
    Join Date
    May 2008
    Posts
    203
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    Quote Originally Posted by Dan the man View Post
    There is a function in Aerolib that finds randoms called foundRandoms (C:\Simba\Includes\AeroLib\misc\randomsolvers). You need to have your nick name setup as part of your display name.
    Ah, I see, it's in Master, s'why I didn't see it.

    I see that it calls findTalk ... it doesn't look like it dismisses players saying your name though? E.g. it simply looks for your name in text & assumes there's something there ... perhaps I overload this method & tack on a check against text in the chatbox & not bother moving the mouse at all if the name was from a player. Seems to be a possible flaw in the method that I was hoping to program around.

  4. #4
    Join Date
    Jan 2012
    Location
    Sydney, Australia
    Posts
    877
    Mentioned
    12 Post(s)
    Quoted
    368 Post(s)

    Default

    Quote Originally Posted by Queso View Post
    Ah, I see, it's in Master, s'why I didn't see it.

    I see that it calls findTalk ... it doesn't look like it dismisses players saying your name though? E.g. it simply looks for your name in text & assumes there's something there ... perhaps I overload this method & tack on a check against text in the chatbox & not bother moving the mouse at all if the name was from a player. Seems to be a possible flaw in the method that I was hoping to program around.
    Yeah it will find the player who says your name and identify that it doesn't have the mouse over option in the array and do nothing. Does waste time though. A way around this is to turn public chat off.

  5. #5
    Join Date
    May 2008
    Posts
    203
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    Quote Originally Posted by Dan the man View Post
    A way around this is to turn public chat off.
    Mmm, true! That'd be a fair solution ... although it's always been my opinion that leaving public chat on makes you appear less bot-y? Since so many scripts amongst this form & other bots tend to turn it off. Perhaps my fear isn't warranted however.

    Oh, also, you mentioned something about an "Auto Colour Aid" ... is that a tool? I am unable to find it on the forums after searching.

  6. #6
    Join Date
    Jan 2012
    Location
    Sydney, Australia
    Posts
    877
    Mentioned
    12 Post(s)
    Quoted
    368 Post(s)

    Default

    Quote Originally Posted by Queso View Post
    Mmm, true! That'd be a fair solution ... although it's always been my opinion that leaving public chat on makes you appear less bot-y? Since so many scripts amongst this form & other bots tend to turn it off. Perhaps my fear isn't warranted however.

    Oh, also, you mentioned something about an "Auto Colour Aid" ... is that a tool? I am unable to find it on the forums after searching.
    https://villavu.com/forum/showthread...ght=auto+color

    Looks more bot like if someone is speaking to you and you don't respond

  7. #7
    Join Date
    May 2008
    Posts
    203
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    Oh my word thanks muchly for the link! That'll knock out some work ... worst case scenario if Flight or others don't get back to me about the TMSObject question I'll just play around with values & see what happens.

    Quote Originally Posted by Dan the man View Post
    Looks more bot like if someone is speaking to you and you don't respond
    My fear when botting has always been not what players are doing but what Jagex can detect ... e.g. the SMART client is feasibly detectable instantly on their end upon usage. Likewise, detecting player settings & seeing public chat off ~may~ be a red flag on their end and I'm paranoid enough to try and program around it.

  8. #8
    Join Date
    Jan 2012
    Location
    Sydney, Australia
    Posts
    877
    Mentioned
    12 Post(s)
    Quoted
    368 Post(s)

    Default

    Quote Originally Posted by Queso View Post
    Oh my word thanks muchly for the link! That'll knock out some work ... worst case scenario if Flight or others don't get back to me about the TMSObject question I'll just play around with values & see what happens.



    My fear when botting has always been not what players are doing but what Jagex can detect ... e.g. the SMART client is feasibly detectable instantly on their end upon usage. Likewise, detecting player settings & seeing public chat off ~may~ be a red flag on their end and I'm paranoid enough to try and program around it.
    I believe that Jagex rely on player reports more than anything when it comes to colour botting, based on my ban history.

  9. #9
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Quote Originally Posted by Queso View Post
    2.) NPC finding. I want to set up multiple TMSObjects for different goblins (they look a lil different) and I was using the tutorial by @Flight found here. Question is: does the inner and outer colors truly have to be "inner" or "outer"? In the case of goblins, I want to find the body and head colors, respectively, with some sort of tolerance ... so would I use the body color as the inner color & head as outer? Also the tutorial doesn't really elaborate how the hue and saturation tolerance affects its findings ... is there a tutorial that elaborates on those? I have a basic understanding of both but would like to read up more on it & if certain values are recommended in different cases.

    Thanks!
    No they aren't truly inner & outer colors any more. In my very original system they were in fact utilized that way; the outer color found first, TPAs were split, boundaries for each TPA were found, and within each boundary the inner color would then be searched for and so on... This system was actually a by product of my original herb-farming script, truly one of my best creations. It also produced neat functions like ForceATPA, which I'd like to throw in the next revision of AeroLib.

    Now it's just a matter of dual-colors being found within a given distance of each other. I suppose a more appropriate title would be "Color A/Color B". Most of the base functions that find TMSObjects have a parameter for declaring the max distance between the two colors, whereas some of the overloaded versions default back to 10 simply for easier scripting.
    Simba Code:
    if rock_Iron.find() then Mine();  

    vs...

    if rock_Iron.find(10, MSCP, FOUND_POINT) then Mine();

    And also something to keep in mind is if you're searching for a TMSObject that has both "inner & outer" colors then you should keep in mind that it's the inner color that will ultimately be the result of the finder. I know that may be a bit confusing so here's and example: A TMSObject of a goblin is declared. You make the inner color as the body and the outer color as its head. Calling these two different functions would then result as given:
    Simba Code:
    Goblin.findAll(10, MSCP, FOUND_POINTS);
    If this function results True then it'll spit back a TPointArray (in this case, "FOUND_POINTS") of the center point of every inner color cluster (TPA) found that was within distance (in this case, 10) of the outer color. So you'll have a TPointArray of the center of every goblin's body (inner color) rather than a TPA of the center of every goblin's head (outer color). And the other way to find TMSObjects by having the finder go a step further and manually check each possible point for the TMSObject's uptext:
    Simba Code:
    Goblin.find(10, MSCP, FOUND_POINT);
    "FOUND_POINT" would be the point at which the first matching TMSObject is found and verified via moving the mouse to it and checking the uptext. However since your mouse is already over the goblin then you really don't need to store this point at all, just click to begin attacking right? If that's the case, try this:
    Simba Code:
    if Goblin.find() then fastClick(MOUSE_LEFT);
    Easy as pie.

    You might wonder what's the point of having the finder return a TPA of all of the matching TMSObjects rather than right away moving the mouse to each possible object to check uptext. Well, this would work better if you wanted to find all of a certain NPC and then go a step further to check if each of those found TMSObjects had a HP bar above them, indicating they're currently in combat and unavailable to attack. Just an example.

    So I hope that sheds some light on the subject. I see Dan's already given you a link to AutoColorAid and how to use that to create unique, accurate colors. Post back if you've still questions or you run into any issues; I'll be happy to lend a hand and I'm sure Dan would be as well; he's knowledgeable and does a wonderful job of answering & explaining. By the way, if you'd like an example of a fighting script that targets NPCs with TMSObjects tied to them, take a look at AeroFighter Lite. And here's the NPC file I made for goblins in the Stronghold of Security:
    Code:
    [NPC_Obj_Main]
    ObjCount=2
    XPMod=65
    
    [NPCObj_0]
    Name=Goblin
    UpText(C)=3
    UpText[0]=ck Gob
    UpText[1]=Goblin
    UpText[1]=oblin
    ColI=3048061
    TolI=12
    hModI=0.04
    sModI=0.13
    
    [NPCObj_1]
    Name=Goblin
    UpText(C)=3
    UpText[0]=ck Gob
    UpText[1]=Goblin
    UpText[1]=oblin
    ColI=4813108
    TolI=11
    hModI=0.04
    sModI=0.12
    
    [GI_Array_Main]
    GICount=0
    CheckNotedItems=False
    
    [Map_Settings]
    UseMap=True
    UseDots=False
    MapName=SecurityStronghold
    MapX=126
    MapY=205
    You can see I declared 2 TMSObjects for this NPC; one for the lighter colored goblins, the other for darker colored ones.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


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
  •