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, 01:38:02 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: Another Bebot on RK3 fix - server.php
Pages: [1]   Go Down
« previous next »
Print
Author Topic: Another Bebot on RK3 fix - server.php  (Read 507 times)
0 Members and 1 Guest are viewing this topic.
Zimble
Freshman
*
Offline Offline

Posts: 7


Another Bebot on RK3 fix - server.php
« on: August 09, 2006, 09:23:25 AM »

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:
<?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, 09:27:07 AM by Zimble » Logged

Zimble/RK3
Khalem
BeBot Founder
Administrator
Grandmaster
********
Offline Offline

Gender: Male
Posts: 670



WWW
Re: Another Bebot on RK3 fix - server.php
« Reply #1 on: August 09, 2006, 10:21:01 AM »

Thanx for the report.

Submitted fix to SVN.
The following code should work properly:
Code:
$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:
/*
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 11, 2006, 05:12:09 PM by Khalem » Logged

BeBot Founder and Fixer Kingpin
Madman coder and destroyer of good code
Zimble
Freshman
*
Offline Offline

Posts: 7


Re: Another Bebot on RK3 fix - server.php
« Reply #2 on: August 09, 2006, 11:58:36 AM »

Thx for the quick fix, Khalem.
Will submitthis to our bot admin, as soon as I catch him ingame Smiley
Logged

Zimble/RK3
Sammajos
Freshman
*
Offline Offline

Posts: 9


Re: Another Bebot on RK3 fix - server.php
« Reply #3 on: August 11, 2006, 09:53:45 AM »

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.)

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

Gender: Male
Posts: 670



WWW
Re: Another Bebot on RK3 fix - server.php
« Reply #4 on: August 11, 2006, 04: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 11, 2006, 05:12:31 PM by Khalem » Logged

BeBot Founder and Fixer Kingpin
Madman coder and destroyer of good code
Pages: [1]   Go Up
Print
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Development > Feedback and Suggestions > Topic: Another Bebot on RK3 fix - server.php
« 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: 0
Guests: 14
Total: 14

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