i was wondering if someone could modify this intro script so that users can add there own intro's and outro's will a command.
-- Random-In-Outro
-- just to let new scripters see, how it is done.
BOTName = "-=TheBoss=-"
Version = "Random-In-Outro 0.1"
BotInfo = "$MyINFO $ALL "..BOTName.." <++V:0.1 Random-In-Outro,?+?:Troubadour> $ $Metal speed"..string.char(1).."$Random-In-Outro@dhq-eurotopia.no-ip.com$"
sHubName = frmHub:GetHubName()
function Main()
frmHub:RegBot(BOTName)
end
function OpConnected(user)
SendToAll( RandomEntryMsg(user))
end
function OpDisconnected(user)
SendToAll( RandomExitMsg(user))
end
function NewUserConnected(user)
if user.iProfile == 2 then
SendToAll(BOTName, RandomVIPMsgConnect(user))
elseif user.iProfile == nil then
user:SendPM(user.sName,BOTName.."Welcome to the "..sHubName.."" )
end
end
function UserDisconnected(user)
if user.iProfile == 2 then
SendToAll( RandomVIPMsgExit(user))
end
end
function RandomEntryMsg(user)
local randomSeed = math.random(11)
if randomSeed == 1 then
return user.sName.." has entered the hub. Please behave cause he is always ready to kick some ....!"
elseif randomSeed == 2 then
return user.sName.." has entered the hub. Let's all cheer for him for 5 minutes!"
elseif randomSeed == 3 then
return user.sName.." has entered the spotlights."
elseif randomSeed == 4 then
return "\r\n\r\n \\ ~ ~ //\r\n ( 0-0 )\r\n----oOO-------(_)--------------------------\r\nI "..user.sName.." I\r\n I Is peeking at you I\r\n-------------------oOO----------------------\r\n I__I__I\r\n I I I I\r\n nooO Ooo"
elseif randomSeed == 5 then
return "Looking around in the doorway "..user.sName.." greetz all users with 'Wassup kids.'"
elseif randomSeed == 6 then
return "Please give him a big welcome! "..user.sName.." has entered the hub.!"
elseif randomSeed == 7 then
return "Here is "..user.sName..". Now there's somebody who knows all!!!"
elseif randomSeed == 8 then
return user.sName..". Arrives Yelling And Screaming Like A Maniac."
elseif randomSeed == 9 then
return user.sName..". Arrives Ranting And Raving About Aliens Or Some Such Rot."
elseif randomSeed == 10 then
return user.sName..". Runs Around The Hub Screaming And Then Leaps Out The Window."
elseif randomSeed == 11 then
return "With A Crazed Look In Their Eyes "..user.sName..". Arrives."
end
end
function RandomVIPMsgConnect(user)
local randomSeed = math.random(4)
if randomSeed == 1 then
return user.sName.." rocks the hub with his presence."
elseif randomSeed == 2 then
return "Walking down the stairs "..user.sName.." enters the hub!"
elseif randomSeed == 3 then
return user.sName.." is about to get the party started ..."
elseif randomSeed == 4 then
return user.sName.." is happy to be a member of this cool hub!"
end
end
function RandomExitMsg(user)
local randomSeed = math.random(7)
if randomSeed == 1 then
return user.sName.." snaps his fingers and disappears like david copperfield ..."
elseif randomSeed == 2 then
return user.sName.." is gone for a ride on the storm ..."
elseif randomSeed == 3 then
return user.sName.." took there board and rides the waves now ..."
elseif randomSeed == 4 then
return user.sName.." has left the hub and is now howling to the moon!'"
elseif randomSeed == 5 then
return "'oh mama!', says "..user.sName.." and suddenly disappears out off sight ..."
elseif randomSeed == 6 then
return user.sName.." does a elvis presley imitation and has left the building!'"
elseif randomSeed == 7 then
return user.sName.." has left the hub, and is taking there absurdly huge share with him."
end
end
function RandomVIPMsgExit(user)
local randomSeed = math.random(4)
if randomSeed == 1 then
return user.sName..", has left the hub and took all his available sluts........eh slots with him!"
elseif randomSeed == 2 then
return "Riding his harley, "..user.sName.." is now riding the freeway."
elseif randomSeed == 3 then
return user.sName.." has left the hub, and he's gonna be stinking drunk when he comes back."
elseif randomSeed == 4 then
return user.sName.." Guess i could'nt stay byeeee of then."
end
end
it already exists search the forum !
ok there are loads of intro outro posts but cant seem to find one with the added bit im after. if you no the link pls post
-- Loginmsg v2.1 with on/off trigs (removed timer,added myinfoarrival)
-- By Dessamator
-- Custom Login by Typhoon™
-- Lua 5 ....
-- [URL]http://Piratez.dk[/URL]
-- Real Quick old Rip from old Sentinel™ version..
-- Commands are
-- !newlogin - This changes the default login :)
-- !newlogout - This changes the default logout message :)
-- your nick is auto inserted in the midle of the text
-- Added right clickcommands with profiles by Cenobyte
-- Added Set To Profile by TT
SetTo = {
[0] = 1, -- Masters
[1] = 1, -- Operators
[2] = 1, -- Vips
[3] = 0, -- Regs
[4] = 1, -- Moderator
[5] = 1, -- NetFounder
[-1] = 0, -- Users
}
tConnect ={}
vMenu = "-=( Login/Logout )=-" -- Rightclick menu name
BotName = "-???j?-" -- Own botname
fConnect="onconnect.dat"
sLogins = "Loginout.txt"
SendComm = 1 -- Send user command [right click] "1"=yes "0"=no
Announce = { LogInTable = {} , LogoutTable = {}, }
function Main()
LoadFromFile(sLogins)
LoadFromFile(fConnect)
frmHub:RegBot(BotName)
end
function NewUserConnected(user)
if SendComm == 1 and SetTo[user.iProfile] == 1 then
user:SendData("$UserCommand 1 3 "..vMenu.."\\Change your login msg$<%[mynick]> !newlogin %[line:Start Message] : %[line:End Message]|")
user:SendData("$UserCommand 1 3 "..vMenu.."\\Turn your login on$<%[mynick]> !msgon|")
user:SendData("$UserCommand 1 3 "..vMenu.."\\Change your logout msg$<%[mynick]> !newlogout %[line:Start Message] : %[line:End Message]|")
user:SendData("$UserCommand 1 3 "..vMenu.."\\Turn your login off$<%[mynick]> !msgoff|")
if Announce.LogInTable[user.sName] and tConnect[user.sName] then
msg = Announce.LogInTable[user.sName]
end
end
end
function MyINFOArrival(user,data)
if msg then
SendToAll(BotName,msg)
msg=nil
end
end
OpConnected = NewUserConnected
function ChatArrival(user, data)
data=string.sub(data,1,string.len(data)-1)
local s,e,cmd = string.find( data, "%b<>%s+(%S*)")
if user.bRegistered then
doGetProfile = GetProfileName(user.iProfile)
else
doGetProfile = "User"
end
if (cmd == "!newlogin") then
ChangeLogin(user,data)
return 1
elseif cmd == ("!newlogout") then
ChangeLogout(user,data)
return 1
elseif (cmd=="!msgoff") then
tConnect[user.sName] =nil
user:SendData(BotName,"Done, your connection to the hub will no longer be announced!!")
return 1
elseif (cmd=="!msgon") then
tConnect[user.sName] =1
user:SendData(BotName,"Done, your connection to the hub be announced!!")
return 1
end
end
ToArrival=ChatArrival
ChangeLogin = function(user,data)
local s,e,cmd,message,message2 = string.find( data, "%b<>%s+(%S+)%s+(.*)%s:%s(.*)" )
if message == nil or message2 == nil then
Announce.LogInTable[user.sName] = " "..doGetProfile.." "..user.sName.." Has entered the hub"
user:SendData(BotName,"Standard Login Enabled: "..doGetProfile.." "..user.sName.." Has entered the hub ")
user:SendData(BotName,"If you want to change it then use this : !newlogin message1 : message2")
else
Announce.LogInTable[user.sName] = ""..message.." "..user.sName.." "..message2
user:SendData(BotName,"Login Changed to: "..message.." "..user.sName.." "..message2)
end
user:SendData(BotName,temp)
end
ChangeLogout = function(user,data)
local s,e,cmd,message,message2 = string.find( data, "%b<>%s+(%S+)%s+(.*)%s:%s(.*)" )
if message == nil and message2 == nil then
Announce.LogoutTable[user.sName] = " "..doGetProfile.." "..user.sName.." Has left the hub"
user:SendData(BotName,"Standard Logout Enabled: "..doGetProfile.." "..user.sName.." Has left the hub ")
user:SendData(BotName,"If you want to change it then use this : !newlogout message1 : message2")
else
Announce.LogoutTable[user.sName] = " "..message.." "..user.sName.." "..message2
user:SendData(BotName,"Logout Changed to: "..message.." "..user.sName.." "..message2)
end
user:SendData(BotName,temp)
end
-- Serialize --
Save_Serialize = function(tTable, sTableName, hFile, sTab)
sTab = sTab or "";
hFile:write(sTab..sTableName.." = {\n" );
for key, value in tTable do
local sKey = (type(key) == "string") and string.format("[%q]",key) or string.format("[%d]",key);
if(type(value) == "table") then
Save_Serialize(value, sKey, hFile, sTab.."\t");
else
local sValue = (type(value) == "string") and string.format("%q",value) or tostring(value);
hFile:write( sTab.."\t"..sKey.." = "..sValue);
end
hFile:write( ",\n");
end
hFile:write( sTab.."}");
end
Save_File = function(file,table , tablename )
local hFile = io.open (file , "w")
Save_Serialize(table, tablename, hFile);
hFile:close()
end
function LoadFromFile(file)
local handle = io.open(file,"r")
if (handle ~= nil) then
dofile(file)
handle:flush()
handle:close()
end
end
function OnExit()
Save_File(sLogins,Announce, "Announce")
Save_File(fConnect,tConnect , "tConnect")
end