crazy script functionality
 

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

crazy script functionality

Started by LiqUiD~TrolL, 14 November, 2004, 17:17:42

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

LiqUiD~TrolL

well hello everybody

well i have a good question for all the scripters arround
some ppl told me to use PLOPS script to show some txt i want in my hub
and the problem IS  :

i m useing the script,it s working fine but there is a problem, the perfixes in the script are ( + )  and the script it is working with(  !  )  ehehhe what the hell is going on??

but i have + not !  


and here is the script my firends  :

-- texter bot by plop
-- modified 2 show only 6 files,
-- thx 2 chilla for the faster routine for opening the files
-- shows text files from a folder named text.


Bot = "something"

FDFolder = "text"

cmd1 = "+ophelp"
file1 = "ophelp.txt"

cmd2 = "+ad"
file2 = "ad.txt"

cmd3 = "+help"
file3 = "help.txt"

cmd4 = "+masterhelp"
file4 = "masterhelp.txt"

cmd5 = "+viphelp"
file5 = "viphelp.txt"

cmd6 = "+hubinfo"
file6 = "hubinfo.txt"


function Main()
   frmHub:RegBot(Bot)
end

function DataArrival(user, data)
   data=strsub(data,1,strlen(data)-1)
   if( strsub(data, 1, 1) == "<" ) then
      s,e,cmd = strfind(data,"%b<>%s+(%S+)")
      if cmd == cmd2 then
         showtext(user, file2)
         return 1
      elseif cmd == cmd1 and user.iProfile ==1 then
         showtext(user, file1)
         return 1
      elseif cmd == cmd3 and (user.iProfile ==3 or user.iProfile ==-1) then
         showtext(user, file3)
         return 1
      elseif cmd == cmd4 and user.iProfile ==0 then
         showtext(user, file4)
         return 1
      elseif cmd == cmd5 and user.iProfile ==2 then
         showtext(user, file5)
         return 1
      elseif cmd == cmd6 and user.iProfile ==0 then
         showtextmain(user, file6)
         return 1
      end
   elseif(strsub(data, 1, 4) == "$To:") then
      s,e,cmd = strfind(data,"$To:%s+%S+%s+From:%s+%S+%s+$%b<>%s+%S(%w+)")
      if cmd == cmd2 then
         showtext(user, file2)
         return 1
      elseif cmd == cmd1 and user.iProfile ==1 then
         showtext(user, file1)
         return 1
      elseif cmd == cmd3 and (user.iProfile ==3 or user.iProfile ==-1) then
         showtext(user, file3)
         return 1
      elseif cmd == cmd4 and user.iProfile ==0 then
         showtext(user, file4)
         return 1
      elseif cmd == cmd5 and user.iProfile ==2 then
         showtext(user, file5)
         return 1
      elseif cmd == cmd6 and user.iProfile ==0 then
         showtextmain(user, file6)
         return 1
      end
   end
end

function showtext(user, file)
local handle = openfile(FDFolder.."/"..file..".txt", "r")
local contents = gsub(read(handle, "*a"),strchar(10), "\r\n")
closefile (handle)
user:SendPM(Bot, "\r\n"..contents.."\r\n|")
end

function showtextmain(user, file)
local handle = openfile(FDFolder.."/"..file..".txt", "r")
local contents = gsub(read(handle, "*a"),strchar(10), "\r\n")

closefile (handle)
SendToAll(Bot, "\r\n"..contents.."\r\n|")
end



does anybody have clue about this functionality???

 :rolleyes:
________<>________


            -=@_ psydream-land.no-ip.org _@=-


             
http://www.psychedelicdreams.bravehost.com

plop

your mistaking here.
version 2 is the only 1 which takes only 1 prefix type, on all the others it doesn't mather.
it's a sneaky trick 2 make it easyer for the users.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

LiqUiD~TrolL

hello plop

thank you very much for your really nice script

my point is that in the script all the perfixes are +
why are they working with !???
it s a big question i have

and exept of that in my hub i like more use + and i would like to change this stupid !


and something more
can i fix it to send the txt in PM????
________<>________


            -=@_ psydream-land.no-ip.org _@=-


             
http://www.psychedelicdreams.bravehost.com

bastya_elvtars

Everything could have been anything else and it would have just as much meaning.

LiqUiD~TrolL

well my friend i founnd it and i fix it good now i m useing a script with 6txts and it s wroking just great
thnaks for your help ppl
________<>________


            -=@_ psydream-land.no-ip.org _@=-


             
http://www.psychedelicdreams.bravehost.com

SMF spam blocked by CleanTalk