simple script
 

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

simple script

Started by slick, 10 July, 2005, 17:56:35

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

slick

i'm looking for a simple script that any user can type in a certain command and it will open a text file maybe one exists dunno but i couldn't find nothing

slick

ok i searched again, i'm sorry but i know absolutely nothing about scripts, so i don't know what to search for i d/l a few such as message boards chat bots and a readme one but none do the simple thing that i want done, my apoligies if i seem stupid

Dessamator

try searching the forum for.: "ptokax text support"
Ignorance is Bliss.

slick

funny thing i had what i needed all along readme 1.0 {hmm wonder who wrote it :) } just didn't clue in there had to be text in the text file, anyway it does what i want t/y except only seems that ops can excess it could you please tell me what needs to be changed so every level of user can excess it


--Readme 1.0
--by Mutor
--
Command ="+commands"
TextFile ="commands.txt"
Send2All ="no" --Show all users? "yes"/"no"
--
function DataArrival(user, data)
s,e,cmd = strfind(data,"^%b<>%s(%S+)|")
   if cmd == Command then
      if user.bOperator then
         ReadText(user)
         return 1
      end
   end
end

function ReadText(user)
readfrom(TextFile)
while 1 do
local line = read()
if line == nil then break end
if Send2All =="yes" then
SendToAll(line)
else
user:SendData(line)
end
end
readfrom()
end

slick

thank you very much i only need it to open just the one text file

SMF spam blocked by CleanTalk