I wish I could exist for a single day without getting a migraine from very stupid issues.

This commit is contained in:
ceikry 2021-08-05 20:12:40 -05:00
parent 5b3a6bcf5e
commit 9ebcbe56e2
3 changed files with 342 additions and 344 deletions

View file

@ -1349,8 +1349,8 @@ public final class Client extends GameShell {
} else { } else {
try { try {
if (PacketParser.anInt80 == 0) { if (PacketParser.anInt80 == 0) {
System.out.println("Trying " + GameConfig.Companion.getJS5_SERVER_PORT()); System.out.println("Trying " + GameConfig.JS5_SERVER_PORT);
Class17.aClass64_413 = Class38.gameSignlink.method1441((byte) 8, Class38_Sub1.accRegistryIp, GameConfig.Companion.getJS5_SERVER_PORT()); Class17.aClass64_413 = Class38.gameSignlink.method1441((byte) 8, Class38_Sub1.accRegistryIp, GameConfig.JS5_SERVER_PORT);
++PacketParser.anInt80; ++PacketParser.anInt80;
} }
@ -1358,7 +1358,7 @@ public final class Client extends GameShell {
/* If the connection is null we reset the JS5 port to the backup server JS5 for compatibility reasons */ /* If the connection is null we reset the JS5 port to the backup server JS5 for compatibility reasons */
if (2 == Objects.requireNonNull(Class17.aClass64_413).anInt978) { if (2 == Objects.requireNonNull(Class17.aClass64_413).anInt978) {
GameConfig.Companion.setJS5_SERVER_PORT(GameConfig.SERVER_PORT + ObjectDefinition.paramWorldID); GameConfig.JS5_SERVER_PORT = GameConfig.SERVER_PORT + ObjectDefinition.paramWorldID;
this.method46(1000); this.method46(1000);
return; return;
} }

View file

@ -12,13 +12,13 @@ public final class ContextMenu {
int width = Class21.anInt3552; int width = Class21.anInt3552;
int height = Class21.anInt3537; int height = Class21.anInt3537;
int contextMenuColor = 6116423; //Context Menu RGB || 6116423 Classic || Old var5 || ColorCore.getHexColors() int contextMenuColor = 6116423; //Context Menu RGB || 6116423 Classic || Old var5 || ColorCore.getHexColors()
Toolkit.getActiveToolkit().fillRect(1 + x, y + 18, width + -2, -19 + height, GameConfig.RCM_BG_COLOR, GameConfig.RCM_BG_OPACITY); Toolkit.getActiveToolkit().fillRect(1 + x, y + 18, width + -2, -19 + height, GameConfig.RCM_BG_COLOR, GameConfig.getRCM_BG_OPACITY());
if (GameConfig.RS3_CONTEXT_STYLE) { if (GameConfig.RS3_CONTEXT_STYLE) {
Toolkit.getActiveToolkit().fillRect(1 + x, 2 + y, width + -2, 16, GameConfig.RCM_TITLE_COLOR, GameConfig.RCM_TITLE_OPACITY); Toolkit.getActiveToolkit().fillRect(1 + x, 2 + y, width + -2, 16, GameConfig.RCM_TITLE_COLOR, GameConfig.getRCM_TITLE_OPACITY());
Toolkit.getActiveToolkit().drawRect(1 + x, 1 + y, width + -2, height, GameConfig.RCM_BORDER_COLOR, GameConfig.RCM_BORDER_OPACITY); Toolkit.getActiveToolkit().drawRect(1 + x, 1 + y, width + -2, height, GameConfig.RCM_BORDER_COLOR, GameConfig.getRCM_BORDER_OPACITY());
} else { } else {
Toolkit.getActiveToolkit().fillRect(1 + x, 2 + y, width + -2, 16, GameConfig.RCM_TITLE_COLOR, GameConfig.RCM_TITLE_OPACITY); Toolkit.getActiveToolkit().fillRect(1 + x, 2 + y, width + -2, 16, GameConfig.RCM_TITLE_COLOR, GameConfig.getRCM_TITLE_OPACITY());
Toolkit.getActiveToolkit().drawRect(1 + x, y + 18, width + -2, -19 + height, GameConfig.RCM_BORDER_COLOR, GameConfig.RCM_BORDER_OPACITY); Toolkit.getActiveToolkit().drawRect(1 + x, y + 18, width + -2, -19 + height, GameConfig.RCM_BORDER_COLOR, GameConfig.getRCM_BORDER_OPACITY());
} }
FontType.bold.method681(RSString.parse(GameConfig.RCM_TITLE), x - -3, y + 14, contextMenuColor, -1); FontType.bold.method681(RSString.parse(GameConfig.RCM_TITLE), x - -3, y + 14, contextMenuColor, -1);

View file

@ -11,384 +11,382 @@ import java.util.*
* Handles the client's config loading * Handles the client's config loading
* @author Ceikry * @author Ceikry
*/ */
class GameConfig { object GameConfig {
companion object { /**
* Debug Booleans
*/
@JvmField
var ITEM_DEBUG_ENABLED = false
/** @JvmField
* Debug Booleans var OBJECT_DEBUG_ENABLED = false
*/
@JvmField
var ITEM_DEBUG_ENABLED = false
@JvmField @JvmField
var OBJECT_DEBUG_ENABLED = false var NPC_DEBUG_ENABLED = false
@JvmField @JvmField
var NPC_DEBUG_ENABLED = false var HD_LOGIN_DEBUG = false
@JvmField @JvmField
var HD_LOGIN_DEBUG = false var HD_LOGIN_VERBOSE = false
@JvmField @JvmField
var HD_LOGIN_VERBOSE = false var CACHE_DEBUG = false
@JvmField @JvmField
var CACHE_DEBUG = false var WORLD_MAP_DEBUG = false
@JvmField /**
var WORLD_MAP_DEBUG = false * Context Menu Presets
*/
@JvmField
var RCM_STYLE_PRESET = "classic"
/** /**
* Context Menu Presets * Context Menu Customization
*/ */
@JvmField @JvmField
var RCM_STYLE_PRESET = "classic" var RCM_BG_COLOR = 6116423
/** @JvmStatic
* Context Menu Customization var RCM_BG_OPACITY = 255
*/
@JvmField
var RCM_BG_COLOR = 6116423
@JvmStatic
var RCM_BG_OPACITY = 255
set(value) {
if(value > 255 || value < 0) field = 255
else field = value
}
@JvmField
var RCM_TITLE_COLOR = 0
@JvmStatic
var RCM_TITLE_OPACITY = 255
set(value) {
if(value > 255 || value < 0) field = 255
else field = value
}
@JvmField
var RCM_BORDER_COLOR = 0
@JvmStatic
var RCM_BORDER_OPACITY = 255
set(value) {
if(value > 255 || value < 0) field = 255
else field = value
}
@JvmField
var RCM_TITLE = "<col=0>Choose Option</col>"
@JvmField
var RS3_CONTEXT_STYLE = false
/**
* Render distance
*/
@JvmField
var RENDER_DISTANCE_INCREASE = false
@JvmField
var RENDER_DISTANCE_VALUE = 3584f
@JvmField
var RENDER_DISTANCE_TILE_VALUE = 28
@JvmField
var RENDER_DISTANCE_FOG_FIX = 3328.0f
@JvmField
var SKYBOX_COLOR = "float"
/**
* Client Info
* Editable
*/
@JvmField
var IP_ADDRESS = "localhost"
@JvmField
var IP_MANAGEMENT = "localhost"
var JS5_SERVER_PORT = 43593
@JvmField
var SERVER_PORT = 43594
@JvmField
var WL_PORT = 5555
@JvmField
var WORLD = 1
@JvmField
var WORLD_OVERRIDE = -1
@JvmField
var LOGIN_THEME = "scape main"
@JvmField
var xpDropsEnabled = true
@JvmField
var xpDropMode = 0
@JvmField
var xpTrackMode = 0
@JvmField
var slayerCountEnabled = true
@JvmField
var slayerTrackerColor = "#635a38"
@JvmStatic
var slayerTrackerOpacity = 180
set(value) { set(value) {
if(value > 255 || value < 0) field = 255 if(value > 255 || value < 0) field = 255
else field = value else field = value
} }
@JvmField @JvmField
var slayerTaskID = 0 var RCM_TITLE_COLOR = 0
@JvmField @JvmStatic
var slayerTaskAmount = 0 var RCM_TITLE_OPACITY = 255
set(value) {
@JvmField if(value > 255 || value < 0) field = 255
var VERBOSE_LOGGING = false else field = value
@JvmStatic
fun setSlayerAmount(amount : Int){
slayerTaskAmount = amount
if(slayerTaskAmount < 0) slayerTaskAmount = 0
SlayerTracker.lastUpdate = System.currentTimeMillis()
} }
@JvmField
var RCM_BORDER_COLOR = 0
@JvmStatic
var RCM_BORDER_OPACITY = 255
set(value) {
if(value > 255 || value < 0) field = 255
else field = value
}
@JvmField
var RCM_TITLE = "<col=0>Choose Option</col>"
@JvmField
var RS3_CONTEXT_STYLE = false
/**
* Render distance
*/
@JvmField
var RENDER_DISTANCE_INCREASE = false
@JvmField
var RENDER_DISTANCE_VALUE = 3584f
@JvmField
var RENDER_DISTANCE_TILE_VALUE = 28
@JvmField
var RENDER_DISTANCE_FOG_FIX = 3328.0f
@JvmField
var SKYBOX_COLOR = "float"
/**
* Client Info
* Editable
*/
@JvmField
var IP_ADDRESS = "localhost"
@JvmField
var IP_MANAGEMENT = "localhost"
@JvmField
var JS5_SERVER_PORT = 43593
@JvmField
var SERVER_PORT = 43594
@JvmField
var WL_PORT = 5555
@JvmField
var WORLD = 1
@JvmField
var WORLD_OVERRIDE = -1
@JvmField
var LOGIN_THEME = "scape main"
@JvmField
var xpDropsEnabled = true
@JvmField
var xpDropMode = 0
@JvmField
var xpTrackMode = 0
@JvmField
var slayerCountEnabled = true
@JvmField
var slayerTrackerColor = "#635a38"
@JvmStatic
var slayerTrackerOpacity = 180
set(value) {
if(value > 255 || value < 0) field = 255
else field = value
}
@JvmField
var slayerTaskID = 0
@JvmField
var slayerTaskAmount = 0
@JvmField
var VERBOSE_LOGGING = false
@JvmStatic
fun setSlayerAmount(amount : Int){
slayerTaskAmount = amount
if(slayerTaskAmount < 0) slayerTaskAmount = 0
SlayerTracker.lastUpdate = System.currentTimeMillis()
}
/**
* Json config Parser
*/
@JvmStatic
fun parse(path: String){
val reader = FileReader(path)
val parser = JSONParser()
val data = parser.parse(reader) as JSONObject
//Networking
if(data.containsKey("ip_address")) IP_ADDRESS = data["ip_address"].toString() else IP_ADDRESS = "play.2009scape.org"
if(data.containsKey("ip_management")) IP_MANAGEMENT = data["ip_management"].toString() else IP_MANAGEMENT = IP_ADDRESS
if(data.containsKey("wl_port")) WL_PORT = data["wl_port"].toString().toInt()
if(data.containsKey("server_port")) SERVER_PORT = data["server_port"].toString().toInt()
if(data.containsKey("js5_port")) JS5_SERVER_PORT = data["js5_port"].toString().toInt()
if(data.containsKey("world")) WORLD = data["world"].toString().toInt()
//Parse customization options
if(data.containsKey("customization")){
val custom = data["customization"] as JSONObject
if(custom.containsKey("login_theme")) LOGIN_THEME = custom["login_theme"].toString()
//Right-click menu customizations
if(custom.containsKey("right_click_menu")){
val rcm = custom["right_click_menu"] as JSONObject
//background
if(rcm.containsKey("background")){
val bg = rcm["background"] as JSONObject
if(bg.containsKey("color")) RCM_BG_COLOR = bg["color"].toString().replace("#", "").toIntOrNull(16) ?: 6116423//convert hex -> deci
if(bg.containsKey("opacity")) RCM_BG_OPACITY = bg["opacity"].toString().toInt()
}
//title bar
if(rcm.containsKey("title_bar")){
val tb = rcm["title_bar"] as JSONObject
if(tb.containsKey("font_color")) RCM_TITLE = RCM_TITLE.replace("0", tb["font_color"].toString().replace("#", ""))
if(tb.containsKey("color")) RCM_TITLE_COLOR = tb["color"].toString().replace("#", "").toIntOrNull(16) ?: 6116423//convert hex -> deci
if(tb.containsKey("opacity")) RCM_TITLE_OPACITY = tb["opacity"].toString().toInt()
}
//border
if(rcm.containsKey("border")){
val border = rcm["border"] as JSONObject
if(border.containsKey("color")) RCM_BORDER_COLOR = border["color"].toString().replace("#", "").toIntOrNull(16) ?: 6116423 //convert hex -> deci
if(border.containsKey("opacity")) RCM_BORDER_OPACITY = border["opacity"].toString().toInt()
}
//styles (changes how things are drawn)
if(rcm.containsKey("styles")){
val style = rcm["styles"] as JSONObject
if(style.containsKey("presets")) RCM_STYLE_PRESET = style["presets"].toString()
if(style.containsKey("rs3border")) RS3_CONTEXT_STYLE = style["rs3border"] as Boolean
}
}
if(custom.containsKey("xpdrops")){
val xpd = custom["xpdrops"] as JSONObject
if(xpd.containsKey("enabled")) xpDropsEnabled = xpd["enabled"] as Boolean
if(xpd.containsKey("drop_mode")) xpDropMode = xpd["drop_mode"].toString().toInt()
if(xpd.containsKey("track_mode")) xpTrackMode = xpd["track_mode"].toString().toInt()
}
if(custom.containsKey("slayer")){
val slayer = custom["slayer"] as JSONObject
if(slayer.containsKey("enabled")) slayerCountEnabled = slayer["enabled"] as Boolean
if(slayer.containsKey("color")) slayerTrackerColor = slayer["color"].toString().replace("#", "")
if(slayer.containsKey("opacity")) slayerTrackerOpacity = slayer["opacity"].toString().toInt()
}
if(custom.containsKey("rendering_options")) {
val hdoptions = custom["rendering_options"] as JSONObject
if(hdoptions.containsKey("technical")) {
val renderIncrease = hdoptions["technical"] as JSONObject
if(renderIncrease.containsKey("render_distance_increase")) RENDER_DISTANCE_INCREASE = renderIncrease["render_distance_increase"] as Boolean
}
if(hdoptions.containsKey("skybox")) {
val skyboxColor = hdoptions["skybox"] as JSONObject
if(skyboxColor.containsKey("skybox_color")) SKYBOX_COLOR
}
}
}
//Parse debug options
if(data.containsKey("debug")){
val debug = data["debug"] as JSONObject
if(debug.containsKey("item_debug")) ITEM_DEBUG_ENABLED = debug["item_debug"] as Boolean
if(debug.containsKey("npc_debug")) NPC_DEBUG_ENABLED = debug["npc_debug"] as Boolean
if(debug.containsKey("object_debug")) OBJECT_DEBUG_ENABLED = debug["object_debug"] as Boolean
if(debug.containsKey("hd_login_region_debug")) HD_LOGIN_DEBUG = debug["hd_login_region_debug"] as Boolean
if(debug.containsKey("hd_login_region_debug_verbose")) HD_LOGIN_VERBOSE = debug["hd_login_region_debug_verbose"] as Boolean
if(debug.containsKey("cache_debug")) CACHE_DEBUG = debug["cache_debug"] as Boolean
if(debug.containsKey("world_map_debug")) WORLD_MAP_DEBUG = debug["world_map_debug"] as Boolean
}
/** /**
* Json config Parser * Style Overrides (Still working on this system. We should allow for maximum creativity
* The way that it will be setup is a style type 1st
* ie, classicbox, rs3, rounded, rounded2
* Then we introduce color schemes that a user could select
* ie, classic, rs3, alternate, alternate2, custom
* @author Woah
*/ */
@JvmStatic when (RCM_STYLE_PRESET) {
fun parse(path: String){ "classic" -> {
val reader = FileReader(path) RS3_CONTEXT_STYLE = false
val parser = JSONParser() RCM_BG_COLOR = 6116423
val data = parser.parse(reader) as JSONObject RCM_BG_OPACITY = 255
RCM_TITLE = "<col=5d5447>Choose Option</col>"
//Networking RCM_TITLE_COLOR = 0
if(data.containsKey("ip_address")) IP_ADDRESS = data["ip_address"].toString() else IP_ADDRESS = "play.2009scape.org" RCM_TITLE_OPACITY = 255
if(data.containsKey("ip_management")) IP_MANAGEMENT = data["ip_management"].toString() else IP_MANAGEMENT = IP_ADDRESS RCM_BORDER_COLOR = 0
if(data.containsKey("wl_port")) WL_PORT = data["wl_port"].toString().toInt() RCM_BORDER_OPACITY = 255
if(data.containsKey("server_port")) SERVER_PORT = data["server_port"].toString().toInt()
if(data.containsKey("js5_port")) JS5_SERVER_PORT = data["js5_port"].toString().toInt()
if(data.containsKey("world")) WORLD = data["world"].toString().toInt()
//Parse customization options
if(data.containsKey("customization")){
val custom = data["customization"] as JSONObject
if(custom.containsKey("login_theme")) LOGIN_THEME = custom["login_theme"].toString()
//Right-click menu customizations
if(custom.containsKey("right_click_menu")){
val rcm = custom["right_click_menu"] as JSONObject
//background
if(rcm.containsKey("background")){
val bg = rcm["background"] as JSONObject
if(bg.containsKey("color")) RCM_BG_COLOR = bg["color"].toString().replace("#", "").toIntOrNull(16) ?: 6116423//convert hex -> deci
if(bg.containsKey("opacity")) RCM_BG_OPACITY = bg["opacity"].toString().toInt()
}
//title bar
if(rcm.containsKey("title_bar")){
val tb = rcm["title_bar"] as JSONObject
if(tb.containsKey("font_color")) RCM_TITLE = RCM_TITLE.replace("0", tb["font_color"].toString().replace("#", ""))
if(tb.containsKey("color")) RCM_TITLE_COLOR = tb["color"].toString().replace("#", "").toIntOrNull(16) ?: 6116423//convert hex -> deci
if(tb.containsKey("opacity")) RCM_TITLE_OPACITY = tb["opacity"].toString().toInt()
}
//border
if(rcm.containsKey("border")){
val border = rcm["border"] as JSONObject
if(border.containsKey("color")) RCM_BORDER_COLOR = border["color"].toString().replace("#", "").toIntOrNull(16) ?: 6116423 //convert hex -> deci
if(border.containsKey("opacity")) RCM_BORDER_OPACITY = border["opacity"].toString().toInt()
}
//styles (changes how things are drawn)
if(rcm.containsKey("styles")){
val style = rcm["styles"] as JSONObject
if(style.containsKey("presets")) RCM_STYLE_PRESET = style["presets"].toString()
if(style.containsKey("rs3border")) RS3_CONTEXT_STYLE = style["rs3border"] as Boolean
}
}
if(custom.containsKey("xpdrops")){
val xpd = custom["xpdrops"] as JSONObject
if(xpd.containsKey("enabled")) xpDropsEnabled = xpd["enabled"] as Boolean
if(xpd.containsKey("drop_mode")) xpDropMode = xpd["drop_mode"].toString().toInt()
if(xpd.containsKey("track_mode")) xpTrackMode = xpd["track_mode"].toString().toInt()
}
if(custom.containsKey("slayer")){
val slayer = custom["slayer"] as JSONObject
if(slayer.containsKey("enabled")) slayerCountEnabled = slayer["enabled"] as Boolean
if(slayer.containsKey("color")) slayerTrackerColor = slayer["color"].toString().replace("#", "")
if(slayer.containsKey("opacity")) slayerTrackerOpacity = slayer["opacity"].toString().toInt()
}
if(custom.containsKey("rendering_options")) {
val hdoptions = custom["rendering_options"] as JSONObject
if(hdoptions.containsKey("technical")) {
val renderIncrease = hdoptions["technical"] as JSONObject
if(renderIncrease.containsKey("render_distance_increase")) RENDER_DISTANCE_INCREASE = renderIncrease["render_distance_increase"] as Boolean
}
if(hdoptions.containsKey("skybox")) {
val skyboxColor = hdoptions["skybox"] as JSONObject
if(skyboxColor.containsKey("skybox_color")) SKYBOX_COLOR
}
}
} }
"rs3" -> {
//Parse debug options RS3_CONTEXT_STYLE = true
if(data.containsKey("debug")){ RCM_BG_COLOR = 662822
val debug = data["debug"] as JSONObject RCM_BG_OPACITY = 255
if(debug.containsKey("item_debug")) ITEM_DEBUG_ENABLED = debug["item_debug"] as Boolean RCM_TITLE = "<col=C6B895>Choose Option</col>"
if(debug.containsKey("npc_debug")) NPC_DEBUG_ENABLED = debug["npc_debug"] as Boolean RCM_TITLE_COLOR = 1512718
if(debug.containsKey("object_debug")) OBJECT_DEBUG_ENABLED = debug["object_debug"] as Boolean RCM_TITLE_OPACITY = 165
if(debug.containsKey("hd_login_region_debug")) HD_LOGIN_DEBUG = debug["hd_login_region_debug"] as Boolean RCM_BORDER_COLOR = 16777215
if(debug.containsKey("hd_login_region_debug_verbose")) HD_LOGIN_VERBOSE = debug["hd_login_region_debug_verbose"] as Boolean RCM_BORDER_OPACITY = 255
if(debug.containsKey("cache_debug")) CACHE_DEBUG = debug["cache_debug"] as Boolean
if(debug.containsKey("world_map_debug")) WORLD_MAP_DEBUG = debug["world_map_debug"] as Boolean
} }
}
/** }
* Style Overrides (Still working on this system. We should allow for maximum creativity
* The way that it will be setup is a style type 1st fun extendRenderDistance() {
* ie, classicbox, rs3, rounded, rounded2 if (RENDER_DISTANCE_INCREASE) {
* Then we introduce color schemes that a user could select /** **DO NOT CHANGE THESE NUMBERS UNLESS YOU KNOW WHAT YOU ARE DOING**
* ie, classic, rs3, alternate, alternate2, custom * Render Distance Overrides
* @author Woah *
* (Simple formula) Tile amount * 512
* Default: 7 * 512 = 3584
* Extended(max): 56 * 512 = 28672
*
* Files + methods effected by these values:
* HDToolKit METHOD viewport
* Class140_Sub1_Sub1 METHOD animate
* Class3_Sub22 METHOD method398 * value as short
* Class40 METHOD method1046 * using RENDER_DISTANCE_TILE_VALUE
*/ */
when (RCM_STYLE_PRESET) { RENDER_DISTANCE_VALUE = if (RENDER_DISTANCE_INCREASE) 28672F else 3584.0f
"classic" -> { RENDER_DISTANCE_TILE_VALUE = if (RENDER_DISTANCE_INCREASE) 56 else 28
RS3_CONTEXT_STYLE = false RENDER_DISTANCE_FOG_FIX = if (RENDER_DISTANCE_INCREASE) 28672F else 3328.0f
RCM_BG_COLOR = 6116423
RCM_BG_OPACITY = 255
RCM_TITLE = "<col=5d5447>Choose Option</col>"
RCM_TITLE_COLOR = 0
RCM_TITLE_OPACITY = 255
RCM_BORDER_COLOR = 0
RCM_BORDER_OPACITY = 255
}
"rs3" -> {
RS3_CONTEXT_STYLE = true
RCM_BG_COLOR = 662822
RCM_BG_OPACITY = 255
RCM_TITLE = "<col=C6B895>Choose Option</col>"
RCM_TITLE_COLOR = 1512718
RCM_TITLE_OPACITY = 165
RCM_BORDER_COLOR = 16777215
RCM_BORDER_OPACITY = 255
}
}
} }
}
fun extendRenderDistance() { /**
if (RENDER_DISTANCE_INCREASE) { * Client Info
/** **DO NOT CHANGE THESE NUMBERS UNLESS YOU KNOW WHAT YOU ARE DOING** * Not Editable
* Render Distance Overrides */
* @JvmField
* (Simple formula) Tile amount * 512 var CLIENT_BUILD = 530
* Default: 7 * 512 = 3584
* Extended(max): 56 * 512 = 28672
*
* Files + methods effected by these values:
* HDToolKit METHOD viewport
* Class140_Sub1_Sub1 METHOD animate
* Class3_Sub22 METHOD method398 * value as short
* Class40 METHOD method1046 * using RENDER_DISTANCE_TILE_VALUE
*/
RENDER_DISTANCE_VALUE = if (RENDER_DISTANCE_INCREASE) 28672F else 3584.0f
RENDER_DISTANCE_TILE_VALUE = if (RENDER_DISTANCE_INCREASE) 56 else 28
RENDER_DISTANCE_FOG_FIX = if (RENDER_DISTANCE_INCREASE) 28672F else 3328.0f
}
}
/** @JvmField
* Client Info var CLIENT_VERSION = 1
* Not Editable
*/
@JvmField
var CLIENT_BUILD = 530
@JvmField @JvmField
var CLIENT_VERSION = 1 var PACKAGE_NAME = "org.runite.client"
@JvmField @JvmField
var PACKAGE_NAME = "org.runite.client" var RSA = true
@JvmField @JvmField
var RSA = true var ISAAC = false
@JvmField @JvmField
var ISAAC = false var EXPONENT = BigInteger("65537")
@JvmField @JvmField
var EXPONENT = BigInteger("65537") var MODULUS = BigInteger("96982303379631821170939875058071478695026608406924780574168393250855797534862289546229721580153879336741968220328805101128831071152160922518190059946555203865621183480223212969502122536662721687753974815205744569357388338433981424032996046420057284324856368815997832596174397728134370577184183004453899764051")
@JvmField @JvmField
var MODULUS = BigInteger("96982303379631821170939875058071478695026608406924780574168393250855797534862289546229721580153879336741968220328805101128831071152160922518190059946555203865621183480223212969502122536662721687753974815205744569357388338433981424032996046420057284324856368815997832596174397728134370577184183004453899764051") var SERVER_NAME = "2009scape"
@JvmField /**
var SERVER_NAME = "2009scape" * Path to config
*/
@JvmField
var configLocation = "config.json"
/** /**
* Path to config * Holiday Event Toggles
*/ */
@JvmField @JvmField
var configLocation = "config.json" var HOLIDAYS_ENABLED = true
/** @JvmField
* Holiday Event Toggles var EASTER_EVENT_ENABLED = false
*/ /**
@JvmField * Halloween event NPC Definitions are handled inside of NPCDefinition.java
var HOLIDAYS_ENABLED = true */
@JvmField
var HALLOWEEN_EVENT_ENABLED = false
@JvmField @JvmField
var EASTER_EVENT_ENABLED = false var THANKSGIVING_EVENT_ENABLED = false
/**
* Halloween event NPC Definitions are handled inside of NPCDefinition.java
*/
@JvmField
var HALLOWEEN_EVENT_ENABLED = false
@JvmField @JvmField
var THANKSGIVING_EVENT_ENABLED = false var CHRISTMAS_EVENT_ENABLED = false
@JvmField private val calendar: Calendar = Calendar.getInstance()
var CHRISTMAS_EVENT_ENABLED = false private val month = calendar.get(Calendar.MONTH)
private val day = calendar.get(Calendar.DAY_OF_MONTH)
private val calendar: Calendar = Calendar.getInstance() @JvmStatic
private val month = calendar.get(Calendar.MONTH) fun implementHoliday() {
private val day = calendar.get(Calendar.DAY_OF_MONTH) if (HOLIDAYS_ENABLED) {
when (month) {
@JvmStatic 3 -> {
fun implementHoliday() { if (day <= 8) {
if (HOLIDAYS_ENABLED) { EASTER_EVENT_ENABLED = true
when (month) {
3 -> {
if (day <= 8) {
EASTER_EVENT_ENABLED = true
}
} }
9 -> HALLOWEEN_EVENT_ENABLED = true
10 -> THANKSGIVING_EVENT_ENABLED = true
11 -> CHRISTMAS_EVENT_ENABLED = true
} }
9 -> HALLOWEEN_EVENT_ENABLED = true
10 -> THANKSGIVING_EVENT_ENABLED = true
11 -> CHRISTMAS_EVENT_ENABLED = true
} }
} }
} }