Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private boolean hoverMenuOption(String option){
- if(!ChooseOption.isOpen())
- Mouse.click(3);
- if(isHoveringOption(option)){
- return true;
- }
- if(Timing.waitCondition(EzConditions.chooseOptionIsOpen(), 750)){
- RSMenuNode[] nodes = ChooseOption.getMenuNodes();
- if(nodes == null)
- return false;
- for(RSMenuNode node:nodes){
- if(node.containsAction(option)){
- Rectangle r = node.getArea();
- if(!r.contains(Mouse.getPos())){
- Mouse.moveBox(r);
- }
- return true;
- }
- }
- }
- return false;
- }
- private boolean isHoveringOption(String option){
- RSMenuNode[] nodes = ChooseOption.getMenuNodes();
- if(nodes == null)
- return false;
- boolean value = false;
- for(RSMenuNode node:nodes){
- if(node.containsAction(option)){
- Rectangle area = node.getArea();
- if(area != null && area.contains(Mouse.getPos())){
- value = true;
- }
- }
- }
- return value;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement