Log in

View Full Version : Plugins


pfyon
01-28-2010, 12:38 PM
If I write a plugin (like Trevius's in the custom quests subforum), does it have access to the same npc/client/etc objects that the original script has access to?

I have limited experience using perl. In the languages I know fairly well (C++, Java), you would either need the objects globally accessible within the class or would need to pass a reference to the objects to the function.

trevius
01-28-2010, 06:13 PM
Yeah, that is the downside to plugins; you have to pass everything to it. If you look at my RandomRoam plugin, you can see where it requires $npc to be passed to it, but then just sets it as a variable for the script to use like normal.