PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: imby on 31 July, 2004, 20:28:17

Title: benefits for my registered users
Post by: imby on 31 July, 2004, 20:28:17
hi, i use ptokax 0330 15.25 and robocop 8b. first of all, are these two things possible? for registered users:

1)extra hub space, so if for example if i set the max users at 300, reg users could have an X amount of extra space for themselves. say set it to be full at 320 users for registered users?

2)hubs one ops in does not count as a hub ratio slot. so if they opped in 2 and were normal user/regged in 2, they would only require two slots.


secondly can you direct me to these scripts if they exist? searching on here has proved unsuccessful. if they don't any chance of someone making either or both? i know it's a big ask, but if you don't ask, you don't get! i'm no where near the level required for making them. just started learning.
Title:
Post by: plop on 31 July, 2004, 20:39:21
1) enable the option under the profile for reg users 2 enter the hub when it's full.

2) thats something for optimus 2 decide.

plop
Title:
Post by: imby on 31 July, 2004, 20:41:52
hi i meant as stand alone, didnt see 1) in the settings, gonna have a look.
Title:
Post by: imby on 31 July, 2004, 20:45:09
with regards to 1), you can't set any numerical amount, which is no good if you're on an average dsl line.
Title:
Post by: imby on 15 September, 2004, 23:29:28
no one wants to do 1) as a stand alone? think it would be pretty useful, maybe not just for me.
Title:
Post by: nErBoS on 15 September, 2004, 23:57:04
Hi,

Are using the Max Users of ptokax or Robocop ???

Best regards, nErBoS
Title:
Post by: imby on 16 September, 2004, 00:33:05
ptokax
Title:
Post by: BoJlk on 16 September, 2004, 01:55:25
My Suggestion is to use the RoboCop settings only
and to disable the HUB's checks.  8)

And there's no settings that allow some REG
users to have their amount of connections  :(

It's a seetings that say: allow users to connect to a full HUB.
and you can put a check box to the REG users.

Maybe there's a Scripts that counts the REG users
when the HUB is full
and stop's any REG users connection after 20 users...
(or any other Number u'll set)

But then it might be a problem with the RoBoCop
Title:
Post by: nErBoS on 16 September, 2004, 02:28:57
Hi,

Use this script, but in your ptokax Max Users put the double of your Max Users. The Max Users will be controled by this script...

--## Extra Full Bot
--## Requested by imby
--## Lets's enter a certain amount of regged users when HUB is full
--## Made by nErboS

sBot = "EF-BOT"

iAmountExtra = 0

--## Configuration ##--

iMaxUsers = 200 -- Number o Max Users that HUB can handle
iExtraRoom = 20 -- Number of regged users that can enter HUB when full

--## END ##--

function Main()
if (frmHub:GetUsersCount() > iMaxUsers) then
iAmountExtra = frmHub:GetUsersCount() - iMaxUsers
end
end

function NewUserConnected(user)
if (frmHub:GetUsersCount() >= iMaxUsers) then
if (user.iProfile == -1) then
user:SendData(sBot, "The HUB is full.")
user:SendData(sBot, "Disconnected....")
user:Disconnect()
elseif (iAmountExtra >= iExtraRoom) then
user:SendData(sBot, "The HUB is full.")
user:SendData(sBot, "Disconnected....")
user:Disconnect()
else
iAmountExtra = iAmountExtra + 1
end
end
end

function UserDisconnected(user)
if (user.iProfile ~= -1 and iAmountExtra ~= 0) then
iAmountExtra = iAmountExtra - 1
end
end

Best regards, nErBoS
Title:
Post by: imby on 16 September, 2004, 02:41:54
thanks BoJlk, already know all that. nerbos supplied exactly what i needed.

i'm surprised no one else wanted this before, i used to be in a reg hub which used the same system, although my memory isnt great. think it was y hub.

thanks a lot nerbos for your time! really appreciated, will test it out later. why put double max users in ptokax? so it doesn't interfere at all in any way?
Title:
Post by: nErBoS on 16 September, 2004, 02:52:56
Hi,

I said the double but can be less, like you said is only to not bug the script :D

Best regards, nErBoS
Title:
Post by: BoJlk on 16 September, 2004, 03:31:46
Sorry [imby], there was no intention to underestimate you...

But this is a good script... [Nerbos]
Title:
Post by: imby on 16 September, 2004, 03:33:10
ok well thanks again. one last question, out of interest, how long does it take you to make such scripts?
Title:
Post by: imby on 16 September, 2004, 03:35:54
np, BoJlk, it's true i'm not the best at scripting. it's clear to see to all :)
Title:
Post by: nErBoS on 16 September, 2004, 11:50:43
Hi,

Imby you have to understand the we are here to help not to do yours request. We make scripts when it's possible, sometimes i don't have paicence or time to make some scripts so i let to someone else to take the request, it could take sometime, but i think you can't find so good support as this forum can give you.

Best regards, nErBoS
Title:
Post by: imby on 16 September, 2004, 15:59:16
i understand that, but that doesn't really relate to what i asked. i was interested to know, how long it takes for someone who is good at scripting, to make such scripts. i wasn't complaining or anything, just was interested.
Title:
Post by: imby on 16 September, 2004, 16:44:15
great, works good, one small thing, it shows the MOTD then

[15:38:13] The HUB is full.
[15:38:13] *** Connection reset by server

any way to make it like normal hubs do, with the disconnection before the MOTD, and only showing disconnected, not connection reset by server message? or is that not possible?
Title:
Post by: nErBoS on 16 September, 2004, 22:21:22
Hi,

About how fast a script can be made it depends on the request, but normal for me maybe 5-10 minutes. About the MOTD i can't change that because user hasn't sent all his info to make the change. About the disconnect part i have added something in the script above.

Best regards, nErBoS
Title:
Post by: imby on 17 September, 2004, 02:29:49
"[01:22:53] The HUB is full.
[01:22:53] Disconnected....
[01:22:53] *** Connection reset by server"

i'd like the status message to show disconnected.

i take it that's a limitation in the protocol, and nothing can be done about that? nevermind, aint a big deal, thanks very much!
Title:
Post by: nErBoS on 17 September, 2004, 02:44:25
Hi,

Bad interpetation of your DC about disconnect, like you said no big deal  :))

Best regards, nErBoS