A Login 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

A Login Script

Started by [DK]DjBent, 19 April, 2004, 21:58:02

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

[DK]DjBent

Looks like this....

BotName = "[MMZ]Bot" --// Set here your bot name

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 disp = ""
doGetProfile = GetProfileName(user.iProfile) or "Not registerd"
local s,e,share = strfind(user.sMyInfoString, "$(%d+)%$")
share = format("%0.2f", ( share / (1024*1024*1024)))
local hubshare = format("%0.2f", ( frmHub:GetCurrentShareAmount() / (1024*1024*1024)))
border1 = "<>=========================H=U=B==I=N=F=O==============================="
border2 = "<>======================================================================"
disp = "\r\n\r\n"..border1.."\r\n"
disp = disp.." ?Welcome: "..user.sName.."\r\n"
disp = disp.." ?To this fine place Called: "..frmHub:GetHubName().."\r\n"
disp = disp.." ?Your IP: "..user.sIP.."\r\n"
disp = disp.." ?Your Status in this Hub: "..doGetProfile.."\r\n"
disp = disp.." ?Actual Share in the Hub: "..hubshare.." GB\r\n"
disp = disp.." ?There are now: "..frmHub:GetUsersCount().." of "..frmHub:GetMaxUsers().." users connected\r\n"
disp = disp.." ?Hub description is: "..frmHub:GetHubDescr().."\r\n"
disp = disp.." ?Hub register address is: "..frmHub:GetRegServer().."\r\n"
disp = disp.." ?Hub minshare is: "..frmHub:GetMinShare()/(1024).." GB\r\n"
disp = disp.." ?Redirect address is: "..frmHub:GetRedirectAddress().."\r\n"
disp = disp.." ?Hub is Powered by: "..frmHub:GetHubBotName().."\r\n"..border2.."\r\n"
user:SendData(BotName, disp)
end



But it wont get the bot name..... and i would like it to do that..... or say that the hub is powered by Robocop 7.0a

Please help me, don't know much about scripting in lua

nErBoS

Hi,

The script is working. What is your dioubt or request ???
A new name to the bot ??? just write the name in this line..

BotName = "[MMZ]Bot" --// Set here your bot name

Best regards, nErBoS
--## nErBoS Spot ##--

[DK]DjBent

<[MMZ]Bot>

- <>=========================H=U=B==I=N=F=O===============================
   ?Welcome:         [MA]DjBent
   ?To this fine place Called:   Sharezone
   ?Your IP:         xxxxxxxxx
   ?Your Status in this Hub:   Master
   ?Actual Share in the Hub:   0.00 GB
   ?There are now:         1 of 20 users connected
   ?Hub description is:      Share lots of Music And have Fun
   ?Hub register address is:   dreamland.gotdns.org;vandel405.dynip.com
   ?Hub minshare is:      10 GB
   ?Redirect address is:      xxxxxx_xxx.yaboo.dk
   ?Hub is Powered by:      
- <>======================================================================

[DK]DjBent

Now you see what i mean.....

the bot name isn't in there and i want it to show i'm using Robocop 7.0a...But don't know how

nErBoS

#4
Hi,

Ok then try this...

BotName = "[MMZ]Bot" --// Set here your bot name 
uBot = "RoboCop 7.0" --Set here the Bot that you are using

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 disp = "" 
doGetProfile = GetProfileName(user.iProfile) or "Not registerd" 
local s,e,share = strfind(user.sMyInfoString, "$(%d+)%$") 
share = format("%0.2f", ( share / (1024*1024*1024))) 
local hubshare = format("%0.2f", ( frmHub:GetCurrentShareAmount() / (1024*1024*1024))) 
border1 = "<>=========================H=U=B==I=N=F=O===============================" 
border2 = "<>======================================================================" 
disp = "\r\n\r\n"..border1.."\r\n"
disp = disp.." ?This Hub is using: "..uBot.."\r\n" 
disp = disp.." ?Welcome: "..user.sName.."\r\n" 
disp = disp.." ?To this fine place Called: "..frmHub:GetHubName().."\r\n" 
disp = disp.." ?Your IP: "..user.sIP.."\r\n" 
disp = disp.." ?Your Status in this Hub: "..doGetProfile.."\r\n" 
disp = disp.." ?Actual Share in the Hub: "..hubshare.." GB\r\n" 
disp = disp.." ?There are now: "..frmHub:GetUsersCount().." of "..frmHub:GetMaxUsers().." users connected\r\n" 
disp = disp.." ?Hub description is: "..frmHub:GetHubDescr().."\r\n" 
disp = disp.." ?Hub register address is: "..frmHub:GetRegServer().."\r\n" 
disp = disp.." ?Hub minshare is: "..frmHub:GetMinShare()/(1024).." GB\r\n" 
disp = disp.." ?Redirect address is: "..frmHub:GetRedirectAddress().."\r\n" 
disp = disp.." ?Hub is Powered by: "..frmHub:GetHubBotName().."\r\n"..border2.."\r\n" 
user:SendData(BotName, disp) 
end

Best regards, nErBoS
--## nErBoS Spot ##--

[DK]DjBent

Dosen't seem to work..... now i get nothing wnen i log in...

nErBoS

Hi,

Sorry some syntax error on writing by me.. try it agian now i have edit the last script.

Best regards, nErBoS
--## nErBoS Spot ##--

[DK]DjBent

I have tryed the edited version and i get nothing in the hub when i log in...

[DK]DjBent

this is what i get now.....

___________________________________________________________________________________________________________
___________________________________________________________________________________________________________


[11:09] Logged in.
[11:09] // Type !help in main for your available commands!
[11:09] <[MMZ]Bot> The Hubowner [MA]DjBent has entered the Hub, Welcome Home.

[DK]DjBent

i get this syntax error


Syntax Error: attempt to concat global `dips' (a nil value)

Skrollster

check so that you haven't change a variablename to dips from disp

[DK]DjBent

Thanks a lot for the help... got it to work now

SMF spam blocked by CleanTalk