PtokaX forum

Development Section => Your Developing Problems => Topic started by: ((UKSN))shad_dow on 04 February, 2004, 14:27:18

Title: Genral Script commands like hub commands
Post by: ((UKSN))shad_dow 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  :]
Title:
Post by: c h i l l a 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...
Title:
Post by: RobinHood 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 ? ;-)
Title:
Post by: NightLitch 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
Title:
Post by: plop on 04 February, 2004, 15:43:14
QuoteOriginally 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
Title:
Post by: ((UKSN))shad_dow 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