Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Creator: Bolodefchoco
- --Made in: 16/01/2016
- --Last update: 05/06/2016
- --[[ Notes:
- Does:
- Permite que você navegue pela syntax lua completa. Se Type for igual a Table você poderá clicar na Function correspondente.
- ]]--
- menu=function(n,path)
- mice[n].path=path
- local t1,t2,t3 = "","",""
- if path then
- for i,v in next,path do
- if i ~= "menu" and i ~= "_G" and i ~= "mice" and i:sub(1,5) ~= "event" then
- t1=t1..(type(v)=="table" and "<a href='event:"..i.."'>"..i.."</a>" or i)..'\n'
- t2=t2..type(v)..'\n'
- t3=t3..(tostring(v)==i and "-" or (#tostring(v)>25 and tostring(v):sub(0,25) or tostring(v)))..'\n'
- end
- end
- end
- ui.addTextArea(0,"",n,50,30,700,364,0x324650,0x324650,1,true)
- ui.addTextArea(1,"<p align='center'><font face='lucida console' size='25'>Lua",n,50,30,700,nil,1,1,0,true)
- ui.addTextArea(2,"<p align='center'>Function",n,100,80,200,17,0x212F36,0x212F36,1,true)
- ui.addTextArea(3,"<p align='center'>"..t1,n,100,110,200,280,0x212F36,0x212F36,1,true)
- ui.addTextArea(4,"",n,100,32,1,360,0x324650,0x324650,1,true)
- ui.addTextArea(5,"<p align='center'>Type",n,300,80,200,17,0x212F36,0x212F36,1,true)
- ui.addTextArea(6,"<p align='center'>"..t2,n,300,110,200,280,0x212F36,0x212F36,1,true)
- ui.addTextArea(7,"<p align='center'>Value",n,500,80,200,17,0x212F36,0x212F36,1,true)
- ui.addTextArea(8,"<p align='center'>"..t3,n,500,110,200,280,0x212F36,0x212F36,1,true)
- ui.addTextArea(9,"",n,300,32,1,360,0x324650,0x324650,1,true)
- ui.addTextArea(10,"",n,500,32,1,360,0x324650,0x324650,1,true)
- ui.addTextArea(11,"",n,700,32,1,360,0x324650,0x324650,1,true)
- ui.addTextArea(12,"<a href='event:_G'>_G</a>"..(mice[n].cbk and mice[n].cbk or ""),n,450,37,250,17,0x212F36,0x212F36,1,true)
- end
- eventTextAreaCallback=function(i,n,c)
- if c:sub(1,2) == "@_" then
- for k,v in next,mice[n].allClicks do
- if k <= tonumber(c:sub(3)) then
- menu(n,v[1])
- mice[n].cbk = v[2]
- end
- end
- elseif c~="_G" then
- mice[n].cbk = mice[n].cbk and mice[n].cbk .. (not mice[n].cbk:find(c) and ".<a href='event:@_"..(#mice[n].allClicks+1).."'>" .. c .. "</a>" or "") or "."..c
- table.insert(mice[n].allClicks,{mice[n].path,mice[n].cbk and mice[n].cbk or ""})
- if c~=tostring(mice[n].path) then
- pcall(function() menu(n,mice[n].path[c]) end)
- else
- menu(n,mice[n].path)
- end
- else
- mice[n].cbk=""
- menu(n,_G)
- end
- end
- mice={}
- eventNewPlayer=function(n)
- mice[n]={
- path = "",
- cbk = nil,
- allClicks = {},
- }
- menu(n,_G)
- end
- table.foreach(tfm.get.room.playerList,eventNewPlayer)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement