Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - mRokita

Pages: [1] 2 3 ... 34
1
Server Discussion / Re: Docker image
« on: February 05, 2021, 09:34:42 PM »
Hi!
Nice work,
It's probably a little too late, but you can use the --net=host flag to make the container use host's network namespace - it should make your container(s) able to get the real IPs.

2
Server Discussion / Re: DP2 Discord Connector
« on: October 22, 2019, 02:13:14 PM »
Nice one!
I will try to find some time to release an updated version of DPLib.
What's the problem with python >= 3.7?
Is it on dplib's part?

3
Server Discussion / Re: Python script help needed.
« on: April 02, 2018, 01:40:17 PM »
The old script is now deprecated, use the new DPLib

install it using PIP:

python3 -m pip install --upgrade DPLib

Code: [Select]
from asyncio import sleep

from dplib.server import Server

s = Server(hostname='127.0.0.1', port=27911, logfile=r'C:\Games\Paintball2\pball\qconsole27911.log', rcon_password='hello')

map_settings = {
    'airtime': {
        'command': 'set elim 10;set timelimit 10;',
        'message': '{C}9Special settings for airtime {C}Aenabled'
    },
    'shazam33': {
        'command': 'set elim 10;set timelimit 10;',
        'message': '{C}9Special settings for shazam33 {C}Aenabled'
    },
    'default_settings': {
        'command': 'set elim 20;set timelimit 20;',
        'message': '{C}9No special settings for map {I}<mapname>{I}, using defaults'
    }
}

@s.event
def on_mapchange(mapname):
    if mapname not in map_settings:
        settings = map_settings['default_settings']
    else:
        settings = map_settings[mapname]
    command = settings.get('command', None)
    message = settings.get('message', None)
    if message:
        message = mapname.join(message.split('<mapname>'))
    if command:
        for c in command.split(';'):
            s.rcon(c)
    if message:
        yield from sleep(3)
        s.say(message)

s.run()
https://mrokita.github.io/DPLib/gettingstarted.html#map-settings

4
There is a new version called DPLib
Here are the docs: https://mrokita.github.io/DPLib/

5
Server Discussion / Re: DPLib
« on: July 12, 2017, 07:53:16 AM »
I'm not payl, obviously. ROT-13(payl) is obviously not cnly!
But payl is still around from time to time, which is nowadays "very active" comparing to others.

Too bad you didn't answer my comment. Being programmer with more years I wanted to raise your attention to terrible error handling. Some methods do raise errors. Some don't, instead returning a string like "here, do something with that". That isn't good design. I understand that error handling is hard thing to do, but I believe also that it's one of most important things. Just wanted to give that hint to you.

And also your dp server browser on android is... not necessary. I wouldn't pay for including it in store, or ask other people to help me... But that's just my opinion.

SB and that lib are my personal projects. I've written that serverbrowser some time ago to learn Android, the lib was my attempt on asyncio. Not all the errors are handled and not all the methods are implemented - it's not a final version.
Also, I wouldn't waste my time on developing stuff for DP if I wanted to create something popular/useful.

6
Server Discussion / Re: DPLib
« on: July 12, 2017, 06:13:36 AM »
Nice error handling bro.
nice nickname payl, u still around?

7
Paintball 2 Discussion / Re: SB 2.1 for Android
« on: July 04, 2017, 04:03:42 PM »
v 2.2 released - fixed the bug on Android 5.1+, should now work fine.
APK: https://dp.mrokita.pl/files/sb-android/sb-2.2.apk
You can donate me at https://dp.mrokita.pl - I'm going to put it on google play, but i need 25 USD to do that

8
Server Discussion / Re: DPLib
« on: July 03, 2017, 05:30:54 PM »
v1.3 released.




New features:

'On game end' event (Server.on_game_end(), Server.wait_for_game_end())
Status query support (Server.get_status(), Server.get_simple_playerlist())
Get cvar method (Server.get_cvar())

Install:

Code: [Select]
python3 -m pip install DPLib
Upgrade:

Code: [Select]
python3 -m pip install --upgrade DPLib

9
Help and Support / Re: Changing server settings based on incoming map
« on: July 03, 2017, 12:53:46 AM »
Tell me what you want the script to do, I can propably write it :-)

10
Help and Support / Re: Changing server settings based on incoming map
« on: July 01, 2017, 10:00:02 AM »
The library doesn't support the GameEnd event yet, but it will soon (1-2 days). The easiest trick would be to wait for Game end and set the cvar then change the map using sv newmap.

11
Help and Support / Re: Changing server settings based on incoming map
« on: July 01, 2017, 09:07:19 AM »
okay, i think that a writing a script using dplib would be an easier (but not 'cleaner') solution though.

12
Help and Support / Re: Changing server settings based on incoming map
« on: July 01, 2017, 02:35:59 AM »
It's not possible without editing the game source I think.
But, you can set the next map using the same script that sets airaccelerate.

13
Server Discussion / Re: DPLib
« on: June 29, 2017, 08:50:12 AM »
https://mrokita.github.io/DPLib/gettingstarted.html
Getting started section finished :)

15
Help and Support / Re: Pball2 on linux, probs
« on: December 28, 2016, 03:53:46 AM »
Run the windows version with wine, it works better than the linux version, honestly. Jitspoe intercoursed up the linux version.

16
Clans, Matches, and Tournaments / Re: Official Clan-Matching Rules
« on: December 21, 2016, 06:34:22 AM »
xd you should better focus on getting new players into the match scene

17
General Development / Re: License of scripts and other works
« on: October 11, 2016, 02:15:21 PM »
What? Every DP script/mod I ever released is on GPL

18
Server Discussion / Re: Python script help needed.
« on: October 08, 2016, 04:25:14 PM »
hTml's script doesnt work when you use "set timestamp_date 1", because the RegEx doesnt fit then.

Just saw it in a quick lookup.
Ye, there was no timestamp_date cvar when i was writing this thing

19
hmm i'll think about that when i will have some free time.

20
ROFL, did u just posted something and then replied on that with 2 multis?
Had you posted something stupid and then passed out?

It looks like there's not enough intrest to make me write that documentation.
Peace

Pages: [1] 2 3 ... 34