Advertisement
Tectoon

[TFM] Untitled

Dec 18th, 2015
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.76 KB | None | 0 0
  1. --Bolodefchoco
  2. --26/09/2015
  3.  
  4. --[[ Função de argumentos INT,STRING,FLOAT,STRING,INT,INT,INT,INT,BOOLEAN
  5. booleanU serve para haver ou não sublinhado (Manual)
  6. ]]--
  7.  
  8. add = ui.addTextArea
  9. ui.smart = function(id,player,alpha,title,text,x,y,w,h,U)
  10.     if id==0 or id==nil then
  11.         id = 1
  12.     end
  13.     if player==nil then
  14.         for n in pairs (tfm.get.room.playerList) do
  15.             n=player
  16.         end
  17.     end
  18.     alpha=alpha or 1
  19.     title=title or ""
  20.     text=text or ""
  21.     x=x or 10
  22.     y=y or 15
  23.     w=w or 100
  24.     h=h or 100
  25.     local u = ""
  26.     if U then
  27.         for i = 0,w/6/2 do
  28.             u = u..'_'
  29.         end
  30.         text = '\n'..text
  31.     end
  32.     add(-id..'0','',player,x+-2,y+18,w+24,h+14,0x2E221B,0x2E221B,alpha,true)
  33.     add(-id..'00','',player,x+-1,y+19,w+22,h+12,0x986742,0x986742,alpha,true)
  34.     add(-id..'000','',player,x+2,y+22,w+16,h+6,0x171311,0x171311,alpha,true)
  35.     add(-id..'0000','',player,x+3,y+23,w+14,h+4,0x0C191C,0x0C191C,alpha,true)
  36.     add(-id..'00000','',player,x+4,y+24,w+12,h+2,0x24474D,0x24474D,alpha,true)
  37.     add(-id..'000000','',player,x+5,y+25,w+10,h+0,0x183337,0x183337,alpha,true)
  38.     add(-id..'0000000',"<p align='center'><font size='15' face='verdana' ><V><b>"..title:upper().."</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)
  39.     add(-id..'00000000','',player,x+15,y+h-20+25,w-10,15,0x5D7D90,0x5D7D90,alpha,true)
  40.     add(-id..'000000000','',player,x+15,y+h-20+27,w-10,15,0x11171C,0x11171C,alpha,true)
  41.     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)
  42. end
  43. function eventTextAreaCallback(i,n,c)
  44.     i = c:sub(7)
  45.     for x = 11,0,-1 do
  46.         i = i..'0'
  47.         ui.removeTextArea(-i,n)
  48.     end
  49. end
  50.  
  51. ui.smart(id,player,alpha,title,text,x,y,w,h,U)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement