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

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

Author Topic: New AOChat Class to handle FC's new "Encoding"  (Read 5146 times)

0 Members and 1 Guest are viewing this topic.

Offline Wanuarmi

  • Contributor
  • *******
  • Posts: 121
  • Karma: +0/-0
New AOChat Class to handle FC's new "Encoding"
« Reply #15 on: November 30, 2005, 12:41:01 am »
xen theres an AOChat 1.19 now, it doesnt say it needs php5. gonna test it out with php4.

http://auno.org/dev/aochat.html

Offline Shelnaria

  • BeBot Rookie
  • *
  • Posts: 17
  • Karma: +0/-0
New AOChat Class to handle FC's new "Encoding"
« Reply #16 on: November 30, 2005, 01:34:39 am »
Quote from: "Xenixa"
Actually that doesn't work so well. That method has the bot ignoring anything in Groups that have a user ID of 0.

Changed to this and it works like a champ:
Code: [Select]
  function inc_gmsg($args)
    {
      $user = $this -> aoc -> get_uname($args[1]);

      $found = false;
     
      $group = $this -> aoc -> lookup_group($args[0]);

      if($user == "0" && (substr($args[2], 0, 2) == "~&"))
      {
         $a_aoext = new AOExtMsg($args[2]);
         $args[2] = $a_aoext -> text;
      }
      else
        $args[2] = utf8_decode($args[2]);


P.S. The string returned via the new Class for Tower messages is a different format than what TowerAttack.php expects.
EX from log: [GROUP]   [MSG]   [All Towers] 0: Jigglez (OMNI, Area 41) attacked ***{ Adventurers Luck }*** (CLAN) at Tir County, 598x1282.
So a rewrite will be in order for TowerAttack.php to parse correctly. AlienAttack_GUILD.php OTH works great.

Oh and yes that's using the Modified AOChat.php I have linked to above.


Need to add this:
Code: [Select]
if (!$group)
        $group = $this -> aoc -> get_gname($args[0]);

After this:
Code: [Select]
$user = $this -> aoc -> get_uname($args[1]);

      $found = false;
     
      $group = $this -> aoc -> lookup_group($args[0]);

      if($user == "0" && (substr($args[2], 0, 2) == "~&"))


Or the bot stops listening to the org channel again.

Offline Xenixa

  • Contributor
  • *******
  • Posts: 307
  • Karma: +0/-0
New AOChat Class to handle FC's new "Encoding"
« Reply #17 on: November 30, 2005, 02:18:32 am »
Shelnaria, look at my first post in this thread again. The one with the Big UPDATE at the top that was posted almost a day ago. :)
<<< Hack's in Zend Studio

All my Custom Bebot files may be Found Here <-clicky

Offline Xenixa

  • Contributor
  • *******
  • Posts: 307
  • Karma: +0/-0
New AOChat Class to handle FC's new "Encoding"
« Reply #18 on: November 30, 2005, 02:23:17 am »
Quote from: "Wanuarmi"
xen theres an AOChat 1.19 now, it doesnt say it needs php5. gonna test it out with php4.

http://auno.org/dev/aochat.html


Ya been looking at this new version for like the last hour.
Code: [Select]
if((float)phpversion() < 5.0)
  {
    die("AOChat class needs PHP version >= 5.0.0 to work.\n");
  }

Auno forgot to change his Header Info in the file like he did in v1.18
<<< Hack's in Zend Studio

All my Custom Bebot files may be Found Here <-clicky

Offline jjones666

  • Contributor
  • *******
  • Posts: 353
  • Karma: +0/-0
New AOChat Class to handle FC's new "Encoding"
« Reply #19 on: December 08, 2005, 01:54:56 am »
Hi,

Which version is the best to use now?  Xenixa's or the one from Bebot SVN?

Cheers,

-jj-

Offline Xenixa

  • Contributor
  • *******
  • Posts: 307
  • Karma: +0/-0
Re: New AOChat Class to handle FC's new "Encoding"
« Reply #20 on: January 18, 2006, 01:22:04 pm »
The one in the SVN trunk looks to be the same as the one I modified.
http://svn.shadow-realm.org:7100/svn/BeBot/trunk/
<<< Hack's in Zend Studio

All my Custom Bebot files may be Found Here <-clicky

 

* Recent Posts
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


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


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

* Who's Online
  • Dot Guests: 101
  • 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