mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2026-08-21 10:25:13 -06:00
attack style failsafe.
This commit is contained in:
parent
5aecc3f4a0
commit
6b2d123184
1 changed files with 1 additions and 3 deletions
|
|
@ -23,14 +23,12 @@ import core.tools.RandomFunction
|
|||
|
||||
class BACombatState(private val bot: BABot) {
|
||||
|
||||
|
||||
//session.roleCalls[BarbRole.ATTACKER]?.toCall
|
||||
fun fightNPCs() {
|
||||
bot.customState = "Fight NPCs"
|
||||
bot.AttackNpcsInRadius(25)
|
||||
//use Called AttackStyle
|
||||
val baSession = getBASession(bot) ?: return
|
||||
val called = baSession.roleCalls[BarbRole.COLLECTOR]?.called as AttackerStyle
|
||||
val called = (baSession.roleCalls[BarbRole.COLLECTOR]?.called ?: AttackerStyle.values().random() ) as AttackerStyle
|
||||
bot.properties.attackStyle = AttackStyle(called.attackStyle, BONUS_SLASH)
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue