Strange_Fk Posted April 29, 2016 Share Posted April 29, 2016 (edited) So I'm not a complete noob to scripting (not saying I'm crazy good either), but I am very new to the whole combat portion of the api and am in the process of making my first basic combat script. To cut to the point I am unsure what filter/boolean to use for an npc that another playing is splash mage training on. Everything works great, except when a player is splashing the npc/entity I have chosen to train on. It will only click it once (occasionally) and right after get filtered out of the npc requirements and choose to attack a different npc nearby. I was wondering what methods/boolean would prevent this from occuring as I see this as a potential red flag to get detected botting if done frequent enough. Here is my script (feel free to use it, but ask for consent before sharing yourself which I doubt will be an issue) it is kinda sloppy and could definitely be cleaned up, but its my first combat script and have been to lazy to go back and clean and cut down/simplify the script at the momement. Thank you all in advance..... Entity name is seagull, because I was using it for seagulls originally and have been lazy to change it to a universal name hahahahah EDIT: oh and the names/int with names like shark and what not are because I never changed/deleted them from the standard template that I use when i write new scripts Oh and if anyone is interested in non combat scripts I wrote feel free to ask me, I might have what you're looking for that have worked well for me. Edited April 29, 2016 by Strange_Fk Quote Link to comment Share on other sites More sharing options...
hansen19498 Posted April 29, 2016 Share Posted April 29, 2016 nice 2 Quote Link to comment Share on other sites More sharing options...
The Hero of Time Posted April 29, 2016 Share Posted April 29, 2016 (edited) To cut to the point I am unsure what filter/boolean to use for an npc that another playing is splash mage training on. NPC seagull = npcs.Closest(n -> n.getName().equals("Seagull") && !n.isUnderAttack() && n.getInteracting() == null); something along those lines. it will search for an seagul, that is called Seagull , is not underattack, and isnt interacting with anyone. Edited April 29, 2016 by The Hero of Time 1 Quote Link to comment Share on other sites More sharing options...
Strange_Fk Posted April 29, 2016 Author Share Posted April 29, 2016 NPC seagull = npcs.Closest(n -> n.getName().equals("Seagull") && !n.isUnderAttack() && n.getInteracting() == null); something along those lines. it will search for an seagul, that is called Seagull , is not underattack, and isnt interacting with anyone. Ahh dope ill try that man. I had that but instead of getInteracting() I had !npc.getInteracting(myPlayer). Thanks mate should work man Quote Link to comment Share on other sites More sharing options...