Pavlov mod.io maps integration with pavlovrcon.com

Add extra buttons to mod.io pavlov map pages to allow switching to the map or adding it to the rotation of a server by using pavlovrcon.com

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

作者
UnderPL
今日安裝
0
安裝總數
25
評價
0 0 0
版本
3.0
建立日期
2023-06-17
更新日期
2023-06-24
尺寸
21.5 KB
授權條款
CC BY-NC 4.0
腳本執行於

Pavlov mod.io RCON integration (pavlovrcon.com)

mod.io extra pavlovrcon.com buttons

This userscript adds extra buttons to the mod.io page for Pavlov maps and mods, making it easier for users to quickly interact with maps and mods using RCON (Remote Console) commands. The script uses the pavlovrcon.com API to send the requests.

Features

  • Adds a "Play" button to instantly switch to a selected map
  • Adds a "Add to map rotation" button to add a selected map to the map rotation
  • Adds a "Remove from map rotation" button to remove a selected map from the map rotation
  • Provides a dropdown menu to choose between various game modes (e.g. SND, TDM, DM, etc.)
  • Adds buttons to the map interface showing which game modes are currently in rotation with that map. These buttons allow you to quickly remove the corresponding map and game mode combination from the rotation by simply clicking on them. (see blue buttons in screenshots)

Usage

  1. Install script (after installing Violentmonkey/Tampermonkey/Greasemonkey)
  2. Log in with your server info in pavlovrcon.com
  3. Use the buttons in any map page (https://mod.io/g/pavlov/m/) (Server ID should stay at 0 unless you have logged in to multiple servers in pavlovrcon.com)

Advanced Configuration

If you find that pavlovrcon.com is down, or if you prefer not to route your requests through the website, you can configure the script to use an HTTP "rcon proxy"/server instead. This alternative method can be particularly useful if you don't want to first log in with your RCON password on pavlovrcon.com before using the script. I use a node.js server to translate the HTTP requests to TCP, you can message me for it.

To enable this option:

  • Edit the script and set the httpProxy variable to true.
  • Update the httpProxyIp and httpProxyPort variables with your HTTP proxy/server's IP and port number respectively.

The script will then send requests to the following endpoint:

http://${httpProxyIp}:${httpProxyPort}/rcon?command=${action}

If you have a different endpoint structure, you can easily modify it directly in the script.

In this URL, ${action} corresponds to the RCON command you wish to send.

To do:

  • Improve the code?