Donate to the B3 fund!

"even a small donation helps!"
Donate with PayPal!
The creator of these plugins has not shown activity in a while. Posting in this board may not result in a fast reply or a reply at all. [ Read the full Support Disclaimer here ]
Most of the plugins here are made by B3 users and the authors may not visit frequently. If you need support for plugins or if questions remain unanswered, you will have to contact the author directly. Read the full Support Disclaimer here

NOTE: Do not attach plugins to your forumtopics! Attachements are periodically removed by maintenance tasks. Upload your plugins to our Downloads section instead!

Author Topic: TopKiller plugin 1.0.4  (Read 56380 times)

Offline Anubis

  • Moderator
  • Sr. Member
  • *
  • Posts: 228
    • g4g.pl
TopKiller plugin 1.0.4
« on: November 18, 2008, 11:37:35 PM »
Hi,
I would like to share with you my new plugin called TopKiller. What it does? It counts the kills made by each player and show TOPKILLER player at the end of each round. Typical info showed to all player looks like:
Top killer: NICK with NUM_OF_FRAGS kills and damage: DAMAGE_GIVEN !
One thing. Because of that there is missing ROUND_END event (which is needed to trigger console message 'TopKiller player'), I've created it by myself. At the q3a parser I've added the function:
Code: [Select]
    def OnShutdowngame(self, action, data, match=None):
        return b3.events.Event(b3.events.EVT_GAME_ROUND_END, data)

The plugin in fact is not new ;) I've created it in the middle of September (meanwhile questions raised here: http://www.bigbrotherbot.com/forums/index.php?topic=474.0 ;) ). Of course I'm planning to made some cleaning in the code in the future (I hope very soon), but the plugin with the correction which I made is working fine last 2 months, and makes a player happy when his Nick is displayed as TOP ;)

HF

Download (v1.0.4):
>>> Download <<<
« Last Edit: June 04, 2009, 12:02:57 AM by Anubis »

Offline flinkaflenkaflrsk

  • Sr. Member
  • ****
  • Posts: 238
Re: TopKiller plugin
« Reply #1 on: November 19, 2008, 12:25:29 AM »
Hey Anu

Wanted to look at it but when i click the link I get
http://cba.pl/cba.png

Offline Anubis

  • Moderator
  • Sr. Member
  • *
  • Posts: 228
    • g4g.pl
Re: TopKiller plugin
« Reply #2 on: November 19, 2008, 12:32:16 AM »
arghhh...
so you need to go to the http://anoobis.cba.pl/ and then download... I didn't know that hotlinks does not working :( Sorry.

I've also uploaded to the another server:
http://anoobis.republika.pl/b3/topkiller/1.0.1/topkiller.zip

regards

//link at the first post fixed

ps. I think I need to find another free hosting supporting hotlinks. <angry>
« Last Edit: November 19, 2008, 08:52:18 AM by Anubis »

Offline Anubis

  • Moderator
  • Sr. Member
  • *
  • Posts: 228
    • g4g.pl
Re: TopKiller plugin
« Reply #3 on: November 20, 2008, 12:59:10 AM »
Still no comments ;)
Does it work for you? Do you like it? Do you hate it? Anything ;)

Offline flinkaflenkaflrsk

  • Sr. Member
  • ****
  • Posts: 238
Re: TopKiller plugin
« Reply #4 on: November 20, 2008, 10:46:49 AM »
sorry don't have time will probably look at it on saturday :)

Offline X

  • Jr. Member
  • **
  • Posts: 43
Re: TopKiller plugin
« Reply #5 on: November 20, 2008, 02:41:56 PM »
well i installed it on my cod4 sd server and nothing happens.
i put the py in plugins, i put the xml in conf folder, added the  startup line in B3.xmln and added the code into my q3a parser and nothing happens. the plugin starts up in log with no errors but nothing shows.
maybe i put the code in wrong place in parser file?

Offline flinkaflenkaflrsk

  • Sr. Member
  • ****
  • Posts: 238
Re: TopKiller plugin
« Reply #6 on: November 20, 2008, 05:44:54 PM »
You running a cod4 server so why would you add the code to the q3a parser (which is for quake)

Offline Anubis

  • Moderator
  • Sr. Member
  • *
  • Posts: 228
    • g4g.pl
Re: TopKiller plugin
« Reply #7 on: November 20, 2008, 06:40:12 PM »
It's quite simple:

COD4.py:
Code: [Select]
import b3.parsers.cod2
import b3.parsers.q3a
import re

inheritance ;)

In fact it does not really matter where it's placed between the functions. I've got it just before "OnClientdisconnect" function.

Code: [Select]
    def OnShutdowngame(self, action, data, match=None):
        return b3.events.Event(b3.events.EVT_GAME_ROUND_END, data)

    def OnClientdisconnect(self, action, data, match=None):
        client = self.getClient(match)
        if client: client.disconnect()
        return None
Are there any entries at your log file related to this plugin? Like:
Quote
081112 21:56:13   CONSOLE   28273:48 ShutdownGame:
081112 21:56:13   VERBOSE   Queueing event Game Round End
081112 21:56:13   VERBOSE   Parsing Event: Game Round End: TopkillerPlugin
081112 21:56:13   DEBUG   TopkillerPlugin: Map End: Showing message
081112 21:56:13   VERBOSE   RCON sending (



« Last Edit: November 20, 2008, 08:04:10 PM by Anubis »

Offline Bakes

  • B3 Contrib/Support
  • Hero Member
  • *
  • Posts: 1226
Re: TopKiller plugin
« Reply #8 on: November 20, 2008, 07:11:18 PM »
Yeah, the fact is, cod4 basically is an improved quake 3 arena. Just like the whole CoD series and Urt.
This also makes the plugin compatible with every game supported with b3, apart from perhaps world of padman.

Offline X

  • Jr. Member
  • **
  • Posts: 43
Re: TopKiller plugin
« Reply #9 on: November 21, 2008, 01:08:03 AM »
ill check here in about 2 hrs when i get home from work and post the log

Offline X

  • Jr. Member
  • **
  • Posts: 43
Re: TopKiller plugin
« Reply #10 on: November 21, 2008, 02:39:27 AM »
Code: [Select]
'group_bits': 1, 'ip': '72.49.89.133', 'auto_login': 1, 'greeting': '', 'pbid': 'e20aaa0cb3b3bb390eee903ac8384770', 'connections': 31, 'mask_level': 0, 'guid': 'e20aaa0cb3b3bb390eee903ac8384770', 'id': 387}
081120 16:02:09 DEBUG Client Authorized: [20] PiMPaLiCOus - e20aaa0cb3b3bb390eee903ac8384770
081120 16:02:15 CONSOLE 12505:22 K;1124913bdcc3cec7fe6898406536f313;9;;-MDK-DrJack;d8e9c169b422aa1f69564dc46af9c38e;24;;BulletNhead;m16_acog_mp;41;MOD_HEAD_SHOT;head
081120 16:02:15 DEBUG TopkillerPlugin: Kill: BulletNhead count: 11 damage: 41 total damage: 503
081120 16:02:17 CONSOLE 12505:24 say;947152828fde0f9fe1527112b67c8a30;7;fosserfavre3;omfg
081120 16:02:17 DEBUG AdminPlugin: OnSay handle 5:"omfg"
081120 16:02:17 DEBUG ChatloggerPlugin: ALL, 382, fosserfavre3, omfg
081120 16:02:17 DEBUG ChatloggerPlugin: query: INSERT INTO chatlog (msg_time, msg_type, client_id, client_name, client_team, msg) VALUES (1227218537, "ALL", 382, "fosserfavre3", -1, "omfg")
081120 16:02:17 DEBUG ChatloggerPlugin: rowcount: 1, id:88186
081120 16:02:20 CONSOLE 12505:27 say;1124913bdcc3cec7fe6898406536f313;9;-MDK-DrJack;damn
081120 16:02:20 DEBUG AdminPlugin: OnSay handle 5:"damn"
081120 16:02:20 DEBUG ChatloggerPlugin: ALL, 1619, -MDK-DrJack, damn
081120 16:02:20 DEBUG ChatloggerPlugin: query: INSERT INTO chatlog (msg_time, msg_type, client_id, client_name, client_team, msg) VALUES (1227218540, "ALL", 1619, "-MDK-DrJack", -1, "damn")
081120 16:02:20 DEBUG ChatloggerPlugin: rowcount: 1, id:88187
081120 16:02:21 CONSOLE 12505:28 ShutdownGame:
081120 16:02:21 CONSOLE 12505:28 ------------------------------------------------------------
081120 16:02:21 CONSOLE 12505:28 ------------------------------------------------------------
081120 16:02:21 CONSOLE 12505:28 InitGame: \_Admin\IcE\_B3\www.bigbrotherbot.com\_Email\[email protected]\_Location\US\_Website\http://www.fallenclan.com\g_compassShowEnemies\0\g_gametype\sd\gamename\Call of Duty 4\mapname\mp_backlot\protocol\6\shortversion\1.7\sv_allowAnonymous\0\sv_disableClientConsole\0\sv_floodprotect\1\sv_hostname\^1|^7FaLLeN^1| [HC] S&D ^2-STATS- B3\sv_maxclients\30\sv_maxPing\350\sv_maxRate\25000\sv_minPing\0\sv_privateClients\6\sv_punkbuster\1\sv_pure\1\sv_voice\1\ui_maxclients\40
081120 16:02:21 CONSOLE 12505:28 J;b79135ef64c9d4e9a53335efcb6a41e4;29;N()MA|)
081120 16:02:21 DEBUG XlrstatsPlugin: xlrstats.dumpEvent -- Type 21, Client <b3.clients.Client object at 0x00E8C310>, Target None, Data None
081120 16:02:21 CONSOLE 12505:28 J;4ed7885beed6a5a2b23c1c73ecb5bc8b;27;|ALPHA| Nexus
081120 16:02:21 DEBUG XlrstatsPlugin: xlrstats.dumpEvent -- Type 21, Client <b3.clients.Client object at 0x00E98D70>, Target None, Data None

Offline Anubis

  • Moderator
  • Sr. Member
  • *
  • Posts: 228
    • g4g.pl
Re: TopKiller plugin
« Reply #11 on: November 21, 2008, 03:44:34 PM »
Thanks...
Well...
Round END event is not triggered at all. plugin counts the kills correctly:
Quote
TopkillerPlugin: Kill: BulletNhead count: 11 damage: 41 total damage: 503
So it's working. There is only thing with parser. OnShutdown is not triggered here.
Could you double check if the q3a is really modified? Maybe try to delete *.pyc file to force recompilation.

Offline Anubis

  • Moderator
  • Sr. Member
  • *
  • Posts: 228
    • g4g.pl
Re: TopKiller plugin
« Reply #12 on: November 21, 2008, 06:10:58 PM »
« Last Edit: November 21, 2008, 11:01:41 PM by Anubis »

Offline flinkaflenkaflrsk

  • Sr. Member
  • ****
  • Posts: 238
Re: TopKiller plugin
« Reply #13 on: November 22, 2008, 03:07:45 PM »
Hey Anubis,

I just downloaded your .zip and opened it and noticed that everything is an B3 folder where your .py is under plugins and the config file is under extplugins directory. Maybe you should put the .py under extplugins and the conf file under /extplugins/conf/ like the rest of the plugins? I would also add a Readme.txt file since we have a lot of people who don't really know the structure of B3 this will give them some instructions how to deal with the plugin and some background information like version. I think this will reduce the number of support questions remarkably :)

Offline Anubis

  • Moderator
  • Sr. Member
  • *
  • Posts: 228
    • g4g.pl
Re: TopKiller plugin
« Reply #14 on: November 22, 2008, 11:04:20 PM »
Hello,
yeah.. good point. I'll do this.
Anyway... could you or someone else who is familiar with B3  and knows how to manage a problem with it, check my plugin whether it's working not on our machine only but on the others as well? I would be really gratefull.

 


Rate this page +1 at Google Search