documentation
download & extend
community & support
B3 hosting
May 24, 2012, 12:38:37 AM
Home
Features
Get Started
Supported Games
Forums
Help
Search
Tags
Groupware
Login
Register
Activation Mail
It appears you have not registered with our community. To register please click here ...
You are here:
Big Brother Bot Forum
Community Developers
Plugin Developers
custom commands (new plugin)
Pages: [
1
]
Go Down
« previous
next »
Print
Author
Topic: custom commands (new plugin) (Read 1262 times)
Blacky
Jr. Member
OS: Windows
Type: Renting Server, no B3
Gameservers:
cod4
Posts: 19
Offline
custom commands (new plugin)
«
on:
October 14, 2011, 05:31:44 AM »
hey all
for my clan server i sould like to have some custom commands,
the problem is non of is is that advanced in programming.
i've already been able to set the !rules from max 20 to max 40 (we have 32 rules)
now i whant to be able to do exactly the same as the normal !rules but only for a few of them.
as our rules are scrambled, we would like the ability to give players rules that are only the tactical once or only the server rules (like english only, chat spamming, abusive lnguage ect)
we also would like to be able to spam only 1 rule (like the !spam), but this only to 1 player, we had this on our b3 but our clan fell appart and is started up again now and we miss these commands in b3 (the command was !sr)
i sould like to have some additional commands like !mp and !setmp (!mp telling people who is currently in command of bans ect and !setmp to change between moderators or admins)
can someone help me writing a plugin like that or does it already exists or does a part of it already exists?
thank you
edit:
already tryied some but python is not a language for me, i'll stick to c++/c/vb.net/html/css
http://pastebin.com/8PjBTzBc
«
Last Edit: October 14, 2011, 05:53:17 AM by Blacky
»
Logged
Garreth
Beta Testers
OS: Linux
Type: Owner dedicated server(s)
Gameservers:
UrT
Posts: 244
Offline
Re: custom commands (new plugin)
«
Reply #1 on:
October 14, 2011, 08:11:21 AM »
This !spam <rule> [<person>], I'd be glad to see in new version of the bot:) However I'm not sure if the devs will look into this.
If you've got programming skills in other languages, then writing such simple plugin shouldn't be the problem for you. I'm currently quite busy with other things, but if you'd like to write your own plugin for this !mp thing, you can make it simpler. Don't use !setmp command, but read from the database players of desired level.
Logged
Looking for Polish servers?
Blacky
Jr. Member
OS: Windows
Type: Renting Server, no B3
Gameservers:
cod4
Posts: 19
Offline
Re: custom commands (new plugin)
«
Reply #2 on:
October 14, 2011, 09:02:08 AM »
well i'm working on it :p
i wouldn't say i got skills at programming, but i'm a quick learner on languages.
if yiu count html and css as programming then you can say i'm quite skilled :p
but c++/c/vb.net is just in the learning phase.
i'll look into already made plugins to see the possibility's and try to assemble it out of that.
now i'm working on that plugin that can spam part of the rules but i didn't figure out how to read the rules out of the plugin_admin.xml using another plugin.
if there are persons whit more skill than me who whant to assist me i would kindly accept
my xfire: dutywascalled
Logged
Spoon
Sr. Member
OS: Windows
Type: Owner dedicated server(s)
Gameservers:
CoD4
Posts: 180
Offline
Re: custom commands (new plugin)
«
Reply #3 on:
October 14, 2011, 10:15:43 AM »
This allows you to do !spam rule1 for every or !spam name rule1 for just that person
Code:
def cmd_spam(self, data, client=None, cmd=None):
"""\
[<name>] <message> - spam a predefined message
"""
input = self.parseUserCmd(data)
if not input:
client.message('^7Invalid parameters')
return False
if input[1]:
cid = input[0]
sclient = self.findClientPrompt(cid, client)
if sclient:
m = re.match('^([^ ]{2,})$',input[1])
if not m:
client.message('^7Invalid parameters')
return False
keyword = m.group(1)
s = self.getSpam(keyword)
if s:
sclient.message(s)
else:
client.message('^7Could not find spam message %s' % keyword)
else:
return False
else:
m = re.match('^([^ ]{2,})$', data)
if not m:
client.message('^7Invalid parameters')
return False
keyword = m.group(1)
s = self.getSpam(keyword)
if s:
self.console.say(s)
else:
client.message('^7Could not find spam message %s' % keyword)
just replace def cmd_spam in the admin plugin with this code.
Logged
Blacky
Jr. Member
OS: Windows
Type: Renting Server, no B3
Gameservers:
cod4
Posts: 19
Offline
Re: custom commands (new plugin)
«
Reply #4 on:
October 14, 2011, 11:22:17 AM »
thx spoon!
its not the !sr as i'm used to but it sould do the same!
now only working on that !tr thingy
Logged
Spoon
Sr. Member
OS: Windows
Type: Owner dedicated server(s)
Gameservers:
CoD4
Posts: 180
Offline
Re: custom commands (new plugin)
«
Reply #5 on:
October 14, 2011, 11:26:46 AM »
so what does !mp and !tr do? add me on xfire and i will see if i can help you with these commands. xfire: EHDSpoon
Logged
Blacky
Jr. Member
OS: Windows
Type: Renting Server, no B3
Gameservers:
cod4
Posts: 19
Offline
Re: custom commands (new plugin)
«
Reply #6 on:
October 14, 2011, 01:04:41 PM »
!tr sould spam the tactical rules lets say teh tactical rules are Rule1-rule5 and rule8 so it sould spam rule 1 to 5 and rule 8
!mp, maybe i sould change it to !asset, and it sould be use by all players to see who is in command of assets
(and !setasset <playername allies> <playername axis> sould set who is in charge)
Logged
Blacky
Jr. Member
OS: Windows
Type: Renting Server, no B3
Gameservers:
cod4
Posts: 19
Offline
Re: custom commands (new plugin)
«
Reply #7 on:
October 31, 2011, 01:24:02 PM »
so i got following command from spoon
Code:
def cmd_spam(self, data, client=None, cmd=None):
"""\
[<name>] <message> - spam a predefined message
"""
input = self.parseUserCmd(data)
if not input:
client.message('^7Invalid parameters')
return False
if input[1]:
cid = input[0]
sclient = self.findClientPrompt(cid, client)
if sclient:
m = re.match('^([^ ]{2,})$',input[1])
if not m:
client.message('^7Invalid parameters')
return False
keyword = m.group(1)
s = self.getSpam(keyword)
if s:
sclient.message(s)
else:
client.message('^7Could not find spam message %s' % keyword)
else:
return False
else:
m = re.match('^([^ ]{2,})$', data)
if not m:
client.message('^7Invalid parameters')
return False
keyword = m.group(1)
s = self.getSpam(keyword)
if s:
self.console.say(s)
else:
client.message('^7Could not find spam message %s' % keyword)
how can i get it that it says to the spammer that (if command* is used) that the rule is being spammed to A user
*!s black rule1
Logged
HogensHero
Newbie
OS: Windows
Type: Gameserver Rental Co.
Gameservers:
CoD7
Posts: 9
Offline
Re: custom commands (new plugin)
«
Reply #8 on:
February 20, 2012, 07:17:55 PM »
Hi, I am sorry this is kinda late.
I need some help I am trying to put you command lines into my server and
I am not sure where to put this in.
Any help would be appreciated.
Logged
MordyT
Support Hero
OS: Windows
Type: Gameserver Rental Co.
Gameservers:
2x CoD4, 1x BF3
Posts: 2627
Offline
Owner of Host4B3.com - Over 70 bots hosted!
Re: custom commands (new plugin)
«
Reply #9 on:
February 21, 2012, 05:39:32 AM »
Quote from: HogensHero on February 20, 2012, 07:17:55 PM
Hi, I am sorry this is kinda late.
I need some help I am trying to put you command lines into my server and
I am not sure where to put this in.
Any help would be appreciated.
The code spoon posted goes into the admin.py in the plugins folder. You will only have this if you use a source install.
Logged
Need B3 Bot hosting? Check out
Host4B3.com
Check
Twitter.com/Host4B3
for updates if the site it down.
Help will be given to those with a b3.log
System: Python 2.7.1 - B3 Source Code - Locally hosted MySQL & Apache - Win 2k3
Tags:
Pages: [
1
]
Go Up
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News (Read Only)
===> News Archive
===> Website News
=> General Discussion
===> Servers
=> Shared Services
-----------------------------
Support Forums
-----------------------------
=> Support Instructions
=> Installation Support
=> General Usage Support
=> Game specific Support
===> Battle Field 3
=====> BF3/B3 beta board
===> Battle Field Bad Company 2
===> Call of Duty series
=====> CoD, CoD:UO, CoD2
=====> Call of Duty 4 (Modern Warfare)
=====> Call of Duty 5 (World at War)
=====> Call of Duty 6 (Modern Warfare 2)
=====> Call of Duty 7 (Black Ops)
=======> AlterOps
===> Frontlines, Fuel of War
===> Enemy Territory
===> Homefront
===> Medal of Honor 2010
===> Open Arena
===> Red Orchestra 2
===> Smokin' Guns
===> Soldier of Fortune 2
===> Urban Terror
===> World of Padman
===> Other games
-----------------------------
Add-Ons
-----------------------------
=> Plugins Discussion
===> Plugin Releases!
===> Plugins by xlr8or
===> Plugins by Courgette
===> Plugins by Freelander
===> Plugins by Bakes
===> Plugins by Ismael
===> Plugins by flinkaflenkaflrsk
===> Plugins by Anubis
===> Plugins by Spoon
===> Plugins by PtitBigorneau
===> Plugins by BlackMamba
===> Plugins by Beber888
===> Plugins by grosbedo
=> XLRstats
===> Weaponmodifiers
=> Echelon
===> Echelon version 2
=> Configurations
=> Installers
-----------------------------
Community Developers
-----------------------------
=> Plugin Developers
=> The Code Bin
Rate this page +1 at Google Search
Web Toolbar by Wibiya
SimplePortal 2.3.1 © 2008-2009, SimplePortal