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 ]

You are here: Big Brother Bot ForumAdd-OnsPlugins DiscussionPlugins by Anubis (Moderator: Anubis)Weapon Control Plugin - Antinoob v1.0.7
Pages: 1 [2] 3 4 ... 28   Go Down
  Print  
Author Topic: Weapon Control Plugin - Antinoob v1.0.7  (Read 55780 times) Bookmark and Share
B3 Contrib/Support
*
OS: --No B3 installed--
Type: --No B3 installed--
Posts: 1225
Offline Offline
Support Specialty: B3-Core, CoD/BFBC2 parsers, FTP-functionality, Plugin development
« Reply #15 on: January 25, 2009, 02:20:56 PM »

hmm, isn't b3 meant to ban based on warninglength/30?
Logged


Moderator
*
OS: Linux
Type: Owner dedicated server(s)
Gameservers: COD4
Posts: 228
Offline Offline
WWW
« Reply #16 on: January 25, 2009, 02:30:30 PM »

Nope... warrning length means that when warning will expire. It's not a ban duration. Just look at the echelon to see the timings.
Logged

Jr. Member
**
Posts: 30
Offline Offline
« Reply #17 on: January 25, 2009, 05:30:57 PM »

The more I post questions here, the more I see the name of the plugin referring to me. LOL

Thanks for the help!
Logged
Full Member
***
Posts: 84
Offline Offline
WWW
« Reply #18 on: January 26, 2009, 06:30:26 AM »

it is however set to tempban for too many warnings for a duration = to warninglength/divider.
Logged
B3 Contrib/Support
*
OS: --No B3 installed--
Type: --No B3 installed--
Posts: 1225
Offline Offline
Support Specialty: B3-Core, CoD/BFBC2 parsers, FTP-functionality, Plugin development
« Reply #19 on: January 26, 2009, 10:09:04 AM »

Nope... warrning length means that when warning will expire. It's not a ban duration. Just look at the echelon to see the timings.

i got that from here, in the botmanual:
http://www.bigbrotherbot.com/trac/wiki/BotManual/Warnings

so ha!
Logged

Moderator
*
OS: Linux
Type: Owner dedicated server(s)
Gameservers: COD4
Posts: 228
Offline Offline
WWW
« Reply #20 on: January 26, 2009, 02:02:46 PM »

ha! you got me!

anyway, thanks for notice.
Logged

Jr. Member
**
Posts: 30
Offline Offline
« Reply #21 on: January 28, 2009, 12:26:46 PM »

Anyone notice issues with the knife?

It's not so bad because so far the only occurrences are when someone knives while possessing a banned weapon. When knifing, while possessing an acceptable weapon, there is no kick/warn.
Logged
B3 Contrib/Support
*
OS: --No B3 installed--
Type: --No B3 installed--
Posts: 1225
Offline Offline
Support Specialty: B3-Core, CoD/BFBC2 parsers, FTP-functionality, Plugin development
« Reply #22 on: January 28, 2009, 12:37:10 PM »

until anubis factors in weapon replacements, like xlrstats, then yes, there will be problems with the knives. Sorry!

It happens in one of the communities I play on, has done for the last 10 months.
Logged

Moderator
*
OS: Linux
Type: Owner dedicated server(s)
Gameservers: COD4
Posts: 228
Offline Offline
WWW
« Reply #23 on: January 28, 2009, 01:22:49 PM »

Hmmm.. I think I need to add some "MOD" settings.... I'll think about that.
Logged

Jr. Member
**
Posts: 30
Offline Offline
« Reply #24 on: January 28, 2009, 04:54:17 PM »

So the same thing goes for when someone is using a legal rifle but uses an illegal pistol.

This is all very odd. Sometimes it works for certain weapons and other weapons it will not.

Sure my list is very long, I'm running a sniper only server. Basically everything is illegal except for sniper class weapons, pistols, grenades, and C4.

Anubis,

If you need any help at all, let me know. I'll do anything to get this to work.

FB
Logged
Full Member
***
Posts: 50
Offline Offline
« Reply #25 on: January 31, 2009, 12:35:17 PM »

Is there a way to set up this plugin so that it kicks people who use our list of banned weapons (all noob tubes and marty) on the first offense?  Then maybe have it temp ban after a set number of kicks?
Logged
B3 Contrib/Support
*
OS: --No B3 installed--
Type: --No B3 installed--
Posts: 1225
Offline Offline
Support Specialty: B3-Core, CoD/BFBC2 parsers, FTP-functionality, Plugin development
« Reply #26 on: January 31, 2009, 01:31:13 PM »

Code:
                        self._adminPlugin.warnClient(event.client, self._warningrule , None, False)

Change that line to:
Code:
                        self._adminPlugin.kickClient(event.client, self._warningrule , None, False)
                        self._adminPlugin.warnClient(event.client, self._warningrule , None, False)

that should work. If it doesn't, please say why.
Logged

Full Member
***
Posts: 50
Offline Offline
« Reply #27 on: January 31, 2009, 02:03:46 PM »

Now it doesn't warn nor kick.  Also...I noticed that this new version of antinoob doesn't display a "don't use" message at the start of a round and a "you can use" message after a set time like it used to...

Here is my py:
Quote
class WeaponInfo:
    _weaponName = None
    _permanent = "0"
   
class MapInfo:
    _mapName = None
    _duration = 10   

#--------------------------------------------------------------------------------------------------
class AntinoobPlugin(b3.plugin.Plugin):
    _adminPlugin = None
    _currentMap = None
    _weapons = []
    _bannedweapons = []
    _maps = []
    _warnduration = 10
    _warndurationdefault = 10
    #default
    _warningrule = 'rule10'
    _unlockmessage = '%s ^3seconds passed ^7- ^3all weapons unlocked^7!!!'
    _infomessage = '^1NO ^2air strikes^7, ^2helis^7 or ^2RPGs for ^7%s seconds. ^1NO ^2martyrdom^7, ^2last stand ^7or ^2launchers allowed^7.'

    def onStartup(self):
        self.registerEvent(b3.events.EVT_CLIENT_KILL)
        self.registerEvent(b3.events.EVT_CLIENT_DAMAGE)
        self.registerEvent(b3.events.EVT_GAME_ROUND_START)
        self._adminPlugin = self.console.getPlugin('admin')

    def onLoadConfig(self):
        self.debug('Loading Configuration Started')
        self._warndurationdefault = self.config.getint('settings', 'warn_duration')
        self.debug('_warndurationdefault: ' + str(self._warndurationdefault))
        self._warningrule = self.config.get('settings', 'warning_rule')
        self._unlockmessage = self.config.get('settings', 'unlock_message')
        self._infomessage = self.config.get('settings', 'info_message')       
       
        for e in self.config.get('weapons/weapon'):
            #name  = setting.get('name')
            self.debug('Weapon parsed: ' + e.text + ' perm: ' + e.get('perm'))
            _wi = WeaponInfo();
            _wi._weaponName = e.text.strip();
            self.debug('Weapon loaded: ' + _wi._weaponName)
            _wi._permanent = e.get('perm');
            if(_wi._permanent == "0"):
                self._weapons.append(_wi)
            else:
                self._bannedweapons.append(_wi)
        _maps = []
        for e in self.config.get('maps/map'):
            #name  = setting.get('name')
            _mi = MapInfo();
            _mi._mapName = e.get('name')
            _mi._duration = int(e.text.strip())
            self.debug('Map parsed: ' + _mi._mapName + ' duration: ' + str(_mi._duration))
           
            self._maps.append(_mi);
       
        self.debug('Loading Configuration Finished')
        return
               
    def _usingWeaponsAllowed(self):
           self.debug(self._unlockmessage % self._warnduration)
           self.console.say(self._unlockmessage % self._warnduration)
           return
       
    def onEvent(self, event):
        if event.type == b3.events.EVT_CLIENT_KILL or event.type ==  b3.events.EVT_CLIENT_DAMAGE:
            weaponname = event.data[1]
            if self.console.game.roundTime() <= self._warnduration:
                #self.debug(weaponname + ' in warnduration: ' + str(self.console.game.roundTime()))
                for weaponInfo in self._weapons:
                    if weaponInfo._weaponName == weaponname:
                        #self.debug('[WARN] - Temporary Restricted Weapon: ' + str(weaponname) + '- Round time: ' + str(self.console.game.roundTime()))
                        self._adminPlugin.warnClient(event.client, self._warningrule , None, False)
                        return
            for bannedweaponInfo in self._bannedweapons:
                if(bannedweaponInfo._weaponName == weaponname):
                    #self.debug('[WARN] - Banned Weapon: ' + str(weaponname))
                    self._adminPlugin.kickClient(event.client, self._warningrule , None, False)
                    self._adminPlugin.warnClient(event.client, self._warningrule , None, False)
                    return
        elif event.type == b3.events.EVT_GAME_ROUND_START:
            if self._currentMap == None or self.console.game.mapName != self._currentMap:
                self._currentMap = self.console.game.mapName
                self.debug('New Map: ' + str(self._currentMap))
                self._warnduration = self._warndurationdefault
                for mapinfo in self._maps:
                    if(mapinfo):
                        if self._currentMap == mapinfo._mapName:
                            self._warnduration = mapinfo._duration
                            self.debug('New Duration: ' + str(self._warnduration))
                            break
            if len(self._weapons) > 0:
                self.debug(self._infomessage % self._warnduration)
                self.console.say(self._infomessage % self._warnduration)
                t = threading.Timer(self._warnduration+1, self._usingWeaponsAllowed)
                t.start()
            return

And here is my xml:
Quote
<configuration plugin="antinoob">
   <settings name="settings">   
      <set name="warn_duration">20</set>
      <set name="warning_rule">rule11</set>
      <set name="unlock_message">%s ^3seconds passed ^7- ^3all weapons unlocked^7!!!</set>
      <set name="info_message">^1NO ^2air strikes^7, ^2helis^7 or ^2RPGs for ^7%s seconds. ^1NO ^2martyrdom^7, ^2last stand ^7or ^2launchers allowed^7.</set>
   </settings>
   <weapons>
      <!-- Tubes -->
        <weapon perm="1">gl_ak47_mp</weapon>
        <weapon perm="1">gl_g3_mp</weapon>
        <weapon perm="1">gl_g36c_mp</weapon>
        <weapon perm="1">gl_m4_mp</weapon>
        <weapon perm="1">gl_m14_mp</weapon>
        <weapon perm="1">gl_m16_mp</weapon>
        <weapon perm="1">gl_mp</weapon>       
        <!-- Nades -->   
        <!-- Airstike -->       
        <weapon perm="0">artillery_mp</weapon>
    <!-- RPG -->
    <weapon perm="0">rpg_mp</weapon>
        <!-- Heli -->       
        <!-- <weapon perm="0">helicopter_mp</weapon>        -->   
        <!-- Martyr -->
        <weapon perm="1">frag_grenade_short_mp</weapon>
   </weapons>
</configuration>
« Last Edit: February 02, 2009, 03:42:44 PM by Lolzumad » Logged
Moderator
*
OS: Linux
Type: Owner dedicated server(s)
Gameservers: COD4
Posts: 228
Offline Offline
WWW
« Reply #28 on: January 31, 2009, 03:06:21 PM »

As said in the very first post in this thread:
unlock_message - message announcing unlocking weapons - MUST CONTAIN %s which will be replaced by number of seconds
info_message - message informing about duration of weapons restriction  - MUST CONTAIN %s which will be replaced by number of seconds
Logged

Full Member
***
Posts: 50
Offline Offline
« Reply #29 on: January 31, 2009, 03:22:40 PM »

Sorry...I knew I still had to change that but I didn't think it would stop it from working.

However, I still do not get a message on round start and another a set time into the round.  I also do not get a warn or a kick when a noob tube is used.
Logged
Tags: martydom 
Pages: 1 [2] 3 4 ... 28   Go Up
  Print  
 
Jump to:  


Rate this page +1 at Google Search


SimplePortal 2.3.1 © 2008-2009, SimplePortal