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 01, 2008, 12:14:14 PM

Login with username, password and session length
Search



Advanced search
Support GoPHP5.org
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Development > Feedback and Suggestions > Topic: Few suggestions
Pages: [1]   Go Down
« previous next »
Print
Author Topic: Few suggestions  (Read 501 times)
0 Members and 1 Guest are viewing this topic.
Hotshot
Rookie
**
Offline Offline

Posts: 21


Few suggestions
« on: September 05, 2006, 06:37:07 AM »

Here is 2 of things i'd like to see put onto the bot.

!members (give list of members)
afk or brb (bot recognises these words and post little script "name" is afk)
Logged
jjones666
BeBot Contributor
Champion
*******
Offline Offline

Posts: 353


Re: Few suggestions
« Reply #1 on: September 05, 2006, 10:24:35 AM »

Both implemented already.

search for !memberlist (by Wolfbiter) and !afk (by Craized).  suggest to download v1.1 of !afk which is superior to the one distributed with Bebot (last time I looked).  This will add an "AFK" next to the !online list.

Cheers,

-jj-
Logged
Wolfbiter
BeBot Contributor
Apprentice
*******
Offline Offline

Posts: 141



WWW
Re: Few suggestions
« Reply #2 on: September 06, 2006, 02:35:54 AM »

I can't promise my script will work with latest bebot, was a while since I wrote it and have no idea what possible database changes may have happend since.
Logged

220 Doctor | 220 Adventurer | 220 Shade
jjones666
BeBot Contributor
Champion
*******
Offline Offline

Posts: 353


Re: Few suggestions
« Reply #3 on: September 06, 2006, 06:07:42 AM »

I'll convert that one myself once I update to Bebot 0.3, it's bloody useful :-)

-jj-
Logged
Khalem
BeBot Founder
Administrator
Grandmaster
********
Offline Offline

Gender: Male
Posts: 670



WWW
Re: Few suggestions
« Reply #4 on: September 06, 2006, 07:13:51 AM »

Members list is planned for 0.3/0.5

Im not entirely happy with the AFK module for BeBot, and i actually find myself missing the AFK functionality from IGN. I don't know when i will find time to do something about it though.
Logged

BeBot Founder and Fixer Kingpin
Madman coder and destroyer of good code
Malosar
Expert
*****
Offline Offline

Posts: 259


WWW
Re: Few suggestions
« Reply #5 on: September 06, 2006, 07:18:48 AM »

Quote from: Khalem on September 06, 2006, 07:13:51 AM
Members list is planned for 0.3/0.5

Im not entirely happy with the AFK module for BeBot, and i actually find myself missing the AFK functionality from IGN. I don't know when i will find time to do something about it though.

From what I remember, mentioning someones name in chat that was afk spawned an afk message from the bot, which is what I miss. Is that what you mean? Not sure what else it did.
Logged

Eternalist
General of The Syndicate
Khalem
BeBot Founder
Administrator
Grandmaster
********
Offline Offline

Gender: Male
Posts: 670



WWW
Re: Few suggestions
« Reply #6 on: September 06, 2006, 07:20:31 AM »

Yes, it's one of the things i miss.
Another thing was also that you didn't need to use a command prefix for the afk commands to be picked up.
Logged

BeBot Founder and Fixer Kingpin
Madman coder and destroyer of good code
Malosar
Expert
*****
Offline Offline

Posts: 259


WWW
Re: Few suggestions
« Reply #7 on: September 06, 2006, 07:33:12 AM »

The AFK module I run doesn't require a command prefix, it will do it with or without.

Code:
        function gmsg($name, $group, $msg) {
                if($name != ucfirst($this -> bot -> botname)) {
                        if(preg_match('/^'.$this -> bot -> commpre.'afk show$/i', $msg)) $c = $this -> list_afk();
                        elseif(preg_match('/^afk ?(.*)/i', $msg, $afkmsg)) $c = $this -> gone($name, $afkmsg[1]);
                        elseif(isset($this -> afk[$name])) $c = $this -> back($name);
                        $c != '' ? $this -> bot -> send_gc($c) : NULL;
                }
        }
Logged

Eternalist
General of The Syndicate
Malosar
Expert
*****
Offline Offline

Posts: 259


WWW
Re: Few suggestions
« Reply #8 on: September 07, 2006, 07:32:13 AM »

The section I posted was just the gmsg section of the AFK module showing it listening for afk without a "!".

Here is the entire module:

Code:
<?php
/*
* AFK Module for BE Bot <http://bebot.fieses.net>
* Module coded by Craized <http://www.craized.net>
* v1.01
* Special thanks to Lal for bug fixes, styles, and development

/*
Add a '_' at the beginning of the file (_AFK.php) if you do not want it to be loaded.
*/

$afk = new AFK($bot);

$commands['tell']['afk'] = &$afk;
$commands['privgroup'][] = &$afk;
$commands['gmsg'][$guild_name][] = &$afk;
$commands["buddy"][] = &$afk;

Class 
AFK {
        var 
$bot;
        var 
$afk;

        function 
AFK(&$bot) {
                
$this -> bot = &$bot;
                
$this -> afk = array();
                
$this -> bot -> db -> query('INSERT IGNORE INTO settings (setting, value) VALUES ("highlight_1", "CB11C9")');
                
$this -> highlight_1 = !method_exists($this -> bot, get_setting) ? '<font color=#CB11C9>' : '<font color=#'.$this -> bot -> get_setting('highlight_1').'>';
        }

function 
buddy($name, $msg)     {
  if(
$msg != 1)
    if(
$this -> afk[$name]) unset($this -> afk[$name]);
}
        
        function 
tell($name, $msg) {
                if(
preg_match('/^'.$this -> bot -> commpre.'afk ?(.*)/i', $msg, $afkmsg)) $c = $this -> gone($name, $afkmsg[1]);
                if(
preg_match('/^'.$this -> bot -> commpre.'afk show$/i', $msg)) $c = $this -> list_afk();
                
$c != '' ? $this -> bot -> send_gc($c) : NULL;
        }

        function 
privgroup($name, $msg) {
                if(
$name != ucfirst($this -> bot -> botname)) {
                        if(
preg_match('/^'.$this -> bot -> commpre.'afk show$/i', $msg)) $c = $this -> list_afk();
                        elseif(
preg_match('/^afk ?(.*)/i', $msg, $afkmsg)) $c = $this -> gone($name, $afkmsg[1]);
                        elseif(isset(
$this -> afk[$name])) $c = $this -> back($name);
                        
$c != '' ? $this -> bot -> send_pgroup($c) : NULL;
                }
        }

        function 
gmsg($name, $group, $msg) {
                if(
$name != ucfirst($this -> bot -> botname)) {
                        if(
preg_match('/^'.$this -> bot -> commpre.'afk show$/i', $msg)) $c = $this -> list_afk();
                        elseif(
preg_match('/^afk ?(.*)/i', $msg, $afkmsg)) $c = $this -> gone($name, $afkmsg[1]);
                        elseif(isset(
$this -> afk[$name])) $c = $this -> back($name);
                        
$c != '' ? $this -> bot -> send_gc($c) : NULL;
                }
        }

        function 
gone($name, $msg) {
                
$this -> afk[$name] = empty($msg) ? 'Away from keyboard' : $msg;
                
$c = $this -> highlight_1.$name.'</font> is now AFK.';
                return 
$c;
        }

        function 
back($name) {
                if(isset(
$this -> afk[$name])) {
                        unset(
$this -> afk[$name]);
                        
$c = $this -> highlight_1.$name.'</font> has returned from away.';
                }
                return 
$c;
        }

        function 
list_afk() {
                
$blob = '::::: '.$this -> bot -> guildname.(preg_match("#s$#i", $this -> bot -> guildname) ? '\'' : '\'s').' AFK List :::::';
                
$blob .= "\n\n\n";
                foreach(
$this -> afk as $key=>$value) {
                        
$blob .= $this -> highlight_1.$key.'</font> is AFK ('.$value.')';
                        
$blob .= "\n\n";
                }
                
$c = $this -> bot -> make_blob('User\'s AFK', $blob);
                return 
$c;
        }
}
?>

Logged

Eternalist
General of The Syndicate
Pages: [1]   Go Up
Print
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Development > Feedback and Suggestions > Topic: Few suggestions
« previous next »
 
Jump to:  

Recent
[request] Raid timers
by Alreadythere
[Today at 11:42:32 AM]

Shared DB online list
by Temar
[Today at 01:55:47 AM]

relay colors
by Temar
[Today at 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]

Bot not see Guild Chat
by Delvar
[November 28, 2008, 08:30:34 AM]

Starting Bot
by Allisande
[November 28, 2008, 07:08:21 AM]
Stats
Members
Total Members: 1243
Latest: Whackoeng
Stats
Total Posts: 11143
Total Topics: 1505
Online Today: 21
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 3
Guests: 18
Total: 21
gerborg
Ifris

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.263 seconds with 28 queries. (Pretty URLs adds 0.049s, 4q)
Loading...