Postado Outubro 21, 2010 14 anos init start local mwalls = {tablesize = 0, x = {}, y = {}, z = {}, mwalltime = {}} local ids = {id = {2128,2129,2130,10181,10182}, totaltime = {20000,20000,45000,20000,45000}} init end auto(200) listas('dontlist') setfontstyle('tahoma', 9, color(255,255,0)) setfontweight(75) setposition($clientwin.left,$clientwin.top) for i=-7,7 do for j=-5,5 do local topid = topitem($posx+i,$posy+j,$posz).id local l = 0 repeat l = l+1 until l > #ids.id or topid == ids.id[l] if l <= #ids.id then local k = 0 repeat k = k+1 until (k > mwalls.tablesize) or ((mwalls.x[k] == $posx+i) and (mwalls.y[k] == $posy+j) and (mwalls.z[k] == $posz)) if k > mwalls.tablesize then mwalls.tablesize = mwalls.tablesize+1 table.insert(mwalls.x,mwalls.tablesize,$posx+i) table.insert(mwalls.y,mwalls.tablesize,$posy+j) table.insert(mwalls.z,mwalls.tablesize,$posz) table.insert(mwalls.mwalltime,mwalls.tablesize,$timems+200+ids.totaltime[l]) end end end end if mwalls.tablesize > 0 then for i=1,mwalls.tablesize do local mwalltime = mwalls.mwalltime[i] if mwalltime == nil then mwalltime = 0 end local topid = topitem(mwalls.x[i],mwalls.y[i],mwalls.z[i]).id local l = 0 repeat l = l+1 until l > #ids.id or topid == ids.id[l] if mwalltime-$timems > 0 and l <= #ids.id then if mwalls.z[i] == $posz then local pos = findpixel(mwalls.x[i],mwalls.y[i]) addtext(timeshort(mwalltime-$timems),pos.x-13,pos.y-6) end else mwalls.tablesize = mwalls.tablesize-1 table.remove(mwalls.x,i) table.remove(mwalls.y,i) table.remove(mwalls.z,i) table.remove(mwalls.mwalltime,i) end end end Créditos: Lucas Terra
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.