Top Hubbers - Page 3
 

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

Top Hubbers

Started by jiten, 21 March, 2006, 18:39:53

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jiten

Quote from: Naithif on 13 September, 2006, 20:27:41
An old quote came to my mind ;D
Something about "bandwidth" and "resources"  ;D ;D ;D

Indeed :P

As I posted earlier:

QuoteThat won't be possible as we would need to modify every user's MyINFO and that is surely a bandwidth and resource hog.

Naithif

Hi

   -- Profiles checked [0 = on; 1 = off]
   tProfiles = {
  • = 1, [1] = 1, [2] = 1, [3] = 1, [4] = 1, [5] = 1 },

    Uhhh
    ???  0 = on and 1 = off ???

JueLz

Should that be The other way around?
I am owner of the MzDistortion? Empire
the addy to my hub is mzdistortion.no-ip.org
____________________________________________
--=                        [HT 500]                          =--

jiten

Quote from: Naithif on 15 September, 2006, 19:12:30
Hi

   -- Profiles checked [0 = on; 1 = off]
   tProfiles = {
Oops... where was my head at? :P

speedX

hey but the script works.....he just replaced the place of on & off bymistake.... :D
Thanking You,

speedX

nEgativE

Hello all, excelente work jiten  :)
Is it possible to send info on connect ? like..
[Scripter]Jiten, Hello, your total uptime is blabla :)
[Scripter]Jiten, your rank is something :)
i see there is a bRankOnConnect but just for UserCommands i think.

Thx in advance.

jiten

Quote from: [PT]nEgativE on 22 September, 2006, 16:16:35
Is it possible to send info on connect ? like..
[Scripter]Jiten, Hello, your total uptime is blabla :)
[Scripter]Jiten, your rank is something :)
i see there is a bRankOnConnect but just for UserCommands i think.

Well, that option you mentioned does this: Send hubtime stats on connect [true = on; false = off]

This is an example of what you'll get on connect:

Quote[18:21:46] <PtokaX>

   ========================================
         Stats:
   --------------------------------------------------------------------------------
   - Nick: jiten
   - Total uptime: 7 minute(s)
   - Daily average uptime: 7 minute(s)
   - Current Rank: Newbie

ollobollo

#57
well programmed script, respect, but there is a little problem since i want to change the imax= 20 into 40. the rightclick shows the 40 but in pm there are only 20 tophubbers shown. can you help me where i can solve this little problem?

regards

ollo

Quote-- Maximum hubbers to show when using !tophubbers
   iMax = 40,

   -- Send message to users with lower than specified Average uptime (AUT) [true = on; false = off]
   bWarning = true,
   -- Minimum Average uptime (hours) that triggers the warning
   iAUT = 1,


problem is found, thx

jiten

Quote from: ollobollo on 23 September, 2006, 16:55:35
there is a little problem since i want to change the imax= 20 into 40. the rightclick shows the 40 but in pm there are only 20 tophubbers shown. can you help me where i can solve this little problem?
problem is found, thx

Care to share with us how you solved this problem?

nEgativE

Quote from: jiten on 22 September, 2006, 18:24:49
Well, that option you mentioned does this: Send hubtime stats on connect [true = on; false = off]

This is an example of what you'll get on connect:


Yes jiten, it's working well.. my bad.
Excelente trabalho :)

ollobollo

jep, its very simple: i change the place in the scriptlist, before robo, now i see the right appearence of tophubbers-script, i think theres a conflict with the inbuilt tophubbers from robo.

speedX

hm..quiet possible.....
Posted on: 01 October 2006, 17:08:01
hey jiten...if ne user types !hubtime <nick> thn his hubtime comes above the command....i would like if it comes below it if possible.....
Thanking You,

speedX

jiten

Quote from: speedX on 03 October, 2006, 18:23:25
hey jiten...if ne user types !hubtime <nick> thn his hubtime comes above the command....i would like if it comes below it if possible.....

Have a look at RegCleaner's thread and you'll see a similar change in the code that does this.

speedX

oh god.....y cant i do anythign rite.....srry but i messed the whole script....could u plzz edit and copy tht portion and paste it....plzzz
Thanking You,

speedX

Herodes

Quote from: speedX on 03 October, 2006, 22:05:23
oh god.....y cant i do anythign rite.....srry but i messed the whole script....could u plzz edit and copy tht portion and paste it....plzzz
Get the script, a clean copy, and go through the thread again,...
Pasting and deleting at the points that were mentioned ;)

speedX

Quote
hubtime = {
      fFunction = function(user, data)
         -- Parse nick
         local _,_, nick = string.find(data, "^%S+%s+(%S+)$")
         -- Exists
         if nick then
            -- Return
            BuildStats(user, nick)
         else
            user:SendMessage(tSettings.sBot, "*** Syntax Error: Type !hubtime <nick>")
         end
      end,
      tLevels = {
         
  • = 1, [1] = 1, [2] = 1, [3] = 1, [4] = 1, [5] = 1,
          },
          tRC = { { "Show an user's stats", " %[line:Nick]" } }
       },
Where shud i paste SendToAll??? so tht i could get the result after the command.....
Thanking You,

speedX

jiten

hubtime's function should be like this:

fFunction = function(user, data)
	-- Parse nick
	local _,_, nick = string.find(data, "^%S+%s+(%S+)$")
	-- Exists
	if nick then 
		-- Return
		SendToAll(user.sName, data)
		BuildStats(user, nick)
	else
		user:SendMessage(tSettings.sBot, "*** Syntax Error: Type !hubtime <nick>")
	end
end,


You'll also need to replace your BuildStats function with this one:

BuildStats = function(user, nick)
	-- In DB
	if tOnline[nick] then
		-- Average uptime in days
		local iAverage = os.difftime(os.time(os.date("!*t")), tOnline[nick].Julian)/(60*60*24)
		if iAverage < 1 then iAverage = 1 end
		-- Generate message
		local sMsg = "\r\n\r\n\t"..string.rep("=", 40).."\r\n\t\t\tStats:\r\n\t"..
		string.rep("-", 80).."\r\n\t- Nick: "..nick.."\r\n\t- Total uptime: "..
		MinutesToTime(tOnline[nick].TotalTime, true).."\r\n\t- Daily average uptime: "..
		MinutesToTime((tOnline[nick].TotalTime/iAverage), true).."\r\n\t- Current Rank: "..GetRank(nick).."\r\n"
		-- Send stats
		SendToAll(tSettings.sBot, sMsg)
	else
		user:SendMessage(tSettings.sBot, "*** Error: No record found for '"..nick.."'!")
	end
end


Notice that with these changes, if you've enabled the 'bRankOnConnect' option, every user's mainchat will be flooded with connecting users' stats. So, be careful.

speedX

nope....u again got it wrong......see all can see the command typed frm b4 only....i took tth setting made by u @ lua.uknet.com ........but the result comes above the command....i would like if it comes below the command......nothing else....
Thanking You,

speedX

jiten

Quote from: speedX on 04 October, 2006, 14:40:46
nope....u again got it wrong......see all can see the command typed frm b4 only....i took tth setting made by u @ lua.uknet.com ........but the result comes above the command....i would like if it comes below the command......nothing else....

First of all, do read and test my previous reply to you post carefully with a clean copy of this script.

Then, you can say:

Quotenope....u again got it wrong......

However, at the moment, that won't be possible as those mods really do what you requested :P

speedX

#69
Yup, done. Actually I had copied ur chat arrival table frm lua.uknnet.com. So, it was not showing the required result even after making the above changes. But when i used a new copy, it gave me a positive result. Thank you.
Posted on: 05 October 2006, 00:09:23
hey jiten, one more help dude
I dont kno wat to do if I want the command to come b4 the result.
here is the script:

Quote
--## Simple Time Bot
--## Requested by SteffJay
--## Made by nErBoS
--## Converted in LUA 5 by 6Marilyn6Manson6
--## Commands:
--##   !time - Gives the current time

sBot = "Time-Bot"

function ChatArrival(user, data)
   if (string.sub(data,1,1)=="<") or (string.sub(data,1,5+string.len(sBot))=="$To: "..sBot) then
      data = string.sub(data,1,string.len(data)-1)
      s,e,cmd = string.find(data,"%b<>%s+(%S+)")
      if (cmd == "!time") then
         user:SendData(sBot, GetTime())
      end
   end
end

function GetTime()
   s = os.date("%S")
   h = os.date("%H")
   m = os.date("%M")
   d = os.date("%d")
   mm = os.date("%m")
   y = os.date("%y")
   Date = "Date: "..d.."/"..mm.."/20"..y.."   Time: "..h..":"..m..":"..s
   return Date
end

and I would like if tht time comes in 12 hr clock format with AM and PM
I tried to put this code (%I:%M %p) but wat I found was errors, Could u help plzz
Thanking You,

speedX

6Marilyn6Manson6

--## Simple Time Bot
--## Requested by SteffJay 
--## Made by nErBoS
--## Converted in LUA 5 by 6Marilyn6Manson6
--## Commands:
--##   !time - Gives the current time

sBot = "Time-Bot"

function ChatArrival(user, data)
	if (string.sub(data,1,1)=="<") or (string.sub(data,1,5+string.len(sBot))=="$To: "..sBot) then
	data = string.sub(data,1,string.len(data)-1)
	s,e,cmd = string.find(data,"%b<>%s+(%S+)")
		if (cmd == "!time") then
			user:SendData(sBot, GetTime())
		end
	end
end

function GetTime()
	f = os.date("%p")
	s = os.date("%S")
	h = os.date("%l")
	m = os.date("%M")
	d = os.date("%d")
	mm = os.date("%m")
	y = os.date("%y")
	Date = "Date: "..d.."/"..mm.."/20"..y.."   Time: "..h..":"..m..":"..s.."  "..f
	return Date
end

speedX

#71
hey 6M6M6 thx for the help, but ur script was showing me wrong time, for 9:52 AM it was showing 00:42 AM. I donno tht it is problem in script or frm side coz i was in a hurry, thn i tried Mutor's script, it is working well & btw wat is UTC mutor? and can u edit this script in such a way tht even if one user type's !time all shud be able to see command along with the result. Thank you
Thanking You,

speedX

Thor

http://ro.4242.hu/cgi-bin/yabb2/YaBB.pl?num=1159443959 ;D
Quote from: speedX on 05 October, 2006, 06:26:34
hey 6M6M6 thx for the help.....but ur script was showing me wrong time.....for 9:52 AM it was showing 00:42 AM .......i donno tht it is problem in script or frm side coz i was in a hurry......
Maybe the server's clock didn't set up... Check it

speedX

#73
Hey jiten, this tophubbers doesnt give result if the nick is given in small. Like for BLITZKRIEG, if i type !hubtime blitzkrieg, it shows nick not found.
And one user in my hub had first logged in with nick ShEvChEnKo7 and thn later SHEVCHENKO7 so there has been a double entry for this guy.

Quote
0 month(s), 9 day(s), 11 hour(s), 21 minute(s)   10460 min   09/06/06 20:50:24   09/06/06 21:35:56   Cool Member   *Online*   SHEVCHENKO7
and

0 month(s), 7 day(s), 5 hour(s), 34 minute(s)   5122 min   09/23/06 07:44:01   09/23/06 07:42:06   Cool Member   *Online*   ShEvChEnKo7



so now wat to do ??

Posted on: 05 October 2006, 19:42:07
hey guys, this is urgent for me. Could ne one fix it for lower case also? plz
Thanking You,

speedX

Psycho_Chihuahua

could.......you please........stop posting.........like this?
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

SMF spam blocked by CleanTalk