Advertisement
Encreedem

AddOn Template

Jul 17th, 2013
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | None | 0 0
  1. objects = [[
  2. <objects>
  3.  
  4. <objects>
  5. ]]
  6.  
  7. local args = { ... }
  8. local callType
  9. local objectID
  10. local systemInfo
  11.  
  12. -- Gets called when an object with type "Custom"
  13. -- needs to be displayed.
  14. function showObject()
  15.  
  16. end
  17.  
  18. -- Gets called when a button or a custom object
  19. -- with canClick attribute gets clicked.
  20. function callFunction()
  21.  
  22. end
  23.  
  24. function main()
  25.   if (#args == 3) then
  26.     callType = args[1]
  27.     objectID = args[2]
  28.     systemInfo = textutils.unserialize(args[3])
  29.    
  30.     if (callType == "Show") then
  31.       showObject()
  32.     elseif (callType == "Click") then
  33.       callFunction()
  34.     end
  35.   end
  36. end
  37.  
  38. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement