mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-09 16:45:44 -07:00
feat(adventure-bots) Fixed issues with Adventure bot assembly and initial spawning into the game world.
This commit is contained in:
parent
869773bf60
commit
12d4182e34
2 changed files with 22 additions and 5 deletions
|
|
@ -116,3 +116,4 @@
|
||||||
- Increase drop rate of Sinister Key to 1/12 - aweinstock
|
- 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
|
- 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
|
- 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.general.scriptrepository.*
|
||||||
import rs09.game.ai.pvmbots.CombatBotAssembler
|
import rs09.game.ai.pvmbots.CombatBotAssembler
|
||||||
import rs09.game.ai.skillingbot.SkillingBotAssembler
|
import rs09.game.ai.skillingbot.SkillingBotAssembler
|
||||||
|
import java.util.Timer
|
||||||
import java.util.concurrent.Executors
|
import java.util.concurrent.Executors
|
||||||
|
import kotlin.concurrent.schedule
|
||||||
|
|
||||||
object ImmerseWorld {
|
object ImmerseWorld {
|
||||||
var assembler = CombatBotAssembler()
|
var assembler = CombatBotAssembler()
|
||||||
|
|
@ -25,15 +27,29 @@ object ImmerseWorld {
|
||||||
// immerseSlayer()
|
// immerseSlayer()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun immerseAdventurer(){
|
fun immerseAdventurer(){
|
||||||
val lumbridge = Location.create(3221, 3219, 0)
|
for (i in 0..(GameWorld.settings?.max_adv_bots ?: 50)){
|
||||||
for(i in (0..(GameWorld.settings?.max_adv_bots ?: 50))){
|
var random: Long = (10000..300000).random().toLong()
|
||||||
GeneralBotCreator(Adventurer(CombatStyle.MELEE), assembler.MeleeAdventurer(CombatBotAssembler.Tier.LOW,lumbridge))
|
Timer().schedule(random){
|
||||||
GeneralBotCreator(Adventurer(CombatStyle.MELEE), assembler.MeleeAdventurer(CombatBotAssembler.Tier.MED,lumbridge))
|
spawn_adventurers()
|
||||||
GeneralBotCreator(Adventurer(CombatStyle.RANGE), assembler.RangeAdventurer(CombatBotAssembler.Tier.MED,lumbridge))
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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(){
|
fun immerseFishingGuild(){
|
||||||
val fishingGuild = Location.create(2604, 3421, 0)
|
val fishingGuild = Location.create(2604, 3421, 0)
|
||||||
for (i in (0..4)) {
|
for (i in (0..4)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue