collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
Did you miss your activation email?
* Search

* Board Stats
  • stats Total Members: 987
  • stats Total Posts: 18339
  • stats Total Topics: 2493
  • stats Total Categories: 7
  • stats Total Boards: 33
  • stats Most Online: 500

Author Topic: Chat Protocol Reference Archive  (Read 8695 times)

0 Members and 1 Guest are viewing this topic.

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Chat Protocol Reference Archive
« on: February 15, 2010, 05:41:05 pm »
This is primarily a backup for the original reference post at http://aodevs.com/index.php/topic,41.0.html

Quote
Posted: Wed Dec 03, 2003 10:06 am  by: dinkles  Post subject: GroupIDs

(A GroupID is 5 bytes long - shown as hex values below)
Code: [Select]
03xxxxxxxx: Guild Group
* xxxxxxxx = Guild ID
* (eg. 0x00171803(=1513475) for Nemesis on RK2
*  http://www.anarchy-online.com/org/stats/d/2/name/1513475)

06xxxxyy00: shopping 1-50
06xxxxyy01: seeking team 1-10
06xxxxyy02: seeking team 10-20
06xxxxyy03: seeking team 20-35
06xxxxyy04: seeking team 35-50
06xxxxyy05: shopping 50-100
06xxxxyy06: seeking team 50-70
06xxxxyy07: seeking team 70-90
06xxxxyy08: seeking team 90-120
06xxxxyy09: shopping 100+
06xxxxyy0a: seeking team 120-150
06xxxxyy0b: seeking team 150+
* xxxx     = Dunno? (Usually 0x0776(=1910), it is always non-zero)
*     yy   = Faction (0x00 = Neu., 0x01 = Clan, 0x02 = OT)

07000000yy: Newbie OOC
*       yy = Faction (0x00 = Neu., 0x01 = Clan, 0x02 = OT)

07xxxxyy10: OOC
07xxxxyy11: Jpn OOC
* xxxx     = Dunno? (Usually 0x0776(=1910), it is always non-zero)
*     yy   = Faction (0x00 = Neu., 0x01 = Clan, 0x02 = OT)

0a00000000: All Towers
0a00000001: Org. Towers
0a00000002: Tower Battle Outcome

0c000007d0: IRRK News Wire
* 000007d0 = Unknown (0x07d0 = 2000)

0c000003e8: Tour Announcements
* 000003e8 = Unknown (0x03e8 = 1000)

Eg:
0x0700000001 is "Clan Newbie OOC"
0x0700000002 is "OT Newbie OOC"
0x0300171803 is "Nemesis" (Guild on RK2)
0x0707760110 is "Clan OOC"

Quote
Posted: Sun Mar 21, 2004 4:47 pm  by: pod13  Post subject:   
--------------------------------------------------------------------------------
Just to throw a one more thing in here.

The first two bytes of args[2] (a short int) not only indicate if the channel is muted but also if logging is turned on for the channel.

Possible values for these two bytes are:

Code:

0x00 00 Not muted, not logging
0x01 01 Muted, not logging
0x00 02 Not muted, logging on
0x00 03 Muted, logging on
 


Why are both bytes set in only one instance? Who knows, but obviously only one byte is significant, and you can treat it as a bit flag.

If the channel is muted the 01 bit is set.
If logging is turned on then the 02 bit is set.

Code:

if ($channelFlags & 0x01) then 'channel is muted';
if ($channelFlags & 0x02) then 'channel is logging';
 


Something like that.

Quote
Posted: Sat Apr 03, 2004 4:42 pm   by: Jesper
--------------------------------------------------------------------------------
The format is GSID (D is data, but has the same format as S).

The flags:
bit 0 = CantIgnore
bit 1 = CantSend
bit 5 = NoInternational (the client are not supposed to show "weird" international characters on this channel).
bit 6 = NoVoice (the client should ignore all /voice commands on this channel)
bit 7 = SendCriteria (only "voiced" people can send to this channel)
bit 8 = GroupOnName (Several channels exist with this name, the client should treat them as the same).

The client can set the top 8 bits with the group_data_set (id 64, format GID) command. Currently the chatserver only reacts to the mute bit (bit 24).
BeBot Founder and Fixer Kingpin

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Chat Protocol Reference Archive
« Reply #1 on: February 15, 2010, 05:43:20 pm »
Quote
Posted: Sat Apr 03, 2004 4:56 pm  by: jesper  Post subject: Split-chat GUI / new chatsocket :: Q&A » [ETA April 5th]
--------------------------------------------------------------------------------
Command 37 is a replacement for command 36 (message_system). The format is IIID (clientid, windowid, messageid, packedargs).
Clientid and windowid is used by the new chat to keep track of what window a message should be shown in. messageid is the id of the message (the client has a database where it looks up the correct string). Packedargs is a list of args for the messageid messagestring.

This command is properly not that interesting for the bots, as its mostly used for /cc feedback to the players.


Command 35 (message_anon_vicinity, format:SSD, args:sendername, messageboddy, blob) is actually the same message you get when NPCS talk to you ingame, so its not something new
Sendername is often an empty string.

Quote
Posted: Sat Apr 03, 2004 5:22 pm  by: jesper  Post subject:  Split-chat GUI / new chatsocket :: Q&A » [ETA April 5th]   
--------------------------------------------------------------------------------
Quote
Amona. wrote:
Then there's also the question of the practical limit VS technical/theoretical limit, ex as of now the technical limit for tells is 8801 characters, but actually beeing able to send a blob that size today is a luckystroke due to other incoming packets of all sorts of types all the time, that + lag sometimes making 2 packets coming simultaniously, this the practical 100% safe limit for tells is 5500 characters with a minimum of 1.7 seconds between them. (actually 1.2, but anything lower than 1.7 might make the server invoke the spam-filter in when its lagged).

The limit is 64k (due to the 16bit size in the header), and there should not be any other limits as fas as I remember.

There has been a lot of speculation on how the chatserver tries to protect itself from floods of messages (its written in python, and has to juggle quite a few connections at once  ). Here is how it works:

There are two limits, one on the size of data, and one on the numer of commands.

The numer of commands you can send is set to 1/sec, and it allow bursts of 10. It works like this: the server has a counter for each connecten, each sec it adds 1 to this counter, and makes sure it never gets above 10. Whenever the server recieves a message it will decrese the counter by 1. It will not check the connected for new messages when the counter is 0.

The datasize limit works in much the same way, the limits here are 1k raw data/sec, and a burst size of 4k. When the server is flodded with data on a socket it will put that socked into a waiting que, and not read any data for a sec or two. After that delay the server will again read data from the socket. A message can be 64k even if it will trigger the flood protection quite a few times (it will take a whole minute to push 64k to the chatserver, but it will happily send those 64k out to 1000+ clients without any delays).


Maybe it would be an idear to change the chatserver to have a higher limit on tells than on group messages...


Edit: the messages/sec limit was wrong, updated.

Last edited by Jesper on Sat Apr 03, 2004 6:19 pm; edited 1 time in total
BeBot Founder and Fixer Kingpin

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Chat Protocol Reference Archive
« Reply #2 on: February 15, 2010, 05:45:06 pm »
Quote
Posted: Sat Apr 03, 2004 5:39 pm by: jesper   Post subject: Special Chars Encryption / Decryption (f.e. German Vowels)
--------------------------------------------------------------------------------
The client is UTF8 based, the unicode site has some info on how characters are encoded: http://www.unicode.org/faq/utf_bom.html
Windows is UTF16 based, but it fairly simple to convert back and forth.
Quote
Posted: Sun Apr 04, 2004 8:31 am by: angels  Post subject: Special Chars Encryption / Decryption (f.e. German Vowels)

--------------------------------------------------------------------------------
 
.... i kinda disagree on that (but maybe i am wrong)

chars FROM the server is unicode8
chars TO the server seem to be different (i dont send unicode transformed text but special-letters with spacing-chars behind ... you can either choose "u" [space] or any other valid char (i use "_")

... my bot runs on an english linux version - so the translation should be differ from my computer (german win xp) - but as far as i noticed, it doesnt.

@Kir: since i am not familiar with french ... would you mind posting a list of french special chars, so i can include it in my bot.
BeBot Founder and Fixer Kingpin

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Chat Protocol Reference Archive
« Reply #3 on: February 15, 2010, 05:45:57 pm »
TOWER, ETC TYPE MESSAGES

Quote
You're receiving what we call "scrambled text" (for lack of a better name) and you need to "descramble" it.
Basically the message is formatted in a certain way, firstly containing 2 ID's (encoded base 85) which match a certain entry in text.mdb (file that ships with AO) followed by a series of arguments.
A string argument looks somthing like "s" followed by 2 characters that together define the length of the string (encoded base 85) followed by the actual string.
An int argument looks something like "i" followed by 4 characters that represent a number encoded in base 85.


Quote
Posted: Mon Dec 19, 2005 5:43 pm by: vhab   Post subject: List of scrambled messages bots receive   

--------------------------------------------------------------------------------
 
Since about everyone has a decent parser for the new messages it's nice to have a list of which messages the bots should look for.
Here's a list of all 'scrambled' messages I know the bot receives (If it has the right rank and is guilded)

Notum Wars Messages

Message: The %s organization %s just entered a state of war! %s attacked the %s organization %s's tower in %s at location (%d,%d).
CategoryID: 506
EntryID: 12753364
Format: Reference, String, String, Reference, String, String, Integer, Integer
Note: This message uses references from Category: 2005

Message: %s just initiated an attack on playfield %i at location (%d,%d). That area is controlled by %s. All districts controlled by your organization are open to attack! You are in a state of war. Leader chat informed.
CategoryID: 506
EntryID: 24174231
Format: String, Integer, Integer, Integer, String

Message: The tower %s in %s was just reduced to %d %% health by %s from the %s organization!
CategoryID: 506
EntryID: 94492169
Format: String, String, Integer, String, String

Message: The tower %s in %s was just reduced to %d %% health by %s!
CategoryID: 506
EntryID: 224009576
Format: String, String, Integer, String

Message: The tower %s in %s was just reduced to %d %% health!
CategoryID: 506
EntryID: 265658836
Format: String, String, Integer

Message: Notum Wars Update: The %s organization %s lost their base in %s.
CategoryID: 506
EntryID: 147506468
Format: Reference, String, String
Note: This message uses references from Category: 2005


Organization Messages

Message: %s kicked from organization (alignment changed).
CategoryID: 501
EntryID: 181448347
Format: String

Message: %s joined the organization.
CategoryID: 508
EntryID: 5146599
Format: String

Message: %s kicked %s from your organization.
CategoryID: 508
EntryID: 37093479
Format: String, String

Message: %s left the orginisation.
CategoryID: 508
EntryID: 45978487
Format: String

Message: GM removed character %s from your organization.
CategoryID: 508
EntryID: 147071208
Format: String

Message: %s changed governing form to '%s'.
CategoryID: 508
EntryID: 138965334
Format: String, String

Message: Your leader, %s has disbanded your organization.
CategoryID: 508
EntryID: 143442663
Format: String

Message: Voting notice for "%s"...\n\nDuration: %d minutes\n\nCandidates: %s\n\nVoting can begin in a few seconds. Use '/org vote ' to cast your vote.
CategoryID: 508
EntryID: 206008469
Format: String, Unsigned Integer, String


Alien Invasion Messages

Message: %s turned the cloaking device in your city %s.
CategoryID: 1001
EntryID: 1
Format: String, String

Message: Your radar station is picking up alien activity in the area surrounding your city.
CategoryID: 1001
EntryID: 2
Format:

Message: Your city in %s has been targeted by hostile forces.
CategoryID: 1001
EntryID: 3
Format: String

Message: %s removed the organization headquarters in %s! All personal belongings or houses in the city were instantly destroyed!
CategoryID: 1001
EntryID: 4
Format: String, String

Message: %s has initiated removal of a %s in %s! The house and all belongings in the house will be destroyed in 2 minutes.
CategoryID: 1001
EntryID: 5
Format: String, Reference, String
Note: This message uses references from Category: 509

Message: %s removed a %s in %s! All benefits from this house and all belongings in the house were instantly destroyed!
CategoryID: 1001
EntryID: 6
Format: String, Reference, String
Note: This message uses references from Category: 509

Message: %s has initiated removal of the HQ in %s! The house and all belongings in the house will be destroyed in 2 minutes. This will also cause the other houses in the city to be deleted!
CategoryID: 1001
EntryID: 7
Format: String, String

Message: ICC planet-wide announcement: %s has been awarded the highest honorary rank for outstanding dedication to the defence of Rubi-Ka.
CategoryID: 1001
EntryID: 254018580
Format: String


Category 509

0: Normal House
1: HQ
2: Market
3: Grid
4: Guard House
5: Radar Station
6: Cloaking Device
7: Mini Cloaking Device
1000: undefined house type


Category 2005

0: neutral
1: clan
2: omni
3: monster
4: advisor
5: guardian
6: gm
7: mixed
BeBot Founder and Fixer Kingpin

 

* Recent Posts
0.7.x updates for AoC by bitnykk
[March 01, 2022, 04:10:10 pm]


0.7.x updates for AO by bitnykk
[March 01, 2022, 04:10:03 pm]


Website back up and quick status update by bitnykk
[July 30, 2021, 04:56:19 pm]


AO Bots - discord server by bitnykk
[January 31, 2021, 03:50:48 am]


AO public Raidforall by bitnykk
[January 18, 2021, 05:02:22 pm]

* Who's Online
  • Dot Guests: 38
  • 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-2022, SimplePortal