feat(adventure-bots) Fixed issues with Adventure bot assembly and initial spawning into the game world.
This commit is contained in:
@@ -116,3 +116,4 @@
|
||||
- Increase drop rate of Sinister Key to 1/12 - aweinstock
|
||||
- Strike spells now always max on Salarin, convert Yanille Agility Dungeon to kotlin + listener - aweinstock
|
||||
- Refactor NPCDropTable, WeightBasedTable and fixed bug where special items weren't processed in some cases - ryannathans
|
||||
- Fixed issues with Adventure bot assembly and initial spawning into game world - Sir Kermit
|
||||
@@ -7,7 +7,9 @@ import rs09.game.ai.general.GeneralBotCreator
|
||||
import rs09.game.ai.general.scriptrepository.*
|
||||
import rs09.game.ai.pvmbots.CombatBotAssembler
|
||||
import rs09.game.ai.skillingbot.SkillingBotAssembler
|
||||
import java.util.Timer
|
||||
import java.util.concurrent.Executors
|
||||
import kotlin.concurrent.schedule
|
||||
|
||||
object ImmerseWorld {
|
||||
var assembler = CombatBotAssembler()
|
||||
@@ -25,15 +27,29 @@ object ImmerseWorld {
|
||||
// immerseSlayer()
|
||||
}
|
||||
}
|
||||
|
||||
fun immerseAdventurer(){
|
||||
val lumbridge = Location.create(3221, 3219, 0)
|
||||
for(i in (0..(GameWorld.settings?.max_adv_bots ?: 50))){
|
||||
GeneralBotCreator(Adventurer(CombatStyle.MELEE), assembler.MeleeAdventurer(CombatBotAssembler.Tier.LOW,lumbridge))
|
||||
GeneralBotCreator(Adventurer(CombatStyle.MELEE), assembler.MeleeAdventurer(CombatBotAssembler.Tier.MED,lumbridge))
|
||||
GeneralBotCreator(Adventurer(CombatStyle.RANGE), assembler.RangeAdventurer(CombatBotAssembler.Tier.MED,lumbridge))
|
||||
for (i in 0..(GameWorld.settings?.max_adv_bots ?: 50)){
|
||||
var random: Long = (10000..300000).random().toLong()
|
||||
Timer().schedule(random){
|
||||
spawn_adventurers()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun spawn_adventurers(){
|
||||
val lumbridge = Location.create(3221, 3219, 0)
|
||||
val tiers = listOf<CombatBotAssembler.Tier>(CombatBotAssembler.Tier.LOW,CombatBotAssembler.Tier.MED)
|
||||
GeneralBotCreator(
|
||||
Adventurer(CombatStyle.MELEE),
|
||||
assembler.MeleeAdventurer(tiers.random(), lumbridge)
|
||||
)
|
||||
GeneralBotCreator(
|
||||
Adventurer(CombatStyle.RANGE),
|
||||
assembler.RangeAdventurer(tiers.random(), lumbridge)
|
||||
)
|
||||
}
|
||||
|
||||
fun immerseFishingGuild(){
|
||||
val fishingGuild = Location.create(2604, 3421, 0)
|
||||
for (i in (0..4)) {
|
||||
|
||||
Reference in New Issue
Block a user