BeBot - An Anarchy Online and Age Of Conan chat automaton
Development => Coding and development discussion => Topic started by: onekman on July 11, 2009, 06:22:56 pm
-
Hey,
I'm no "shark" into PHP, so I need help with following issue.
I created a new module, consisting of new methods, which can be use from the bot.
However I now created another module, where I need to call one of the methods from the old module.
How is that possible ? pls attach an example if possible.
Thanks ind advance for a great piece of work :)
/1k
-
You have to register the module offering the functions with the bot core.
$this->register_module("some_unique_name");
Then you can access the module from anywhere by using the core() function.
$this->bot->core("some_unique_name")->function_you_want_to_call();