PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: johny on 02 May, 2004, 19:08:17

Title: Random Welcome for Ops/Vips
Post by: johny on 02 May, 2004, 19:08:17
Hi ya great scripters
i am looking for a scrip tha shows a random welcome message on entering the hub.
i already ripped a part out of an very old script,but i could not find the part what triggers it.
ill show you the full part i got, and its placed in a folder called messonconnect.
My goal is a stand alone script to replace the part in robocop 7.0a

Plz help me out and let me know if there is one who can make it for me and mayby all other script fanaticks

thanks in advance fro Johny
Title:
Post by: nErBoS on 02 May, 2004, 19:40:02
Hi,

Try this tha i made in a portuguese forum..

--Made by nErBoS

sBot = "Welcome-Bot"

--## Want to use Welcome Msg to whic levels ?? ##--

Reg = 1
Vip = 1
Operator = 1
Master = 1

--1 actives, 0 deactives

--## Messages ##--

   --## Messages for REG ##--
   --## In Message
   regwlcin = {
         "[USER] enters runnigggg..... and falls.",
         "[USER] enters in search for slots."
   }
   --## Out Message
   regwlcout = {
         "[USER] leaves the Hub with out trail.",
         "[USER] leaves with a bag full of downloads."
   }

   --## Messages for VIP ##--
   --## In Message  
   vipwlcin = {
         "The Vip [USER] is wainting for cham...pomi.",
         "[USER] arrives in his Farrari Enzo."
   }
   --## Out Message
   vipwlcout = {
         "The Vip [USER] goes away fully drunk.",
         "[USER] levaes in his Ferrair Enzo."
   }

   --## Messages for OP ##--
   --## In Message  
   opwlcin = {
      "The OP [USER] has enter to help.",
      "[USER] enters and ask for a coffee."      
   }
   --## Out Message
   opwlcout = {
      "The OP [USER] leaves after so much help gaved.",
         "[USER] leaves with a a lot coffee in his blood."      
   }

   --## Messages for MASTER ##--
   --## In Message  
   masterwlcin = {
         "The Master [USER] has enter to rule.",
         "[USER] enters in a red carpet."      
   }
   --## Out Message
   masterwlcout = {
         "The Master [USER] leveas after some much kicks.",
         "[USER] leaves rolled in the red carpet."      
   }

function Main()
   frmHub:RegBot(sBot)
end

function NewUserConnected(user, data)
   if (user.iProfile == 3 and Reg == 1) then
      local regmsg = regwlcin[random(1, getn(regwlcin))]
      regmsg, x = gsub(regmsg, "%b[]", user.sName)
      SendToAll(sBot, regmsg)
   elseif (user.iProfile == 2 and Vip == 1) then
      local vipmsg = vipwlcin[random(1, getn(vipwlcin))]
      vipmsg, x = gsub(vipmsg, "%b[]", user.sName)
      SendToAll(sBot, vipmsg)
   elseif (user.iProfile == 0 and Master == 1) then
      local mastermsg = masterwlcin[random(1, getn(masterwlcin))]
      mastermsg, x = gsub(mastermsg, "%b[]", user.sName)
      SendToAll(sBot, mastermsg)
   elseif (user.bOperator and Operator == 1) then
      local opmsg = opwlcin[random(1, getn(opwlcin))]
      opmsg, x = gsub(opmsg, "%b[]", user.sName)
      SendToAll(sBot, opmsg)
   end
end

OpConnected = NewUserConnected

function UserDisconnected(user, data)
   if (user.iProfile == 3 and Reg == 1) then
      local regmsg = regwlcout[random(1, getn(regwlcout))]
      regmsg, x = gsub(regmsg, "%b[]", user.sName)
      SendToAll(sBot, regmsg)
   elseif (user.iProfile == 2 and Vip == 1) then
      local vipmsg = vipwlcout[random(1, getn(vipwlcout))]
      vipmsg, x = gsub(vipmsg, "%b[]", user.sName)
      SendToAll(sBot, vipmsg)
   elseif (user.iProfile == 0 and Master == 1) then
      local mastermsg = masterwlcout[random(1, getn(masterwlcout))]
      mastermsg, x = gsub(mastermsg, "%b[]", user.sName)
      SendToAll(sBot, mastermsg)
   elseif (user.bOperator and Operator == 1) then
      local opmsg = opwlcout[random(1, getn(opwlcout))]
      opmsg, x = gsub(opmsg, "%b[]", user.sName)
      SendToAll(sBot, opmsg)
   end
end

OpDisconnected = UserDisconnected

Best regards, nErBoS
Title:
Post by: ??????Hawk?????? on 02 May, 2004, 20:05:15
try this one:-

Random intro/outro by chaggydawg (http://217.120.180.188/Forum4/redirect.php?dlid=86&PHPSESSID=fb846b41b434e8747b6ee54b456ca402)
Title: Random Welcome for Ops/Vips
Post by: johny on 03 May, 2004, 11:22:39
Hi ya guy's,

Thanks a lot for your help with this lil prob'
I got the script from hawk running on my hub now, and added some of my welcom.byebye texts.

All my Ops and Vips do like these messages now,
so its a great script.

Lots and Lots of thanks from me ([fow]CCCL-NL)
Title:
Post by: Magic on 11 May, 2004, 14:31:21
QuoteOriginally posted by ??????Hawk??????
try this one:-

Random intro/outro by chaggydawg (http://217.120.180.188/Forum4/redirect.php?dlid=86&PHPSESSID=fb846b41b434e8747b6ee54b456ca402)




I placed this random intro script and it's great,
but I am having problem because I have the following code:


function NewUserConnected(curUser)
UserCommands(curUser)
end

function OpConnected(curUser)
      if GetProfileName(curUser.iProfile) == "Master" then
         MasterCommands(curUser)
      else
         OpsCommands(curUser)
      end
end




function MasterCommands(user)
   
        user:SendData("$UserCommand 1 3 Ban user(s)$<%[mynick]> !ban %[nick] %[line:Reason for ban]||")
        user:SendData("$UserCommand 1 3 User info$<%[mynick]> ?whois %[nick]||")
   user:SendData("$UserCommand 0 3 |") -- Separator
        user:SendData("$UserCommand 1 3 Pm to all$<%[mynick]> !mm %[line:Write PM to all users]||")
        user:SendData("$UserCommand 0 3 |") -- Separator
   user:SendData("$UserCommand 1 3 Gag user$<%[mynick]> !gag %[nick]||")
   user:SendData("$UserCommand 1 3 Ungag user$<%[mynick]> !ungag %[nick]||")
        user:SendData("$UserCommand 0 3 |") -- Separator
   user:SendData("$UserCommand 1 3 Pokazi vrijeme$<%[mynick]> !time||")
        user:SendData("$UserCommand 1 3 Restartaj Scripte$<%[mynick]> !restartscripts||")
        user:SendData("$UserCommand 0 3 |") -- Separator
        user:SendData("$UserCommand 1 3 Sakrij me$<%[mynick]> !hideme||")
        user:SendData("$UserCommand 1 3 Pokazi me$<%[mynick]> !unhideme||")
        user:SendData("$UserCommand 0 3 |") -- Separator
        user:SendData("$UserCommand 1 3 Vic dana$<%[mynick]> !boom||")
        user:SendData("$UserCommand 1 3 Coffee$<%[mynick]> !coffee||")
        user:SendData("$UserCommand 1 3 Cannabis$<%[mynick]> !cannabis||")            
       
           
end
function OpsCommands(user)
   user:SendData("$UserCommand 1 3 Ban user(s)$<%[mynick]> !ban %[nick] %[line:Reason for ban]||")
        user:SendData("$UserCommand 1 3 Pm to all$<%[mynick]> !mm %[line:Write PM to all users]||")
        user:SendData("$UserCommand 1 3 Informacije o useru$<%[mynick]> !info %[nick]||")
   user:SendData("$UserCommand 0 3 |") -- Separator
   user:SendData("$UserCommand 1 3 Gag user$<%[mynick]> !gag %[nick]||")
   user:SendData("$UserCommand 1 3 ungag user$<%[mynick]> !ungag %[nick]||")
   user:SendData("$UserCommand 0 3 |") -- Separator
        user:SendData("$UserCommand 1 3 Pokazi vrijeme$<%[mynick]> !time||")
        user:SendData("$UserCommand 0 3 |") -- Separator
        user:SendData("$UserCommand 1 3 Vic dana$<%[mynick]> !boom||")
        user:SendData("$UserCommand 1 3 Coffee$<%[mynick]> !coffee||")
        user:SendData("$UserCommand 1 3 Cannabis$<%[mynick]> !cannabis||")
        user:SendData("$UserCommand 0 3 |") -- Separator
        user:SendData("$UserCommand 1 3 User (regisriran?)$<%[mynick]> ?user %[nick]||")
       
end


function UserCommands(user)

   user:SendData("$UserCommand 1 3 Pokazi vrijeme na hubu$<%[mynick]> !time||")
   user:SendData("$UserCommand 1 3 Moj IP i ver.DC-a$<%[mynick]> ?me||")
        user:SendData("$UserCommand 0 3 |") -- Separator
        user:SendData("$UserCommand 1 3 Pravila$<%[mynick]> ?rules||")
        user:SendData("$UserCommand 1 3 Pomoc$<%[mynick]> !help||")
        user:SendData("$UserCommand 1 3 Operateri$<%[mynick]> ?ops||")
        user:SendData("$UserCommand 0 3 |") -- Separator
         user:SendData("$UserCommand 1 3 Registracija$<%[mynick]> !regme %[line:Unesi password]||")
        user:SendData("$UserCommand 1 3 Stavi hub u favorite$<%[mynick]> /fav||")
        end




and it is for right click options which helps me alot,
when I put the welcome random (or any other welcome stuff) right click does not work. Can somebody help me to resolve this problem. I really can not live without my
right click options, but I need a welcome too.
This random one is faboulas, I love it.

Thanks for help guys...

Magic