Smith |
plugin framework (Moderator: BAH_Strike) | Previous Topic | Next Topic |
Page 1 of 1 |
// it simply just makes sense to allow plugins to freely execute cog; this means you can do all sorts of crazy stuff in-game
// without having to learn a new API and without me having to write one. // // note that the cog script should NOT include a symbols section, nor code / end keywords. // // you are responsible for providing the source/sender and params. your cog script can use the typical // GetSourceRef(), GetSenderID(), GetParam(0) etc to retrieve these values. // // if your cog calls ReturnEx(), this value will be accessible to you via the returned szReturn value. // // final note: the smith cog VM operates under a Flex symbol type and generally is most compatible as strings. // so for simplicity of interface, all values are strings. you are responsible for formatting integer values into strings // and parsing return values etc. typedef void (__cdecl *dExecuteCOG)(const char* szCOGScript, const char* szSourceRef, const char* szSenderRef, const char* szSenderID, const char* szParam0, const char* szParam1, const char* szParam2, const char* szParam3, char* szReturn); |
// called by smith whenever it is ready to execute a cog verb. mods get first dibs.
// returning 1 indicates to smith that the verb was handled and it will not be passed to any other // plugins or handled by smith itself. returning 0 allows the verb to continue until its hopefully picked up by something else. // // note: verb name in szName is always lowercase //int __cdecl OnExecuteCOGVerb(const char* szName, int nNumParams, const char** pszParams, char* szReturn) |
Page 1 of 1 | |
plugin framework (Moderator: BAH_Strike) | Previous Topic | Next Topic |