PtokaX forum

Lua 5.3/5.2/5.1 Scripts (for PtokaX 0.4.0.0 and newer) => Request for scripts => Topic started by: popescuionut on 22 October, 2011, 20:40:28

Title: RE AscIIArtBot new version for ptokax 0.4.1.1 and 0.4.1.2
Post by: popescuionut on 22 October, 2011, 20:40:28
This version AsciiArtBot I want to find her 0.4.1.1 or 0.4.1.2 for ptokax. When you kiss for example the menu command, and nick is the one who gave. I find this version of the script somewhere? I can help make it functional and 0.4.1.1 or 0.4.1.2 ptokax. ? Below is the script:


-- LUA 5
--04/03/05
--TiMeTrAVelleRs Version

Bot = "[PB]Ares"   -- your main bot here
CDFolder = "text" -- make folder in your scripts put your ascii there
SendComm = 1    -- Send user command [right click] "1"=yes "0"=no
tMenu = "-=? Comenzi funny ?=-" -- ArtBotMenu Name

SetTo = {
[0] = 1,   -- Masters
[1] = 1,   -- Operators
[2] = 1,   -- Vips
[3] = 1,   -- Regs
[4] = 1,   -- Moderator
[5] = 1,   -- NetFounder
[6] = 1,   -- Owner
[-1] = 1,  -- Users
}
--------------------------------------------------------------------------------------------------------------------

--$UserCommand 1 X  Where -> 1=Hub Menu 2=User Menu 3=Hub/User Menu
--
function NewUserConnected(user)
if SendComm == 1 and SetTo[user.iProfile] == 1 then
user:SendData("$UserCommand 1 2 "..tMenu.."\\La Revedere$<%[mynick]> +bye&#124;|")
user:SendData("$UserCommand 1 3 "..tMenu.."\\Salut$<%[mynick]> +sal&#124;|")
user:SendData("$UserCommand 1 3 "..tMenu.."\\Buna Dimineata$<%[mynick]> +bd&#124;|")
user:SendData("$UserCommand 1 3 "..tMenu.."\\Noapte Buna$<%[mynick]> +nb&#124;|")
user:SendData("$UserCommand 1 3 "..tMenu.."\\BRB$<%[mynick]> +brb&#124;|")
end
end

OpConnected = NewUserConnected

function Main()
   --frmHub:RegBot(Bot)
end

function ChatArrival(user, data)
   data=string.sub(data,1,string.len(data)-1)
   if( string.sub(data, 1, 1) == "<" ) then
      s,e,cmd = string.find(data,"%b<>%s+(%S+)")
      cmd = string.sub(cmd, 1,string.len(cmd))
      if io.open(CDFolder.."/"..cmd..".txt",r) ~= nil then
         showtext(user, cmd)
         return 1
      end
   end
end

function showtext(user, file)
local contents ="\r\n\r\n"
for line in io.lines(CDFolder.."/"..file..".txt") do
    contents = contents..line.."\r\n"
    end
SendToAll(user.sName.."\r\n"..contents.."\r\n|")
end

function showtextold(user, cmd)
local lines="\r\n\r\n"
    for line in io.lines(file) do
        lines = lines..line.."\r\n"
    end
    user:SendPM(Bot, lines.." |")
end


Please refer to Code Tags when posting script - Psycho_Chihuahua

Thank you very much!