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: Bots Plugin for Urban Terror  (Read 31350 times)

Offline ph03n1x

  • Sr. Member
  • ****
  • Posts: 296
    • Lovers and Haters Urban Terror
Re: Bots Plugin for Urban Terror
« Reply #75 on: November 28, 2013, 10:01:14 AM »
ok thank you LouK..

ps: Ignore the comment on GitHub :P

Offline ph03n1x

  • Sr. Member
  • ****
  • Posts: 296
    • Lovers and Haters Urban Terror
Re: Bots Plugin for Urban Terror
« Reply #76 on: December 14, 2013, 01:01:05 PM »
It would be nice if there was a command to disable bots until new map loads or even disable for a period of time. Is there a way we can achieve this?
« Last Edit: December 14, 2013, 04:27:35 PM by ph03n1x »

Offline LouK

  • Full Member
  • ***
  • Posts: 119
    • The Sni:{Per}:Jum Clan
Re: Bots Plugin for Urban Terror
« Reply #77 on: December 16, 2013, 10:42:13 AM »
It would be nice if there was a command to disable bots until new map loads or even disable for a period of time. Is there a way we can achieve this?


Sure, I could add a parameter to the !kickbots command for time(example: !kickbots 10 (kick them for 10 mins)

Btw, I finally got bots working now I'm working to finish maps add stuff ;)

Offline ph03n1x

  • Sr. Member
  • ****
  • Posts: 296
    • Lovers and Haters Urban Terror
Re: Bots Plugin for Urban Terror
« Reply #78 on: December 16, 2013, 05:58:57 PM »

That example for a timed kb command is excellent. +1 for that. :)

Yea I saw, LouK..I'm anxious to use it! I follow you on GitHub...I know every little update you make. I'm like the stalker you never had :P

Offline ph03n1x

  • Sr. Member
  • ****
  • Posts: 296
    • Lovers and Haters Urban Terror
Re: Bots Plugin for Urban Terror
« Reply #79 on: December 20, 2013, 02:32:35 PM »
I have had the world of trouble understanding this (due to it being in complete French). I am not really a python scriptwriter so I need a little guidance. In order to get bots to automatically come in game after 10 minutes, I have edited the bots.py file to look like this:

Code: [Select]
 def KickAllBots (self, data, client, cmd=None):
                """\
                Kick all the bots of the server
                """
                # Kick de tous les bots present sur le serveur
                if client is not None:
                        client.message('^7Bot regulationl : ^1OFF')
                self.Cde_Regul_Bots = False
                self.SupprBots(1, self.Max_Bot)
time.sleep(600)
client.message('^7Bot Regulation : ^2ON')
self.Cde_Regul_Bots = True
self.SupprBots(0, self.Max_Bot)

The problem is that b3 will wait for that 10 minutes and will not accept other commands during that time. Is there a way I can make it turn back on automatically and have b3 accept other commands meanwhile?

Thanks for the help!



Offline 82ndAB.Bravo17

  • Dev. Team
  • Hero Member
  • *
  • Posts: 2528
Re: Bots Plugin for Urban Terror
« Reply #80 on: December 20, 2013, 06:44:38 PM »
Instead of sleep which halts execution  until it is over you need to use a crontab which will activate after the 10 minutes is up.

You will find examples of how to do this in some of the plugins.

Offline Kalash_13

  • Newbie
  • *
  • Posts: 1
Re: Bots Plugin for Urban Terror
« Reply #81 on: December 05, 2014, 10:39:24 AM »
Looking for custom bot maps ?
you should check botmapsdepot.free.fr
There are more than 200 custom bot maps for Urban Terror 4.2.x available

Offline Splashing

  • Jr. Member
  • **
  • Posts: 20
  • they call me mr boombastic
    • Most Wanted Clan
Re: Bots Plugin for Urban Terror
« Reply #82 on: July 18, 2015, 02:12:28 PM »
Sorry for bumping an old thread, but is there a bot plugin like this which works for 4.2?
In the readme it says This plugin works for 4.1 only!

Thanks
Splashing

Offline Fenix

  • Dev. Team
  • Hero Member
  • *
  • Posts: 983
    • GitHub
Re: Bots Plugin for Urban Terror
« Reply #83 on: July 18, 2015, 03:09:23 PM »
It should work with Urban Terror 4.2 too since the bot code has not been changed across the 2 versions of UrT.

Offline Splashing

  • Jr. Member
  • **
  • Posts: 20
  • they call me mr boombastic
    • Most Wanted Clan
Re: Bots Plugin for Urban Terror
« Reply #84 on: July 19, 2015, 03:52:07 AM »
It worked, but after a while the bots started to reconnect with random names.


When I do !list it shows the names that they're supposed to have.



bots.xml - http://pastebin.com/PZbYzB2y
b3.xml - http://pastebin.com/q4fK7npE

Offline ph03n1x

  • Sr. Member
  • ****
  • Posts: 296
    • Lovers and Haters Urban Terror
Re: Bots Plugin for Urban Terror
« Reply #85 on: July 19, 2015, 04:27:41 AM »
I use this one..works fine for me: https://github.com/ph03n1x9000/BotHandler


cu :)

Offline Splashing

  • Jr. Member
  • **
  • Posts: 20
  • they call me mr boombastic
    • Most Wanted Clan
Re: Bots Plugin for Urban Terror
« Reply #86 on: July 19, 2015, 11:38:32 AM »
It's working for me too, but again it's starting to take names of other players :(

Any reason why??

Offline Fenix

  • Dev. Team
  • Hero Member
  • *
  • Posts: 983
    • GitHub
Re: Bots Plugin for Urban Terror
« Reply #87 on: July 19, 2015, 12:35:45 PM »
Seems that this plugin is quite popular. I'm thinking of including it in the B3 1.10 standard plugins set, giving it a fresh up :)

Offline ph03n1x

  • Sr. Member
  • ****
  • Posts: 296
    • Lovers and Haters Urban Terror
Re: Bots Plugin for Urban Terror
« Reply #88 on: July 19, 2015, 02:28:03 PM »
Please attach b3.log...

cu :)

Offline Splashing

  • Jr. Member
  • **
  • Posts: 20
  • they call me mr boombastic
    • Most Wanted Clan
Re: Bots Plugin for Urban Terror
« Reply #89 on: July 19, 2015, 03:09:44 PM »
Well the thing is, b3 still logs them as their original names, the ones they're supposed to be.
But on the server their display names are different.
It's a fairly large log so I apologize in advance.

b3.log - 

pastebin says that the file is too big... It's 5.2mb, what should I do?

 


Rate this page +1 at Google Search