collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18363
  • stats Total Topics: 2500
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: Make a help file  (Read 2454 times)

0 Members and 1 Guest are viewing this topic.

Offline ZoeF

  • BeBot Rookie
  • *
  • Posts: 4
  • Karma: +0/-0
Make a help file
« on: March 10, 2008, 05:10:02 pm »
Hello everyone, i trold the forums alot but couldn't find any feedback on how 2 make a help file. I recently downloaded the loot module and puted it in the module folder. But whe i do !help loot in the bot it doesn't give me any info on the module itself. So i started to look around on how to make one. But i couldn't find any info.

Anyone who can give me some feedback on where to start searching or how 2 make one ?

Tnx in advance.

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Make a help file
« Reply #1 on: March 10, 2008, 05:27:28 pm »
Maybe the wiki entry will help you. The current bebot versions don't use help files anymore, they got their help inside the module classes.

Offline ZoeF

  • BeBot Rookie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: Make a help file
« Reply #2 on: March 10, 2008, 07:15:24 pm »
Code: [Select]
function Rolls (&$bot) {
$this -> bot = &$bot;
$this -> mode = "single";

//Sed default access control levels
$this -> bot -> accesscontrol -> create('tell', 'loot', 'GUEST');
$this -> bot -> accesscontrol -> create('gc', 'loot', 'GUEST');
$this -> bot -> accesscontrol -> create('pgmsg', 'loot', 'GUEST');

$this -> help['description'] = "Plugin to make a loot roll.";
$this -> help['command']['loot <item>'] = "Add item to the loot list.";
$this -> help['command']['list'] = "Makes a list of items curently rold.";
$this -> help['command']['clear'] = "Clear all items in the list.";
$this -> help['command']['add <number>'] = "Add <number> to choose what you want to win.";
$this -> help['command']['roll'] = "Roll all the items curently in the list.";
$this -> help['notes'] = "No notes.";
        }

Ok so i got it halfly to work. The strange thing is that it only shows the "first ( loot <item> )" command and the notes. What did i do wrong ? Even if i change the order of commands it stil only shows the loot <item>. And when we // the loot command it only shows the description of the list command and the notes.
« Last Edit: March 10, 2008, 07:19:13 pm by ZoeF »

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Make a help file
« Reply #3 on: March 10, 2008, 07:22:58 pm »
If you do !help loot you only get the help entry for loot, same for the other commands. If you do !help you'll see that all commands are at least listed.
There is no !help module command.

Offline ZoeF

  • BeBot Rookie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: Make a help file
« Reply #4 on: March 10, 2008, 07:30:43 pm »
So i can't add the other function for that specific module in this file ? If so is there a way 2 add those things in the helpfile ?
« Last Edit: March 10, 2008, 07:34:11 pm by ZoeF »

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Make a help file
« Reply #5 on: March 10, 2008, 07:51:44 pm »
You could try something like the following:
Code: [Select]
$this -> help['description'] = "Plugin to make a loot roll.";
$this -> help['command']['loot'] = "Put a long explanation about the working and all the commands of this module here.";
$this -> help['command']['list'] = $this -> help['command']['loot'];
$this -> help['command']['clear'] = $this -> help['command']['loot'];
$this -> help['command']['add'] = $this -> help['command']['loot'];
$this -> help['command']['roll'] = $this -> help['command']['loot'];
That way you would get always the same text, and could list all commands inside one help text. This is a crude hack though, I'll try to add a way to list all commands of a single module, and show all their help texts in one blob.

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: Make a help file
« Reply #6 on: March 10, 2008, 08:26:09 pm »
wouldn't changeing the module to use subcommands be better? (assuming it doesn't looking at the help) eg !add is more of a general command not loot module . If you know what i mean

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: Make a help file
« Reply #7 on: March 10, 2008, 08:29:08 pm »
also !roll is the random number roll

If there are subcommands then you are doing the help wrong

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: Make a help file
« Reply #8 on: March 10, 2008, 08:37:09 pm »
and alreadythere won't what you posted just do the same description and they will still show just 1 command

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Make a help file
« Reply #9 on: March 10, 2008, 08:46:20 pm »
and alreadythere won't what you posted just do the same description and they will still show just 1 command
Yes, it's an ugly hack. But I think it's currently the only way to accomplish what ZoeF wants.

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Make a help file
« Reply #10 on: March 10, 2008, 09:17:41 pm »
I've added listing of all commands of a module to the help blobs.

Download the most current version of BotHelp for your bot version:
BeBot 0.4, save as core/BotHelp.php
BeBot 0.5 (aka trunk version), save as main/05_BotHelp.php
« Last Edit: March 10, 2008, 09:19:29 pm by Alreadythere »

 

* Recent Posts
[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm]


0.8.x updates for AoC by bitnykk
[January 30, 2024, 11:16:08 pm]


0.8.x updates for AO by bitnykk
[January 30, 2024, 11:15:37 pm]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am]


Bebot and Rasberry by bitnykk
[November 29, 2023, 11:04:14 pm]

* Who's Online
  • Dot Guests: 730
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal