eniallator

mControl - Plugin Template

Jan 18th, 2016
671
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.56 KB | None | 0 0
  1. -- This is eniallator's Control program's plugin template.
  2. -- Link to Control program: http://pastebin.com/ss0BX2mM
  3. -- This file goes into the folder that you have specified in the pluginFolder variable in the Control program.
  4. --
  5. -- ================================================================================
  6. --
  7. -- The key you have given your function that you have given in the function table is how you are going to call your function in the remote computer's command line. For example inputting "testFunc arg1 arg2" would call the function testfunc from the functionTable and in the function argument it would then pass the following arguments: ({"arg1","arg2"},*ID of remote computer thats connected*,*protocol thats being used*).
  8. --
  9. -- DISCLAIMER: this acts as the same as the way you would create your function in the control program before, just the status, helpTable and functionTable tables can be accessed from here. I have also made it so that plugin's functions have priority over the control program's functions e.g you can rewrite the default functions from a plugin.
  10.  
  11. status = {*insert your function name here* = 1}
  12. -- Just add more keys/values the same way as the first one is laid out
  13.  
  14. helpTable = {*insert your function name here* = "*insert your function's help here*"}
  15. -- Just add more keys/values the same way as the first one is laid out
  16.  
  17. functionTable = {*insert your function name here* = function(userInput, connectedComputerID, protocol) *insert what your function does here* end}
  18. -- Just add more keys/values the same way as the first one is laid out
Advertisement
Add Comment
Please, Sign In to add comment