Author Topic: a login script  (Read 1808 times)

0 Members and 1 Guest are viewing this topic.

Offline [DK]DjBent

  • Junior Member
  • **
  • Posts: 11
  • Karma: +0/-0
a login script
« on: 19 April, 2004, 21:47:42 »
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

PtokaX forum

a login script
« on: 19 April, 2004, 21:47:42 »

Offline plop

  • Forum God
  • ****
  • Posts: 2 464
  • Karma: +37/-0
(No subject)
« Reply #1 on: 19 April, 2004, 22:27:12 »
your talking about this i guess.
frmHub:GetHubBotName()
it returns the name of the ptokax build-in bot, not a scripted bot.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

imby

  • Guest
(No subject)
« Reply #2 on: 24 May, 2005, 15:58:15 »
Anyone have LUA 5 version of this?

Offline TTB

  • Lord
  • ***
  • Posts: 436
  • Karma: +17/-1
(No subject)
« Reply #3 on: 24 May, 2005, 16:04:49 »
Try this threat and use the search next time!

*CLICK*
TTB

(? ?.??.-> Admin @ Surfnet hubs <-.??.???)

imby

  • Guest
(No subject)
« Reply #4 on: 24 May, 2005, 17:15:57 »
I did use search, the latter has functions I don't need and parts I don't understand therefore it'll end up as bloat since I wont know what code to remove, the former is perfect for my needs.

PtokaX forum

(No subject)
« Reply #4 on: 24 May, 2005, 17:15:57 »