This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

BF3 APi stats display (Nov 4, 2o11)

Support & discussion of released scripts, and announcements of new releases.
Post Reply
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

BF3 APi stats display (Nov 4, 2o11)

Post by speechles »

A friend on efnet for the last year or so, has been asking for a battlefield stats display script. So an ongoing joke with him, has been, to just tell him "soon". Without ever really giving him a date. Well, after a years worth of telling him "it's almost ready" and "dude, it'll be done tomorrow!". Guess what? It is done, and here it is for all of you here as well. If you like it, praise mafaioz. His non-stop assault to get it done resulted in this. If you hate it, well, show some of that hate to mafaioz too.. :P
<speechles> !bf3 mafaioz
<sp33chy> Mafaioz (of Norway) - (ps3) Rank: Corporal 3 star (12); Played: 13:07:48; Score: 165,739; Score/Minute: 210.38; Next Rank: Sergeant (in 4,261); Accuracy: 7.6%; Longest Headshot: 300.38m | Kills: 454; Deaths: 314; Assists: 127; K/D Ratio: 1.44585 | Wins: 27; Losses: 33; W/L Ratio: 0.81818 @ http://bf3stats.com/stats_ps3/Mafaioz#ps3

<speechles> !bf3 -360 mafaioz
<sp33chy> Sorry, no search results were found for "mafaioz" on 360.

<speechles> !bf3 mafaioz -pc
<sp33chy> Sorry, no search results were found for "mafaioz" on pc.

Code: Select all

#---------------------------------------------------------------#
# incith:bf3                                               v1.0 #
#                                                               #
# This script basically scrapes battlefield 3's api and such.   #
#                                                               #
# Usage:                                                        #
#   .chanset #channel +bf3                                      #
#   !bf3 [-<platform>] <name to search for>                     #
#                                                               #
# ChangeLog:                                                    #
#    v1.0 - first release, enjoy.. :)                           #
#                                                               #
#    Requested by Mafaioz: If you like this script, then you    #
#    owe this guy your respect. Bow before him. Now! Do it!     #
#                                                               #
#    - - - Mafaioz, um.. like here's your BF3 script yo! :P     #
#                                                               #
#                                                               #
# TODO:                                                         #
#   - Suggestions/Thanks/Bugs, e-mail at bottom of header.      #
#                                                               #
# LICENSE:                                                      #
#   This code comes with ABSOLUTELY NO WARRANTY.                #
#                                                               #
#   This program is free software; you can redistribute it      #
#   and/or modify it under the terms of the GNU General Public  #
#   License as published by the Free Software Foundation;       #
#   either version 2 of the License, or (at your option) any    #
#   later version.                                              #
#                                                               #
#   This program is distributed in the hope that it will be     #
#   useful, but WITHOUT ANY WARRANTY; without even the implied  #
#   warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR     #
#   PURPOSE.  See the GNU General Public License for more       #
#   details. (http://www.gnu.org/copyleft/library.txt)          #
#                                                               #
# Portions of the script, and the name of this script are       #
# property of: Copyright (C) 2005, Jordan - google@woota.net    #
#                                                               #
# Everything else:                                              #
# Copyleft (C) 2011, speechles                                  #
# imspeechless@gmail.com                                        #
#---------------------------------------------------------------#
package require http 2.3
setudef flag bf3

# 0 will typically disable an option, otherwise a value 1 or
# above will enable it.
#
namespace eval incith {
  namespace eval bf3 {
    # set this to the command character you want to use for the binds
    variable command_char "!"

    # set these to your preferred binds ("one two three etc etc")
    variable binds "bf3 b3"

    # set this to your default section if the user doesn't give one
    # pc / 360 / ps3
    variable section "ps3"

    # if you want to allow users to search via /msg, enable this
    variable private_messages 1

    # ** this is not an optional setting, if a string is too long to send, it won't be sent! **
    # It should be set to the max amount of characters that will be received in a public
    #   message by your IRC server.  If you find you aren't receiving results, try lowering this.
    variable split_length 403

    # number of minute(s) to ignore flooders, 0 to disable flood protection
    variable ignore 1

    # how many requests in how many seconds is considered flooding?
    # by default, this allows 3 queries in 10 seconds, the 4th being ignored
    #   and ignoring the flooder for 'variable ignore' minutes
    variable flood 4:10
  }
}
Incith:BF3 v1.0: Battlefield 3 APi stats display script

Enjoys :)
t
tmyoungjr
Voice
Posts: 14
Joined: Fri Aug 24, 2007 3:30 pm

Post by tmyoungjr »

hah thank you!

I had been waiting for the bf3stats api to get released and then i stopped checking!

saw this before I had checked their site again!

thanks!
s
squish102
Voice
Posts: 1
Joined: Fri Jan 21, 2011 9:02 pm

Post by squish102 »

Thanks that is great. Do you have to have an account on bf3stats to get your result?

Ok looks like you don't... Is there any way to get the playerupdate feature working? They have added it to the api
s
seeN
Voice
Posts: 2
Joined: Wed Nov 16, 2011 10:04 pm
Location: Interwebz

Post by seeN »

I just wanted to thank you for your great work. I started on writing one myself but then i found this well coded script which saves me a lot of time and effort. Big THX :D
M
Mafaioz
Voice
Posts: 1
Joined: Wed Dec 07, 2011 1:13 pm

Post by Mafaioz »

I havent gotn a single thanks on EFnet yet :P i WORKED every day for this to be made :P haha thanks speechy :P
i
inittab
Voice
Posts: 5
Joined: Wed Jan 11, 2012 8:03 pm

Post by inittab »

hi, been using this for awhile and it seems bf3stats.com queues updates on the page now when you access it, the script doesn't seem to ever trigger this update, so unless you access your stats on the website directly the stats never update. Any idea's on how to get around this?
S
Sebastien
Voice
Posts: 2
Joined: Thu Oct 13, 2011 6:41 pm
Location: Behind you
Contact:

There is a problem

Post by Sebastien »

My name has a space in it. "Doouble Tap" (yes, double "o")
here is a screenshot of the error HERE
and as you can see here I have an account and the url in your script is correct.

Thank you for the fix :)
i can't wait to see my stats in my channel :)
-First, solve the problem. Then, write the code.-
S
Sebastien
Voice
Posts: 2
Joined: Thu Oct 13, 2011 6:41 pm
Location: Behind you
Contact:

Post by Sebastien »

Still no fix :(
i wish i knew something about tcl scripts :/
-First, solve the problem. Then, write the code.-
T
Tommyken
Voice
Posts: 11
Joined: Wed Apr 09, 2008 1:11 pm

Post by Tommyken »

i got this error
[10:40:54] <SVG> [10:46:45] Tcl error [incith::bf3::public_message]: can't read "type": no such variable
Post Reply