Jump to content

Hybris

Members
  • Posts

    262
  • Joined

  • Last visited

  • Feedback

    100%

Posts posted by Hybris

  1. Hello,

    I'm working on a thieving script and it works fine, but when I go to the bank and come back to the area, it seems to missplace the NPC entity and I can't interact with it anymore. I've checked and the npc is not null, it even has the correct actions. I added a line to draw the outline of the NPC and when this happens, it's just on a random square instead of on the actual NPC.

    Also interesting to note that when I restart the script, it still seems to select this random square instead of the NPC, unless I refresh my scripts.

    Any ideas? Using mirror mode btw.

    Thanks,

    Hybris

  2. 6 hours ago, You Tube said:

    If someone could modify this script to hop around worlds and say 1 line, I will pay!

     

    Or if someone could make me a script that hops worlds and says 1 line of text ill pay well please contact me.

     

     

    Add me Janne#1565

  3. 17 minutes ago, BravoTaco said:

    Aaaah to see each item inside the list you will have to loop through it and print each element.

    You might have to check if there is more than one entity in the list, if their is than use the interact() method to interact, if not than you can just left click normally.

    You can also move the camera instead if an entity in the list is not the same position as the NPC, as this would imply that the only reason the other entity is in the list is because of camera position and not because two entitys are stacked.

    I'm pretty sure you can print a list & see all the elements 😛 But I tried it with looping through each of them and it still gives me the same, it will only show the Player entity even when the "mouse.getOnCursorCount()" shows 2...

  4. 25 minutes ago, BravoTaco said:

    How are you looping through the list to print the entitys?

    For spam clicking an npc you can grab their bounding box and check if the mouse is within that than, just use mouse.click() else move the mouse to the npc.

    Or you can try the hover() method instead of grabbing the bounding box. It might move the mouse though even if its already hovering, kinda like the interact() method. Haven't tested.

     

    This wont work well with moving npcs.

    
    NPC npc = getNpcs().closest("Banker");
    boolean isMouseOverNPC = (npc != null) && npc.getModel().getBoundingBox(
            npc.getGridX(), npc.getGridY(), npc.getZ()).contains(getMouse().getPosition());
    if (isMouseOverNPC)
        getMouse().click(false);
    else if (npc != null)
        npc.hover();
    

    I'm not looping through the list, just printing the list object.

    As for the spam clicking, I'm currently using the hover method which works, but sometimes the NPC is behind a door & it will click the door instead.

     

    19 minutes ago, memelord123 said:

    if (getMouse().isOnCursor(yourNpcHere)) {

        getMouse().click(false);

    }

     

    As long as your mouse is on the npc, the mouse will left click and not move.


    I tried that but for some reason the "isOnCursor(npc)" method returns false even though the cursor is on my entity.
     

  5. Hey,

    For some reason when I use mouse.getEntitiesOnCursor it only gives me one, even though the count says 2.c0985ac0b61234469a52d5a6e82fa409.png

    The second entity is an NPC & I'm sure the mouse is placed right on the entity.
    Any ideas?

    Thanks in advance,
    Hybris


    P.S.: How would I accurately spam click an NPC? npc.interact() seems to move the mouse every time it clicks and mouse.click() can easily fail.

  6. 9 hours ago, SteeMurr said:

    In a perfect world, what would be the ideal order in which you'd bot stats for a 'main' account? I'll maybe add the caveat that you don't have the benefit of suicide accounts to fund the main or ability to buy rsgp to expedite certain skills, to make it interesting. Curious to know people's thoughts! 

     

    Get skills for quests -> quest

×
×
  • Create New...