PtokaX forum

Archive => Archived 5.0 boards => Finished Scripts => Topic started by: ?Tr??T_???? on 21 July, 2005, 00:19:12

Title: !!!!!!!!!!!!!!!!!!!!!!
Post by: ?Tr??T_???? on 21 July, 2005, 00:19:12
Hello
Does someone knows if its posible to create commands??
like !somethinghere

Thanx in advance :)
Title:
Post by: Northwind on 21 July, 2005, 00:25:00
hmhm let's think!

allmoust every script has a command, u have to say what is the specific meaning what commands has to do.

!rules
!time
!timed message


you have to just re-search and use search button... dont spam with annoyin !!!!!! topics...

and if u want to do own command... just watch others script and learn.... like others have to do...
Title: about
Post by: ?Tr??T_???? on 21 July, 2005, 00:29:07
i want a commnd like this !about
Title:
Post by: Northwind on 21 July, 2005, 00:43:04
what is purpose of that ???? about of what ???

I RECOMMEND YOU TO USE SEARCH BUTTON!
Title: cmd
Post by: ?Tr??T_???? on 21 July, 2005, 00:46:53
open a window and then i put the text i want
Title:
Post by: Northwind on 21 July, 2005, 00:49:16
Maybe this is what u want

-- Simple TXT / file viewer by TTB

-- Requested by Pingelmonster

-- Made: 06-05-05

----------------------------------



-- ## Settings ## --



bot = "#SimpleTXT"   -- botname

path = "txt"      -- path for your txt file(s)



File1= "mytext.txt"   -- filename

cmd1 = "!mycommand"      -- command



regbot = "1"          -- Reg your bot?

PM = "1"         -- Send your message by PM or in MAIN chat? 1 = PM, 0 = Main Chat.



-- NOTE: If you choose to send by PM, your bot will be REGGED anyway (can't send PM without sender).



-- ## Don't change below! ## --



function Main()

   if regbot == "1" or PM == "1" then

      frmHub:RegBot(bot)

   end

end



function ChatArrival(curUser,data)

data = string.sub(data,1,string.len(data)-1)

s,e,cmd = string.find(data,"%b<>%s+(%S+)")

   if cmd and cmd == cmd1 then

      local sdata = LoadFile(File1)

      if PM == "1" then

         curUser:SendPM(bot,"\r\n"..sdata)

      else

         curUser:SendData(bot,"\r\n\r\n"..sdata.."\r\n")

      end

      return 1

   end

end



function LoadFile(file)

   local handle = io.open(path.."/"..file,"r")

   if handle then

      local sdata = ""

      local line = ""

      for line in handle:lines() do

         sdata = sdata..line.."\r\n"

      end

      return sdata

   else

      sdata = "File / command not available!"

      return sdata

   end

   handle:close()

end
Title: where
Post by: ?Tr??T_???? on 21 July, 2005, 00:50:28
where i put !about
Title:
Post by: Northwind on 21 July, 2005, 00:54:13
check it now again and u see, i post correct version of it
Title: sorry i am a fool
Post by: ?Tr??T_???? on 21 July, 2005, 00:56:48
thanx thanx thanx :D  :D  :D  :D  ?(  ?(  ?(  8)  8)  :]  :]  :P  :P  ;)
Title:
Post by: Northwind on 21 July, 2005, 01:00:53
np, but i still recommend you to learn how to use search button...
Title: i use
Post by: ?Tr??T_???? on 21 July, 2005, 01:02:52
i use but i didnt know what will i type in serache i tried some but not enough
Title: !
Post by: CaSaNoVa on 26 July, 2005, 01:45:45
If u want that a file txt goes by a command, new version of ptokax has that into.
Create file txt,than put it on texts and restart file txt by
!reloadtxt.

Example :

Do about.txt and put on texts.
then !reloadtxt in main chat
Do !about on main and file txt appears to you.
Title: !
Post by: ?Tr??T_???? on 26 July, 2005, 16:14:46
the old dont do it???
Title:
Post by: HillyBilly on 26 July, 2005, 16:44:25
or use an ascii bot for it

Cheers HB
Title: yuyuyuyuhu
Post by: ?Tr??T_???? on 26 July, 2005, 17:19:20
finally i understood its workin many many thanx :P  :P  :P  :D  :D  :D
Title:
Post by: NightLitch on 26 July, 2005, 17:35:07
2 thing:

1. Learn to post in the right SECTION, this is finished scripts not request scripts or help

2. Move the thread moderators...

/ NL