PvpBot Wiki
Features

Scripts

Save a sequence of commands under a name and run it whenever you like, with parameters and pauses.

What they're for

Setting up a scenario always takes the same commands: spawn the bots, put them in a faction, hand out kits, point them at someone. A script stores those lines under a name, so one line runs them all again.

Example

/pvpbot script create raid
/pvpbot script add raid pvpbot spawn 20
/pvpbot script add raid pvpbot faction join {1} latest
/pvpbot script add raid pvpbot kit givefaction {2} {1}
/pvpbot script add raid wait 40
/pvpbot script add raid pvpbot faction hostile {1} player

And to run it:

/pvpbot script run raid bandits iron

This spawns 20 bots, puts them in the bandits faction, gives them the iron kit, waits two seconds and then sets them at war with the players.

Rules

  • Parameters: {1}…{9} are replaced by the arguments given to script run, in order.
  • Pauses: a wait <ticks> line stops the script and resumes the rest after that many ticks (20 = 1 second). The server carries on as normal meanwhile.
  • latest: inside a script it means the bots this script created with its last spawn, even if someone else spawned bots in the meantime.
  • Leading slash: lines are written without /; if you add one it's removed.
  • Comments: lines starting with # are skipped.
  • Limit: 200 lines per script.
  • One at a time: if you run a script while another is running, it starts as soon as the first one finishes. That way two scripts never grab each other's bots.
  • Permissions: lines run as if you typed them. A script saves typing but grants nothing extra.
Named bots in scripts /pvpbot spawn <name> looks up the skin in the background, so the next line might not find the bot yet. In scripts use /pvpbot spawn <name> none, which creates the bot at once.

Managing scripts

CommandWhat it does
/pvpbot script listLists the scripts.
/pvpbot script show <name>Shows the numbered lines.
/pvpbot script remove <name> <line>Removes a line (numbered as in show).
/pvpbot script delete <name>Deletes the script.

Scripts are stored in plugins/PvpBot/scripts.yml. A /pvpbot reload stops any script that is running.

PvpBot Wiki · for Paper and Spigot 1.21.11 / 26.2 · Download on Modrinth