mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2026-08-22 19:05:11 -06:00
small bot progress
This commit is contained in:
parent
5380fbe9ed
commit
07b51c0236
1 changed files with 9 additions and 10 deletions
|
|
@ -2,19 +2,15 @@ package content.minigame.barbassault.bots
|
|||
|
||||
import content.minigame.barbassault.BarbRole
|
||||
import content.minigame.barbassault.arena.BarbassaultState
|
||||
import content.minigame.barbassault.lobby.BarbassLobbyActivity.Companion.addToQueue
|
||||
import content.minigame.barbassault.lobby.BarbassaultLobby
|
||||
import content.minigame.barbassault.lobby.BarbassQuickWaveActivity.Companion.addToQueue
|
||||
import content.minigame.barbassault.lobby.BarbassaultLobby.Companion.MAIN_LOBBY
|
||||
import content.minigame.barbassault.lobby.BarbassaultLobby.Companion.QUICK_START
|
||||
import content.minigame.barbassault.lobby.BarbassaultLobby.Companion.waveLobbies
|
||||
import content.minigame.barbassault.lobby.baSession
|
||||
import content.minigame.pestcontrol.bots.PestControlTestBot2.State
|
||||
import core.api.EquipmentSlot
|
||||
import core.api.forceMove
|
||||
import core.api.getRegionBorders
|
||||
import core.game.bots.CombatBotAssembler
|
||||
import core.game.bots.PvMBots
|
||||
import core.game.container.impl.EquipmentContainer
|
||||
import core.game.global.action.EquipHandler
|
||||
import core.game.node.item.Item
|
||||
import core.game.world.map.Location
|
||||
|
|
@ -26,14 +22,12 @@ class BarbassBot(l: Location) : PvMBots(legitimizeLocation(l)){
|
|||
CombatBotAssembler().gearPCiMeleeBot(this)
|
||||
val icape: Item = this.equipment.get(1)
|
||||
EquipHandler.unequip(this,1,icape.id)
|
||||
//isArtificial
|
||||
}
|
||||
|
||||
var tick = 0
|
||||
var combatMoveTimer = 0
|
||||
var justStartedGame = true
|
||||
var movetimer = 0
|
||||
val num = Random().nextInt(4)
|
||||
val combathandler = BACombatState(this)
|
||||
var time = 0
|
||||
enum class State { OUTSIDE_ROOM, ENTER_ROOM,REFRESH, WAITING_IN_ROOM, PLAY_GAME, GET_TO_BA }
|
||||
|
|
@ -56,6 +50,7 @@ class BarbassBot(l: Location) : PvMBots(legitimizeLocation(l)){
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
var oneact = false
|
||||
private fun enterRoom() {
|
||||
this.sendChat("Attempting.....")
|
||||
|
|
@ -76,10 +71,14 @@ class BarbassBot(l: Location) : PvMBots(legitimizeLocation(l)){
|
|||
}
|
||||
private fun doRoleTask() {
|
||||
val myRole = this.baSession?.team?.getRoleForPlayer(this)
|
||||
if (myRole == BarbRole.ATTACKER) {
|
||||
combathandler.fightNPCs()
|
||||
when (myRole) {
|
||||
BarbRole.ATTACKER -> combathandler.fightNPCs()
|
||||
BarbRole.DEFENDER -> combathandler.handleDefender()
|
||||
BarbRole.COLLECTOR -> combathandler.handleCollector()
|
||||
BarbRole.HEALER -> combathandler.handleHealer()
|
||||
null -> return
|
||||
}
|
||||
//do task based on myRole
|
||||
combathandler.chatter()
|
||||
}
|
||||
|
||||
var switch = false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue