Back Reply to topic
Willibald 
(started thread)
Blue-Ribbon Chicken 
Topics: 3
Posts: 12
Playing:  AOC
Ingame:  Willibald
Years registered: * * * * * * * * * * * * * * * *
gratz is not working Posted: Post 02:58 Wed - Feb 25, 2009

Hello everybody,

i use Ragebot 0.8.1 on Debian Linux.

Nearly all functions work pretty fine and i even added a plugin sucessfully (!memo) So i think i understood the basic config of the bot zunge zeigen

But there is no way that the bot will gratz a guildbuddy if he has an levelup.

$PluginConfig["guildupdate"]["gratz"] = True; <--- is set

and i did no changes in \plugins\buddy\guildupdate schockiert

Anny suggestions grübel i have no further idea what im doing wrong kopf gegen wand

greetings

Willibald
Reply with quote


Sabcoll 
Blue-Ribbon Chicken 
Topics: 0
Posts: 12
Playing:  Age of Conan
Ingame:  Aurelia
Years registered: * * * * * * * * * * * * * * * *
Posted: Post 03:08 Sun - Mar 15, 2009

afaik there is no "guildupdate" folder and therefore no index.php --> gratz cant work ... Reply with quote


Willibald 
(started thread)
Blue-Ribbon Chicken 
Topics: 3
Posts: 12
Playing:  AOC
Ingame:  Willibald
Years registered: * * * * * * * * * * * * * * * *
Posted: Post 09:06 Tue - Apr 07, 2009

\plugins\buddy\guildupdate is existing and the bot is running this script if someone has an levelup. (i debugged this by adding some logoutputs in this script)


BUT the bot always enters the else tree in index.php:

Code:
} else {
      say("Guildupdate :: lookup flag not set",1);
   }


what has to be done to get the bot to enter the right case selection?

here the complete code of the index.php from the 0.8.1 release:

Code:

<?php
global $guildmates,$guildmains,$BuddyUpdate,$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 ($BuddyUpdate[$args["name"]]) {
      /*do we have a levelup?*/
      if ($args["level"]!=$BuddyUpdate[$args["name"]]["level"]) {
         say("Guildupdate :: Levelup for guildmate ".$args["name"]." from ".$args["level"]." to ".$BuddyUpdate[$args["name"]]["level"],1);
         if ($PluginConfig["guildupdate"]["gratz"] == True) {
            include($currentplugin."/gratz.php");
            send_guild_channel_message(colortext(":: ".$msg." ::"));
         }
      }
      /*do we have a playfieldchange?*/
      if ($args["playfield"]!=$BuddyUpdate[$args["name"]]["playfield"]) {
         say("Guildupdate :: Playfieldchange for guildmate ".$args["name"]." from ".$args["playfield"]." to ".$BuddyUpdate[$args["name"]]["playfield"],1);
      }
      /*unset lookup*/
      unset($BuddyUpdate[$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);
}
?>
Reply with quote


lukan 
Blue-Ribbon Chicken 
Topics: 0
Posts: 4
Playing:  AoC
Ingame:  Mushroom
Years registered: * * * * * * * * * * * * * * * *
Posted: Post 10:18 Thu - Oct 01, 2009

i am experiencing the same problem... no gratz messages at all. Reply with quote


Chaly 
Offizier · Webmaster 
Topics: 404
Posts: 2107
Location: Bad Honnef
Playing:  Guildwars2 (Drakkar See)
Ingame:  Chaly Flavour
Years registered: * * * * * * * * * * * * * * * * * * * * * *
Posted: Post 03:59 Sat - Oct 24, 2009

gratz isn't working right now. it is based on a paket sent on a character-state-change paket.
when this paket is being received, ragebot
1 saves the current level of a character in a global variable
2 saves the name of the character in a global to-do variable
3 queues a removement of the buddy (from the bot characters buddylist)
4 additional queues an add-to-buddylist command

the bot processes his queue, removes the buddy and adds it again. caused by the add-command, the server sends some information about the new buddy. this strange procedure is required as there is no other way to enforce the server to update the buddy-information as far as i knew while coding this module.

when the new buddy-information arrives, ragebot
- checks if the buddy is in the to-do list (step 2)
- and compares the previous level of his "new" buddy with the level saved before (step 1)
if the level isn't the same, the bot sends a gratz-message to the guildchat.

this module was one of the first most ppl deactivated, as the spam was excessive. as even the larger guilds have a higher average level now and the hype (aoc was released, let's play it for some months) is over, this function becomes attractive again.

the first things we have to check is, if the chatserver changed the order of sending information:
most probably the bot doesn't receive a character-state-change at all, or he receives it when he already knows about the new character-level.

easiest way: debugmessages in the callback function, create a character, level it. i wrote this function while a lowlevel-guild had several levelups a day..
Reply with quote



_________________

Chalys Gimpnesstheory (2003) Die Theorie der expotentiellen Bullshits den Gimps bei gleichbleibendem Anteil produzieren.
bravoleader 
Blue-Ribbon Chicken 
Topics: 1
Posts: 6
Playing:  Age of Conan
Ingame:  Ethaniel
Years registered: * * * * * * * * * * * * * * * *
Posted: Post 11:51 Wed - Nov 25, 2009

got it working adding this in bot_callback

Code:
      $precLvl = $BuddyList[$args[0]]["level"];
      $newLvl = 0 + $args[2];
      $nomePg = $AOC->id[$args[0]];
      
      if(($precLvl != $newLvl)and($precLvl!="" and $newLvl != "")) {
         say("Guildupdate :: Levelup for guildmate ".$nomePg." from ".$precLvl." to ".$newLvl,1);
         //if ($PluginConfig["guildupdate"]["gratz"] == True) {
            include("plugins/buddy/guildupdate/gratz.php");
            send_guild_channel_message(colortext(":: ".$msg." ::"));
         //}
      }


between
Code:
$BuddyList[$args[0]]["playfield"] = 0 + $args[3];

AND
Code:
$BuddyList[$args[0]]["level"]     = 0 + $args[2];


Line 121 more or less big grin
It should work big grin
Reply with quote


Chaly 
Offizier · Webmaster 
Topics: 404
Posts: 2107
Location: Bad Honnef
Playing:  Guildwars2 (Drakkar See)
Ingame:  Chaly Flavour
Years registered: * * * * * * * * * * * * * * * * * * * * * *
Posted: Post 06:54 Thu - Nov 26, 2009

thanks a lot ! Reply with quote


Back Reply to topic