help modifying showtxt
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
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

help modifying showtxt

Started by RiPOFF, 24 November, 2003, 21:38:59

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

RiPOFF

How can i make it show that you have to type +help and if in a convo it wont react:
Its +help <---To something like that it wont display

--ShowInfo v1.0 by latinmusic == poweroperator 18/04/2003
--Based on TrickerBot 2 by ?Ptaczek?
--Based on a few lines of DirtyBot made by Dirty Finger
--This script read several files from a table and display them to a single user when he type the appropiate command...
--The directory --> Files <-- must exist inside of PtokaX Script Directory...
--The files --> rules.txt, net.txt, logo.txt and news.txt <-- must exist inside Files Directory...
--Enjoy

BotName = "<>"
Files = {
["-extended"] = "extra/triggers/extended.txt",
["+insanehubs"] = "extra/triggers/insanehubs.txt",
["+staff"] = "extra/triggers/staff.txt",
["+netops"] = "extra/triggers/netops.txt",
["+vips"] = "extra/triggers/vips.txt",
["+misc1"] = "triggers/extra/misc1.txt",
["+misc"] = "triggers/extra/misc.txt",
["+misc2"] = "triggers/extra/misc2.txt",
["+misc3"] = "triggers/extra/misc3.txt",
["+misc4"] = "triggers/extra/misc4.txt",
["+misc5"] = "triggers/extra/misc5.txt",
}
function Main()
end
function DataArrival(user, data)
if( strsub(data, 1, 1) == "<" ) then
s,e,msg = strfind(data, "%b<> ([ -z]*)")
for key, value in Files do
if( strfind( strlower(msg), key) ) then
txtToShow, x = gsub(value, "%b[]", user.sName)
Show(user, TheFile)
return 1
end
end
end
end
function Show(user, TheFile)
readfrom(txtToShow, "r")
local message = ""
while 1 do
local line = read()
if line == nil then break
else
message = message..line.."\r\n"
end
end
user:SendData(BotName, message)
readfrom()
return 1;
end

[ES]latinmusic

Can you post the script here as i originally made it, i mean exactly in the way i posted before long time ago, i missed a part here and i have deleted my own copy :(
And about modifiyed i don't understand what you mean, my english is not good so:
Post the script as i posted before and remake your question and explain a little more, i will see what can i do this evening to modify it :)

SMF spam blocked by CleanTalk