--************************************************** ***************** --**Butler Bot V3.0 ** --** Revalation Hub release ** --** Revalation.no-ip.com:420 and princespalace.no-ip.com:460 ** --** Writen By [DM]Matt© Revalation Hub 2004© ** --** Revalation.no-ip.com:420 = [DM]Matts© Hub ** --** With THx To Plop,Hawk and nightlitch ** --** For Teaching Me Lua Codeing ** --** With Thx to [DM]DataVampire For The Name Butler Bot ** --************************************************** ***************** Bot = "Бункер™" --*******************************************-=Read THis First=-************************************************** ******** --** In this script if you add your ops into the tables they can have a custom welcome message ** --** That they can change themselfs if not the script will use a default rank for their status I.e Master and Operator ** --** as long as you follow the format of the tables the script will work fine. note Do Not change the table names !!!! ** ** --************************************************** ************************************************** ******************** enter = { ---=**This is the table where your users enter the hub when createing more tables Just Follow The Format=-** ["[DM]DataVampire"]= " Hub Co-owner DataVampire Has Enterd The Hub ", ["[DM]Matt"]= " Hub Owner [DM]Matt Has Enterd The Hub Run Fakers Run", ["[DM]Hedwig"]= "Hub Cheif Admin [DM]Hedwig Has Enterd The HUb All Bow To Her Every Needs", ["Dragonmac©"]= "The Network God Dragonmac© Has Come To Open Up The Heavens", ["[DM].UK.sparky"]= "The Hub Co-Owner [DM].UK.sparky has enterd the hub" } exit = { --**This is the Table Where The Users Leave The hub** ["[DM]DataVampire"]= "The Co-owner [DM]DataVampire Has Left The Hub Bye Now ", ["[DM]Matt"]= "Hub Owner [DM]Matt Has Left THe Hub To Go Do Something More Fun", ["[DM]Hedwig"]= "Hub Cheif Admin [DM]Hedwig Has left The Hub Goodbye", ["Dragonmac©"]= "The Network God Dragonmac© Has Left The Hub To Go Back To The Heavens", ["[DM].UK.Sparky"] = "The Hub Co-owner [DM].UK.Sparky Has Left The Hub Bye Now" } welcome = { --this is the personal greeting that ure ops will get when they enter the hub this will only be shown to them ["[DM]Kbeh273300"]= " Welcome Elvis Your Hub Awaits ", ["[DM]Matt"]= " Hello Matt Welcome To House Of Kings", ["[DM]§harlene"]= "Welcome Shar To House Of Kings Plz Enjoy Yourself", ["Dragonmac©"]= "Welcome DragonMac© How Are You Today ?" } enter = { [0] = {"Внимание надсмотрщик зашел Бункер™!!!", "Время Гестапо в Бункере™ наступило!!!",}, [1] = {"Внимание ВОЖАК зашел Бункер™!!!", "О нет!!! Еще один гестаповец появился!!!", "Стены Бункера™ содрагнуться! Будьте осторожны!!! ",} } --************************************************** *************************************** --**-------------------------------------------------------------------------------------** --***************************** Do Not Edit Bellow **************************************** --**-------------------------------------------------------------------------------------** --************************************************** *************************************** function Main() SendToAll(Bot,"Радио-Хаб Бункер™ рад видеть вас.") frmHub:RegBot(Bot) end function NewUserConnected(User) if GetProfileName(User.iProfile) == "VIP" then User:SendData(Bot,User.sName.." Ваш статус: Присяжный заседатель.") SendToAll(Bot,"Присяжный "..User.sName.." не смог обделить нас вниманием.") elseif GetProfileName(User.iProfile) == "Reg" then User:SendData(Bot,User.sName.." Ваш статус: Обыватель.") SendToAll(Bot,"Очевидец "..User.sName.." вызван на процесс.") else User:SendData(Bot,User.sName.." Ваш статус: Проходимец! Вы не имеете прав на этом хабе.") end end function UserDisconnected(User) if GetProfileName(User.iProfile) == "VIP" then SendToAll(Bot,"Присяжный заседатель "..User.sName.." в страхе убежал с судебного процесса.") end end table4 = { } function OpConnected(User) if enter[User.sName] then SendToAll(Bot, enter[User.sName] ) elseif GetProfileName(User.iProfile) == "Master" then User:SendData(Bot,User.sName.." Ваш статус: Верховный судья.") SendToAll(Bot,"Всем всать!!! Суд идет!!! "..User.sName.." командует процессом!!!") else User:SendData(Bot,User.sName.." Ваш статус: Мировой судья.") SendToAll(Bot,"Мировой судья "..User.sName.." начинает заседание!!!") end end function OpDisconnected(User) if exit[User.sName] then SendToAll(Bot, exit[User.sName]) elseif GetProfileName(User.iProfile) == "Master" then SendToAll(Bot,"Верховный судья "..User.sName.." решил прекратить затянувшуюся дискуссию!!!") else SendToAll(Bot,"Мировой судья "..User.sName.." изнывая от соблазна, решил взять пакет и удалиться.") end end function save(table, file) writeto(file) for a,b in enter do write(a.."$"..b.."\n") end writeto() end function DataArrival( User, data ) if( strsub(data, 1, 1) == "<" ) then data=strsub(data,1,strlen(data)-1) local s,e,cmd = strfind(data,"%b<>%s+(%S+)") if cmd == "!sgreeting" then s,e,args = strfind(data, "%b<>%s+%S+%s+(.+)") welcome[User.sName] = args User:SendData(Bot,"Greeting Message Set User "..User.sName.." as "..args) save(welcome, "butler/welcome.txt") elseif cmd == "!senter" then s,e,args = strfind(data, "%b<>%s+%S+%s+(.+)") enter[User.sName] = args User:SendData(Bot,"Welcome Message Set User "..User.sName.." as "..args) save(enter, "butler/enter.txt") elseif cmd == "!sexit" then s,e,args = strfind(data, "%b<>%s+%S+%s+(.+)") exit[User.sName] = args User:SendData(Bot,"Exit Message Set User "..User.sName.." as "..args) save(exit, "butler/exit.txt") elseif cmd == "!butlerhelp" then MessageHelp(User) elseif cmd == "!showexits" then local line = "\r\n\r\n" for nick, exitmsg in exit do line = line..nick.." -- "..exitmsg.."\r\n" end User:SendData(Bot,line) elseif cmd == "!showgreeting" then local line = "\r\n\r\n" for nick, grtmsg in welcome do line = line..nick.." -- "..grtmsg.."\r\n" end User:SendData(Bot,line) elseif cmd == "!showenters" then local line = "\r\n\r\n" for nick, entermsg in enter do line = line..nick.." -- "..entermsg.."\r\n" User:SendData(Bot,line) end end end end function MessageHelp(User) local handle = openfile("butler/help.txt", "r") if (handle ~= nil) then local line = read(handle) Temptimerfile = "\r\n" while line do Temptimerfile = Temptimerfile.."\r\n"..line line = read(handle) end User:SendData(Bot, Temptimerfile) closefile(handle) end end --**************************** --**Script Made By [DM]Matt©** --****************************