L* R*
HOME FORUM DOWNLOADS
Content
  Links
     Browse SVN
     SVN Commit log
     Documentation (Wiki)
  Developers
     Taskmanager
User
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 02, 2008, 11:33:53 PM

Login with username, password and session length
Search



Advanced search
Support GoPHP5.org
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Support > BeBot 0.5 support > Topic: Make a help file
Pages: [1]   Go Down
« previous next »
Print
Author Topic: Make a help file  (Read 300 times)
0 Members and 1 Guest are viewing this topic.
ZoeF
Freshman
*
Offline Offline

Posts: 3


Make a help file
« on: March 10, 2008, 11:10:02 AM »

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.
Logged
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1085


Re: Make a help file
« Reply #1 on: March 10, 2008, 11:27:28 AM »

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.
Logged
ZoeF
Freshman
*
Offline Offline

Posts: 3


Re: Make a help file
« Reply #2 on: March 10, 2008, 01:15:24 PM »

Code:
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, 01:19:13 PM by ZoeF » Logged
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1085


Re: Make a help file
« Reply #3 on: March 10, 2008, 01: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.
Logged
ZoeF
Freshman
*
Offline Offline

Posts: 3


Re: Make a help file
« Reply #4 on: March 10, 2008, 01: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, 01:34:11 PM by ZoeF » Logged
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1085


Re: Make a help file
« Reply #5 on: March 10, 2008, 01:51:44 PM »

You could try something like the following:
Code:
$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.
Logged
Temar
BeBot Developer
Grandmaster
********
Offline Offline

Gender: Male
Posts: 877



WWW
Re: Make a help file
« Reply #6 on: March 10, 2008, 02: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
Logged

MSN messenger: chris_smith96 at hotmain dot com
Xfire: chriss96
Temar
BeBot Developer
Grandmaster
********
Offline Offline

Gender: Male
Posts: 877



WWW
Re: Make a help file
« Reply #7 on: March 10, 2008, 02:29:08 PM »

also !roll is the random number roll

If there are subcommands then you are doing the help wrong
Logged

MSN messenger: chris_smith96 at hotmain dot com
Xfire: chriss96
Temar
BeBot Developer
Grandmaster
********
Offline Offline

Gender: Male
Posts: 877



WWW
Re: Make a help file
« Reply #8 on: March 10, 2008, 02:37:09 PM »

and alreadythere won't what you posted just do the same description and they will still show just 1 command
Logged

MSN messenger: chris_smith96 at hotmain dot com
Xfire: chriss96
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1085


Re: Make a help file
« Reply #9 on: March 10, 2008, 02:46:20 PM »

Quote from: Temar on March 10, 2008, 02:37:09 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.
Logged
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1085


Re: Make a help file
« Reply #10 on: March 10, 2008, 03: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, 03:19:29 PM by Alreadythere » Logged
Pages: [1]   Go Up
Print
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Support > BeBot 0.5 support > Topic: Make a help file
« previous next »
 
Jump to:  

Recent
!items database
by Zeephonz
[Today at 08:05:21 PM]

Log playtime from buddys ...
by IKShadow
[Today at 06:48:12 AM]

[request] Raid timers
by Elesar1
[December 01, 2008, 04:41:09 PM]

Shared DB online list
by Temar
[December 01, 2008, 01:55:47 AM]

relay colors
by Temar
[December 01, 2008, 01:54:56 AM]

BeBot v0.6.0 released
by Alreadythere
[November 30, 2008, 05:32:00 PM]

Change to Bid.php
by Temar
[November 30, 2008, 11:41:44 AM]

OnlineOrg
by Jiheld
[November 29, 2008, 12:44:27 PM]

Silly Newbie Question.
by Temar
[November 29, 2008, 12:00:02 PM]

massive_pvp_time_table 1
by gerborg
[November 29, 2008, 06:55:35 AM]
Stats
Members
Total Members: 1244
Latest: Armonkens
Stats
Total Posts: 11146
Total Topics: 1505
Online Today: 25
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 2
Guests: 16
Total: 18
Elesar1
Vain

Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
TinyPortal v0.9.8 © Bloc | NewDef design by Bloc
Page created in 0.585 seconds with 28 queries. (Pretty URLs adds 0.028s, 4q)
Loading...