logo bannerlogo banner
Page Navigator

Example Usage

import GameOptionsDispatch from 'yolkbot/dispatches/GameOptionsDispatch';

bot.dispatch(new GameOptionsDispatch({ gravity: 0.5, disableRPG: true }));

Arguments

  • changes (object) - all the changes to make; can have the following props:
    • gravity (number) - the gravity of the game (0.25, 0.5, 0.75, or 1.0)
    • damage (number) - the damage of the game (0.25, to 2.0 in increments of 0.25)
    • healthRegen (number) - the health regen of the game (0.25, to 4.0 in increments of 0.25)
    • locked (boolean) - if the game should be locked
    • noTeamChange (boolean) - if the game should not allow team changes
    • noTeamShuffle (boolean) - if the game should not shuffle teams after kotc ends
    • disableEggk (boolean) - if the eggk should be disabled
    • disableScrambler (boolean) - if the scrambler should be disabled
    • disableFreeRanger (boolean) - if the free ranger should be disabled
    • disableRPG (boolean) - if the rpg should be disabled
    • disableWhipper (boolean) - if the whipper should be disabled
    • disableCrackshot (boolean) - if the crackshot should be disabled
    • disableTriHard (boolean) - if the trihard should be disabled
    • toDisable (array of numbers) - an array of gun IDs to disable
    • toEnable (array of numbers) - an array of gun IDs to enable
    • rawWeaponsDisabled (array of booleans) - an array of 7 booleans that specifies if each of the guns is enabled (false) or disabled (true) in the order of GunList. This is a raw version of the toDisable and toEnable options, and is not recommended to use.

Dispatch Checks

  • The changes object must be valid
  • The bot must be the owner of the game

Notes

You are not supposed to mix disable<gun>, toDisable/toEnable, and rawWeaponsDisabled. Use one of them, not all of them. You should use whichever option is best for your program - for automated weapon disabling, use something like toEnable and toDisable, though if you just want to do something like one-off turn off RPG, something like disableRPG is better.