All functions related to fights.
For both functions the parameters are all optional:
Parameters | Types | Initial value | Description |
---|---|---|---|
forbiddenMonsters | number[] | null | ID list of forbidden monsters |
mandatoryMonsters | number[] | null | ID list of mandatory monsters |
minMonsters | number | 1 | Number of monsters minimum in the group |
maxMonsters | number | 8 | Number of monsters maximum in the group |
minMonstersLevel | number | 1 | Minimum level of the group of monsters |
maxMonstersLevel | number | 1000 | Maximum level of the group of monsters |
forbiddenMonsters
, mandatoryMonsters
, minMonsters
, maxMonsters
, minLevel
, maxLevel
)Checks if a group of monsters in the map match the parameters passed to the function.
Returns true if a group(s) matches, false if there is none.
canFight([64], [68], 2, 6, 200, 600); // Check if, on this map, the bot can fight a group of 2 to 6 mobs with 1 Wabbit minimum and no Black Tiwabbit. The group must have a level greater than or equal to 200 and less than or equal to 600.
forbiddenMonsters
, mandatoryMonsters
, minMonsters
, maxMonsters
, minLevel
, maxLevel
)Starts a fight on a group that matches the parameters passed to the function.
Returns true and attacks the group if a group matches, false if there is none.
fight(null, null, 2, 6, 200, 600); // Attack if, on this map, a group checks the parameters: a group of 2 to 6 mobs with a level greater than or equal to 200 and less than or equal to 600.