Scorpius 144 Share Posted July 23, 2017 I've created a listener like this private InventoryListener ItemChangeListener = new InventoryListener() { @Override public void onItemChange(Item[] items) { } }; And I register it using this code getClient().getInstance().addEventListener(ItemChangeListener); But it doesn't seem to trigger, any ideas? Link to comment Share on other sites More sharing options...
TheAppFoundry 11 Share Posted July 24, 2017 I didn't know there was a way to add listeners in Dreambot, I upvote this to see somebodies solution! Link to comment Share on other sites More sharing options...
Scorpius 144 Author Share Posted August 2, 2017 I didn't know there was a way to add listeners in Dreambot, I upvote this to see somebodies solution! I remember seeing something from a mod/manager regarding the usage of addListener but I forgot how it was done BUMP: Still looking for an answer, I'm trying to add a listener without making the script class implement it Link to comment Share on other sites More sharing options...
TheAppFoundry 11 Share Posted August 3, 2017 Have you checked out this: http://prntscr.com/g3p8aa Link to comment Share on other sites More sharing options...
Scorpius 144 Author Share Posted August 3, 2017 Have you checked out this: http://prntscr.com/g3p8aa I'll check it out once the bot API is back up and reply again Link to comment Share on other sites More sharing options...
Scorpius 144 Author Share Posted March 8, 2018 Have you checked out this: http://prntscr.com/g3p8aa I didn't check it yet LOL, Trying now Link to comment Share on other sites More sharing options...
Hashtag 8519 Share Posted March 8, 2018 I didn't check it yet LOL, Trying now public class Script extends AbstractScript implements InventoryListener { ... @Override public void onItemChange(Item... items) { } } Link to comment Share on other sites More sharing options...
Scorpius 144 Author Share Posted March 8, 2018 public class Script extends AbstractScript implements InventoryListener { ... @Override public void onItemChange(Item... items) { } } Caused bugs on quickstart, the script freezes (or stops idk, been a while since i last tested it) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.