Repository navigation
API Player actions
Alexandre 'kidev' Poumaroux edited this page Oct 21, 2026
·
4 revisions
| Import | from proleak import actions |
Act as the player. Needs the actions capability (local servers).
| Returns | Function | |
|---|---|---|
bool |
build(builder_unit: int, unit_type: str, x: float, z: float) |
Place unit_type at map point (x, z) with your builder unit. |
bool |
train(unit: int, unit_type: str) |
Upgrade or train unit into unit_type. |
bool |
hire(unit: int, unit_type: str) |
Hire mercenary unit_type from unit (your king or barracks). |
bool |
upgrade(upgrade_id: str, level: int) |
Buy a king upgrade or Upgrade Supply, to level (the game's data calls these researches). |
Each action returns True when the game's client accepts the order and sends it to the server, and False when one of the client's own checks refuses it (not enough gold, a blocked square).
build(builder_unit: int, unit_type: str, x: float, z: float) -> bool
Place unit_type at map point (x, z) with your builder unit.
train(unit: int, unit_type: str) -> bool
Upgrade or train unit into unit_type.
hire(unit: int, unit_type: str) -> bool
Hire mercenary unit_type from unit (your king or barracks).
upgrade(upgrade_id: str, level: int) -> bool
Buy a king upgrade or Upgrade Supply, to level (the game's data calls these researches).
Using ProLeak
Features
Tutorial
- Your first plugin
- Plugin basics
- Handling events
- Plugin settings
- User interface
- Players, units and game data
- Purchases, signals and pings
- Chat, camera, input and more
- Cosmetics
- Game modes
- Game updates
- Publishing plugins
Reference