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 04, 2008, 02:06:30 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 > Module Requests > BeBot Hyborian Modules > Topic: Grats Mod
Pages: [1] 2   Go Down
« previous next »
Print
Author Topic: Grats Mod  (Read 826 times)
0 Members and 1 Guest are viewing this topic.
meatshield
Rookie
**
Offline Offline

Posts: 24


Grats Mod
« on: July 02, 2008, 01:48:06 AM »

Description:
I think a Grats mod would be a welcome edition.  In case theres confusing, a grats bot would grats members when they ding.  Would be nice if it had a few random statements to choose from (id like to be able to add more personally).  Ragebot has something like this, and its a clean chatbot... Im just not sure it has the functionality that this one will have.


Commands:
No Called Commands
Logged
Blueeagle
Omnipotent
BeBot Developer
Expert
********
Offline Offline

Gender: Male
Posts: 313



Re: Grats Mod
« Reply #1 on: July 02, 2008, 02:53:27 PM »

There has to be a command as the bot doesn't know when a player levels other than when it does a roster update and the xml that FC provides is already old.

It would be possible to monitor the chat channel(s) and detect "ding!" and then reply a grats.

It would also be possible to use that to update the whois on the player before the XML is updated. That would involve some alteration to the roster update as it should not level down a character when it detects that the XML has a lower level. Instead it should possibly flag the level as unconfirmed.

Logged

The only problem that can't be solved by adding another wrapper is having too many wrappers.
Noer
BeBot Hyborian Developer
Apprentice
*******
Offline Offline

Posts: 105


Re: Grats Mod
« Reply #2 on: July 02, 2008, 02:54:55 PM »

This one should probably be moved to the Bebot AoC support. Judging on the Ragebot-reference I think he refers to AoC.
Logged
Blueeagle
Omnipotent
BeBot Developer
Expert
********
Offline Offline

Gender: Male
Posts: 313



Re: Grats Mod
« Reply #3 on: July 02, 2008, 03:30:17 PM »

Quote from: Noer on July 02, 2008, 02:54:55 PM
This one should probably be moved to the Bebot AoC support. Judging on the Ragebot-reference I think he refers to AoC.
Well it would work in the same fashion on both AoC and AO as far as I can tell so I see no point in moving it.
Logged

The only problem that can't be solved by adding another wrapper is having too many wrappers.
Temar
BeBot Developer
Grandmaster
********
Offline Offline

Gender: Male
Posts: 887



WWW
Re: Grats Mod
« Reply #4 on: July 02, 2008, 04:21:06 PM »

there is a ding module already for the AO version of BeBot
Logged

MSN messenger: chris_smith96 at hotmain dot com
Xfire: chriss96
Noer
BeBot Hyborian Developer
Apprentice
*******
Offline Offline

Posts: 105


Re: Grats Mod
« Reply #5 on: July 02, 2008, 04:26:41 PM »

Quote from: Blueeagle on July 02, 2008, 03:30:17 PM
Quote from: Noer on July 02, 2008, 02:54:55 PM
This one should probably be moved to the Bebot AoC support. Judging on the Ragebot-reference I think he refers to AoC.
Well it would work in the same fashion on both AoC and AO as far as I can tell so I see no point in moving it.


It works a bit different in AoC. Theres no XML available for players, but you are able to see the level and class of players through the chatserver. And the gameclient has a "ding"-announcement channel (though you can't access that from the chat server).
Logged
meatshield
Rookie
**
Offline Offline

Posts: 24


Re: Grats Mod
« Reply #6 on: July 02, 2008, 05:05:28 PM »

Ya AoC reference Smiley

I figured AoC Support was for issues.  This was labeled Module Req.

Hopefully that's where this request goes.

You guys are awsome though. Everything I've posted has been replied to several times.
Logged
meatshield
Rookie
**
Offline Offline

Posts: 24


Re: Grats Mod
« Reply #7 on: July 02, 2008, 05:21:19 PM »

I was thinking -- Can you guys create a AoC Module Req forum Topic?  So that we don't get mixed in with AO and it isn't confusing.
Logged
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1088


Re: Grats Mod
« Reply #8 on: July 03, 2008, 04:28:05 AM »

AoC Subforum created Smiley
Logged
meatshield
Rookie
**
Offline Offline

Posts: 24


Re: Grats Mod
« Reply #9 on: July 03, 2008, 09:44:35 PM »

Now that we're moved Smiley  Any ideas on the grats mod? We had some good stuff going for a bit and then it dropped off.
Logged
kardsen
Apprentice
***
Offline Offline

Posts: 81


Re: Grats Mod
« Reply #10 on: July 07, 2008, 10:16:53 AM »

From another PHP based Bot  (ragebot)

Code:
<?php
global $guildmates,$guildmains,$guildlookup,$PluginConfig;

/* Already loaded guildmates? If not we currently may logon and receive the status of every buddy */
if ($guildmates[0]&&$guildmates[$args["name"]]) {
/*Do we have a state-change caused by a refresh?*/
if ($guildlookup[$args["name"]]) {
/*do we have a levelup?*/
if ($args["level"]!=$guildlookup[$args["name"]]["level"]) {
say("Guildupdate :: Levelup for guildmate ".$args["name"]." from ".$args["level"]." to ".$guildlookup[$args["name"]]["level"],1);
if ($PluginConfig["guildupdate"]["gratz"]) {
include($currentplugin."/gratz.php");
send_guild_channel_message(colortext(":: ".$msg." ::"));
}
global $db, $dbconfig;
$stmt = $db->prepare('UPDATE '.$dbconfig['dbprefix'].'toons SET toon_level = :toon_level WHERE toon_name = :toon_name;');
$stmt->bindParam(':toon_name', $args["name"]);
$stmt->bindParam(':toon_level', $args["level"]);
$stmt->execute();
}
/*do we have a playfieldchange?*/
if ($args["playfield"]!=$guildlookup[$args["name"]]["playfield"]) {
say("Guildupdate :: Playfieldchange for guildmate ".$args["name"]." from ".$args["playfield"]." to ".$guildlookup[$args["name"]]["playfield"],1);
}
/*unset lookup*/
unset($guildlookup[$args["name"]]);
if (!$msg) say("Guildupdate :: Statuschange ignored",1);
} else {
say("Guildupdate :: lookup flag not set",1);
}
} else {
say("Guildupdate :: Buddystatus of a none-guildmate suppressed",1);
}
?>


and the grats portion of it

Code:
<?php
/**** Idea: Creator
***** Strings: Creator
*****/
if ($level==80){
switch (rand(1,2)) {
case 1: 
$msg="Big gratz ".$args["name"]."! You reached the end of the line, you can finally log off and quit aoc.";
break;
case 2: 
$msg="Big gratz ".$args["name"]."! Game Over!";
break;
}
} else {     

switch (rand(1,4)) {
case 1:
$msg="Hey ".$args["name"]."! Why don't you come over and apprentice me for a change?";
break;
case 2:
$msg="Come on save some dings for the rest ".$args["name"]."!";
break;
case 3:
$msg="Enough with the dingin ".$args["name"].".. you are making me feel low enough!";
break;
case 4:
$msg="Gratz to level ".$args["level"]." ".$args["name"]."!";
break;
}
}
?>


60% of the time,  it works every time.
Logged
Noer
BeBot Hyborian Developer
Apprentice
*******
Offline Offline

Posts: 105


Re: Grats Mod
« Reply #11 on: July 07, 2008, 10:27:32 AM »

Yup its not too hard to make. Just add it as a cron-function and let the bot lookup the members of the bot every 1-5mins.
Logged
Vrykolas
BeBot Hyborian Developer
Apprentice
*******
Offline Offline

Posts: 100


Re: Grats Mod
« Reply #12 on: July 07, 2008, 12:30:02 PM »

I'd already finished writing this by the time I read this thread.

It's a mod rather than a plugin as I modified the latest versions of Main.php and Bot.php to include 2 new events (buddy_levelup & buddy_location_change), hence I'd recommend this as for advanced users only.

The files are available here.
Logged
kardsen
Apprentice
***
Offline Offline

Posts: 81


Re: Grats Mod
« Reply #13 on: July 10, 2008, 07:19:37 PM »

Guildcrier [MOD-CUSTOM] [DIR]   Loading additional modules in directory custom/modules/
Guildcrier [ERROR]      [autogratz]     Event 'buddy_levelup' is invalid. Not registering.
Guildcrier [MOD-CUSTOM] [LOAD]  autogratz.php
Logged
Organizer
Apprentice
***
Online Online

Posts: 94


Re: Grats Mod
« Reply #14 on: July 24, 2008, 02:27:42 AM »

Vrykolas I presume you edited the autogratz ported module further than then one you provided on request for me a day or two ago...

After using it a bit I see potential for a a few things that would be nice to include and would be all ever needed i would presume:

* Random message option (presume maybe this was added as part of this request? - I'll try this version to check what you done, but I would suggest that it choses randomly amongst all saved messages without a level set, and in case of level match it would chose randomly amongst those as well, so that you technically could have several randoms triggered at lvl 80).
* Keep the level option (as I presume is in there still) for custom messages on certain levels.
* Option to see all the gratz stored (important)
* Option to delete gratz stored (e.g. like in the news module would be totally optimal - very important)
* Option in !settings to either see gratz in guild channel or as /tells

Would it not be better if this simply was with the core bot files and not required separate updated? I'm sure there is a reason I'm not smart enough to understand, but if it could be I rather have it with. Even if it would be default as disables and could be enabled with any options thought the use of !settings

With the above added I think this module would be as flexible and final as it ever would need to be...
Logged
Pages: [1] 2   Go Up
Print
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Development > Module Requests > BeBot Hyborian Modules > Topic: Grats Mod
« previous next »
 
Jump to:  

Recent
Bot not working after tod...
by Alreadythere
[Today at 01:04:41 PM]

Tokens Calulator
by Temar
[December 03, 2008, 01:09:03 PM]

Bebot does not work with ...
by IKShadow
[December 03, 2008, 08:54:04 AM]

!items database
by Temar
[December 03, 2008, 07:27:59 AM]

massive_pvp_time_table 1
by Sudoka
[December 03, 2008, 06:49:07 AM]

Log playtime from buddys ...
by IKShadow
[December 02, 2008, 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]
Stats
Members
Total Members: 1246
Latest: Vingus
Stats
Total Posts: 11190
Total Topics: 1507
Online Today: 21
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 5
Guests: 16
Total: 21
scape
Organizer
vikor
clashbot

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