Adjusted Adventure Bots
- Added a check for commonly sticky areas
This commit is contained in:
@@ -56,6 +56,11 @@ class Adventurer(val style: CombatStyle): Script() {
|
|||||||
val lumbridge: Location = Location.create(3222, 3219, 0)
|
val lumbridge: Location = Location.create(3222, 3219, 0)
|
||||||
var city: Location = lumbridge
|
var city: Location = lumbridge
|
||||||
|
|
||||||
|
val common_stuck_locations = arrayListOf<ZoneBorders>(
|
||||||
|
ZoneBorders(2861,3425,2869,3440),
|
||||||
|
ZoneBorders(2937,3356,2936,3353)
|
||||||
|
)
|
||||||
|
|
||||||
fun dialogue() {
|
fun dialogue() {
|
||||||
val player = RegionManager.getLocalPlayers(bot).random()
|
val player = RegionManager.getLocalPlayers(bot).random()
|
||||||
val real = if (!player.isArtificial) player else player
|
val real = if (!player.isArtificial) player else player
|
||||||
@@ -779,9 +784,7 @@ class Adventurer(val style: CombatStyle): Script() {
|
|||||||
val gemrocks = Location.create(2825,2997,0)
|
val gemrocks = Location.create(2825,2997,0)
|
||||||
val chaosnpc = Location.create(2612,9484,0)
|
val chaosnpc = Location.create(2612,9484,0)
|
||||||
val chaosnpc2 = Location.create(2580,9501,0)
|
val chaosnpc2 = Location.create(2580,9501,0)
|
||||||
|
val taverly = Location.create(2909, 3436, 0)
|
||||||
var PoiList = listOf(karamja,alkharid,feldiphills,isafdar,
|
|
||||||
eaglespeek,canafis,treegnome,teak1,teakfarm)
|
|
||||||
|
|
||||||
var handler1: CombatSwingHandler? = null
|
var handler1: CombatSwingHandler? = null
|
||||||
|
|
||||||
@@ -835,7 +838,7 @@ class Adventurer(val style: CombatStyle): Script() {
|
|||||||
teak1,teakfarm,keldagrimout,
|
teak1,teakfarm,keldagrimout,
|
||||||
miningguild,coal,crawlinghands,
|
miningguild,coal,crawlinghands,
|
||||||
magics,gemrocks,chaosnpc,chaosnpc,
|
magics,gemrocks,chaosnpc,chaosnpc,
|
||||||
chaosnpc2).random()
|
chaosnpc2,taverly).random()
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: Optimise and adjust how bots handle picking up ground items further.
|
//TODO: Optimise and adjust how bots handle picking up ground items further.
|
||||||
@@ -903,6 +906,16 @@ class Adventurer(val style: CombatStyle): Script() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// zoneborder checker
|
||||||
|
if(ticks % 30 == 0){
|
||||||
|
for(border in common_stuck_locations){
|
||||||
|
if(border.insideBorder(bot)){
|
||||||
|
refresh()
|
||||||
|
ticks = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
when(state){
|
when(state){
|
||||||
|
|
||||||
State.LOOT_DELAY -> {
|
State.LOOT_DELAY -> {
|
||||||
|
|||||||
Reference in New Issue
Block a user