Skip to content

This script is used to detect mod updates and restart automatically, only supported on Pterodactyl

License

Notifications You must be signed in to change notification settings

alfari24/auto-restart-project-zomboid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

auto-restart-project-zomboid

This script is used to detect mod updates and restart automatically, only supported on Pterodactyl

Required

  • server Project Zomboid must be Running at Pterodactyl
  • Python Lts

Installation

  • download code Download here
  • make sure all config.json was correctly
  • Install Package using pip install -r requirements.txt
  • Run bot using python3 main.py or python main.py
  • Change rcon file permission to 777

What Code do ?

  • send message when detect mode update
  • send message to ingame (count down) and discord channel
  • do restart the server project zomboid via ApiKey Pterodactyl
  • send message server running when restart was successfuly

Config.json \ explain

    "docPath"         : "./",                     # Mod ID directory, if dont know, dont change it
    "serverName"      : "pzserver.ini",
    "IP_ADDRESS"      : "serverip:27015",         # server ip Project Zomboid, and **RCON PORT** (not server port)
    "IPSERVER"        : "serverip",               # Server IP Project Zomboid
    "PORT"            : "16261",                  # Server Port
    "PASSWORD_RCON"   : "you_password",           # Set your password at server.ini on your server project zomboid and find RCON password
    "admin"           : 1102032173340573817,      # Discord User ID
    "notifyChannel"   : 1074483557810065501,      # Discord Channel ID
    "warga"           : 1174003582954127410,      # Discord Role ID (who want tag when any update detect)
    "panel_url"       : "https://panel.example.com/", # Panel Pterodactl URL
    "apikey"          : "ptlc_....",              # Create APIKEY at Pterodactyl Panel
    "botToken"        : " ",                      # Discord BOT TOKEN
    "server_id"       : "asfw123",                # Server_ID of your project zomboid server 
    "gif_url_restart" : "https://media1.tenor.com/m/bGCuW8uql2kAAAAC/office-server.gif",     # change this if u need custome message gif
    "gif_url_running" : "https://media1.tenor.com/m/e2VK6sB1TX0AAAAd/online-server.gif"      # change this if u need custome message gif
}

Show up

  • Discord Announce IndoPZ EndZ

  • Pterodactyl Running Bot Bot

Attention

  • you need add mod list : WorkshopItems=2939104168;2932265300; inside folder Server and find file name pzserver.ini, you can follow example at that file.
  • when u update mod list, u need remove moddata.json and start/restart the bot Moddata.json

To contribute, please fork this repository and make a pull request

About

This script is used to detect mod updates and restart automatically, only supported on Pterodactyl

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages