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: Another Bebot on RK3 fix - server.php  (Read 5667 times)

0 Members and 1 Guest are viewing this topic.

Offline Zimble

  • BeBot Rookie
  • *
  • Posts: 7
  • Karma: +0/-0
Another Bebot on RK3 fix - server.php
« on: August 09, 2006, 04:23:25 pm »
I don't know if this has been mentioned before, but the !server command of Bebot doesn't work on RK3.
In server.php around line 84 the dimension number is read from the bot.conf and the probes.xml provided by funcom is searched for name="dNUMBER"

While this works on Atlantean and Rimor, it doesn't work on "Die neue Welt" coz this server isn't named d3 in probes.xml but dg.

I fixed this by adding another check before the explode function and modified the explode statement:
Code: [Select]
<?php
$server 
$this -> bot -> get_site("http://probes.funcom.com/ao.xml");
if( (
$dim $this -> bot -> dimension) == "3" $dim "g";
$server explode("name=\"d" $dim "\""$server);
?>

« Last Edit: August 09, 2006, 04:27:07 pm by Zimble »
Zimble/RK3

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Another Bebot on RK3 fix - server.php
« Reply #1 on: August 09, 2006, 05:21:01 pm »
Thanx for the report.

Submitted fix to SVN.
The following code should work properly:
Code: [Select]
$server = $this -> bot -> get_site("http://probes.funcom.com/ao.xml");
$server = explode("name=\"" . $this -> select_dimension() . "\"", $server["content"]);
$server = explode("</dimension>", $server[1]);

And adding the following function
Code: [Select]
/*
Pick the correct dimention
*/
function select_dimension()
{
switch($this -> bot -> dimension)
{
case '0':
$return = "dt";
break;
case '1':
$return = "d1";
break;
case '2':
$return = "d2";
break;
case '3':
$return = "dg";
break;
}
return $return;
}
« Last Edit: August 12, 2006, 12:12:09 am by Khalem »
BeBot Founder and Fixer Kingpin

Offline Zimble

  • BeBot Rookie
  • *
  • Posts: 7
  • Karma: +0/-0
Re: Another Bebot on RK3 fix - server.php
« Reply #2 on: August 09, 2006, 06:58:36 pm »
Thx for the quick fix, Khalem.
Will submitthis to our bot admin, as soon as I catch him ingame :)
Zimble/RK3

Offline Sammajos

  • BeBot Rookie
  • *
  • Posts: 9
  • Karma: +0/-0
Re: Another Bebot on RK3 fix - server.php
« Reply #3 on: August 11, 2006, 04:53:45 pm »
I put your fix inside the Server.php Khalem. And the Result is:

Warning: Unexpected character in Input: '\' (ASCII = 92) state=1 in D:\MyBots\Thisbot\modules\Server.php

Parse Error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in D:\MyBots\Thisbot\modules\Server.php

This is a Bebot v 0.3.3 on a Windows 2003 Server with the php5 from the Download.

(And Sorry for my bad English.)


Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Another Bebot on RK3 fix - server.php
« Reply #4 on: August 11, 2006, 11:42:32 pm »
There was a missing double quote in the second line of the first code block. Already fixed in SVN, updated the quoted code.

Edit: And missing braces.
« Last Edit: August 12, 2006, 12:12:31 am by Khalem »
BeBot Founder and Fixer Kingpin

 

* 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: 154
  • 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