PtokaX forum

Archive => Archived 4.0 boards => Finished Lua 4 scripts => Topic started by: Madman on 26 September, 2004, 22:54:18

Title: Custom login Script
Post by: Madman on 26 September, 2004, 22:54:18
Hi, I have made a Custom login Script.
The script with Only Op Support can be find here
http://board.univ-angers.fr/thread.php?threadid=2801&boardid=6&styleid=1&sid=10c2dd343eda19f3a193090808608ae8

Here is The Script With All profiles suported and fixed a small bug for the users...

--//Custom Log in Script Made By Madman
--//Thanks Typhoon for the help with ..Profile..
--//And Also 4 The Local msg thing
--//Version 2
--//User's Is Now Also Supported
--//Thanks To [VIP]SilentiQa That Told Me To Add It ;)
--//Bug For Users Fixed

Bot = "LoginBot"

--//User enters the hub text
--//[nick] will be replaced with the users name..
--//["Madman"]= "The [nick] has entred", Will show
--// The Madman has entred
table = {

--//Ops
["[DN]Madman"]= "The Dragon Lord [nick] rode in on his breath of flame",
["[OP]Scruffy"]= "The looser [nick] has falled in with a hangover",
["[DN]Didde"]= "The man, The myth, The concept [nick] flies in to the hub",
["-=FakeKiller=-"]= "[nick] is a killing machine, he is always busy killing people, so don't PM him",
["Dragonmac?"]= "The Network God [nick] has come to open up the hell",
["[DN]Con"]= "The God of Destruction 2 [nick] has come down from heaven",
["[OP]FranticJ1"]= "The GuitarDevil [nick] has played in",
["[OP]Bart_simpson"]= "[nick] has been activated",
["[OP]Stoffy"]= "[nick] faked his way in",
["KAMBOSS"]= "The old and wise phropecy merchant [nick] has arriveed at last",
--//Vips
["[VIP]SilentiQa"]= "The cutest girl in town [nick] has entred the hub",
--//4 Madhouse
["Madman"]= "The Dragon lord [nick] rided in on his breath of flame",
-- [""]= "[nick]",
}

--//User Disconnect Text
table2 = {

--//Ops
["[DN]Madman"]= "[nick] burns down some fakers on his way out",
["[OP]Scruffy"]= "[nick] has *gone*",
["[DN]Didde"]= "[nick] disconnects down to flames",
["-=FakeKiller=-"]= "[nick] has gone to the real world, to kill people",
["Dragonmac?"]= "The Network God [nick] has left the hub to go back to the hell",
["[DN]Con"]= "The God of Destruction [nick] has left the hub, to return to heaven",
["[OP]FranticJ1"]= "The GuitarDevil [nick] played on his last song",
["[OP]Bart_simpson"]= "[nick] has been deactivated",
["[OP]Stoffy"]= "[nick] has been kicked",
["KAMBOSS"]= "Now you are all alot wiser, it is time for old [nick] to leave and go spread the shit elsewhere",
--//Vips
["[VIP]SilentiQa"]= "The One And Only [nick] has left the hub",
--//4 Madhouse
["Madman"]= "[nick] burns down some fakers on his way out",
-- [""]= "[nick]",
}


--//User's Enter The Hub
function NewUserConnected(curUser)
if table[curUser.sName] then
local msg = gsub(table[curUser.sName], "%[nick%]", curUser.sName)
SendToAll(Bot,msg)
--//If User Send Text... Becuse Users dont have any profile and has to have there own text
else if (curUser.iProfile == -1) then
curUser:SendData(Bot, "Welcome user "..curUser.sName.." Have a Good Time.")
--//If not in table
else
local Profile = GetProfileName(curUser.iProfile)
SendToAll(Bot,"The "..Profile.." "..curUser.sName.." has entered the Hub, Welcome Home.")
end
end
end

--//Users Leaves The Hub
function UserDisconnected(curUser)
if table2[curUser.sName] then
local msg = gsub(table2[curUser.sName], "%[nick%]", curUser.sName)
SendToAll(Bot,msg)
--//If User Send Nothing... Becuse Users dont have any profile
else if (curUser.iProfile == -1) then
curUser:SendData("")
--//If not in table
else
local Profile = GetProfileName(curUser.iProfile)
SendToAll(Bot,"The "..Profile.." "..curUser.sName.." has left the Hub, See you Soon.")
end
end
end

--//Ops Enters The Hub
function OpConnected(curUser)
if table[curUser.sName] then
local msg = gsub(table[curUser.sName], "%[nick%]", curUser.sName)
SendToAll(Bot,msg)
--//If not in table
else
local Profile = GetProfileName(curUser.iProfile)
SendToAll(Bot,"The "..Profile.." "..curUser.sName.." has entered the Hub, Welcome Home.")
end
end

--//Ops Leaves The Hub
function OpDisconnected(curUser)
if table2[curUser.sName] then
local msg = gsub(table2[curUser.sName], "%[nick%]", curUser.sName)
SendToAll(Bot,msg)
--//If not in table2
else
local Profile = GetProfileName(curUser.iProfile)
SendToAll(Bot,"The "..Profile.." "..curUser.sName.." has left the Hub, See you Soon.")
end
end
Title:
Post by: Madman on 26 September, 2004, 23:52:35
Made A update.. or Downgrade maybe i should call it ;p

--//Custom Log in Script Made By Madman
--//Thanks Typhoon for the help with ..Profile..
--//And Also 4 The Local msg thing
--//Version 2
--//User's Is Now Also Supported
--//Thanks To [VIP]SilentiQa That Told Me To Add It ;)
--//Bug For Users Fixed
--//Version 3
--//Removed Reg And User Support
--//Only VIP And Higher Supported
--//Disturbing With The Script Telling Me When A Reg User Logged In

Bot = "-=Destruction=-" --//Change To Whatever You Want

--//User enters the hub text
--//[nick] will be replaced with the users name..
--//["Madman"]= "The [nick] has entred", Will show
--// The Madman has entred
table = {

--//Ops
["[DN]Madman"]= "The Dragon Lord [nick] rode in on his breath of flame",
["[OP]Scruffy"]= "The looser [nick] has falled in with a hangover",
["[DN]Didde"]= "The man, The myth, The concept [nick] flies in to the hub",
["-=FakeKiller=-"]= "[nick] is a killing machine, he is always busy killing people, so don't PM him",
["Dragonmac?"]= "The Network God [nick] has come to open up the hell",
["[DN]Con"]= "The God of Destruction 2 [nick] has come down from heaven",
["[OP]FranticJ1"]= "The GuitarDevil [nick] has played in",
["(?†?)the_coffee_house_murderess"]= "The hub bitch [nick] has logged in. Obey her!",
["[OP]Bart_simpson"]= "[nick] has been activated",
["[OP]Stoffy"]= "[nick] faked his way in",
["KAMBOSS"]= "The old and wise phropecy merchant [nick] has arriveed at last",
--//Vips
["[VIP]SilentiQa"]= "The cutest girl in town [nick] has entred the hub",
--//4 Madhouse
["Madman"]= "The Dragon lord [nick] rided in on his breath of flame",
-- [""]= "[nick]",
}

--//User Disconnect Text
table2 = {

--//Ops
["[DN]Madman"]= "[nick] burns down some fakers on his way out",
["[OP]Scruffy"]= "[nick] has *gone*",
["[DN]Didde"]= "[nick] disconnects down to flames",
["-=FakeKiller=-"]= "[nick] has gone to the real world, to kill people",
["Dragonmac?"]= "The Network God [nick] has left the hub to go back to the hell",
["[DN]Con"]= "The God of Destruction [nick] has left the hub, to return to heaven",
["[OP]FranticJ1"]= "The GuitarDevil [nick] played on his last song",
["(?†?)the_coffee_house_murderess"]= "The hub bitch [nick] went out for a while",
["[OP]Bart_simpson"]= "[nick] has been deactivated",
["[OP]Stoffy"]= "[nick] has been kicked",
["KAMBOSS"]= "Now you are all alot wiser, it is time for old [nick] to leave and go spread the shit elsewhere",
--//Vips
["[VIP]SilentiQa"]= "The One And Only [nick] has left the hub",
--//4 Madhouse
["Madman"]= "[nick] burns down some fakers on his way out",
-- [""]= "[nick]",
}


--//VIPs Enter The Hub
function NewUserConnected(curUser)
if (curUser.iProfile == 2) then
if table[curUser.sName] then
local msg = gsub(table[curUser.sName], "%[nick%]", curUser.sName)
SendToAll(Bot,msg)
--//If not in table and Profile Vip
elseif (curUser.iProfile == 2) then
local Profile = GetProfileName(curUser.iProfile)
SendToAll(Bot,"The "..Profile.." User "..curUser.sName.." has entered the Hub, Welcome Home.")
end
end
end

--//VIPs Leaves The Hub
function UserDisconnected(curUser)
if (curUser.iProfile == 2) then
if table2[curUser.sName] then
local msg = gsub(table2[curUser.sName], "%[nick%]", curUser.sName)
SendToAll(Bot,msg)
--//If not in table and Profile Vip
elseif (curUser.iProfile == 2) then
local Profile = GetProfileName(curUser.iProfile)
SendToAll(Bot,"The "..Profile.." User "..curUser.sName.." has left the Hub, See you Soon.")
end
end
end

--//Ops Enters The Hub
function OpConnected(curUser)
if table[curUser.sName] then
local msg = gsub(table[curUser.sName], "%[nick%]", curUser.sName)
SendToAll(Bot,msg)
--//If not in table
else
local Profile = GetProfileName(curUser.iProfile)
SendToAll(Bot,"The "..Profile.." "..curUser.sName.." has entered the Hub, Welcome Home.")
end
end

--//Ops Leaves The Hub
function OpDisconnected(curUser)
if table2[curUser.sName] then
local msg = gsub(table2[curUser.sName], "%[nick%]", curUser.sName)
SendToAll(Bot,msg)
--//If not in table2
else
local Profile = GetProfileName(curUser.iProfile)
SendToAll(Bot,"The "..Profile.." "..curUser.sName.." has left the Hub, See you Soon.")
end
end