Advertisement
jille_Jr

CC: GPS Excavate launcher

Feb 26th, 2014
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.48 KB | None | 0 0
  1. -- This is a temporary program just to
  2. -- simply being able to run the
  3. -- gpsexcavate program made by Ikkalyzte
  4. -- without a wireless modem
  5.  
  6. local programname = "gpsexcavate"
  7.  
  8. local old = {}
  9.  
  10. function replacement()
  11.     --body
  12. end
  13.  
  14. local key = next(rednet)
  15. while key do
  16.     local index = key
  17.     key = next(rednet,key)
  18.     old[index] = _G.rednet[index]
  19.     _G.rednet[index] = replacement
  20. end
  21.  
  22. pcall(shell.run,programname,...)
  23.  
  24. for index,func in pairs(old) do
  25.     _G.rednet[index] = func
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement