This topic was brought up recently: how can a function in the main script file be called from a plugin script? I've wondered about it before, but back then I decided to just expose whatever data the outside scripts may need from the plugin through MC variables. But this approach doesn't work very well if, say, you want to use the OnPluginPartialLine callback in your main script. A solution is hypothetical (though it does work for me in several other problems) but I am pretty sure it'll work:
1.Make an alias in your world file to match on something more or less unique (I prefer using GUID's or Mushclient's GetUniqueID callback). Set that alias to call a routine in your main script.
2.Whenever OnPluginPartialLine fires in your plugin, simply do World.Execute with a string that will be matched by the alias above; using alias's wildcards you can pass any needed data at the same time also.
As I said, I haven't tried that exact thing myself, but I don't see anything that would prevent it from working.
1.Make an alias in your world file to match on something more or less unique (I prefer using GUID's or Mushclient's GetUniqueID callback). Set that alias to call a routine in your main script.
2.Whenever OnPluginPartialLine fires in your plugin, simply do World.Execute with a string that will be matched by the alias above; using alias's wildcards you can pass any needed data at the same time also.
As I said, I haven't tried that exact thing myself, but I don't see anything that would prevent it from working.