Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tools={
- mic ={
- immobilize = function (name,time,x,y)
- if tools.room.exist(name) then
- local time = (time or 3)*1000
- local x= x or tfm.get.room.playerList[name].x
- local y=y or tfm.get.room.playerList[name].y
- tfm.exec.movePlayer(name,x,y)
- for k = -1,1 do
- local i,o = -2,2
- tfm.exec.addConjuration(x/10+k,y/10+o,time)
- tfm.exec.addConjuration(x/10+k,y/10+i,time)
- tfm.exec.addConjuration(x/10+o,y/10+k,time)
- tfm.exec.addConjuration(x/10+i,y/10+k,time)
- end
- end
- end,
- circle = function(x,y,r)
- local x,y,a,r = x or 400,y or 200,{11,11,0,2,0,2,0,11,11},r or 100
- for i=1,10 do
- local xPos=math.cos(i)*r
- local yPos=math.sin(i)*r
- for k=-1,1 do
- for j=-1,1 do
- tfm.exec.displayParticle(a[(i%#a)+1],x+k*xPos,y+j*yPos)
- end
- end
- end
- end
- },
- config={
- main = function()
- _time = 0
- _mice = {}
- _playersOnRoom = 0
- _textId = 0
- _textData = {}
- end,
- list = function()
- for player in pairs(tfm.get.room.playerList)do
- _mice[player]={}
- _playersOnRoom = _playersOnRoom+1
- end
- end,
- loop = function()
- _time = _time +1
- for o,i in pairs(_textData)do
- if i[3]+i[2] < _time then
- ui.removeTextArea(i[1])
- end
- end
- end
- },
- room = {
- exist = function(name)
- tools.config.list()
- if _mice[name] then return true
- else return false
- end
- end,
- players = function()
- tools.config.list()
- return _playersOnRoom
- end
- },
- text = {
- alert = function (text,time,obj,x,y,w,h,fc,bc,t)
- time = time or 5
- obj=obj or nil
- x = x or 300
- y = y or 150
- w = w or 50
- h = h or 50
- fc = fc or 0x324650
- bc = bc or 0x324650
- ui.addTextArea(_textId,text,obj,x,y,w,h,fc,bc,t,true)
- local o = {_textId,time,_time}
- table.insert(_textData,o)
- _textId = _textId +1
- end
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment