PtokaX forum

Archive => Archived 5.0 boards => Help with scripts => Topic started by: ?Tr??T_???? on 27 July, 2005, 22:31:41

Title: Can someone transfer this to LUA 5?
Post by: ?Tr??T_???? on 27 July, 2005, 22:31:41
Hello
i hav this script but its in lua 4 i think so plz can someone pu it in lua 5??

thanx

code:
________________________________________

--## Warn Bot
--## Pedido por M-DrEaMeR
--## Feito por nErBoS

sBot = "']['h? ?impl? N?']['w?rK"

--## Tabela com as palavras a ser avisadas ##--
arrWord = {
   "a", "e", "i", "o", "u", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0",
}

function Main()
   frmHub:RegBot(sBot)
end

function DataArrival(user, data)
   if (strsub(data,1,1) == "<" and not user.bOperator) then
      data = strsub(data,1,strlen(data)-1)
      for i=1, getn(arrWord) do
         if (strfind(data, arrWord)) then
            local s,e,talk = strfind(data, "%b<>%s+(.+)")
            SendPmToOps(sBot, "<"..user.sName.."> ("..user.sIP..") disse no Main: "..talk)
            return 0
         end
      end
   end
   if (strsub(data,1,5) == "$To: " and not user.bOperator) then
      data = strsub(data,1,strlen(data)-1)
      for i=1, getn(arrWord) do
         if (strfind(data, arrWord)) then
            local s,e,to = strfind(data, "$To:%s+(%S+)")
            local s,e,talk = strfind(data, "%b<>%s+(.+)")
            SendPmToOps(sBot, "<"..user.sName.."> ("..user.sIP..") disse em PVT ao utilizador "..to.." o seguinte: "..talk)
            return 0
         end
      end
   end
end
Title: is not good?
Post by: ?Tr??T_???? on 28 July, 2005, 14:30:59
is spy bot not good thing??
Title:
Post by: TTB on 28 July, 2005, 15:38:06
NO!!!! IT IS NOT GOOD!!

The problem is that ppl can send PMs to each other... And do you know what PM means???

-- PRIVATE MESSAGE --

So no convertion for this lame script!  X(