PtokaX forum

Lua 5.3/5.2/5.1 Scripts (for PtokaX 0.4.0.0 and newer) => Conversion Requests => Topic started by: electronic_Psycho on 09 June, 2008, 18:39:22

Title: Loginin Script. Need help with convert.
Post by: electronic_Psycho on 09 June, 2008, 18:39:22
Hello  :)

i have that script "Loginin By TiMeTrAVelleR "

i like that script and i need help. if someone can convert it to the new API plz  :-[

____________


------------------------------------------------------------------------------------------------
----//   Loggin by TiMeTrAVelleR Fixed By Optimus //-------------[infected-System]
----------------------------- Converted to Lua 5 by jiten------------------------
----//  Mor status & edit by: ElecTronic??.Psycho! //----------------
------------------------------------------------------------------------------------------------
----// Set here your bot name

sBotName = "name"

kb = 1024
mb = kb*kb
gb = kb*kb*kb
tb = kb*kb*kb*kb

function NewUserConnected(user)
Message(user)
end

function OpConnected(user)
Message(user)
end

--// Profile Counter
     
function ProfileCounter(profile)

      local table, count = GetUsersByProfile(profile),0
      for i,User in pairs(table) do


if GetItemByName(User) then
   count = count + 1

end

     end

     return count
end

function Message(user)
if user.sMyInfoString then
local disp = ""
doGetProfile = GetProfileName(user.iProfile) or "Not registerd"
hubshare = string.format("%.2f Tb.",frmHub:GetCurrentShareAmount()/(1024 * 1024 * 1024 * 1024))
local _,_,share = string.find(user.sMyInfoString, "^%$MyINFO %$ALL [^ ]+ [^$]*%$ $[^$]+[^$]%$[^$]*%$%s*(%d+)%$" )
if share then
minshare = string.format("%0.2f", tonumber(share)/gb).." GB"
else
minshare = "Corrupt"
end
end

border1 = "-----------------------"
border2 = "-----------------------"
disp = "\r\n\r\n"..border1.."\r\n"
disp = disp.."--------------------\r\n"
disp = disp.."--------------------"..user.sName.."\r\n"
disp = disp.."--------------------\r\n"
disp = disp.."--------------------"..doGetProfile .."\r\n"
disp = disp.."--------------------"..user.sIP.."\r\n"
disp = disp.."--------------------\r\n"
disp = disp.."-------------------- "..minshare.."\r\n"
disp = disp.."--------------------\r\n"
disp = disp.."--------------------".. hubshare.."\r\n"
disp = disp.."--------------------\r\n"
disp = disp.."-------------------\r\n"
disp = disp.."-------------------\r\n"
disp = disp.."-------------------"..frmHub: GetUsersCount().." of "..frmHub:GetMaxUsers().." users Online. .\r\n"
disp = disp.."-------------------"..ProfileCounter("Owner").." [Owner] "..ProfileCounter("Master").." [Master's] "..ProfileCounter("Netfounder").." [S-oP's] "..ProfileCounter ("Operator").." [oP's] "..ProfileCounter("Moderator").." [S-Vip's] "..ProfileCounter("Vip").." [Vip's] "..ProfileCounter("reg").." [reg's] Online..\r\n"
disp = disp.."-------------------\r\n"
disp = disp.."------------------"..frmHub: GetHubDescr().."\r\n"
disp = disp.."------------------\r\n"..border2.."\r\n"

user:SendData(sBotName, disp)

end


_________________


Tnx.

Ep
Title: Re: Loginin Script. Need help with convert.
Post by: Psycho_Chihuahua on 09 June, 2008, 22:06:05
please use Code Tags when posting, its easier on the eyes :)
Title: Re: Loginin Script. Need help with convert.
Post by: [NL]Daddy-Bear? on 13 July, 2008, 15:22:09
Hello it?s me again.

Hello electronic_Psycho.
I think this what you mend follow the link ;)
http://forum.ptokax.org/index.php?topic=7981.0

Respectfully,

[NL]Daddy-Bear?
Title: Re: Loginin Script. Need help with convert.
Post by: electronic_Psycho on 22 July, 2008, 08:12:26
 ;D Good Morning.

Thanks "Daddy-Bear?"  :D