BeBot - An Anarchy Online and Age Of Conan chat automaton

Development => Coding and development discussion => Topic started by: Getrix on December 11, 2009, 03:22:30 pm

Title: 1.06: Chat dimension changes
Post by: Getrix on December 11, 2009, 03:22:30 pm
Ok i know its still TestLive, but it doesnt hurt to be one step ahead for the patch to go live ;)

I didnt do much resource on last time it changed (1.05) so i dont have the knowledge to get make the changes without help or hints.

The error i get is:

Quote
Bebot [2009-12-11 14:04:15]     [LOGIN] [STATUS]        Authenticating

Warning: unpack(): Type n: not enough input, need 2, have 0 in D:\Path\Sources\AOChat.php on line 508

Warning: array_pop(): The argument should be an array in D:\Path\Sources\AOChat.php on line 509

Warning: unpack(): Type N: not enough input, need 4, have 0 in D:\Path\Sources\AOChat.php on line 513

Warning: array_pop(): The argument should be an array in D:\Path\AOChat.php on line 514

Unsupported rpcpacket type (in, )

Warning: RPC_UNIVERSE_CHALLENGE: Error in logininfo, [ServerSeed:] [Username:NICK] [Password:10] in D:\Path\Sources\AOChat.php on line 701
Bebot [2009-12-11 14:04:15]     [CONN]  [ERROR] Failed authenticating to server.
Retrying in 60 seconds.
The bot is restarting.
Title: Re: 1.06: Chat dimension changes
Post by: Getrix on December 11, 2009, 03:22:52 pm
Whats on the line:


Quote
Warning: unpack(): Type n: not enough input, need 2, have 0 in D:\Path\Sources\AOChat.php on line 508
Code: [Select]
$temparray = unpack("n",$data);

Quote
Warning: array_pop(): The argument should be an array in D:\Path\Sources\AOChat.php on line 509
Code: [Select]
$len = array_pop($temparray);
Quote
Warning: unpack(): Type N: not enough input, need 4, have 0 in D:\Path\Sources\AOChat.php on line 513
Code: [Select]
$temparray = unpack("N", $data);
Quote
Warning: array_pop(): The argument should be an array in D:\Path\AOChat.php on line 514
Code: [Select]
$type  = array_pop($temparray);
Quote
Unsupported rpcpacket type (in, )
Code: [Select]

Quote
Warning: RPC_UNIVERSE_CHALLENGE: Error in logininfo, [ServerSeed:] [Username:NICK] [Password:10] in D:\Path\Sources\AOChat.php on line 701
Code: [Select]
trigger_error("RPC_UNIVERSE_CHALLENGE: Error in logininfo, [ServerSeed:".$this->serverseed."] [Username:".$this->username."] [Password:". strlen($this->password)."]",E_USER_WARNING);
Title: AoC and patch 1.06
Post by: Shakor on December 14, 2009, 09:56:29 am
Hi,

We tested the bot out on Testlive and seems they changed the login seed again...

Code: [Select]
Bot [LOGIN] [STATUS]        Authenticating
Warning: unpack(): Type n: not enough input, need 2, have 0 in /home/bebot/bebotTL/Sources/AOChat.php on line 508
Warning: array_pop(): The argument should be an array in /home/bebot/bebotTL/Sources/AOChat.php on line 509
Warning: unpack(): Type N: not enough input, need 4, have 0 in /home/bebot/bebotTL/Sources/AOChat.php on line 513
Warning: array_pop(): The argument should be an array in /home/bebot/bebotTL/Sources/AOChat.php on line 514
Unsupported rpcpacket type (in, )

Warning: RPC_UNIVERSE_CHALLENGE: Error in logininfo, [ServerSeed:] [Username:*******] [Password:9] in /home/bebot/bebotTL/Sources/AOChat.php on line 701
Bot [CONN]  [ERROR] Failed authenticating to server. Retrying in 60 seconds.
Title: Re: AoC and patch 1.06
Post by: Getrix on December 14, 2009, 03:29:54 pm
Allready started the discussion around this here: http://bebot.link/index.php/topic,2118.0.html
Title: Re: AoC and patch 1.06
Post by: Shakor on December 14, 2009, 03:34:09 pm
Ah yes. Sorry for double posting.
Title: Re: 1.06: Chat dimension changes
Post by: Khalem on December 15, 2009, 08:43:58 pm
Merged
Title: Re: 1.06: Chat dimension changes
Post by: BoA-Gert on January 30, 2010, 08:57:20 am
Any news on this? 1.06 is looking likely to hit next week - and I see Conan Chat has an update out that is fixed for the 1.06 changes...
Title: Re: 1.06: Chat dimension changes
Post by: keirou on January 30, 2010, 05:30:45 pm
is it possible to ask the cchat creator how they got the new authentication method?
any eta one when this will be available?
Title: Re: 1.06: Chat dimension changes
Post by: DJKRose on January 30, 2010, 05:47:08 pm
is it possible to ask the cchat creator how they got the new authentication method?
I just sent him a message...

any eta one when this will be available?
Not yet.

// djkrose
Title: Re: 1.06: Chat dimension changes
Post by: Khalem on January 30, 2010, 06:27:00 pm
For reference, CChat is GPL

http://www.conanchat.com/hg/ConanChat/rev/e77a4907fcab

Only change i see offhand tagged related to 1.06
Title: Re: 1.06: Chat dimension changes
Post by: Getrix on January 30, 2010, 06:56:22 pm
Code: [Select]
Old: ChatServerVersion="0"
New: ChatServerVersion="1"

Not looked into it, but looks like a small change?
Title: Re: 1.06: Chat dimension changes
Post by: Getrix on February 02, 2010, 10:51:32 pm
Anyone did progress on this?
1.06 is probly out this week ...
Title: Re: 1.06: Chat dimension changes
Post by: Chaoz on February 03, 2010, 12:52:44 pm
Heya :-)

If you haven't figured out this yet, I can give you the patch later on today for 1.06 :)

Chaoz / Conan Chat Creator
Title: Re: 1.06: Chat dimension changes
Post by: keirou on February 03, 2010, 04:03:32 pm
would love to know what needs to be changed Chaoz :)
Title: Re: 1.06: Chat dimension changes
Post by: Getrix on February 03, 2010, 04:07:40 pm
That would be great Chaoz!
Didnt take the time to learn AOChat this time too :P
But good that you are willing to share your fixes =)
Title: Re: 1.06: Chat dimension changes
Post by: keirou on February 03, 2010, 06:04:59 pm
sure enough, all servers will be 1.06 this time tomorrow.
updates just got re-announced today
Title: Re: 1.06: Chat dimension changes
Post by: Chaoz on February 03, 2010, 11:29:54 pm
Only minor updates to the protocol this time around:

AOChat.php : line 855
-----------------------------------------
From : $territoryInitPacket = new RPCPacket("out", RPC_TERRITORY_INIT, array($this->accountid, $this->serverseed ) );

To : $territoryInitPacket = new RPCPacket("out", RPC_TERRITORY_INIT, array($this->accountid, $this->serverseed, 1 ) );



AOChat.php : line 454
-----------------------------------------
from : $loginCharacterPacket = new AOChatPacket("out", AOCP_LOGIN_CHARID, array( 0,$this->char["id"],$this->serverseed) );

to   : $loginCharacterPacket = new AOChatPacket("out", AOCP_LOGIN_CHARID, array( 1,$this->char["id"],$this->serverseed) );

AOChat.php : line 2165
-----------------------------------------
from: (string)RPC_TERRITORY_INIT   => array("name"=>"Player Init", "args"=>"II"),
to    : (string)RPC_TERRITORY_INIT   => array("name"=>"Player Init", "args"=>"III"),


I would also suggest to rename aoc's testlive in the ServerList.php file since you will connect to AO's testlive if you just specify testlive.

ServerList.php : line 11
from: $server_list['aoc']['Testlive']     = array('server'=>'testlive.ageofconan.com', 'port'=>7000);

to : $server_list['aoc']['Aoctestlive']     = array('server'=>'testlive.ageofconan.com', 'port'=>7000);

- Chaoz.

PS! The bot runs  in both 1.05.7.4 and 1.06 with this patch so update it sooner than later ;)

[edit] made the changes in red
[edit] Added the 3rd missing change to the arguments on RPC_TERRITORY_INIT
Title: Re: 1.06: Chat dimension changes
Post by: Getrix on February 04, 2010, 07:04:54 am
Awsome share Chaoz!

Good to know that i was searching for something like that my self, but missing the last skills to realy find it ;)
Title: Re: 1.06: Chat dimension changes
Post by: BoA-Gert on February 04, 2010, 08:02:45 am
Cheers for that - I'll do it now whilst the servers are down for 1.06 :)
Title: Re: 1.06: Chat dimension changes
Post by: Runemy on February 04, 2010, 08:20:28 am
Yep, already changed :)

Thanks Chaoz. Do not ever quit! ^^
Title: Re: 1.06: Chat dimension changes
Post by: keirou on February 04, 2010, 11:18:24 am
warning: error while reading rpc header. () in <bot location>\Sources\AOChat.php on line 489
warning: handleRPCPackets: Packet is not an object (no RPCPacket?) in <bot location>\Sources\AOChat.php on line 691


489 = trigger_error("Error while reading rpc header. ($head)", E_USER_WARNING);

691 = trigger_error("handleRPCPackets: Packet is not an object (no RPCPacket?)",E_USER_WARNING);
Title: Re: 1.06: Chat dimension changes
Post by: Getrix on February 04, 2010, 11:23:16 am
Getting same against "Fury" and "Crom"

Keirou told me on IRC that he got it working against Wiccana but not TL.
So do they have different setups? :S
Title: Re: 1.06: Chat dimension changes
Post by: BoA-Gert on February 04, 2010, 11:28:32 am
Get that for Crom as well
Title: Re: 1.06: Chat dimension changes
Post by: Margon on February 04, 2010, 11:31:25 am
Read error: EOF

Warning: Error while reading rpc header. () in /home/bebot/bebot/Sources/AOChat.php on line 489

Warning: handleRPCPackets: Packet is not an object (no RPCPacket?) in /home/bebot/bebot/Sources/AOChat.php on line 691


on Asgard too
Title: Re: 1.06: Chat dimension changes
Post by: Runemy on February 04, 2010, 11:42:50 am
And Aquilonia
Title: Re: 1.06: Chat dimension changes
Post by: idr_ingvard on February 04, 2010, 11:58:44 am
On Two Eagles also. It fails, when trying to read answer from server, when performing RPC_TERRITORY_INIT
Title: Re: 1.06: Chat dimension changes
Post by: Socaoc on February 04, 2010, 12:27:17 pm
Same from Hyrkania.

It fails with the same error message like Margon's above.
Title: Re: 1.06: Chat dimension changes
Post by: Chaoz on February 04, 2010, 12:31:58 pm
oh crap..forgot to add the last change:

AOChat.php - line 2165

from:
(string)RPC_TERRITORY_INIT            => array("name"=>"Player Init",               "args"=>"II"),

to
(string)RPC_TERRITORY_INIT            => array("name"=>"Player Init",               "args"=>"III"),

Sorry about that :)
Title: Re: 1.06: Chat dimension changes
Post by: Margon on February 04, 2010, 12:37:25 pm
Warning: RPC_UNIVERSE_ERROR: Error while authenticating to territory [Err:Unable to log in] in /home/bebot/bebot/Sources/AOChat.php on line 780

doesn't work with your fixes
Title: Re: 1.06: Chat dimension changes
Post by: Mahvo on February 04, 2010, 12:55:19 pm
Do all the changes that Chaoz posted in this thread, and then fix:

From:
$loginCharacterPacket = new AOChatPacket("out", AOCP_LOGIN_CHARID, array(0,$this->char["id"],$this->serverseed) );
To:
$loginCharacterPacket = new AOChatPacket("out", AOCP_LOGIN_CHARID, array(1,$this->char["id"],$this->serverseed) );

In function:
function authenticateConan($username, $password, $character)

Cannot give you accurate line numbers, added so much debug info in my file :D
Title: Re: 1.06: Chat dimension changes
Post by: Chaoz on February 04, 2010, 12:56:18 pm
Did you also apply my last change?
Title: Re: 1.06: Chat dimension changes
Post by: Margon on February 04, 2010, 12:58:06 pm
now it works, i applied all the fixes again
Title: Re: 1.06: Chat dimension changes
Post by: MysterF on February 04, 2010, 01:04:28 pm
Only minor updates to the protocol this time around:

AOChat.php : line 855
-----------------------------------------
From : $territoryInitPacket = new RPCPacket("out", RPC_TERRITORY_INIT, array($this->accountid, $this->serverseed ) );

To : $territoryInitPacket = new RPCPacket("out", RPC_TERRITORY_INIT, array($this->accountid, $this->serverseed, 1 ) );



AOChat.php : line 454
-----------------------------------------
from : $loginCharacterPacket = new AOChatPacket("out", AOCP_LOGIN_CHARID, array( 0,$this->char["id"],$this->serverseed) );

to   : $loginCharacterPacket = new AOChatPacket("out", AOCP_LOGIN_CHARID, array( 1,$this->char["id"],$this->serverseed) );

AOChat.php : line 2165
-----------------------------------------
from: (string)RPC_TERRITORY_INIT   => array("name"=>"Player Init", "args"=>"II"),
to    : (string)RPC_TERRITORY_INIT   => array("name"=>"Player Init", "args"=>"III"),


I would also suggest to rename aoc's testlive in the ServerList.php file since you will connect to AO's testlive if you just specify testlive.

ServerList.php : line 11
from: $server_list['aoc']['Testlive']     = array('server'=>'testlive.ageofconan.com', 'port'=>7000);

to : $server_list['aoc']['Aoctestlive']     = array('server'=>'testlive.ageofconan.com', 'port'=>7000);

- Chaoz.

PS! The bot runs  in both 1.05.7.4 and 1.06 with this patch so update it sooner than later ;)

[edit] made the changes in red
[edit] Added the 3rd missing change to the arguments on RPC_TERRITORY_INIT

WORKED LIKE A CHARM HERE MATE, CHEERS.
Title: Re: 1.06: Chat dimension changes
Post by: Chaoz on February 04, 2010, 01:06:14 pm
Ok good - sorry for the mishap about the missing change though.
Next time I will try to apply the changes I write to a fresh install myself :)

Chaoz
Title: Re: 1.06: Chat dimension changes
Post by: Socaoc on February 04, 2010, 01:10:38 pm
Yes it works now  :D !

Thanx very much  !!!
Title: Re: 1.06: Chat dimension changes
Post by: keirou on February 04, 2010, 01:13:14 pm
am getting errors with it on TL

US servers just came down so have atleast 3hrs before i can test that again
Title: Re: 1.06: Chat dimension changes
Post by: dillinger on February 04, 2010, 01:20:40 pm
I made all of your changes, but I get this error again!

Code: [Select]
gbot [LOGIN]  [STATUS]        Connecting to aoc server aoc-eu-um.live.ageofconan.com:7000
gbot [LOGIN]  [STATUS]        Authenticating
Warning: RPC_UNIVERSE_ERROR: Error while authenticating to territory [Err:Unable to log in] in C:\xampp\php\Sources\AOChat.php on line 780
gbot [CONN]   [ERROR] Failed authenticating to server. Retrying in 60 seconds.

Please help! Thanx
Title: Re: 1.06: Chat dimension changes
Post by: Baldrick on February 04, 2010, 01:21:34 pm
Would someone mind posting a working file? I keep getting the same errors.
Title: Re: 1.06: Chat dimension changes
Post by: Akiiras on February 04, 2010, 01:24:31 pm
Do all the changes that Chaoz posted in this thread, and then fix:

From:
$loginCharacterPacket = new AOChatPacket("out", AOCP_LOGIN_CHARID, array(0,$this->char["id"],$this->serverseed) );
To:
$loginCharacterPacket = new AOChatPacket("out", AOCP_LOGIN_CHARID, array(1,$this->char["id"],$this->serverseed) );

In function:
function authenticateConan($username, $password, $character)

Cannot give you accurate line numbers, added so much debug info in my file :D

Thank you both. Bot's up and running perfectly.
Title: Re: 1.06: Chat dimension changes
Post by: WeZoN on February 04, 2010, 01:34:12 pm
http://www.cero89.com/downloads/AOChat.phps


Here you go^^
Title: Re: 1.06: Chat dimension changes
Post by: Xene on February 04, 2010, 01:35:47 pm
I made all the changes listed here, but still cant get the bot to log in:

Error while authenicating  to territory ( Err: Unable to log in AOChat.php line 1522
Failed to authenicating to server

Whats wrong???
Title: Re: 1.06: Chat dimension changes
Post by: dillinger on February 04, 2010, 01:40:12 pm
Allrighty, now I got it!

Thanx 4 your great work!
Title: Re: 1.06: Chat dimension changes
Post by: WeZoN on February 04, 2010, 01:40:36 pm
just download the AOChat.phps i posted above
Title: Re: 1.06: Chat dimension changes
Post by: Getrix on February 04, 2010, 01:43:02 pm
It looks like there is a connection problem.
If you get "Warning: RPC_UNIVERSE_ERROR: Error while authenticating to territory [Err:Unable to log in]" give it some min and try again.
Title: Re: 1.06: Chat dimension changes
Post by: Chaoz on February 04, 2010, 02:04:58 pm
Yeah, the last error is usually when the character is (halfway) logged in. So you have to wait for that character to time out I guess.

Chaoz
Title: Re: 1.06: Chat dimension changes
Post by: dillinger on February 04, 2010, 02:05:46 pm
Curiously I had two lines to change in my AOChat.php!

Line 454:
Code: [Select]
$loginCharacterPacket = new AOChatPacket("out", AOCP_LOGIN_CHARID, array(1,$this->char["id"],$this->serverseed) );
and

Line 891:
Code: [Select]
$loginCharacterPacket = new AOChatPacket("out", AOCP_LOGIN_CHARID, array(1,$this->char["id"],$this->serverseed) );
Since I edited BOTH lines: THE BOT IS RUNNING! *jaaay*
Title: Re: 1.06: Chat dimension changes
Post by: Chaoz on February 04, 2010, 02:08:46 pm
Ah yes.
The first one is basicly when you log in faster than the chatserver can authenticate you, so the chatserver is lagging. This login will try again since it usually goes ok the second time you try to authenticate against the chatserver.

The other line is the first-time login.

So yes, both should be changed ( I actually did that here ). I so have to give the file next time instead of half of my changes ;)

Chaoz.
Title: Re: 1.06: Chat dimension changes
Post by: DJKRose on February 04, 2010, 02:38:53 pm
I've added Chaoz' (and all the other) fixes to the current repository. Also tested it, of course: WORKING!

Get it here or wait for the new version to get released:
http://bazaar.launchpad.net/%7Ebebot-devel/bebot/stable-0.6/annotate/head%3A/Sources/AOChat.php

Thank you again for this, Chaoz!

Bye,
dj.krose
Title: Re: 1.06: Chat dimension changes
Post by: Chaoz on February 04, 2010, 02:44:49 pm
Will there be a 0.6.7 version with this in it ? :)
Title: Re: 1.06: Chat dimension changes
Post by: DJKRose on February 04, 2010, 02:50:43 pm
I guess so, but that depends on Khalem. I've just sent him a PM.
Title: Re: 1.06: Chat dimension changes
Post by: Baldrick on February 04, 2010, 05:27:16 pm
Thank you very much for the quick responses, and for posting the file. It works like a charm!
You guys are great, I love this community  ;D
Title: Re: 1.06: Chat dimension changes
Post by: Samu on February 05, 2010, 09:55:58 am
Hi there,
I have a little problem,i cant communicate with my bot in the guild chat,only in tells.
I see in log files when peoples logged on (details,logon massage etc.) but nothing happened in in-game guild chat.
Title: Re: 1.06: Chat dimension changes
Post by: Chaoz on February 05, 2010, 09:59:15 am
Yes I actually had this issue as well. I think it occured after the servermerge. Basicly you get a new guild channel since the servers were merged.

What you have to do is to log in the bot in the normal conan client, type something in the normal guildchat, log out, and then restart the botscript.

Should do the trick :)
Title: Re: 1.06: Chat dimension changes
Post by: Samu on February 05, 2010, 10:31:52 am
Its worked,thanks mate  :)
Title: Re: 1.06: Chat dimension changes
Post by: Iheaca on April 01, 2010, 11:21:30 am
I have this issue since we moved to 1.07 on live servers.

Quote
Waning: Error while reading rpc header. () in <path>/Sources/AOchat.php on line 497

Warning: handleRPCPackets: Packet is not an object (noRPCPacket?) in <path>/Sources/AOchat.php on line 699

Seems same issue as described here, but I have already this patch in since quite some time and Bot was working fine on 1.06 (Bot version 6.7)

Any clue ?
Title: Re: 1.06: Chat dimension changes
Post by: Iheaca on April 01, 2010, 11:38:35 am
Found there:

http://bebot.link/profile/?area=showposts;u=1494

Thanks Chaoz !
SimplePortal 2.3.7 © 2008-2024, SimplePortal