Hannes7337 Posted February 21, 2018 Share Posted February 21, 2018 Hi, I was wondering if it's better/cleaner to pass the MethodProvider instance rather than the Script instance to another class - let's say a Node class. Any thoughts? Quote Link to comment Share on other sites More sharing options...
Anoo Posted February 21, 2018 Share Posted February 21, 2018 (edited) Just make your Node class extend MethodProvider then pass your Script instance to any Nodes Edited February 21, 2018 by Anoo Quote Link to comment Share on other sites More sharing options...
Alek Posted February 21, 2018 Share Posted February 21, 2018 The "correct" way is to pass the bot instance, however there are many solutions that also work. Quote Link to comment Share on other sites More sharing options...
Chris Posted February 21, 2018 Share Posted February 21, 2018 pass Bot use Bot.getMethods() to access methodprovider Quote Link to comment Share on other sites More sharing options...
Hannes7337 Posted February 22, 2018 Author Share Posted February 22, 2018 Alright, thanks! Quote Link to comment Share on other sites More sharing options...
liverare Posted February 22, 2018 Share Posted February 22, 2018 12 hours ago, Alek said: The "correct" way is to pass the bot instance, however there are many solutions that also work. A lot of scripters are writing their own nodes. Why not make an official OSBot one? It'd just be an extra extendable class. Quote Link to comment Share on other sites More sharing options...