Advertisement
Bolodefchoco_LUAXML

[Pedido] !lista

Oct 2nd, 2015
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.45 KB | None | 0 0
  1. add = ui.addTextArea
  2. UI = function(id,player,alpha,title,text,x,y,w,h,U)
  3. if id==0 or id==nil then id = 1 end if player==nil then for n in pairs (tfm.get.room.playerList) do n=player end end if alpha==nil then alpha=1 end if title==nil then title='' end if text==nil then text='' end if x==nil then x=10 end if y==nil then y=15 end if w==nil then w=100 end if h==nil then h=100 end if U==true then u = '' for i = 0,#title do u = u..'_' end text = '\n'..text else u = '' end add(-id..'0','',player,x+-2,y+18,w+24,h+14,0x2E221B,0x2E221B,alpha,true) add(-id..'00','',player,x+-1,y+19,w+22,h+12,0x986742,0x986742,alpha,true) add(-id..'000','',player,x+2,y+22,w+16,h+6,0x171311,0x171311,alpha,true) add(-id..'0000','',player,x+3,y+23,w+14,h+4,0x0C191C,0x0C191C,alpha,true) add(-id..'00000','',player,x+4,y+24,w+12,h+2,0x24474D,0x24474D,alpha,true) add(-id..'000000','',player,x+5,y+25,w+10,h+0,0x183337,0x183337,alpha,true) add(-id..'0000000',"<p align='center'><font size='15' face='verdana' ><V><b>"..string.upper(title).."</b></p></font><R>"..u.."<p align='left'><font size='12' /><N>\n"..text,player,x+6,y+26,w+8,h+-2,0x122528,0x122528,alpha,true) add(-id..'00000000','',player,x+15,y+h-20+25,w-10,15,0x5D7D90,0x5D7D90,alpha,true) add(-id..'000000000','',player,x+15,y+h-20+27,w-10,15,0x11171C,0x11171C,alpha,true) add(-id..'0000000000','<p align="center"><a href="event:close_'..id..'"><N>Fechar</a>',player,x+15,y+h-20+26,w-10,15,0x3C5064,0x3C5064,alpha,true)
  4. end
  5. function eventTextAreaCallback(i,n,c)
  6. i = c:sub(7) for x = 11,0,-1 do i = i..'0' ui.removeTextArea(-i,n) end
  7. end
  8. mice = {}
  9. id = 0
  10. nu = 0
  11. function eventNewPlayer(n)
  12. id = id + 1 nu = nu + 1
  13.         if not mice[n] then
  14.                  mice[n] = {
  15.                         id = id + 1,
  16.                         p = tfm.get.room.playerList[n].playerName,
  17.                         nb = '('..math.random(1,20)..') 9'..nu+id+9*8^7,
  18.                         ddd = {'tim','vivo','claro','nextel'},
  19.                 }
  20.         mice[n].ddd = mice[n].ddd[math.random(#mice[n].ddd)]
  21.         end
  22. end
  23. for n in pairs (tfm.get.room.playerList) do eventNewPlayer(n) end
  24. function eventChatCommand(na,c)
  25.         if c:sub(0,5)=='lista' then local x=''
  26.             for i = 0,#tfm.get.room.playerList do
  27.                 for n in pairs (tfm.get.room.playerList) do
  28.                     x=x..'<J>'..mice[n].p..' <BL>-<T> '..mice[n].nb..' <BL>-<BV> '..mice[n].ddd:upper()..'\n'
  29.                     UI(0,na,.4,'Telefones',"<p align='center'>"..x,15,15,350,350,true)
  30.                 end                
  31.             end
  32.         end
  33. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement