I need a script that states to the hub when Ops, VIPs and Regs join the hub. All I could find was a script that works for VIPs and I couldn't figure out how to change it for all. Could someone help this old noob? :(
onENTER = "-= Has entered the hub =-"
onEXIT = "-= Has left the hub =-"
function NewUserConnected(user)
if user.iProfile == 3 then
SendToAll(Bot, user.sName.." "..onENTER)
elseif user.iProfile == 2 then
SendToAll(Bot, user.sName.." "..onENTER)
end
end
function OpConnected(user)
SendToAll(bot, user.sName.." "..onEnter)
end
function UserDisconnected(user)
if user.iProfile == 3 then
SendToAll(Bot, user.sName.." "..onEXIT)
elseif user.iProfile == 2 then
SendToAll(Bot, user.sName.. " "..onEXIT)
end
end
function OpDisconnected()
SendToAll(Bot, user.sName.." "..onEXIT)
end
i tried this script but it doesnt seem to work.
i got the follwing error:
Syntax Error: attempt to index global `user' (a nil value)
Syntax Error: attempt to concat global `onEnter' (a nil value)
which i know nothing abt
also i want 2 try adjust the above script so that users, whetehr they are registered or not reistered the ' has entered message' comes up......also i want to take out the Op enter msg as its not needed for me.
Sorry i'm so rubbish at this but i think i'm graddually learning!
please help
thanx a lot!
Devastator
onENTER = "-= Has entered the hub =-"
onEXIT = "-= Has left the hub =-"
Bot = "Botname_here"
function NewUserConnected(user)
user:SendData(Bot, "Welcome user.sName.."\r\nYour IP: "..user.sIP)
if user.iProfile == 3 then
SendToAll(Bot, user.sName.." "..onENTER)
elseif user.iProfile == 2 then
SendToAll(Bot, user.sName.." "..onENTER)
end
end
function UserDisconnected(user)
if user.iProfile == 3 then
SendToAll(Bot, user.sName.." "..onEXIT)
elseif user.iProfile == 2 then
SendToAll(Bot, user.sName.. " "..onEXIT)
end
end
Sorry, was in a rush.. this should work..i checked for errors and had none so good luck!!
kepp please dont give the "-= =-" coz it's was for my hub and i dont whant that other hubs will have the same welcome as in my hub 10x
:P
CyA all
QuoteOriginally posted by D-J Valhala
kepp please dont give the "-= =-" coz it's was for my hub and i dont whant that other hubs will have the same welcome as in my hub 10x
:P
CyA all
i dont think you own the copyright to the "-= =-"
and yours is not the only hub to have that welcome.
Syntax Error: `)' expected;
last token read: `\' at line 8 in file ....
again i have no clue i'm jus pointin things out!
its an error thats popped up
if u can fix it thanx a lot m8 (y)
onENTER = "-= Has entered the hub =-"
onEXIT = "-= Has left the hub =-"
Bot = "Botname_here"
function NewUserConnected(user)
user:SendData(Bot, "Welcome "..user.sName.."\r\nYour IP: "..user.sIP)
if user.iProfile == 3 then
SendToAll(Bot, user.sName.." "..onENTER)
elseif user.iProfile == 2 then
SendToAll(Bot, user.sName.." "..onENTER)
end
end
function UserDisconnected(user)
if user.iProfile == 3 then
SendToAll(Bot, user.sName.." "..onEXIT)
elseif user.iProfile == 2 then
SendToAll(Bot, user.sName.. " "..onEXIT)
end
end
here.. :S
Thanx a lot m8 it works now :D
can u make it so wen all users registered or not registered sign in the same msg shows
sorry 2 b such a pain plz b kind enuff 2 change it so it appears 4 unregistered users 2! plz :rolleyes: :rolleyes: :rolleyes:
Thanx a LoT i apologise 4 bein such a nusiance!
Devastator
Works great, thank you!
i'm usin this script but i got
Syntax Error: attempt to concat local `iProfile' (a nil value)
i'm quite sure its with this script try fix this if u can
thanx a lot u guys r gr8!
Devastator
cnt n e bodee help me with this?
QuoteOriginally posted by Devastator
i'm usin this script but i got
Syntax Error: attempt to concat local `iProfile' (a nil value)
i'm quite sure its with this script try fix this if u can
thanx a lot u guys r gr8!
Devastator
can't see anything wrong in the script, but it's for testdrive and up.
on icecube it's logical that you get sutch an error, it doesn't have profiles yet.
plop
i dnt use ice cube i use 0.326 TD 4...dunno wat problem is usin Robocop and MasterChat script with it also
QuoteOriginally posted by Devastator
i dnt use ice cube i use 0.326 TD 4...dunno wat problem is usin Robocop and MasterChat script with it also
give this 1 a try, i placed some debugging msg's in it.
hope that can help finding whats going wrong.
onENTER = "-= Has entered the hub =-"
onEXIT = "-= Has left the hub =-"
Bot = "Botname_here"
function NewUserConnected(user)
user:SendData(Bot, "Welcome "..user.sName.."\r\nYour IP: "..user.sIP)
if user.iProfile then
if user.iProfile == 3 then
SendToAll(Bot, user.sName.." "..onENTER)
elseif user.iProfile == 2 then
SendToAll(Bot, user.sName.." "..onENTER)
end
else
user:SendData(Bot, "whaaaaaaaaaaaaaaa problem, somehow you don't have a profile.|")
end
end
function UserDisconnected(user)
if user.iProfile then
if user.iProfile == 3 then
SendToAll(Bot, user.sName.." "..onEXIT)
elseif user.iProfile == 2 then
SendToAll(Bot, user.sName.. " "..onEXIT)
end
else
user:SendData(Bot, "whaaaaaaaaaaaaaaa problem, somehow you don't have a profile.|")
end
end
plop
i jus found out that i get the error when i temp op a user and when they exit the following syntax error appears...
Syntax Error: attempt to concat local `iProfile' (a nil value)
hope that helps u 2 solve ma problem
thanx a lot
Devastator
then this should solve your problem.
onENTER = "-= Has entered the hub =-"
onEXIT = "-= Has left the hub =-"
Bot = "Botname_here"
function NewUserConnected(user)
user:SendData(Bot, "Welcome "..user.sName.."\r\nYour IP: "..user.sIP)
if user.iProfile then
if user.iProfile == 3 then
SendToAll(Bot, user.sName.." "..onENTER)
elseif user.iProfile == 2 then
SendToAll(Bot, user.sName.." "..onENTER)
end
end
end
function UserDisconnected(user)
if user.iProfile then
if user.iProfile == 3 then
SendToAll(Bot, user.sName.." "..onEXIT)
elseif user.iProfile == 2 then
SendToAll(Bot, user.sName.. " "..onEXIT)
end
end
end
plop
am gonna keep sayin this until his made mod or until i go mad....sum1 make plop a mod....his just a helping machine he was born 2 help every1!....
Thanx once agen on replyin much appreciated! =)
PLOP 4 MOD!!!
^^^^^^^^
Devastator