atgp42 1 Share Posted January 28, 2018 The .interact() method will walk towards the target in some cases. I would like to individually call the 'camera rotation' and 'mouse move/clicking' portions of the interact() function, so there is no chance of this function walking the player towards the entity. Edit: I figured out how to do the mouse move and clicking part, use 'InteractionSetting.EMPTY'. boolean customInteract(String action, Entity name) { EntityDestination ed = new EntityDestination(ctx.getClient(), name); InteractionEvent ie = new InteractionEvent(ed); if (ie.interact(action, InteractionSetting.EMPTY)) { return true; } return false; } Any help would be much appreciated, thanks. Link to comment Share on other sites More sharing options...
Manly 879 Share Posted January 28, 2018 I've never had the interact method walk for me although I think it is meant to do that. Can you post code of what you have done? Link to comment Share on other sites More sharing options...
atgp42 1 Author Share Posted January 28, 2018 thanks for the quick reply. here is a bigger snippet of the attacking method if (ctx.getLocalPlayer().isInteracting(ctx.getNpcs().closest(npcName))){ return true; } else { if (!ctx.getNpcs().closest(npcName).isOnScreen()) { ctx.getCamera().mouseRotateToEntity(ctx.getNpcs().closest(npcName)); } else { if (customInteract("Attack", ctx.getNpcs().closest(npcName))) { return true; } } return false; } Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.