thankyou
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: WeaponLimiter Plugin  (Read 23761 times)

Offline GeneralFailure

  • Jr. Member
  • **
  • Posts: 34
    • [FPF] FrankenPower FAILURE
Re: WeaponLimiter Plugin
« Reply #45 on: June 27, 2013, 11:56:58 PM »
Hi ozon,

very thx for your answer.
i understand what you mean...i think you are right.

thank you

Offline mansonik

  • Newbie
  • *
  • Posts: 4
Re: WeaponLimiter Plugin
« Reply #46 on: July 20, 2013, 08:28:50 PM »
Hi,

I would lite to make Weaponlimiter in BF3 to be writing as !yell does.

Anyone has an idea how to make that possible?

Offline Courgette

  • Senior Dev.
  • Hero Member
  • *
  • Posts: 4882
    • Github repository
Re: WeaponLimiter Plugin
« Reply #47 on: July 21, 2013, 02:22:27 AM »
I would lite to make Weaponlimiter in BF3 to be writing as !yell does.

You can do that by hacking a bit the code of the plugin.

Edit the file weaponlimiter\__init__.py and replace

Quote
killer.message('Kill reason: Killed by Admin. %s is forbidden!' % weapon)
with
Quote
killer.yell('Kill reason: Killed by Admin. %s is forbidden!' % weapon)

and replace
Quote
killer.message('%s is forbidden!' % weapon)
with
Quote
killer.yell('%s is forbidden!' % weapon)

Offline mansonik

  • Newbie
  • *
  • Posts: 4
Re: WeaponLimiter Plugin
« Reply #48 on: July 21, 2013, 01:59:49 PM »
You can do that by hacking a bit the code of the plugin.

Edit the file weaponlimiter\__init__.py and replace
with
and replacewith

And how to change yell duration?
And i would like to write "Forbiden weapons ... " to be write as yell too.

Offline Courgette

  • Senior Dev.
  • Hero Member
  • *
  • Posts: 4882
    • Github repository
Re: WeaponLimiter Plugin
« Reply #49 on: July 21, 2013, 03:40:44 PM »
And how to change yell duration?
See big_msg_duration in your b3.xml file.
Code: [Select]
  
      <!-- big_msg_duration : for how many seconds big messages are displayed -->
        <set name="big_msg_duration">6</set>
If you can't find it, or have difficulties with your b3.xml file, use http://config.bigbrotherbot.net/form.php?parser=bf3 to create a new one.

And i would like to write "Forbiden weapons ... " to be write as yell too.
in the same file as explained in my previous post, replace
Quote
            if client:
                client.message(msg)
            else:
                self.console.say(msg)
with
Quote
            if client:
                client.yell(msg)
            else:
                self.console.saybig(msg)

Offline ozon

  • Full Member
  • ***
  • Posts: 107
    • GitHub
Re: WeaponLimiter Plugin
« Reply #50 on: July 23, 2013, 11:33:58 AM »
Nice idea. Should I implement it?

But remember that if the killer is killed (example for forbidden weapon usage), he can not read the Yell message. Feasible option is to display the message to him when he respawn.
« Last Edit: July 23, 2013, 11:35:45 AM by ozon »

Offline GeneralFailure

  • Jr. Member
  • **
  • Posts: 34
    • [FPF] FrankenPower FAILURE
Re: WeaponLimiter Plugin
« Reply #51 on: July 23, 2013, 03:51:55 PM »
Yes please, implement it  ;D

Offline ozon

  • Full Member
  • ***
  • Posts: 107
    • GitHub
Re: WeaponLimiter Plugin
« Reply #52 on: July 24, 2013, 12:40:40 AM »
You can test it if you like.
I addet a new config option that allow to configure a extra message. ( display as message or yell with duration ).


Last patch: https://github.com/ozon/b3-plugin-weaponlimiterbf3/commit/c45acf7af755e0f5bad016319b3da00fe1389d61
Last dev download: https://github.com/ozon/b3-plugin-weaponlimiterbf3/archive/master.zip

I add later support for delayed yell messages.

Code: python [Select]

>>> joe.kills(simon,'Weapons/Gadgets/C4/C4')
..result in
Code: [Select]
Joe kills Simon
sending msg to Joe: Kill reason: Killed by Admin. C4 EXPLOSIVES is forbidden!
WARNING [3]: Joe,  C4 EXPLOSIVES is forbidden!
ALERT: Joe auto-kick from warnings if not cleared [3]  C4 EXPLOSIVES is forbidden!
You have Simon killed with a C4 EXPLOSIVES. This weapon is forbidden!
« Last Edit: July 24, 2013, 12:46:00 AM by ozon »

Offline GeneralFailure

  • Jr. Member
  • **
  • Posts: 34
    • [FPF] FrankenPower FAILURE
Re: WeaponLimiter Plugin
« Reply #53 on: July 24, 2013, 04:45:08 AM »
very thx,

the new Plugin-Version is installed and b3 is restarted...


Offline xcoreZz

  • Newbie
  • *
  • Posts: 2
Re: WeaponLimiter Plugin
« Reply #54 on: July 24, 2013, 05:36:44 PM »
How to install ? I dont find weaponlimiterbf3.py.

Offline ozon

  • Full Member
  • ***
  • Posts: 107
    • GitHub
Re: WeaponLimiter Plugin
« Reply #55 on: July 24, 2013, 06:04:29 PM »
How to install ? I dont find weaponlimiterbf3.py.
Sorry. I should update the README.

Copy the folder "weaponlimiterbf3" from extplugins to your B3 extplugins.

Offline xcoreZz

  • Newbie
  • *
  • Posts: 2
Re: WeaponLimiter Plugin
« Reply #56 on: July 24, 2013, 06:08:19 PM »
Thank you.
But i have another Problem: http://pastebin.com/JPatRbPn
« Last Edit: July 24, 2013, 10:29:57 PM by xcoreZz »

Offline GeneralFailure

  • Jr. Member
  • **
  • Posts: 34
    • [FPF] FrankenPower FAILURE
Re: WeaponLimiter Plugin
« Reply #57 on: July 26, 2013, 06:52:12 PM »
Thank you.
But i have another Problem: http://pastebin.com/JPatRbPn

hi, xcoreZz

do you make changes in the plugin_weaponlimiterbf3.ini ?
i had the same error with misconfigurations in the plugin_weaponlimiterbf3.ini.

Test the original ini-File from the Plugin-Package.

Offline ozon

  • Full Member
  • ***
  • Posts: 107
    • GitHub
Re: WeaponLimiter Plugin
« Reply #58 on: July 26, 2013, 06:55:35 PM »
Thank you.
But i have another Problem: http://pastebin.com/JPatRbPn
Please post your config file. Thanks

Offline ozon

  • Full Member
  • ***
  • Posts: 107
    • GitHub
Re: WeaponLimiter Plugin
« Reply #59 on: December 09, 2013, 04:21:24 AM »
This Plugin should now work with Battlefield 4 too.

 


Rate this page +1 at Google Search