REQ: Modified Info Script
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

REQ: Modified Info Script

Started by Yello, 14 August, 2005, 20:46:09

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Yello

Hello m8s.I found many info scripts but i need some modified script with more modifications like this one:

:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::

? Hub Information:

? Name:
? Description:
? Topic:
? Uptime:
? Users: There are now of the users online
? User Peak:
? Max User Peak:
? Hub Address:
? Web Address:
? Country:
? Shared:
? Reliability:
? Rating:
? Hub Owner:
? Local Date And Time:
? There Are: 0 Hub Owner(s), 0 Master(s), 0 NetFounder(s), 0 Moderators(s), 0 Operator(s), 0 Vip(s), 0 Registered User(s)

? User Information:

? Nick:
? IP Address:
? Share:
? Slots:
? Description:
? Tag:
? Connection:
? E-Mail:
? Client & Version:
? Mode:
? Profile Name:
? Flag:
? Your Local Date And Time Is:

:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::

Can anyone script this one ?
BTW what does User Peak And Max User Peak Mean ?

Thanks in advance...

Yello

Arent there anyone who can make it ? I need this script as soon as possible. Please guys script it

?Tr??T_????

i will try///

Psycho_Chihuahua

PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

?Tr??T_????

#4
login = {
["BotName"] = "Info-Bot",
["Hubowner"] = "[']['?N]Azim",
["webadres"] = "ur web adress here",
["Forumadres"] = "http://www.jimenmickeclubforum.dyndns.info",
["minsharehub"] = "1 GB",
["helpcommand"] = "!help",
}
local kb = "1024"
local mb = kb*kb
local gb = mb*kb
local tb = gb*kb

function Main()
frmHub:RegBot(login.BotName)
end

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 table do
if GetItemByName(User) then
count = count + 1
end
end
return count
end

function Message(user)
local timeanddate = os.date("%d-%m-%Y %H:%M:%S")
local tmp = os.clock()
local weeks, days, hours, minutes, seconds = math.floor(tmp/604800), math.floor(math.mod(tmp/86400, 7)), math.floor(math.mod(tmp/3600, 24)), math.floor(math.mod(tmp/60, 60)), math.floor(math.mod(tmp/1, 60))
if frmHub:GetHubTopic() == nil then
topic = "No topic set"
else
topic = frmHub:GetHubTopic()
end
if user.sMyInfoString then
local disp = ""
doGetProfile = GetProfileName(user.iProfile) or "Not registerd (reg your self type !regme and a password of your choice in main)"
hubshare = string.format("%0.3f", frmHub:GetCurrentShareAmount()/(tb)).." TB"
local _,_,share = string.find(user.sMyInfoString, "^%$MyINFO %$ALL [^ ]+ [^$]*%$ $[^$]+[^$]%$[^$]*%$%s*(%d+)%$" )

if share then
minshare = string.format("%0.3f", tonumber(share)/gb).." GB"
else
minshare = "Corrupt"
end
border1 = " :::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?::: ?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:: :"
border2 = " :::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?::: ?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:: :"
disp = "\r\n\r\n"..border1.."\r\n"

disp = disp.."? Hub Information: "

disp = disp.." ? Name: "..frmHub:GetHubName().."\r\n"
disp = disp.." ? Description: "..frmHub:GetHubDescr().."\r\n"
disp = disp.." ? Topic: "..topic.."\r\n"
disp = disp.." ? Uptime:
disp = disp.." ? Users:
disp = disp.." ? User Peak:
disp = disp.." ? Max User Peak:
disp = disp.." ? Hub Address: "..frmHub:GetHubAddress()..":"..frmHub:GetHubPort().."\r\n"
disp = disp.." ? Web Address: "..login.webadres.."\r\n"
disp = disp.." ? Country:
disp = disp.." ? Shared: "..hubshare.."\r\n"
disp = disp.." ? Reliability:
disp = disp.." ? Rating:
disp = disp.." ? Hubowner: "..login.Hubowner.."\r\n"
disp = disp.." ? Local Date And Time: "..timeanddate.."\r\n"
disp = disp.." ? There Are: "..ProfileCounter("NetFounder").." netfoudner(s),"..ProfileCounter("master").." Master(s),"..ProfileCounter("Operator").." Operator(s),"..ProfileCounter("Vip").." Vip(s),"..ProfileCounter("reg")..", Registered user(s).\r\n\r\n"

disp = disp.."? User Information: "

disp = disp.." ? Nick: "..(user.sName or "n/a").."\r\n"
disp = disp.." ? IP Address: "..user.sIP.."\r\n"
disp = disp.." ? Share: "..minshare.."\r\n"
disp = disp.." ? Slots: "..user.iSlots.."\r\n"
disp = disp.." ? Description: "..(user.sDescription or "n/a").."\r\n"
disp = disp.." ? Tag:
disp = disp.." ? Connection: "..user.sConnection.."\r\n"
disp = disp.." ? E-Mail: "..user.sEmail.."\r\n"
disp = disp.." ? Client & Version: "..user.sClient.."\r\n":"..user.sClientVersion.."\r\n"
disp = disp.." ? Mode: "..(tMode[user.sMode] or "n/a").."\r\n"
disp = disp.." ? Profile Name: "..doGetProfile.."\r\n"
disp = disp.." ? Flag:
disp = disp.." ? Your Local Date And Time Is:

user:SendData(login.BotName, disp)

disp = nil
end
end--------------------------------------------------------------------------------

?Tr??T_????

[16:17] Syntax ...dministrator\My Documents\Azim (Business)\Ptokax\Ptokax\scripts\info.lua:64: unfinished string near `" ? Description:'

Psycho_Chihuahua

--PtokaX Online Users Script .03
--
--by Mutor The Ugly
--
-- This script will keep track of users logged into the hub.
-- This script creates two files, one contains
-- a the table of users, the second writes the table to an html file for use
-- on the PtokaX WebServer and the template pack.
--
--
--	Installation:
--	Just overwrite 'pxstats.lua' with this file, restart scripts
--	No need to change your HTML, script will update online users.html only
--
--
--	[7/10/05]
--	+Changes from .01
--		+Now pulls Online users list from hub
--		+Option to clear online table/html at hub/script stop
--		+OnlineFile & OnlineFile2 are created if they dont exist
--		+Added time stamp to Online table/html
--		+Changed HTML format a bit
--
--
--	[7/16/05]
--	+Changes from .02
--		+Only for version 0.3.3.0 build 17.02 or greater
--		+Option for login information

--User Settings------------------------------------------------
OnlineFile = "../html/webstats/online.dat"  	--Path and filename for Online user table
OnlineFile2 = "../html/webstats/users.html" 	--Path and filename for Online user html
ClearOnExit = "yes"	--"yes" / "no"				--Clear online table/html at script stop?
HubOwner = "[Admin]Mutor"						--Your Nick / Owner Nick
ShowInfo = "yes"	--"yes" / "no"				--Show hub/user information to new logins?
Greeting = "it's nice of you to stop by..."		--Short message for new logins
--End User Settings--------------------------------------------

function Main()
	local ScriptStart=os.date("%I:%M %p  %m/%d/%y ")
	local StartMsg = "Online Script Started"
	if loadfile(OnlineFile) ~= nil  and ClearOnExit ~="yes" then
		dofile(OnlineFile)
		Online[StartMsg] = ScriptStart
	else
		Online = {}
		Online[StartMsg] = ScriptStart
	end
	local OnlineTab = frmHub:GetOnlineUsers()
		for i = 1, table.getn(OnlineTab) do
			local Login=os.date("%I:%M %p  %m/%d/%y ")
			local Nickname = OnlineTab[i]["sName"]
			Online[Nickname] = Login
		end
Save_File(OnlineFile,Online,"Online")
SaveOnline()
end

function OnExit()
	if ClearOnExit == "yes" then
		Online = {}
	end
local ScriptStop=os.date("%I:%M %p  %m/%d/%y ")
local StopMsg = "Online Script Stopped"
Online[StopMsg] = ScriptStop
Save_File(OnlineFile,Online,"Online")
SaveOnline()
end

function NewUserConnected(user)
local Login=os.date("%I:%M %p  %m/%d/%y ")
    if Online[user.sName] == nil then
        Online[user.sName]= Login
        Save_File(OnlineFile,Online,"Online")
        SaveOnline()
    end
	if ShowInfo ~= "yes" then
		return 1
	else
		local Prof
		local Topic
		Prof= GetProfileName(user.iProfile) or "Unregistered User"
		Topic = frmHub:GetHubTopic() or "There is no current topic."
		local Mail = user.sEmail
		if Mail == "" then Mail = "None" end
		local art = string.rep("?",40).."\r\n"--??
		local ul = string.rep("?",13).."\r\n"
		local tmp = "\r\n\r\n\t"..art.."\tHub Information:\r\n\t"..ul..
		"\tWelcome:\t"..user.sName..", "..Greeting.."\r\n"..
		"\tHub Name: \t"..frmHub:GetHubName()..",  "..Topic.."\r\n"..
		"\tHub description:\t"..frmHub:GetHubDescr().."\r\n"..
		"\tHubOwner:\t"..HubOwner.."\r\n"..
		"\tUptime:\t\t"..string.format("%.0f Minutes",frmHub:GetUpTime() / 60).."\r\n"..
		"\tPeak Users:\t"..frmHub:GetMaxUsersPeak().."\r\n"..
		"\tHub Share:\t"..string.format("%.2f Tb.",frmHub:GetCurrentShareAmount()/(1024 * 1024 * 1024 * 1024)).."\r\n"..
		"\tThere Are Now:\t"..frmHub:GetUsersCount().." of "..frmHub:GetMaxUsers().." online.\r\n\r\n"..
		"\t"..art.."\tYour Information:\r\n\t"..ul..
		"\tUsername:\t"..user.sName.."\r\n"..
		"\tIP Address:\t"..user.sIP.."\r\n"..
		"\tShare Size:\t"..string.format("%.2f Gb.",user.iShareSize/(1024 * 1024 * 1024)).."\r\n"..
		"\tProfile Name:\t"..Prof.."\r\n"..
		"\tDC Tag:\t\t"..user.sTag.."\r\n"..
		"\tDescription:\t"..user.sDescription.."\r\n"..
		"\tEmail:\t\t"..Mail.."\r\n"..
		"\tConnection:\t"..user.sConnection.."\r\n\r\n\t"..art..
		"\t? [ This information is only being shown to you ] ?\r\n\r\n\t"..art
		user:SendData(tmp)
	end
end

OpConnected = NewUserConnected

function UserDisconnected(user,data)
    if Online[user.sName] ~= nil then
        Online[user.sName]= nil
        Save_File(OnlineFile,Online,"Online")
        SaveOnline()
    end
end

OpDisconnected = UserDisconnected

Save_Serialize = function(tTable, sTableName, hFile, sTab)
	sTab = sTab or "";
	hFile:write(sTab..sTableName.." = {\n" );
	for key, value in tTable do
		local sKey = (type(key) == "string") and string.format("[%q]",key) or string.format("[%d]",key);
		if(type(value) == "table") then
			Save_Serialize(value, sKey, hFile, sTab.."\t");
		else
			local sValue = (type(value) == "string") and string.format("%q",value) or tostring(value);
			hFile:write( sTab.."\t"..sKey.." = "..sValue);
		end
		hFile:write( ",\n");
	end
	hFile:write( sTab.."}");
end

Save_File = function(file,table , tablename )
	local hFile = io.open (file , "w")
        if hFile then
	       Save_Serialize(table, tablename, hFile);
	       hFile:close()
        else
            hFile:write("")
        end
end

function SaveOnline()
    dofile(OnlineFile)
	local File = io.open (OnlineFile2 , "w")
	   if File then
	       File:write("\\\\\\\")
	       	File:write("\\\
\\User Name\\\\    \\\\Login Time\\\\")       for i,v in Online do           File:write("\\"..i.."\\    \\"..v.."\\")       end       File:write("\\\\")           File:close()    else        File:write("")   end end
this works

there were only two " 's to remove ^^
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

Yello

can anyone help to street boy to fix the bugs in his script ? I realy need this script in the way i poste it !

Dessamator

disp = disp.." ? Description:


ur strings arent closed, whenever u use a string u must have a quotation  in the beggining and the end, e.g:
disp = disp.." ? Description: "
Ignorance is Bliss.

?Tr??T_????

login = {
["BotName"] = "Info-Bot",
["Hubowner"] = "[']['?N]Azim",
["webadres"] = "ur web adress here",
["Forumadres"] = "http://www.jimenmickeclubforum.dyndns.info",
["minsharehub"] = "1 GB",
["helpcommand"] = "!help",
}
local kb = "1024"
local mb = kb*kb
local gb = mb*kb
local tb = gb*kb

function Main()
frmHub:RegBot(login.BotName)
end

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 table do
if GetItemByName(User) then
count = count + 1
end
end
return count
end

function Message(user)
local timeanddate = os.date("%d-%m-%Y %H:%M:%S")
local tmp = os.clock()
local weeks, days, hours, minutes, seconds = math.floor(tmp/604800), math.floor(math.mod(tmp/86400, 7)), math.floor(math.mod(tmp/3600, 24)), math.floor(math.mod(tmp/60, 60)), math.floor(math.mod(tmp/1, 60))
if frmHub:GetHubTopic() == nil then
topic = "No topic set"
else
topic = frmHub:GetHubTopic()
end
if user.sMyInfoString then
local disp = ""
doGetProfile = GetProfileName(user.iProfile) or "Not registerd (reg your self type !regme and a password of your choice in main)"
hubshare = string.format("%0.3f", frmHub:GetCurrentShareAmount()/(tb)).." TB"
local _,_,share = string.find(user.sMyInfoString, "^%$MyINFO %$ALL [^ ]+ [^$]*%$ $[^$]+[^$]%$[^$]*%$%s*(%d+)%$" )

if share then
minshare = string.format("%0.3f", tonumber(share)/gb).." GB"
else
minshare = "Corrupt"
end
border1 = " :::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?::: ?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:: :"
border2 = " :::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?::: ?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:: :"
userinfo = " ? User Information:"
hubinfo = "? Hub Information:"
disp = "\r\n\r\n"..border1.."\r\n"

disp = disp.." ? Hub Information:"
disp = disp.." ? Name: "..frmHub:GetHubName().."\r\n"
disp = disp.." ? Description: "..frmHub:GetHubDescr().."\r\n"
disp = disp.." ? Topic: "..topic.."\r\n"
disp = disp.." ? Hub Address: "..frmHub:GetHubAddress()..":"..frmHub:GetHubPort().."\r\n"
disp = disp.." ? Web Address: "..login.webadres.."\r\n"
disp = disp.." ? Shared: "..hubshare.."\r\n"
disp = disp.." ? Hubowner: "..login.Hubowner.."\r\n"
disp = disp.." ? Local Date And Time: "..timeanddate.."\r\n"
disp = disp.." ? There Are: "..ProfileCounter("NetFounder").." netfoudner(s),"..ProfileCounter("master").." Master(s),"..ProfileCounter("Operator").." Operator(s),"..ProfileCounter("Vip").." Vip(s),"..ProfileCounter("reg")..", Registered user(s).\r\n\r\n"
disp = disp.." ? User Information:"
disp = disp.." ? Nick: "..(user.sName or "n/a").."\r\n"
disp = disp.." ? IP Address: "..user.sIP.."\r\n"
disp = disp.." ? Share: "..minshare.."\r\n"
disp = disp.." ? Slots: "..user.iSlots.."\r\n"
disp = disp.." ? Description: "..(user.sDescription or "n/a").."\r\n"
disp = disp.." ? Connection: "..user.sConnection.."\r\n"
disp = disp.." ? E-Mail: "..user.sEmail.."\r\n"
disp = disp.." ? Profile Name: "..doGetProfile.."\r\n"
disp = disp.." :::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?::: ?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:: :"
user:SendData(login.BotName, disp)

disp = nil
end
end--------------------------------------------------------------------------------

?Tr??T_????



 :::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?::: ?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:: :
 ? Hub Information: ? Name: ']['h? ?impl? N?']['w?rK [UK]
 ? Description: mp3's; movies; games; etc...RCv10.01e
 ? Topic: Play Trivia and Jumble..Enjoy
 ? Hub Address: thesimplenetwork.mine.nu:411
 ? Web Address: ur web adress here
 ? Shared: 0.474 TB
 ? Hubowner: [']['?N]Azim
 ? Local Date And Time: 16-08-2005 16:47:43
 ? There Are: 1 netfoudner(s),1 Master(s),2 Operator(s),2 Vip(s),2, Registered user(s).

 ? User Information: ? Nick: [']['?N]Azim
 ? IP Address: 82.24.122.205
 ? Share: 10.739 GB
 ? Slots: 4
 ? Description: Hub Owner
 ? Connection: Cable
 ? E-Mail: thesimplenetwork@hotmail.co.uk
 ? Profile Name: NetFounder
 :::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?::: ?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:::?:: :

?Tr??T_????

Has u can c its missing some stuff:
? Uptime:
? Users:
? User Peak:
? Max User Peak:
? Country:
? Reliability:
? Rating:
? Tag:
? Flag:
? Your Local Date And Time Is:
? Client & Version:

and this is not well organized:
 ? Hub Information: ? Name: ']['h? ?impl? N?']['w?rK [UK]
? User Information: ? Nick: [']['?N]Azim

?Tr??T_????

sorry m8 its like this coz i dont know lua language...
i just tried to make more easy to who will do it...
 ;)  ;)  ;)  ;)  ;)

SMF spam blocked by CleanTalk