Author Topic: Genral Script commands like hub commands  (Read 2031 times)

0 Members and 1 Guest are viewing this topic.

Offline ((UKSN))shad_dow

  • Triple Ace
  • **
  • Posts: 213
  • Karma: +2/-0
Genral Script commands like hub commands
« on: 04 February, 2004, 14:27:18 »
afternoon all .

right heres a simple Q for ya .

looked at all mutibot scripts @ the forums download site ,
 
besides the ones that are compled, i noticed that every scripter seems to code the main hub commands (do a !help on ya hubs main to see what i mean) a diffent way , anybody got a idea for were me to start as i dont realy wont to cut & paste from other scripts (not with out script owners permission first)

any advice would be most helpful  :]
creator of Therapy-X? bot

PtokaX forum

Genral Script commands like hub commands
« on: 04 February, 2004, 14:27:18 »

Offline c h i l l a

  • Lord
  • ***
  • Posts: 347
  • Karma: +1/-0
(No subject)
« Reply #1 on: 04 February, 2004, 15:09:26 »
well go to the how to's section and start your way there.
And if you need help or don't understand why things aint working like you want it to, then just post your code, okeys? ;)

Nice to see new scripters...

Offline RobinHood

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
(No subject)
« Reply #2 on: 04 February, 2004, 15:15:31 »
it's not so difficult as u think :-)

do !help in your mainchat

copy the text in 2 txt files (1 for user command and 1 for the op commands)

your commands must be scripted like this:

if (cmd=="!cmd1") then
   code cmd1
elseif (cmd=="!cmd2") then
   code cmd2
elseif (cmd=="!help") then
   if user.bOperator then
      read the ophelp.txt line by line by help-bot
   end
   read the userhelp.txt line by line by help-bot
elseif (cmd=="!cmd3") then
   code cmd3
end

now you are able to disable some commands if you want to by

elseif (cmd=="!cmd4") then
   return 1

perhaps this will help you ? ;-)

Offline NightLitch

  • Emperor
  • **
  • Posts: 1 455
  • Karma: +16/-0
(No subject)
« Reply #3 on: 04 February, 2004, 15:35:39 »
"tiny" Note: remeber - return 1 - otherwise the original help will show to. :-)

have a nice day everyone / NL
//NL

Offline plop

  • Forum God
  • ****
  • Posts: 2 464
  • Karma: +37/-0
(No subject)
« Reply #4 on: 04 February, 2004, 15:43:14 »
Quote
Originally posted by ((UKSN))shad_dow

afternoon all .

right heres a simple Q for ya .

looked at all mutibot scripts @ the forums download site ,
 
besides the ones that are compled, i noticed that every scripter seems to code the main hub commands (do a !help on ya hubs main to see what i mean) a diffent way , anybody got a idea for were me to start as i dont realy wont to cut & paste from other scripts (not with out script owners permission first)

any advice would be most helpful  :]
what happens is that they replace the ptokax help menu, so they have 2 add the ptokax commands again 2 the menu from there bot.
it's nothing more then a string showing there.

plop
« Last Edit: 04 February, 2004, 15:44:05 by 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 <----<<

Offline ((UKSN))shad_dow

  • Triple Ace
  • **
  • Posts: 213
  • Karma: +2/-0
(No subject)
« Reply #5 on: 08 February, 2004, 17:59:39 »
Hi All , cheers for all ya replies and i post code some where on here if i screw up LOL ;)

starting to code Therapy Hub Bot (might finnish in 3 years time PMFSL)

ttfn
creator of Therapy-X? bot

PtokaX forum

(No subject)
« Reply #5 on: 08 February, 2004, 17:59:39 »