diff --git a/Server/src/main/kotlin/rs09/ServerConstants.kt b/Server/src/main/kotlin/rs09/ServerConstants.kt index dc84f09db..295d076fc 100644 --- a/Server/src/main/kotlin/rs09/ServerConstants.kt +++ b/Server/src/main/kotlin/rs09/ServerConstants.kt @@ -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") diff --git a/Server/src/main/kotlin/rs09/game/ai/general/ScriptAPI.kt b/Server/src/main/kotlin/rs09/game/ai/general/ScriptAPI.kt index 0d39b9ebb..892ce6dfa 100644 --- a/Server/src/main/kotlin/rs09/game/ai/general/ScriptAPI.kt +++ b/Server/src/main/kotlin/rs09/game/ai/general/ScriptAPI.kt @@ -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.") } diff --git a/Server/src/main/kotlin/rs09/game/system/config/ServerConfigParser.kt b/Server/src/main/kotlin/rs09/game/system/config/ServerConfigParser.kt index 451479703..3475a845a 100644 --- a/Server/src/main/kotlin/rs09/game/system/config/ServerConfigParser.kt +++ b/Server/src/main/kotlin/rs09/game/system/config/ServerConfigParser.kt @@ -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 }