ASCII Art Text Help
 

News:

11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

ASCII Art Text Help

Started by Ninjutsu, 28 December, 2008, 19:34:45

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ninjutsu

Hello!
I'm reading the forum for a while, and I found some interesting scripts here.

I have a request. I know this help for the lua 5.1 is closed (I'm still using PtokaX v0.3.6), but I got this script: ASCII Art Bot (TiMeTrAVelleRs Version) and is working well, but I need an extra feature in it: when I call the ASCII file (whatever command it is, ex: +beer), I want to be able to offer this beer to somebody ( ex: +beer Ninjutsu). I've got another great script, called FunScript v8 (by Madman) that has this function, and I tried to get the code from that script but with no results... I saw there (in FunScript) that the ASCII file has some text in it, ex: [curuser] gives [vic] some Acid enjoy!!!, where these are replaced with the nick of the person who call the command and the other with de victim's nick.
Can anyone make these command in the ASCII Art Bot?

Many thanks in advance!

Here's the script:
-- LUA 5 
--04/03/05
--TiMeTrAVelleRs Version

Bot = frmHub:GetHubBotName()   -- 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 = "Rafal Works Hub\\? Desen ASCII" -- ArtBotMenu Name

SetTo = {
 [0] = 1,   -- Masters
 [1] = 1,   -- Operators
 [2] = 1,   -- Vips
 [3] = 1,   -- Regs
 [4] = 1,   -- Moderator
 [5] = 1,   -- NetFounder
 [-1] =0,   -- 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 3 "..tMenu.."\\Ursulet$<%[mynick]> +bear&#124;|")
		user:SendData("$UserCommand 1 3 "..tMenu.."\\Bere$<%[mynick]> +beer&#124;|")
		user:SendData("$UserCommand 1 3 "..tMenu.."\\Posta$<%[mynick]> +bike&#124;|")
		user:SendData("$UserCommand 1 3 "..tMenu.."\\Revin$<%[mynick]> +brb&#124;|")
		user:SendData("$UserCommand 1 3 "..tMenu.."\\Sunt ocupat$<%[mynick]> +busy&#124;|")
		user:SendData("$UserCommand 1 3 "..tMenu.."\\La revedere$<%[mynick]> +bye&#124;|")
		user:SendData("$UserCommand 1 3 "..tMenu.."\\La multi ani$<%[mynick]> +cake&#124;|")
		user:SendData("$UserCommand 1 3 "..tMenu.."\\Clovn$<%[mynick]> +clown&#124;|")
		user:SendData("$UserCommand 1 3 "..tMenu.."\\Dragon$<%[mynick]> +dragon&#124;|")
		user:SendData("$UserCommand 1 3 "..tMenu.."\\Vise placute$<%[mynick]> +dream&#124;|")
		user:SendData("$UserCommand 1 3 "..tMenu.."\\Paste fericit$<%[mynick]> +easter&#124;|")
		user:SendData("$UserCommand 1 3 "..tMenu.."\\Fara fake$<%[mynick]> +fake&#124;|")
		user:SendData("$UserCommand 1 3 "..tMenu.."\\MotherFaker$<%[mynick]> +faker&#124;|")
		user:SendData("$UserCommand 1 3 "..tMenu.."\\Gaze$<%[mynick]> +fart&#124;|")
		user:SendData("$UserCommand 1 3 "..tMenu.."\\Nu sunt aici$<%[mynick]> +gone&#124;|")
		user:SendData("$UserCommand 1 3 "..tMenu.."\\Sunt fericit$<%[mynick]> +happy&#124;|")
		user:SendData("$UserCommand 1 3 "..tMenu.."\\Vultur$<%[mynick]> +hawk&#124;|")
		user:SendData("$UserCommand 1 3 "..tMenu.."\\Inima mea$<%[mynick]> +heart&#124;|")
		user:SendData("$UserCommand 1 3 "..tMenu.."\\Salut$<%[mynick]> +hello&#124;|")
		user:SendData("$UserCommand 1 3 "..tMenu.."\\Imbratisare$<%[mynick]> +hug&#124;|")
		user:SendData("$UserCommand 1 3 "..tMenu.."\\Ma grabesc$<%[mynick]> +hurry&#124;|")
		user:SendData("$UserCommand 1 3 "..tMenu.."\\Te sarut$<%[mynick]> +kiss&#124;|")
		user:SendData("$UserCommand 1 3 "..tMenu.."\\LOL$<%[mynick]> +lol&#124;|")
		user:SendData("$UserCommand 1 3 "..tMenu.."\\Te iubesc$<%[mynick]> +luv&#124;|")
		user:SendData("$UserCommand 1 3 "..tMenu.."\\Buna dimineata$<%[mynick]> +morning&#124;|")
		user:SendData("$UserCommand 1 3 "..tMenu.."\\Noapte buna$<%[mynick]> +night&#124;|")
		user:SendData("$UserCommand 1 3 "..tMenu.."\\Iepuras$<%[mynick]> +rabbit&#124;|")
		user:SendData("$UserCommand 1 3 "..tMenu.."\\Repornesc PC$<%[mynick]> +reboot&#124;|")
		user:SendData("$UserCommand 1 3 "..tMenu.."\\Trandafir$<%[mynick]> +rose&#124;|")
		user:SendData("$UserCommand 1 3 "..tMenu.."\\Zambet$<%[mynick]> +smile&#124;|")
		user:SendData("$UserCommand 1 3 "..tMenu.."\\Sarpe$<%[mynick]> +snake&#124;|")
		user:SendData("$UserCommand 1 3 "..tMenu.."\\Fara spam$<%[mynick]> +spam&#124;|")
		user:SendData("$UserCommand 1 3 "..tMenu.."\\Toast$<%[mynick]> +toast&#124;|")
		user:SendData("$UserCommand 1 3 "..tMenu.."\\Internet$<%[mynick]> +web&#124;|")
		user:SendData("$UserCommand 1 3 "..tMenu.."\\Bine ati venit$<%[mynick]> +welcome&#124;|")
		user:SendData("$UserCommand 1 3 "..tMenu.."\\Sarbatori Fericit$<%[mynick]> +xmas&#124;|")
		user:SendData("$UserCommand 1 3 "..tMenu.."\\Craciun Fericit$<%[mynick]> +xtree&#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.." "..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



And there is the ASCII beer example:



            !!!!!!!!!
             !!!!!!!
             !!!!!!!
             !!!!!!!
            !!!!!!!!!         This beer is from [curuser] to [vic]!!!
           !!!!!!!!!!!
          !!!!!!!!!!!!!
         !!!!!!!!!!!!!!!
        !!!!!!!!!!!!!!!!!                _______
        !               !               !              !
        !               !               !              !
        !               !               !!!!!!!!!!!!!!!! 
        !               !               !!!!!!!!!!!!!!!!
        !!!!!!!!!!!!!!!!!               !!!!!!!!!!!!!!!!
        !!!!!!!!!!!!!!!!!               !!!!!!!!!!!!!!!!
        !!!!!!!!!!!!!!!!!               !!!!!!!!!!!!!!!!
        !!!!!!!!!!!!!!!!!               !!!!!!!!!!!!!!!!   
        !!!!!!!!!!!!!!!!!               !!!!!!!!!!!!!!!!

Our greatest glory is not in never failing, but in rising each time we fall.


Ninjutsu

Thank you Mutor for your fast answer and help!
It is working very well, and I'm satisfied 100% with the result.

Great job!!! And many thanks!!!

Respect!
Our greatest glory is not in never failing, but in rising each time we fall.


SMF spam blocked by CleanTalk