Donate to the B3 fund!

"even a small donation helps!"
Donate with PayPal!
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: headshotsurt plugin [Urban Terror 4.1/4.2]  (Read 44456 times)

Offline Courgette

  • Senior Dev.
  • Hero Member
  • *
  • Posts: 4883
    • Github repository
Re: heashotsurt plugin v0.2.0 [urt4.1]
« Reply #30 on: October 26, 2008, 07:47:53 PM »
the only ways that plugin would show the same message twice are:
- you are running 2 bots  at once
- you have included the plugin twice in the bot config


Offline daedalus

  • Jr. Member
  • **
  • Posts: 22
Re: heashotsurt plugin v0.2.0 [urt4.1]
« Reply #31 on: December 16, 2008, 11:00:22 AM »
With UrT 4.1, does b3 1.1.3 read the HIT line just before the KILL line to work out how the kill was made, and then supply all the info via the KILL event?

Offline Courgette

  • Senior Dev.
  • Hero Member
  • *
  • Posts: 4883
    • Github repository
Re: heashotsurt plugin v0.2.0 [urt4.1]
« Reply #32 on: December 16, 2008, 01:01:58 PM »
In the urt41 parser, look at the onHit method. It will set the victim.hitloc property.
Then in the onKill method, that info is used to setup the hit location of that kill.

So as long as the hit info is issued before the kill info in the urt log, that works
« Last Edit: December 16, 2008, 01:07:29 PM by Courgette »

Offline grdaneault

  • Newbie
  • *
  • Posts: 2
Re: heashotsurt plugin v0.2.0 [urt4.1]
« Reply #33 on: December 19, 2008, 08:32:20 PM »
Hmm...

For some reason neither this plugin nor the PowerAdminUrT plugin work for counting headshots...

Yes, I have set up my server.cfg

Code: [Select]
//Example config. Note that everything behind // is ignored by the game
//Try to keep cvar-values as short as possible. Otherwise you might get "info string length exceeded" errors on your server

//*** Administrator Info, shows in some gamebrowsers ***
sets " Admin" "Grdaneault" //Uses a space in front so it shows up at the top of the properties list
sets " Email" ""

//*** Server Name and Daily Message ***
set sv_hostname "..::[508]::.." //Your servername here
set g_motd "visit SmallGroupProductions.com" //Your message of the day here, it is displayed while connecting
set sv_joinmessage "You.  Will. DIE!" //Your joinmessage here, it is displayed when the game is joined

//*** General Game Settings ***
set sv_maxclients "12" //max clientslots available on the server, using more than 16 is not advised. It can cause lag and most maps are not built for it. Going over 24 can cause nasty bugs.
set g_maxGameClients "0" //max clients that can actually join the game. Other clients are forced to spectate. 0=all
set sv_privateClients "0" //Amount of private slots. This amount of slots will be reserved for players who enter the right privatepassword
set g_gametype "3" //0=FreeForAll, 3=TeamDeathMatch, 4=Team Survivor, 5=Follow the Leader, 6=Capture and Hold, 7=Capture The Flag, 8=Bombmode
sets sv_dlURL "smallgroupproductions.com/UrT_Maps" //Sets the address for auto-downloading. Auto-download only works on ioUrbanTerror-clients, not quake3-clients. The client will try to download <sv_dlURL>/q3ut4/mapname.pk3. So if your server is running ut4_coolmap and sv_dlURL is set to 'yoursite.com/maps', make sure the maps is hosted at http://www.yoursite.com/maps/q3ut4/ut4_coolmap.pk3. Leaving this set 'urbanterror.net' will make it use a map mirror with the most common maps on it. If you got your own hosting, please us that though, to save bandwith.

//*** Passwords ***
set rconpassword "" //Password to control the server remotely using rcon.
set sv_privatePassword "" //password for private slots
set g_password "" //password for the server. Nothing = public

//*** Limits/times ***
set timelimit "0" //time in minutes before map is over, 0=never
set fraglimit "100" //amount of points to be scored before map is over, 0=never
set capturelimit "0" //amount of flagcaps before map is over, 0=never
set g_warmup "5" //time in seconds before game starts when changed to a new map. Gives slower computers time to load before game starts

//*** Respawning *** (FFA, TDM, CAH, CTF)
set g_respawnDelay "2" //seconds before respawn, ignored when g_waverespawns is 1
set g_forcerespawn "2" //seconds before respawn is forced, even when plater did not press fire
set g_waverespawns "0" //use waverespawns, meaning everybody in a team respawns at the same time
set g_bluewave "15" //seconds between blue waverespawns, ignored when g_waverespawns is 0
set g_redwave "15" //seconds between red waverespawns, ignored when g_waverespawns is 0
set g_respawnProtection "0" //amount of seconds a spawning players is protected from damage

//*** Rules ***
set g_deadchat "2" //Determines if alive players can see dead players message. 0=living players can not see dead players chat 1=living players see only team-messages from dead teammembers 2=living players also see normal chats from dead players
set g_antiwarp "1" //enable or disable antiwarp. This option smooths the movement of warping players (warping is caused by a crappy connection, for instance when torrenting during playing). The warping player will experience stutters when this is enabled
set g_antiwarptol "50" //tolerance of the antiwarp. Higher = more tolerant. 50=default
set g_gear "0" //bitmask that decides which votes are allowed and which not. Check http://www.urbanterror.net/gear_calc.html to find the correct number
set g_allowvote "1073741823" //bitmask that decides which votes are allowed and which not. Check http://www.urbanterror.net/allowvote_calc.html to find the correct number
set g_failedvotetime "0" //time in seconds before someone can call another vote after another has failed
set g_followstrict "1" //1=no haunting of enemies when dead
set sv_floodprotect "0" //1=stops clients from spamming many chatlines

//*** Matchmode ***
set g_matchmode "0" //matchmode is for matchplay. Features timeouts and ready-commands
set g_timeouts "3" //ammount of timeouts that a team can do per map
set g_timeoutlength "240" //length of the timeout
set g_pauselength "0" //length of a pause. This can only be done by rcon. 0=indefinatly

//*** Team Game Settings ***
set g_friendlyFire "2" //0=no friendlyfire 1=friendlyfire on, kick after too many TK's 2=friendlyfire on, no kicks
set g_maxteamkills "3" //amount of TK's before you get kicked when friendlyfire is 1
set g_teamkillsforgettime "300" //amount of seconds before TK's are forgotten
set g_teamautojoin "0" //force players to autojoin on connect, instead of letting them spec untill they join themselves
set g_teamForceBalance "0" //if on, you can't join a team when it has more players then the other
set g_maintainTeam "1" //when switching maps, players will stay in their team
set g_teamnamered "Hackers" //name for the red team, nothing = Red Dragons
set g_teamnameblue "Geeks" //name for the red team, nothing = SWAT
set g_swaproles "0" //When map is over, play it again with the teams swapped (recommended for bombmode). After that, change map. 0=change map immediatly when map is over, no swapping of teams

//*** Team Survivor/Bombmode/Follow the Leader Specific Settings ***
set g_maxrounds "0" //number of rounds before map is over, 0=never
set g_RoundTime "3" //maximum minutes a round can take
set g_survivorrule "0" //0=teams don't get a point when time is up before everyone is dead. 1=team with most players left gets point
set g_suddendeath "1" //when map is over and both teams have same amount of points, add another round
set g_bombdefusetime "10" //seconds it takes to defuse bomb
set g_bombexplodetime "40" //seconds before bomb goes off after planting

//*** Capture the flag Specific Settings ***
set g_flagreturntime "30" //if a flag is dropped, return it after this amount of seconds
set g_hotpotato "5" //when both flags are taken, they will explode after this amount of minutes

//*** Advanced settings *** Dont change, unless you know what you are doing
set sv_strictauth "0" //1=check for valid cdkey, this means ioUrbanTerror players will not be able to join
set sv_pure "1" //dont let players load modified pk3-files
set sv_maxRate "0" //maximum traffic per second the server will send per client. 25000 or 0 = max
set sv_timeout "180" //time in seconds before player with a interupted connection will be kicked
set g_inactivity "0" //time in seconds before a non-moving player will be kicked

//*** Master Servers *** Servers the server will report to if 'dedicated' is set to 2. When set to 1, it doesn't report.
set sv_master1 "" //This one will be set automatically by the game-engine, so just leave it blank
set sv_master2 "master.urbanterror.net"
set sv_master3 "master2.urbanterror.net"
set sv_master4 "master.quake3arena.com"
set sv_master5 ""

//*** Other Settings ***
set g_armbands "2" //determines the behaviour of the armbandcolor (also shows on playerlist and minimap). 0=player's choice, set with cg_rgb 1=Based on teamcolor (red or blue) 2=assigned by server (random)
set sv_maxping "0" //max ping a client may have when connecting to the server
set sv_minping "0" //min ping a client may have when connecting to the server
set g_allowchat "2" //0= no chatting at all 1=teamchats only 2=all chats
set g_log "games.log" //name of the logfile. Empty ("") means no log. Log will be in the q3ut4 folder in windows. Linux uses ~/.q3a/q3ut4
set g_logsync "2" //0=no log, 1=buffered, 2=continuous, 3=append
set logfile "1" //0 = NO log, 1 = log file enabled
set g_loghits "1" // allow to log every bullet hit : essential to detect headshots
set g_logroll "0" //create new log every now and then, instead of always using the same one

set g_cahtime "60" //Interval in seconds of awarding points for flags in Capture and Hold gamemode

//*** Map Rotation ***
set g_mapcycle "mapcycle.txt" //name of mapcycle-file, located in q3ut4 directory
map ut4_dealey_b2 //what map to start with

//*** Anti Cheat ***
//pb_sv_enable //to enable PB, remove the // at the beginning of this line (only works when using Quake 3 Arena, not ioUrbanTerror)
set sv_battleye "0" //Keep this disabled, BattlEye is dead

portion of B3 log that pretains to the headshot (more available upon request)
Code: [Select]
081219 14:25:49	CONSOLE	11:26 Hit: 0 1 0 14: [508]Grdaneault hit Jeff in the Head
081219 14:25:49 CONSOLE 11:26 Kill: 1 0 28: [508]Grdaneault killed Jeff by UT_MOD_SR8
081219 14:25:49 VERBOSE Queueing event Client Kill (100, '28', None)
081219 14:25:49 VERBOSE Parsing Event: Client Kill: StatsPlugin
081219 14:25:49 VERBOSE stats vshift 0.5

B3 Config (I am using 1.1.3)

Code: [Select]
<configuration>
<settings name="b3">
<set name="parser">iourt41</set>
<set name="database"></set>
<set name="bot_name">b3</set>
<set name="bot_prefix">^0(^2b3^0)^7:</set>
<set name="time_format">%I:%M%p %Z %m/%d/%y</set>
<set name="time_zone">CST</set>
<!-- 9 = verbose, 10 = debug, 21 = bot, 22 = console -->
<set name="log_level">9</set>
<set name="logfile">b3.log</set>
</settings>
<settings name="server">
<set name="rcon_password">[email protected]$UsEc3et$7_aHeTrUz4S</set>
<set name="port">27960</set>
<set name="game_log">C:\UrbanTerror\q3ut4\games.log</set>
<set name="public_ip">71.174.110.67</set>
<set name="rcon_ip">192.168.1.232</set>
<set name="punkbuster">off</set>
</settings>
<settings name="messages">
<set name="kicked_by">%s^7 was kicked by %s^7 %s</set>
<set name="kicked">%s^7 was kicked %s</set>
<set name="banned_by">%s^7 was banned by %s^7 %s</set>
<set name="banned">%s^7 was banned %s</set>
<set name="temp_banned_by">%s^7 was temp banned by %s^7 for %s^7 %s</set>
<set name="temp_banned">%s^7 was temp banned for %s^7 %s</set>
<set name="unbanned_by">%s^7 was un-banned by %s^7 %s</set>
<set name="unbanned">%s^7 was un-banned %s</set>
</settings>
<settings name="plugins">
<set name="external_dir">@b3/extplugins</set>
</settings>
<plugins>
<!--<plugin name="censor" priority="1" config="@b3/conf/plugin_censor.xml"/>-->
<plugin name="spamcontrol" priority="2" config="@b3/conf/plugin_spamcontrol.xml"/>
<plugin name="admin" priority="3" config="@b3/conf/plugin_admin.xml"/>
<!--<plugin name="tk" priority="4" config="@b3/conf/plugin_tk.xml"/>-->
<plugin name="stats" priority="5" config="@b3/conf/plugin_stats.xml"/>
<plugin name="pingwatch" priority="6" config="@b3/conf/plugin_pingwatch.xml"/>
<plugin name="adv" priority="7" config="@b3/conf/plugin_adv.xml"/>
<plugin name="status" priority="8" config="@b3/conf/plugin_status.xml"/>
<plugin name="welcome" priority="9" config="@b3/conf/plugin_welcome.xml"/>
<plugin name="punkbuster" priority="10" config="@b3/conf/plugin_punkbuster.xml"/>
<plugin name="poweradminurt" priority="14" config="@b3/extplugins/conf/poweradminurt.xml"/>
<plugin name="urtbslap" priority="15" config="@b3/extplugins/conf/urtbslap.xml"/>
<!--<plugin name="weaponcontrolurt" priority="16" config="@b3/extplugins/conf/plugin_weaponcontrolurt.xml"/>-->
<plugin name="headshotsurt" priority="17" config="@b3/extplugins/conf/headshots.xml"/>

<!--
This plugin will require an extra login password from your higher admins. You
can use this if you are concerned about people accidentally gaining admin rights
because of non-unique guids in Cod2.
For Cod1 and Cod:UO this is less of a concern, because they can use the
Punkbuster IDs.
<plugin name="login" priority="12" config="@b3/conf/plugin_login.xml"/>
-->

<!--
This is a non-standard plugin, and quite resource heavy. Please take a look in the
B3 forums (look for XLR Extensions) for more information before enabling this.
Extra database tables are necessary.
<plugin name="xlrstats" priority="13" config="@b3/extplugins/conf/xlrstats.xml"/>
-->
</plugins>
</configuration>
I don't know if it makes a difference,  but when the server starts up there's a Big info length string exceeded (or something like that), but when i check the g_logsync,  logfile,  g_loghits variables, they are all set how they should be.  Also, this is a home server off of my computer, so the IP changes sometimes.  Any help is greatly appreciated.  If you need any other information please ask.

Offline Courgette

  • Senior Dev.
  • Hero Member
  • *
  • Posts: 4883
    • Github repository
Re: heashotsurt plugin v0.2.0 [urt4.1]
« Reply #34 on: December 19, 2008, 09:15:34 PM »

2) Setup your iourtded config properly :
Code: [Select]
set g_logsync "2"		//0=no log, 1=buffered, 2=continuous, 3=append
set logfile "1" //0 = NO log, 1 = log file enabled
set g_loghits "1" // allow to log every bullet hit : essential to detect headshots


perhaps ?

Offline grdaneault

  • Newbie
  • *
  • Posts: 2
Re: heashotsurt plugin v0.2.0 [urt4.1]
« Reply #35 on: December 20, 2008, 01:10:24 AM »
Huh?  Isn't that already set?
Code: [Select]

//*** Other Settings ***
set g_armbands "2" //determines the behaviour of the armbandcolor (also shows on playerlist and minimap). 0=player's choice, set with cg_rgb 1=Based on teamcolor (red or blue) 2=assigned by server (random)
set sv_maxping "0" //max ping a client may have when connecting to the server
set sv_minping "0" //min ping a client may have when connecting to the server
set g_allowchat "2" //0= no chatting at all 1=teamchats only 2=all chats
set g_log "games.log" //name of the logfile. Empty ("") means no log. Log will be in the q3ut4 folder in windows. Linux uses ~/.q3a/q3ut4
set g_logsync "2" //0=no log, 1=buffered, 2=continuous, 3=append
set logfile "1" //0 = NO log, 1 = log file enabled
set g_loghits "1" // allow to log every bullet hit : essential to detect headshots
set g_logroll "0" //create new log every now and then, instead of always using the same one

« Last Edit: December 20, 2008, 01:24:54 AM by grdaneault »

Offline ryry46d9

  • B3 Contrib/Support
  • Sr. Member
  • *
  • Posts: 337
    • Pb| clan
Re: heashotsurt plugin for Urban Terror
« Reply #36 on: September 16, 2009, 07:29:35 AM »
can you explain what went wrong and how you solved it so other people can learn from your experience.

about the message, it is a console message and I suppose you mean you want it to appear in the chat.
So edit headshotsurt.py line 167

replace :
Code: [Select]
self.console.write('%s^3 made ^6%s^3 headshots'%(clientName,headshotsStats.count))  

with :
Code: [Select]
self.console.say('%s^3 made ^6%s^3 headshots'%(clientName,headshotsStats.count)) 

that should be fine (not tested thought)

I see this @ line 184

Offline MrMind

  • Jr. Member
  • **
  • Posts: 39
Re: heashotsurt plugin v0.2.0 [urt4.1]
« Reply #37 on: December 31, 2009, 04:11:00 PM »
Hi!

Could you tell me how to show headshot message as big text?

Delete this line from headshoturt.py?
 
Code: [Select]
self.console.write('%s^3 made ^6%s^3 headshots'%(self.coloredClientName(client),headshotsStats.headshots))

And replace to this?
Code: [Select]
self.console.write('bigtext %s' % 'my text')

Thx in advance.
« Last Edit: December 31, 2009, 04:13:49 PM by MrMind »

Offline Courgette

  • Senior Dev.
  • Hero Member
  • *
  • Posts: 4883
    • Github repository
Re: heashotsurt plugin v0.2.0 [urt4.1]
« Reply #38 on: December 31, 2009, 05:12:54 PM »
that should do it. Give it a try

Offline MrMind

  • Jr. Member
  • **
  • Posts: 39
Re: heashotsurt plugin v0.2.0 [urt4.1]
« Reply #39 on: January 01, 2010, 01:09:35 PM »
that should do it. Give it a try
Yeah. It works. But now show all players headshot and not only mine. Is it possible to show only my headshots?

Offline Courgette

  • Senior Dev.
  • Hero Member
  • *
  • Posts: 4883
    • Github repository
Re: heashotsurt plugin v0.2.0 [urt4.1]
« Reply #40 on: January 01, 2010, 03:18:59 PM »
no sorry.

Offline MrMind

  • Jr. Member
  • **
  • Posts: 39
Re: heashotsurt plugin v0.2.0 [urt4.1]
« Reply #41 on: January 01, 2010, 04:34:53 PM »
Hi Courgette,

Is it possible to show whos made the headshot in bigtext, because we can show only a text?

Thx in advance. :)
-------------------
Edit:
I did it, and it works very good.

Here is the code:
 
Quote
self.console.write('bigtext "%s made HEADSHOT"' % (client.name))

thx for this great plugin.
« Last Edit: January 01, 2010, 06:40:56 PM by MrMind »

Offline matthewstice

  • Full Member
  • ***
  • Posts: 57
Re: heashotsurt plugin v0.2.0 [urt4.1]
« Reply #42 on: January 07, 2010, 12:42:56 PM »
CANT GET THIS WORKING, only plugin that doesnt seem to work(COD1)1.5

IN MY COD CONFIG
set g_loghits "1"
set logfile "1
set g_logsync "2"

ALSO
headshotsurt.py is in my  /extplugins
headshots.xml is in my  /extplugins/conf
And enabled the plugin in b3/conf/b3.xml   as follows

   <plugin name="ctime" priority="14" config="@b3/extplugins/conf/plugin_ctime.xml"/>
    <plugin name="topkiller" priority="15" config="@b3/extplugins/conf/plugin_topkiller.xml"/>
    <plugin name="headshotsurt" priority="16" config="@b3/extplugins/conf/headshots.xml"/>


HEADSHOTS.XML FILE SAMPLE


<configuration plugin="headshotsurt">

   <settings name="settings">
      <!-- Reset spree stats for all clients at map rotation 0 = no, 1 = yes -->
      <set name="reset_headshots">1</set>
    
      <!-- The minimum level to be able to use the [email protected] command. -->
      <set name="min_level_headshots_cmd">1</set>
    
      <!-- Show awards. 0=no, 1=yes -->
      <set name="show_awards">1</set>
   </settings>

</configuration>

On server !headshots always say " you have no headshot " after u enter it even if u have headshots, no console messages come up after headshots

Here is part of my b3log where i found the headshotsurt

100107 02:56:35   DEBUG   Register Event: Program Exit: TopkillerPlugin
100107 02:56:35   BOT       Plugin topkiller (1.0.1 - Anubis) loaded
100107 02:56:35   BOT       Loading Plugin #16 headshotsurt [C:\UserFiles\wrifles\GameServers\TC72030157231655253572850\b3\extplugins\conf\headshots.xml]
100107 02:56:35   INFO   Could not load built in plugin headshotsurt (No module named headshotsurt)
100107 02:56:35   INFO   trying external plugin directory : C:\UserFiles\wrifles\GameServers\TC72030157231655253572850\b3\extplugins
100107 02:56:35   BOT       HeadshotsurtPlugin: Loading config C:\UserFiles\wrifles\GameServers\TC72030157231655253572850\b3\extplugins\conf\headshots.xml for HeadshotsurtPlugin
100107 02:56:35   DEBUG   HeadshotsurtPlugin: reset hs stats : True
100107 02:56:35   DEBUG   HeadshotsurtPlugin: show awards : True
100107 02:56:35   DEBUG   HeadshotsurtPlugin: min level for hs cmd : 1
100107 02:56:35   DEBUG   AdminPlugin: Command "headshots (hs)" registered with cmd_headshots for level (1, 100)
100107 02:56:35   DEBUG   Register Event: Stop Process: HeadshotsurtPlugin
100107 02:56:35   DEBUG   Register Event: Program Exit: HeadshotsurtPlugin
100107 02:56:35   BOT       Plugin headshotsurt (0.2.0 - Courgette) loaded
100107 02:56:35   BOT       Loading Plugin ftpytail

ALSO AFTER ABOUT 5 HEADSHOTS I DID
100107 02:57:50   DEBUG   AdminPlugin: OnSay handle 5:"!headshots"
100107 02:57:50   DEBUG   AdminPlugin: Handle command !headshots
100107 02:57:50   VERBOSE   RCON sending (75.102.38.5:28960) tell 0 ^1=^7W^1= ^3[pm]^7 ^7You made no headshot

THis shows up about 10times in the log
100107 03:14:46   VERBOSE   Parsing Event: Client Kill: HeadshotsurtPlugin
« Last Edit: January 07, 2010, 12:49:24 PM by matthewstice »

Offline Courgette

  • Senior Dev.
  • Hero Member
  • *
  • Posts: 4883
    • Github repository
Re: heashotsurt plugin v0.2.0 [urt4.1]
« Reply #43 on: January 07, 2010, 01:23:52 PM »
This is plugin is for Urban Terror only. It is not meant to work for other games.

Offline matthewstice

  • Full Member
  • ***
  • Posts: 57
Re: heashotsurt plugin v0.2.0 [urt4.1]
« Reply #44 on: January 07, 2010, 03:27:48 PM »
srry me so retardaaaaad lol

 


Rate this page +1 at Google Search

anything