mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-21 09:02:07 -07:00
Added config parameter for the offerer of adventure bot GE announcements
This commit is contained in:
parent
ba2fb55bd1
commit
3c839937eb
3 changed files with 9 additions and 3 deletions
|
|
@ -185,6 +185,10 @@ class ServerConstants {
|
|||
@JvmField
|
||||
var SERVER_NAME: String = ""
|
||||
|
||||
//the server's grand exchange name
|
||||
@JvmField
|
||||
var SERVER_GE_NAME: String = ""
|
||||
|
||||
//The RSA_KEY for the server.
|
||||
@JvmField
|
||||
var EXPONENT = BigInteger("52317200263721308660411803146360972546561037484450290559823448967617618536819222494429186211525706853703641369936136465589036631055945454547936148730495933263344792588795811788941129493188907621550836988152620502378278134421731002382361670176785306598134280732756356458964850508114958769985438054979422820241")
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ import core.tools.RandomFunction
|
|||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
import org.rs09.consts.Items
|
||||
import rs09.ServerConstants.Companion.SERVER_GE_NAME
|
||||
import rs09.game.ai.AIRepository
|
||||
import rs09.game.ge.GrandExchange
|
||||
import rs09.game.ge.GrandExchangeOffer
|
||||
|
|
@ -453,7 +454,7 @@ class ScriptAPI(private val bot: Player) {
|
|||
val canSell = GrandExchange.addBotOffer(actualId, itemAmt)
|
||||
if (canSell && saleIsBigNews(actualId, itemAmt)) {
|
||||
SystemLogger.logAI("Offered $itemAmt of $actualId on the GE.")
|
||||
Repository.sendNews("Fellerscape just offered " + itemAmt + " " + ItemDefinition.forId(actualId).name.toLowerCase() + " on the GE.")
|
||||
Repository.sendNews(SERVER_GE_NAME + " just offered " + itemAmt + " " + ItemDefinition.forId(actualId).name.toLowerCase() + " on the GE.")
|
||||
}
|
||||
bot.bank.remove(Item(id, itemAmt))
|
||||
bot.bank.refresh()
|
||||
|
|
@ -483,7 +484,7 @@ class ScriptAPI(private val bot: Player) {
|
|||
}
|
||||
val canSell = GrandExchange.addBotOffer(actualId, itemAmt)
|
||||
if (canSell && saleIsBigNews(actualId, itemAmt)) {
|
||||
Repository.sendNews("FellerScape just offered " + itemAmt + " " + ItemDefinition.forId(actualId).name.toLowerCase() + " on the GE.")
|
||||
Repository.sendNews(SERVER_GE_NAME + " just offered " + itemAmt + " " + ItemDefinition.forId(actualId).name.toLowerCase() + " on the GE.")
|
||||
}
|
||||
bot.bank.remove(item)
|
||||
bot.bank.refresh()
|
||||
|
|
@ -519,7 +520,7 @@ class ScriptAPI(private val bot: Player) {
|
|||
1517 -> continue
|
||||
1519 -> continue
|
||||
1521 -> continue
|
||||
else -> Repository.sendNews("Fellerscape just offered " + itemAmt + " " + ItemDefinition.forId(actualId).name.toLowerCase() + " on the GE.")
|
||||
else -> Repository.sendNews(SERVER_GE_NAME + " just offered " + itemAmt + " " + ItemDefinition.forId(actualId).name.toLowerCase() + " on the GE.")
|
||||
}
|
||||
}
|
||||
bot.bank.remove(item).also { SystemLogger.logAI("$item has been listed on the GE.") }
|
||||
|
|
|
|||
|
|
@ -100,6 +100,7 @@ object ServerConfigParser {
|
|||
ServerConstants.DAILY_RESTART = data.getBoolean("world.daily_restart")
|
||||
ServerConstants.GRAND_EXCHANGE_DATA_PATH = data.getPath("paths.eco_data")
|
||||
ServerConstants.CELEDT_DATA_PATH = data.getPath("paths.cele_drop_table_path")
|
||||
ServerConstants.SERVER_GE_NAME = data.getString("world.name_ge") ?: ServerConstants.SERVER_NAME
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue