thankyou
Donate to the B3 fund!

"even a small donation helps!"
Donate with PayPal!

Full documentation and information about XLRstats version 2 can be found at this subsection of our site.

Our upcoming XLRstats version 3 (League Edition) is currently being developed. You can have a glimpse on our main XLRstats website: www.xlrstats.com


Author Topic: !rank for XLRStats  (Read 23097 times)

Offline TmR

  • Full Member
  • ***
  • Posts: 94
Re: !rank for XLRStats
« Reply #45 on: February 21, 2012, 05:40:46 PM »
download mine and test it. dont replace yours just move out from the folder.
yours looking correct but i see different size.
bith 81kb and same nr of lines...
did get reports that for some people it works..
gonna test it myself tonight, since i've not played after reset, if it might be the number of kills you need before !rank works.
« Last Edit: February 22, 2012, 04:21:59 PM by TmR »

Offline TmR

  • Full Member
  • ***
  • Posts: 94
Re: !rank for XLRStats
« Reply #46 on: February 27, 2012, 11:55:43 AM »
Seems that you need 500 kills?
Where can we find this setting? couldnt find it in the config file

Offline Mariodu62

  • Sr. Member
  • ****
  • Posts: 466
Re: !rank for XLRStats
« Reply #47 on: February 27, 2012, 02:10:54 PM »
Seems that you need 500 kills?
Where can we find this setting? couldnt find it in the config file

yes.... you just have to read when you set the xlrstats...
« Last Edit: February 27, 2012, 02:12:47 PM by Mariodu62 »

Offline HazzMatt

  • Newbie
  • *
  • Posts: 4
Re: !rank for XLRStats
« Reply #48 on: February 27, 2012, 09:46:17 PM »

Offline TmR

  • Full Member
  • ***
  • Posts: 94
Re: !rank for XLRStats
« Reply #49 on: March 07, 2012, 10:15:29 AM »
yes.... you just have to read when you set the xlrstats...
can't find this anywhere in the settings...

Offline Mariodu62

  • Sr. Member
  • ****
  • Posts: 466
Re: !rank for XLRStats
« Reply #50 on: March 07, 2012, 11:49:57 AM »
can't find this anywhere in the settings...

Have a look at step 3 ...
http://www.xlrstats.com/xlrstats_installation

Offline Fragmeister

  • Full Member
  • ***
  • Posts: 78
    • Serveur FRAG on Urban terror
Re: !rank for XLRStats
« Reply #51 on: April 08, 2013, 09:35:53 PM »
Hey,
Nice work for this command, and thanks for sharing  ;)
But the version that offers you, it is not possible to see the ranks of other players, so I've modify the command to give this possibility, replace the rank command in xlrstats.py :
Code: python [Select]
    def cmd_rank(self, data, client, cmd=None):
        """\
        [<name>] - list a players XLR Skill Rank Position
        """
sclient = client
id = client.id
#[...]
return
else:
client.message('^3XLR Ranking: ^7 %s is not Ranked' % sclient.exactName)       
return


With this :
Code: py [Select]
    def cmd_rank(self, data, client, cmd=None):

        """\

        [<name>] - list a players XLR Skill Rank Position
        """
        if data:
            sclient = self._adminPlugin.findClientPrompt(data, client)
            if not sclient: return
        else:
            sclient = client
        #sclient = client
        id = sclient.id

q = 'SELECT rang FROM (SELECT @rownum := @rownum +1 AS rang, statistic . * FROM (SELECT clients.name, clients.time_edit, xlr_playerstats.client_id, xlr_playerstats.id, kills, deaths, ratio, skill, winstreak, losestreak, rounds, fixed_name, ip FROM clients, xlr_playerstats WHERE ( clients.id = xlr_playerstats.client_id) AND ((xlr_playerstats.kills >1000) OR (xlr_playerstats.rounds >50)) AND (xlr_playerstats.hide =0) AND (UNIX_TIMESTAMP( NOW( ) ) - clients.time_edit <14 *60 *60 *24) AND clients.id NOT IN (SELECT DISTINCT (target.id) FROM penalties AS penalties, clients AS target WHERE (penalties.type =  "Ban" OR penalties.type =  "TempBan") AND inactive =0 AND penalties.client_id = target.id AND (penalties.time_expire = -1 OR penalties.time_expire > UNIX_TIMESTAMP( NOW( ) )))) AS statistic, (SELECT @rownum :=0) AS vars ORDER BY skill DESC) AS DATA WHERE client_id = %s' % (id)

cursor = self.query(q)
if not cursor.EOF:

r = cursor.getRow()       

message = '^3XLR Ranking: ^7%s ^7: Rank ^2%s' % (sclient.exactName, int(r['rang']))

cmd.sayLoudOrPM(client, message)

return
else:

client.message('^3XLR Ranking: ^7 %s is not Ranked' % sclient.exactName)       
return
Website of my urt server : www.frag-urt.com/

Offline dark-spirit

  • Newbie
  • *
  • Posts: 3
Re: !rank for XLRStats
« Reply #52 on: July 07, 2014, 08:50:50 PM »
Hi, i tried the last changes from Fragmeister, but rank doesn't work i tried to correct because it doesn't fits automaticaly but well i failed, could anyone give me the correct one that i just need to copy>Paste?

Thanks in advance!

Offline Thomaxius

  • Full Member
  • ***
  • Posts: 116
Re: !rank for XLRStats
« Reply #53 on: August 10, 2014, 10:53:52 AM »
If anybody is interested, an easily copy able version of the command can be found here:
http://pastebin.com/xBMXbrzX

Also, I made it so that it will show you the total competing players.

 


Rate this page +1 at Google Search