I wanna use this script on Eximius, but I got it from Px forums...so does it also works on eximius then?
I got also this error, can someone fix it for me plz Eximius\Scripts\regrequest.lua:21: attempt to index global 'SetMan' (a nil value)--[[
Request Reg 2.0 LUA 5.11 [Strict][API 2]
by Mutor 02/18/08
Requested by Psycho_Chihuahua
Provides user command to request registration.
-User must supply a valid password with request.
-Online Ops are notified of request.
-Users are messaged about registration on connect
-Option for timed registration reminder.
+Changes from 1.x
~Converted for use with the new Px API. Requested by ]-[€LL§Li††L€AnG€L
]]
--//Botname pulled from the hub
local Bot = SetMan.GetString(21)
--//User Command to request registration
local ReqCmd = "regme"
--//Send timed message to unregged? true/false
local TimedMsg = true
--//Interval [in minutes] between message to unregged
local Mins = 60
local Timer = 0
OnStartup = function()
if TimedMsg then
Timer = TmrMan.AddTimer(Mins*60000)
OnTimer(Timer)
end
end
UserConnected = function(user, data)
if user.iProfile == -1 then
local Pfx,art = SetMan.GetString(29):sub(1,1),"\t"..string.rep("?",50).."\n"
local RegMsg="\n\n"..art.."\tNotice: Users are required to "..
"register themselves in this hub.\n\n"..art..""..
"\tYou can request registration by typing -> "..
Pfx..ReqCmd.." <password>\n\n"..
"\tAs soon as possible an Operator will check your client\n"..
"\tand share and assist you with registration\n\n"..art
Core.SendToUser(user,"<"..Bot.."> "..RegMsg.."|")
Core.SendToUser(user,"$UserCommand 1 3 Request Registration "..
"$<%[mynick]> "..Pfx..ReqCmd.." %[line:Password]||")
end
end
ChatArrival = function(user, data)
local _,_,cmd = data:find("%b<> ["..SetMan.GetString(29).."](%a+)")
if cmd and cmd == ReqCmd then
local _,_,pwd = string.find(data, "^%b<> %p%w+ ([^|]+)|$")
if pwd then
if string.find(pwd, "[%c|\n\r]") then
return Core.SendToUser(user,"<"..Bot.."> That password has "..
"invalid charachters, try another.|"),true
else
local RequestTime=os.date("%B %d %Y %I:%m %p ")
local ReqMsg="\n\n\tRequest Submitted: "..user.sNick..
", your registration request was received\n"..
"\tIt was submitted to all online operators on: "..RequestTime.."\n"..
"\tAn Operator will assist you with registration as soon as is possible.\n\n"
local Reg = RegMan.GetReg(user.sNick)
if not Reg then
local s = FmtSz(Core.GetUserValue(user,16))
local RegMsg0="\n\n\t"..RequestTime.."\n\tAttention Operators: the user: "..
user.sNick.." has requested registration with the password: "..pwd.."\n"..
"\tWould you please check "..user.sNick.."'s client from IP "..user.sIP..
" and share of "..s.." and respond.\n\n|"
return MsgOps(RegMsg0.."|"),Core.SendToUser(user,"<"..Bot.."> "..ReqMsg),true
else
local p = ProfMan.GetProfile(Reg.iProfile).sProfileName
local DenyMsg = "Don't be silly "..user.sNick..", you are already logged in as "..p.."|"
return Core.SendToUser(user,"<"..Bot.."> "..DenyMsg),true
end
end
else
return Core.SendToUser(user,"<"..Bot.."> ".."You must provide a password|"),true
end
end
end
OnTimer = function(Id)
if Id == Timer then
local Pfx = SetMan.GetString(29):sub(1,1)
for i,user in ipairs(Core.GetOnlineUsers(-1)) do
local art,ul = "\t"..string.rep("?",50).."\n",string.rep("?",6)
local RegMsg=user.sNick.."\n\n"..art.."\tNotice: Users are required to "..
"register themselves in this hub.\n\n"..art..""..
"\tYou can request registration by typing -> "..
Pfx..ReqCmd.." <password>\n\n"..
"\tAs soon as possible an Operator will check your client\n"..
"\tand share and assist you with registration\n\n"..art
Core.SendPmToUser(user,Bot,RegMsg.."|")
end
end
end
MsgOps = function(msg)
if msg and msg:len() > 0 then
local x = SetMan.GetOpChat().bEnabled
if x then
Core.SendToOpChat("<"..Bot.."> "..msg.."|")
else
Core.SendPmToOps(Bot,msg.."|")
end
end
end
FmtSz = function(int)
local i,u,x=tonumber(int) or 0,{"","K","M","G","T","P"},1
while i > 1024 do i,x = i/1024,x+1 end return string.format("%.2f %sB.",i,u[x])
end