All pastes #83751 Raw Edit

THC4k

public text v1 · immutable
·published 2006-07-10 01:13 UTC
rendered paste body
local xbangs  = {
	move = function (t,x,y) lslua.exec ("!Labelmove "..t.name.." "..x .. " "..y) end,
	moveby = function (t,x,y) lslua.exec("!Labelmoveby "..t.name.." "..x .. " "..y) end,
	etc
	}
xmodule = {__bangs = xbangs}
local mt = {}
function xmodule:new(s)
	local t = self
	t.name = s or ""
	return setmetatable(t, mt)
end

function xmodule:print()
  print(self.name)
end

mt.__index = function (t,key) return (t.__bangs[key] or evar[t.name.."current"..key] or evar[t.name..key]) end