BF2Stats (v1.0) |
Description. | ||
A plugin to display live stats from gamespy for Battlefield 2.
Configuration | ||
The configuration file for this plugin is system/BF2Stats/BF2StatsConfig.xml
commands | ||
Contains command elements (see below).
command | ||
Defines an IRC command, wich will be available in the bot after this plugin is loaded.
Contains one or more reponse elements
Example:
<command command="!bf2combat" method="getplayerinfo.aspx" description="Shows combat statistics" authLevel="none" output="channel"> <response pattern="{nick}: Kills/Assists/Streak[{kill}/{kila}/{bksk}] Deaths/Streak[{deth}/{wdsk}]"/> <response pattern="Kills/deaths per minute[{klpm}/{dtpm}] Kills/deaths per round[{klpr}/{dtpr}]"/> </command>
command Attributes.
command | required, command name as to be typed by an IRC user. |
method | required, defines which type of stats data to fetch from gamespy. For a list of available methods look at the BF2 Technical Information Wiki. |
description | required, used in the help messages. |
authLevel | required, authLevel of users to which the command will be available. One of: none, any, trusted, master, admin |
output | required, one of: channel, private, notice |
response | ||
Defines the output(s) to the command.
Allowed within command elements.
response attributes
pattern | required, format of the response with placeholders for the values. placeholders are within curly braces, for example {kill} will insert the total kills. For a list of available placeholders, look at the BF2 Technical Information Wiki. |
Example:
<response pattern="{nick}: Global Score[{scor}] Combat Score[{cmsc}] Teamwork Score[{twsc}] Time played[{time}]"/>
cacheExpiry | ||
Time in milliseconds the stats are cached (and served from cache).
Default: 1800000 (30 minutes)
Example:
<cacheExpiry>1800000</cacheExpiry>
baseURL | ||
Base URL for all gamespy queries.
No need to change this, unless gamespy changes it.
Default: http://bf2web.gamespy.com/ASP/
Example:
<baseURL>http://bf2web.gamespy.com/ASP/</baseURL>
Commands | ||
Usage for all commands is "commandname bf2-nick". Available Commands are configurable, here's a list of the default commmands:
!bf2stats | Show overall BF2 stats for the given nick |
!bf2combat | Shows combat statistics |
!bf2stats2 | Show additional BF2 stats for the given nick |
!bf2id | Displays the pid for the nick |
!bf2round | Shows best round scores for the given nick |
!bf2rank | Shows the global rank |
!bf2fav | Show favourite kit, weapon, map etc. |
!bf2s | Shows a link to the stats on www.bf2s.com |
!bf2vehicle | Shows driver statistics |
Change History | ||
v1.0 | First Version by jawe |