February 25, 20169 yr Alright, So for interacting with entity/position we can do this for event; if (getMouse().getCrossHairColor().equals(CrossHairColor.YELLOW)) { //OR RED setFinished(); } But how am i supposed to do it for inventory items/widgets ? Am i supposed to use CrossHairColor.NONE ? I need this for my custom interaction method. Edited February 25, 20169 yr by iJodix
February 25, 20169 yr for the invent could you not check the top left hand corner? Not looked from coding POV but you can see it changes from / 2 more options to ''->" Edited February 25, 20169 yr by Goaks
February 25, 20169 yr Why wouldn't it be successful? Those things are static, so you can safely say success iff mouse.click is successful, right?
February 25, 20169 yr Author Why wouldn't it be successful? Those things are static, so you can safely say success iff mouse.click is successful, right? I'd rather double check as i don't want script to eff up. But what for CrossHairColor.NONE is ? Am i supposed to use it for cases like this ? Edited February 25, 20169 yr by iJodix
February 25, 20169 yr I'd rather double check as i don't want script to eff up. But what for CrossHairColor.NONE is ? Am i supposed to use it for cases like this ? Could you just use the isItemSelected() from the inventory API class? click.item; sleep(600); if (item.isItemSelected()) { do stuff } Or am I missing what your asking?
February 25, 20169 yr Author Could you just use the isItemSelected() from the inventory API class? click.item; sleep(600); if (item.isItemSelected()) { do stuff } Or am I missing what your asking? This would work for items that you don't have to equip/wield/drop, Everyone wondering why i need this is because i'm writing my own custom interaction method.
February 25, 20169 yr This would work for items that you don't have to equip/wield/drop, Everyone wondering why i need this is because i'm writing my own custom interaction method. Got it I mean the interact boolean as stated would work however there is always a way to notice a change. equip something the character would change equipment wise and so on. I cant say I fully understand your end goal so it's harder to help out.
February 25, 20169 yr Author >doesn't trust the interact() boolean I need this for my custom interaction method :p Got it I mean the interact boolean as stated would work however there is always a way to notice a change. equip something the character would change equipment wise and so on. I cant say I fully understand your end goal so it's harder to help out. Alright, let me try to elobrate; If you click on any entity successfully, a red crosshair appears, if you missclick, a yellow one appears, But when you need to interact with widgets/inventory items like equip/drop/ etc no crosshair appears.
February 25, 20169 yr I need this for my custom interaction method Alright, let me try to elobrate; If you click on any entity successfully, a red crosshair appears, if you missclick, a yellow one appears, But when you need to interact with widgets/inventory items like equip/drop/ etc no crosshair appears. if you equip/drop it will disapear from invent. so take a count of item before and after. the difference should be 1. Else it failed
February 25, 20169 yr Author if you equip/drop it will disapear from invent. so take a count of item before and after. the difference should be 1. Else it failed Never mind guys, i used CrossHairColor.NONE and it seems to be do it job well, so i guess NONE is meant to be used for situations like this.
February 25, 20169 yr Never mind guys, i used CrossHairColor.NONE and it seems to be do it job well, so i guess NONE is meant to be used for situations like this. I was about to suggest this. I'm glad it worked out tho.
February 26, 20169 yr Never mind guys, i used CrossHairColor.NONE and it seems to be do it job well, so i guess NONE is meant to be used for situations like this. Another idea might simply be to check if the mouse is within a slightly shrunken bounding box.
February 27, 20169 yr Never mind guys, i used CrossHairColor.NONE and it seems to be do it job well, so i guess NONE is meant to be used for situations like this. The crosshair color is always None, unless you click somewhere (that triggers either red/yellow color). Checking for none does not solve your issue here. There is no way to really confirm a click when you are interacting with interfaces/inventory/equipment. https://dl.dropboxusercontent.com/s/e3znjjxqw0tht27/2016-02-27_18-04-54.mp4?dl=0 Edited February 27, 20169 yr by Krulvis
Create an account or sign in to comment