Various Changes (#614)

* Clean Old Log Files

* Various Changes

* Moved minutes.log to log folder
* Made SERVER_LOG_DIR constant
* Moved FILE_SYSTEM_DIR to GameConstants & Deleted org.apollo.jagcached.Constants
* Removed unused minutes.log from data/data
* Removed Duplicate RSAKeyGen
* Moved RSAKeyGen from com.rs2.net.rsa to com.rs2.util.rsa

* Removed data/net.xml & Created Moved NetworkConstants.java

* Add HTTP & Jaggrab Port's to ConfigLoader

* IntelliJ Reformat ConfigLoader.java

* Fix Mistake

* Attempt #2

* Woops, wrong port
This commit is contained in:
Josh Shippam
2023-02-09 01:05:06 +00:00
committed by GitHub
parent 88a9562e03
commit 55ca851d07
201 changed files with 1264 additions and 12570 deletions
@@ -5,6 +5,8 @@
"website_link": "https://2006Scape.org",
"server_debug": false,
"file_server": true,
"http_port": 8080,
"jaggrab_port": 43595,
"world_id": 1,
"xp_rate": 1.0,
"variable_xp_rate": false,
@@ -1,11 +0,0 @@
[2014/02/01] 13:44 andrewadsfa1 cast High Alchemy on bread for 14 coins
[2014/02/01] 13:44 andrewadsfa1 cast High Alchemy on empty pot for 0 coins
[2014/02/01] 13:44 andrewadsfa1 cast High Alchemy on bucket for 0 coins
[2014/02/01] 13:44 andrewadsfa1 cast High Alchemy on bronze pickaxe for 0 coins
[2014/02/01] 13:44 andrewadsfa1 cast High Alchemy on shrimps for 3 coins
[2014/02/01] 13:44 andrewadsfa1 cast High Alchemy on small fishing net for 3 coins
[2014/02/01] 13:44 andrewadsfa1 cast High Alchemy on tinderbox for 0 coins
[2014/02/01] 13:44 andrewadsfa1 cast High Alchemy on bronze hatchet for 9 coins
[2014/02/01] 13:46 andrewadsfa1 cast High Alchemy on nature rune for 74 coins
[2014/02/01] 13:46 andrewadsfa1 cast High Alchemy on nature rune for 74 coins
[2014/02/01] 13:46 andrewadsfa1 cast High Alchemy on nature rune for 74 coins
@@ -1,7 +0,0 @@
[2019/10/26] 21:23 michael2 clicked item bones
[2019/10/26] 21:25 michael2 clicked item bones
[2019/10/26] 21:26 michael2 clicked item bones
[2019/10/26] 21:28 michael2 clicked item bones
[2019/10/26] 21:30 michael2 clicked item bones
[2019/10/26] 21:30 michael2 clicked item bones
[2019/10/26] 21:30 michael2 clicked item bones
@@ -1,2 +0,0 @@
[2019/10/28] 15:43 michael8 clicked item herb
[2019/10/28] 15:43 michael8 clicked item bones
@@ -1,110 +0,0 @@
[2014/01/12] 10:51 andrew used command: ipban andrew
[2014/01/12] 10:59 andrew used command: ipbot andrew10
[2014/01/12] 11:00 andrew used command: ipbot andrew10
[2014/01/12] 11:01 andrew used command: ipbot andrew10
[2014/01/12] 11:07 andrew used command: ipbot andrew10
[2014/01/12] 11:07 andrew used command: ipbot andrew10
[2014/01/12] 11:08 andrew used command: ipbot andrew10
[2014/01/12] 11:09 andrew used command: ipbot andrew10
[2014/01/12] 11:09 andrew used command: ipbot andrew10
[2014/01/12] 11:10 andrew used command: ipbot andrew10
[2014/01/12] 11:11 andrew used command: ipbot andrew10
[2014/01/12] 11:11 andrew used command: ipbot andrew10
[2014/01/12] 11:12 andrew used command: ipbot andrew10
[2014/01/12] 11:12 andrew used command: ipbot andrew10
[2014/01/12] 11:12 andrew used command: ipbot andrew10
[2014/01/12] 11:12 andrew used command: ipbot andrew10
[2014/01/12] 11:13 andrew used command: ipbot andrew10
[2014/01/12] 12:27 andrew used command: ipban andrew11
[2014/01/12] 13:52 andrew used command: ipban andrew25
[2014/01/12] 13:53 andrew used command: ipban andrew25
[2014/01/12] 13:54 andrew used command: ipban andrew25 hi
[2014/01/12] 13:55 andrew used command: ipban andrew25
[2014/01/12] 13:56 andrew used command: ipban andrew25 botting
[2014/01/12] 13:57 andrew used command: ipban andrew25
[2014/01/12] 13:57 andrew used command: ipban andrew25 botting bitch
[2014/01/12] 13:58 andrew used command: ipban andrew25 botting
[2014/01/12] 16:07 andrew used command: ipban andrew22 fucker
[2014/01/12] 16:09 andrew used command: ipban andrew22 botting
[2014/01/12] 16:10 andrew used command: ipban andrew22
[2014/01/12] 16:10 andrew used command: ipban andrew22 botting
[2014/01/12] 16:11 andrew used command: ipbanned andrew22 BOTTING
[2014/01/12] 16:24 andrew used command: ipmute andrew22 fuckoff
[2014/01/12] 16:26 andrew used command: ipmute andrew22 hi
[2014/01/12] 16:28 andrew used command: ipban andrew22
[2014/01/12] 16:28 andrew used command: ipban andrew22 fuckoff
[2014/01/12] 16:32 andrew used command: ipban andrew22 fucker
[2014/01/12] 16:35 andrew used command: ipmute andrew22
[2014/01/12] 16:35 andrew used command: ipmute andrew22 spam
[2014/01/12] 16:37 andrew used command: ipmute andrew22
[2014/01/12] 16:37 andrew used command: ipmute andrew22 fucker
[2014/01/12] 16:37 andrew used command: unipmute andrew22
[2014/01/12] 16:39 andrew used command: unipmute andrew22
[2014/01/12] 16:39 andrew used command: ipmute andrew 22 botting
[2014/01/12] 16:39 andrew used command: ipmute andrew 22 botting
[2014/01/12] 16:39 andrew used command: ipmute andrew 22 botting
[2014/01/12] 16:42 andrew used command: ipmute andrew 22 hi
[2014/01/12] 16:42 andrew used command: ipmute andrew 22 hi..
[2014/01/12] 16:44 andrew used command: ipmute andrew 22 hi
[2014/01/12] 16:44 andrew used command: ipmute andrew 22 hi
[2014/01/12] 16:45 andrew used command: ipmute andrew 22 hi
[2014/01/12] 16:45 andrew used command: ipmute andrew 22 hi
[2014/01/12] 16:48 andrew used command: ipmute andrew 22 hi
[2014/01/12] 16:49 andrew used command: ipmute andrew 22 hi
[2014/01/12] 16:56 andrew used command: ipmute andrew 22 hi
[2014/01/12] 16:57 andrew used command: ipmute andrew 22 hi
[2014/01/12] 16:57 andrew used command: ipmute andrew 22 hi
[2014/01/12] 16:59 andrew used command: ipmute andrew 22 hi
[2014/01/12] 17:00 andrew used command: ipmute andrew 22 hi
[2014/01/12] 17:01 andrew used command: ipmute adsfasdf adsfasdf asdf
[2014/01/13] 19:31 andrew used command: ipmute andrew 30 hi
[2014/01/13] 19:33 andrew used command: ipmute andrew 35 hi
[2014/01/13] 19:37 andrew used command: ipmute andrew_35 hi
[2014/01/13] 19:42 andrew used command: ipmute_andrew 35_botting
[2014/01/13] 19:42 andrew used command: ipban_andrew 35_botting
[2014/01/13] 19:47 andrew used command: ipmute
[2014/01/13] 19:48 andrew used command: ipmute
[2014/01/14] 18:39 andrew used command: mute andrew45 cuz
[2014/01/14] 18:39 andrew used command: mute-andrew45-cuz
[2014/01/14] 18:39 andrew used command: mute-Andrew45-cuz
[2014/01/14] 18:40 andrew used command: mute-Andrew45-jj
[2014/01/14] 18:40 andrew used command: ipmute-andrew45-cuz
[2014/01/14] 18:40 andrew used command: unipmute-andrew-cuz
[2014/01/14] 18:40 andrew used command: unipmute andrew
[2014/01/14] 18:44 andrew used command: mute-andrew45-cuz
[2014/01/14] 18:44 andrew used command: mute
[2014/01/14] 18:44 andrew used command: mute-andrew45-da
[2014/01/14] 18:45 andrew used command: unmute andrew45
[2014/03/08] 13:37 andrew used command: bank
[2014/03/08] 13:39 andrew used command: bank
[2014/03/08] 13:41 andrew used command: bank
[2014/03/08] 13:43 andrew used command: bank
[2014/03/08] 13:45 andrew used command: bank
[2014/03/08] 13:46 andrew used command: bank
[2014/03/08] 13:47 andrew used command: bank
[2014/03/08] 13:47 andrew used command: bank
[2014/03/08] 13:53 andrew used command: bank
[2014/03/08] 13:54 andrew used command: bank
[2014/03/08] 13:54 andrew used command: bank
[2014/03/08] 13:54 andrew used command: bank:
[2014/03/08] 13:55 andrew used command: bank
[2014/03/08] 13:56 andrew used command: bank
[2014/03/08] 14:06 andrew used command: bank
[2014/03/08] 14:08 andrew used command: bank
[2014/03/08] 14:11 andrew used command: bank
[2014/03/08] 14:12 andrew used command: bank
[2014/03/08] 14:14 andrew used command: bank
[2014/03/08] 14:15 andrew used command: bank
[2014/03/08] 14:21 andrew used command: bank
[2014/03/08] 14:21 andrew used command: bank
[2014/03/08] 14:22 andrew used command: bank
[2014/03/08] 14:24 andrew used command: bank
[2014/03/08] 14:27 andrew used command: bank
[2014/03/08] 14:28 andrew used command: bank
[2014/03/08] 14:30 andrew used command: bank
[2014/03/08] 14:32 andrew used command: bank
[2014/03/08] 14:36 andrew used command: bank
[2014/03/08] 14:41 andrew used command: bank
[2014/03/08] 14:51 andrew used command: bank
[2014/03/08] 14:57 andrew used command: bank
[2014/03/08] 15:01 andrew used command: bank
@@ -1,11 +0,0 @@
[2014/03/08] 14:22 andrew1 used command: bank
[2014/03/08] 14:26 andrew1 used command: bank
[2014/03/08] 14:31 andrew1 used command: bank
[2014/03/08] 14:33 andrew1 used command: bank
[2014/03/08] 14:40 andrew1 used command: bank
[2014/03/08] 14:44 andrew1 used command: bank
[2014/03/08] 14:44 andrew1 used command: bank
[2014/03/08] 14:49 andrew1 used command: bank
[2014/03/08] 14:54 andrew1 used command: bank
[2014/03/08] 14:55 andrew1 used command: bank
[2014/03/08] 14:57 andrew1 used command: bank
@@ -1,16 +0,0 @@
[2019/11/21] 18:52 andrew5 used command: bank
[2019/11/21] 19:04 andrew5 used command: bank
[2019/12/04] 13:26 andrew5 used command: bank
[2019/12/22] 05:47 andrew5 used command: bank
[2019/12/22] 05:58 andrew5 used command: bank
[2019/12/22] 05:58 andrew5 used command: bank
[2019/12/22] 05:59 andrew5 used command: bank
[2020/01/03] 07:00 andrew5 used command: bank
[2020/01/03] 07:00 andrew5 used command: bank
[2020/01/03] 07:02 andrew5 used command: bank
[2020/03/13] 04:15 andrew5 used command: bank
[2020/03/13] 04:17 andrew5 used command: bank
[2020/03/13] 04:21 andrew5 used command: bank
[2020/03/13] 04:25 andrew5 used command: bank
[2020/03/13] 04:25 andrew5 used command: bank
[2020/03/13] 04:29 andrew5 used command: bank
@@ -1,2 +0,0 @@
[2020/02/09] 23:17 andrew55 used command: bank
[2020/02/09] 23:19 andrew55 used command: bank
@@ -1,4 +0,0 @@
[2019/10/27] 16:16 michael used command: bank
[2019/11/24] 09:27 michael used command: bank
[2019/11/24] 09:31 michael used command: bank
[2019/11/24] 09:38 michael used command: bank
@@ -1 +0,0 @@
[2019/10/28] 16:52 michael2 used command: bank
@@ -1 +0,0 @@
[2014/01/18] 22:22 mod den used command: bank
File diff suppressed because it is too large Load Diff
@@ -1 +0,0 @@
[2014/02/11] 20:05 andrewf dropped 1 empty pot absX: 3222 absY: 3218
@@ -1,3 +0,0 @@
[2014/02/11] 20:24 andrewsdf dropped 1 bronze hatchet absX: 3222 absY: 3218
[2014/02/11] 20:24 andrewsdf dropped 1 tinderbox absX: 3223 absY: 3219
[2014/02/11] 20:24 andrewsdf dropped 1 shrimps absX: 3226 absY: 3219
@@ -1,2 +0,0 @@
[2019/06/19] 22:04 irdb dropped 1 bronze sword absX: 3210 absY: 3218
[2019/06/19] 22:14 irdb dropped 1 bronze dagger absX: 3207 absY: 3215
@@ -1,2 +0,0 @@
[2019/10/26] 13:49 michael dropped 1 chef's hat absX: 3250 absY: 3225
[2019/10/26] 13:49 michael dropped 1 fire talisman absX: 3250 absY: 3225
@@ -1,16 +0,0 @@
[2019/10/26] 21:23 michael2 dropped 3 iron arrow absX: 3248 absY: 3225
[2019/10/26] 21:24 michael2 dropped 17 bronze arrow absX: 3262 absY: 3228
[2019/10/26] 21:24 michael2 dropped 1 air talisman absX: 3262 absY: 3228
[2019/10/26] 21:26 michael2 dropped 1 bronze longsword absX: 3259 absY: 3229
[2019/10/26] 21:28 michael2 dropped 1 bronze med helm absX: 3251 absY: 3225
[2019/10/26] 21:28 michael2 dropped 1 air talisman absX: 3251 absY: 3225
[2019/10/26] 21:29 michael2 dropped 9 coins absX: 3255 absY: 3223
[2019/10/26] 21:29 michael2 dropped 6 water rune absX: 3255 absY: 3223
[2019/10/26] 21:29 michael2 dropped 1 goblin mail absX: 3255 absY: 3223
[2019/10/26] 21:31 michael2 dropped 1 bronze sq shield absX: 3260 absY: 3228
[2019/10/26] 21:32 michael2 dropped 9 coins absX: 3259 absY: 3227
[2019/10/26] 21:34 michael2 dropped 1 bronze sq shield absX: 3262 absY: 3229
[2019/10/26] 21:34 michael2 dropped 1 bronze sq shield absX: 3255 absY: 3223
[2019/10/26] 21:34 michael2 dropped 1 bronze longsword absX: 3255 absY: 3223
[2019/10/26] 21:35 michael2 dropped 1 raw chicken absX: 3260 absY: 3227
[2019/10/26] 21:51 michael2 dropped 1 ashes absX: 3234 absY: 3218
@@ -1,21 +0,0 @@
[2019/10/27] 18:50 michael5 dropped 1 bronze arrow absX: 3247 absY: 3226
[2019/10/27] 18:50 michael5 dropped 1 bronze arrow absX: 3247 absY: 3226
[2019/10/27] 18:50 michael5 dropped 1 bronze arrow absX: 3247 absY: 3226
[2019/10/27] 18:50 michael5 dropped 2 bronze arrow absX: 3247 absY: 3226
[2019/10/27] 18:50 michael5 dropped 3 bronze arrow absX: 3247 absY: 3226
[2019/10/27] 18:50 michael5 dropped 4 bronze arrow absX: 3247 absY: 3226
[2019/10/27] 18:50 michael5 dropped 5 bronze arrow absX: 3247 absY: 3226
[2019/10/27] 18:50 michael5 dropped 6 bronze arrow absX: 3247 absY: 3226
[2019/10/27] 18:51 michael5 dropped 2 air rune absX: 3248 absY: 3226
[2019/10/27] 18:51 michael5 dropped 5 iron arrow absX: 3248 absY: 3226
[2019/10/27] 18:51 michael5 dropped 1 bronze arrow absX: 3251 absY: 3226
[2019/10/27] 18:51 michael5 dropped 1 bronze arrow absX: 3253 absY: 3225
[2019/10/27] 18:51 michael5 dropped 2 bronze arrow absX: 3252 absY: 3225
[2019/10/27] 18:51 michael5 dropped 3 bronze arrow absX: 3252 absY: 3225
[2019/10/27] 18:51 michael5 dropped 1 bronze arrow absX: 3242 absY: 3225
[2019/10/27] 18:51 michael5 dropped 2 bronze arrow absX: 3242 absY: 3225
[2019/10/27] 18:52 michael5 dropped 3 bronze arrow absX: 3242 absY: 3225
[2019/10/27] 18:52 michael5 dropped 4 bronze arrow absX: 3242 absY: 3225
[2019/10/27] 18:52 michael5 dropped 5 bronze arrow absX: 3242 absY: 3225
[2019/10/27] 18:52 michael5 dropped 6 bronze arrow absX: 3242 absY: 3225
[2019/10/27] 18:55 michael5 dropped 1 ashes absX: 3234 absY: 3230
@@ -1,27 +0,0 @@
[2019/10/28] 13:45 michael6 dropped 1 bronze arrow absX: 3224 absY: 3222
[2019/10/28] 13:45 michael6 dropped 1 bronze arrow absX: 3224 absY: 3224
[2019/10/28] 13:45 michael6 dropped 2 bronze arrow absX: 3224 absY: 3224
[2019/10/28] 13:45 michael6 dropped 3 bronze arrow absX: 3224 absY: 3222
[2019/10/28] 13:45 michael6 dropped 4 bronze arrow absX: 3224 absY: 3224
[2019/10/28] 13:45 michael6 dropped 5 bronze arrow absX: 3224 absY: 3224
[2019/10/28] 13:45 michael6 dropped 6 bronze arrow absX: 3224 absY: 3224
[2019/10/28] 13:45 michael6 dropped 7 bronze arrow absX: 3224 absY: 3224
[2019/10/28] 13:46 michael6 dropped 8 bronze arrow absX: 3224 absY: 3224
[2019/10/28] 13:46 michael6 dropped 9 bronze arrow absX: 3224 absY: 3222
[2019/10/28] 13:46 michael6 dropped 10 bronze arrow absX: 3224 absY: 3224
[2019/10/28] 13:48 michael6 dropped 1 bronze arrow absX: 3220 absY: 3224
[2019/10/28] 13:48 michael6 dropped 1 bronze arrow absX: 3219 absY: 3223
[2019/10/28] 13:48 michael6 dropped 2 bronze arrow absX: 3221 absY: 3223
[2019/10/28] 13:48 michael6 dropped 1 bronze arrow absX: 3221 absY: 3225
[2019/10/28] 13:48 michael6 dropped 1 bronze arrow absX: 3222 absY: 3221
[2019/10/28] 13:48 michael6 dropped 2 bronze arrow absX: 3222 absY: 3221
[2019/10/28] 13:48 michael6 dropped 3 bronze arrow absX: 3222 absY: 3221
[2019/10/28] 13:48 michael6 dropped 4 bronze arrow absX: 3222 absY: 3221
[2019/10/28] 13:48 michael6 dropped 5 bronze arrow absX: 3222 absY: 3221
[2019/10/28] 13:48 michael6 dropped 6 bronze arrow absX: 3222 absY: 3221
[2019/10/28] 13:52 michael6 dropped 1 bronze arrow absX: 3221 absY: 3219
[2019/10/28] 13:52 michael6 dropped 1 bronze arrow absX: 3232 absY: 3219
[2019/10/28] 14:01 michael6 dropped 1 bronze arrow absX: 3217 absY: 3244
[2019/10/28] 14:01 michael6 dropped 1 bronze arrow absX: 3228 absY: 3218
[2019/10/28] 14:01 michael6 dropped 1 bronze arrow absX: 3230 absY: 3218
[2019/10/28] 14:02 michael6 dropped 1 bronze arrow absX: 3232 absY: 3217
@@ -1,29 +0,0 @@
[2019/10/28] 15:09 michael7 dropped 1 bronze arrow absX: 3225 absY: 3223
[2019/10/28] 15:13 michael7 dropped 1 bronze arrow absX: 3225 absY: 3224
[2019/10/28] 15:13 michael7 dropped 1 bronze arrow absX: 3225 absY: 3222
[2019/10/28] 15:18 michael7 dropped 1 bronze arrow absX: 3230 absY: 3219
[2019/10/28] 15:19 michael7 dropped 2 bronze arrow absX: 3230 absY: 3219
[2019/10/28] 15:19 michael7 dropped 1 bronze arrow absX: 3234 absY: 3217
[2019/10/28] 15:19 michael7 dropped 1 bronze arrow absX: 3235 absY: 3221
[2019/10/28] 15:19 michael7 dropped 2 bronze arrow absX: 3235 absY: 3221
[2019/10/28] 15:19 michael7 dropped 1 bronze arrow absX: 3236 absY: 3222
[2019/10/28] 15:19 michael7 dropped 1 bronze arrow absX: 3233 absY: 3222
[2019/10/28] 15:19 michael7 dropped 2 bronze arrow absX: 3233 absY: 3222
[2019/10/28] 15:19 michael7 dropped 3 bronze arrow absX: 3233 absY: 3222
[2019/10/28] 15:19 michael7 dropped 4 bronze arrow absX: 3233 absY: 3222
[2019/10/28] 15:19 michael7 dropped 5 bronze arrow absX: 3233 absY: 3222
[2019/10/28] 15:19 michael7 dropped 6 bronze arrow absX: 3233 absY: 3222
[2019/10/28] 15:19 michael7 dropped 1 bronze arrow absX: 3232 absY: 3220
[2019/10/28] 15:19 michael7 dropped 1 bronze arrow absX: 3233 absY: 3220
[2019/10/28] 15:19 michael7 dropped 2 bronze arrow absX: 3233 absY: 3220
[2019/10/28] 15:20 michael7 dropped 1 bronze arrow absX: 3234 absY: 3218
[2019/10/28] 15:20 michael7 dropped 1 ashes absX: 3230 absY: 3218
[2019/10/28] 15:20 michael7 dropped 3 bronze arrow absX: 3230 absY: 3219
[2019/10/28] 15:20 michael7 dropped 1 bronze arrow absX: 3223 absY: 3228
[2019/10/28] 15:23 michael7 dropped 1 bronze arrow absX: 3223 absY: 3227
[2019/10/28] 15:23 michael7 dropped 2 bronze arrow absX: 3223 absY: 3229
[2019/10/28] 15:23 michael7 dropped 1 bronze arrow absX: 3234 absY: 3218
[2019/10/28] 15:23 michael7 dropped 1 bronze arrow absX: 3236 absY: 3218
[2019/10/28] 15:23 michael7 dropped 1 bronze arrow absX: 3234 absY: 3218
[2019/10/28] 15:23 michael7 dropped 2 bronze arrow absX: 3234 absY: 3218
[2019/10/28] 15:23 michael7 dropped 3 bronze arrow absX: 3234 absY: 3218
@@ -1,20 +0,0 @@
[2019/10/28] 15:25 michael8 dropped 1 bronze arrow absX: 3234 absY: 3226
[2019/10/28] 15:25 michael8 dropped 1 bronze arrow absX: 3234 absY: 3226
[2019/10/28] 15:25 michael8 dropped 1 bronze arrow absX: 3234 absY: 3226
[2019/10/28] 15:29 michael8 dropped 1 bronze arrow absX: 3228 absY: 3219
[2019/10/28] 15:29 michael8 dropped 1 bronze arrow absX: 3226 absY: 3220
[2019/10/28] 15:29 michael8 dropped 2 bronze arrow absX: 3226 absY: 3220
[2019/10/28] 15:29 michael8 dropped 3 bronze arrow absX: 3226 absY: 3220
[2019/10/28] 15:29 michael8 dropped 4 bronze arrow absX: 3228 absY: 3220
[2019/10/28] 15:30 michael8 dropped 1 bronze arrow absX: 3229 absY: 3217
[2019/10/28] 15:30 michael8 dropped 1 bronze arrow absX: 3226 absY: 3218
[2019/10/28] 15:31 michael8 dropped 5 bronze arrow absX: 3226 absY: 3220
[2019/10/28] 15:31 michael8 dropped 6 bronze arrow absX: 3226 absY: 3220
[2019/10/28] 15:31 michael8 dropped 7 bronze arrow absX: 3226 absY: 3220
[2019/10/28] 15:31 michael8 dropped 1 iron dagger absX: 3226 absY: 3220
[2019/10/28] 15:36 michael8 dropped 1 bronze arrow absX: 3219 absY: 3222
[2019/10/28] 15:36 michael8 dropped 2 bronze arrow absX: 3219 absY: 3222
[2019/10/28] 15:36 michael8 dropped 3 bronze arrow absX: 3219 absY: 3222
[2019/10/28] 15:36 michael8 dropped 4 bronze arrow absX: 3219 absY: 3222
[2019/10/28] 15:41 michael8 dropped 1 air talisman absX: 3220 absY: 3222
[2019/10/28] 15:41 michael8 dropped 1 herb absX: 3220 absY: 3222
@@ -1,9 +0,0 @@
[2020/08/09] 21:08 sandro dropped 1 waterskin(0) absX: 3303 absY: 3136
[2020/08/09] 21:08 sandro dropped 1 waterskin(0) absX: 3303 absY: 3136
[2020/08/09] 21:08 sandro dropped 1 waterskin(0) absX: 3301 absY: 3138
[2020/08/09] 21:08 sandro dropped 1 waterskin(0) absX: 3299 absY: 3139
[2020/08/09] 21:08 sandro dropped 1 waterskin(0) absX: 3297 absY: 3141
[2020/08/09] 21:08 sandro dropped 1 waterskin(0) absX: 3297 absY: 3141
[2020/08/09] 21:08 sandro dropped 1 waterskin(0) absX: 3297 absY: 3141
[2020/08/09] 21:08 sandro dropped 1 waterskin(0) absX: 3297 absY: 3141
[2020/08/09] 21:08 sandro dropped 1 waterskin(0) absX: 3293 absY: 3147
@@ -1 +0,0 @@
[2019/11/10] 22:30 spamtest1 dropped 1 grimy lantadyme absX: 3231 absY: 3207
@@ -1 +0,0 @@
[2019/10/04] 22:10 test dropped 3 coins absX: 3224 absY: 3202
@@ -1 +0,0 @@
[2014/01/08] 16:07 andrew1 killed andrew in the duel arena.
@@ -1,4 +0,0 @@
[2019/11/17] 15:52 andrew22 picked up knife itemX: 3224, itemY: 3202
[2019/11/17] 15:52 andrew22 picked up knife itemX: 3224, itemY: 3202
[2019/11/17] 15:54 andrew22 picked up knife itemX: 3224, itemY: 3202
[2019/11/17] 15:56 andrew22 picked up knife itemX: 3224, itemY: 3202
@@ -1,2 +0,0 @@
[2019/06/19] 22:14 irdb picked up bronze dagger itemX: 3207, itemY: 3215
[2019/10/03] 18:17 irdb picked up cabbage itemX: 3217, itemY: 9622
@@ -1,2 +0,0 @@
[2019/10/26] 13:50 michael picked up fire talisman itemX: 3250, itemY: 3226
[2019/10/26] 13:50 michael picked up chef's hat itemX: 3250, itemY: 3226
@@ -1,20 +0,0 @@
[2019/10/26] 21:23 michael2 picked up iron arrow itemX: 3249, itemY: 3225
[2019/10/26] 21:23 michael2 picked up bones itemX: 3249, itemY: 3225
[2019/10/26] 21:24 michael2 picked up bronze arrow itemX: 3261, itemY: 3228
[2019/10/26] 21:24 michael2 picked up bones itemX: 3261, itemY: 3228
[2019/10/26] 21:24 michael2 picked up air talisman itemX: 3261, itemY: 3228
[2019/10/26] 21:26 michael2 picked up bones itemX: 3251, itemY: 3225
[2019/10/26] 21:26 michael2 picked up bones itemX: 3260, itemY: 3229
[2019/10/26] 21:26 michael2 picked up bronze longsword itemX: 3260, itemY: 3229
[2019/10/26] 21:27 michael2 picked up bones itemX: 3262, itemY: 3229
[2019/10/26] 21:28 michael2 picked up bronze med helm itemX: 3250, itemY: 3225
[2019/10/26] 21:28 michael2 picked up bones itemX: 3250, itemY: 3225
[2019/10/26] 21:28 michael2 picked up air talisman itemX: 3250, itemY: 3225
[2019/10/26] 21:30 michael2 picked up bones itemX: 3250, itemY: 3225
[2019/10/26] 21:30 michael2 picked up goblin mail itemX: 3254, itemY: 3223
[2019/10/26] 21:31 michael2 picked up bronze sq shield itemX: 3260, itemY: 3229
[2019/10/26] 21:31 michael2 picked up bones itemX: 3260, itemY: 3229
[2019/10/26] 21:33 michael2 picked up coins itemX: 3261, itemY: 3229
[2019/10/26] 21:34 michael2 picked up bronze sq shield itemX: 3262, itemY: 3230
[2019/10/26] 21:34 michael2 picked up bronze sq shield itemX: 3254, itemY: 3223
[2019/10/26] 21:34 michael2 picked up bronze longsword itemX: 3254, itemY: 3223
@@ -1,5 +0,0 @@
[2019/10/27] 18:51 michael5 picked up bronze arrow itemX: 3248, itemY: 3226
[2019/10/27] 18:51 michael5 picked up air rune itemX: 3248, itemY: 3226
[2019/10/27] 18:51 michael5 picked up bones itemX: 3248, itemY: 3226
[2019/10/27] 18:51 michael5 picked up iron arrow itemX: 3248, itemY: 3226
[2019/10/27] 18:51 michael5 picked up bronze arrow itemX: 3249, itemY: 3226
@@ -1,5 +0,0 @@
[2019/10/28] 13:46 michael6 picked up bronze arrow itemX: 3224, itemY: 3223
[2019/10/28] 13:48 michael6 picked up bronze arrow itemX: 3220, itemY: 3223
[2019/10/28] 13:48 michael6 picked up bronze arrow itemX: 3222, itemY: 3222
[2019/10/28] 13:48 michael6 picked up bronze arrow itemX: 3220, itemY: 3225
[2019/10/28] 13:48 michael6 picked up bronze arrow itemX: 3220, itemY: 3226
@@ -1,5 +0,0 @@
[2019/10/28] 15:19 michael7 picked up bronze arrow itemX: 3234, itemY: 3222
[2019/10/28] 15:19 michael7 picked up bronze arrow itemX: 3234, itemY: 3221
[2019/10/28] 15:19 michael7 picked up bronze arrow itemX: 3234, itemY: 3220
[2019/10/28] 15:19 michael7 picked up bronze arrow itemX: 3235, itemY: 3220
[2019/10/28] 15:19 michael7 picked up bronze arrow itemX: 3234, itemY: 3218
@@ -1,4 +0,0 @@
[2019/10/28] 15:36 michael8 picked up bronze arrow itemX: 3219, itemY: 3221
[2019/10/28] 15:43 michael8 picked up air talisman itemX: 3219, itemY: 3222
[2019/10/28] 15:43 michael8 picked up herb itemX: 3219, itemY: 3222
[2019/10/28] 15:43 michael8 picked up bones itemX: 3219, itemY: 3222
@@ -1,2 +0,0 @@
[2019/11/10] 22:46 spamtest1 picked up bones itemX: 3231, itemY: 3236
[2019/11/10] 22:46 spamtest1 picked up bones itemX: 3231, itemY: 3236
@@ -1,9 +0,0 @@
[2019/10/04] 22:06 test picked up knife itemX: 3224, itemY: 3202
[2019/10/04] 22:10 test picked up knife itemX: 3224, itemY: 3202
[2019/10/04] 22:10 test picked up knife itemX: 3224, itemY: 3202
[2019/10/04] 22:11 test picked up coins itemX: 3224, itemY: 3202
[2019/10/04] 22:16 test picked up knife itemX: 3224, itemY: 3202
[2019/10/04] 22:16 test picked up knife itemX: 3224, itemY: 3202
[2019/10/04] 22:16 test picked up knife itemX: 3224, itemY: 3202
[2019/10/04] 22:23 test picked up knife itemX: 3224, itemY: 3202
[2019/10/04] 22:24 test picked up knife itemX: 3224, itemY: 3202
@@ -1 +0,0 @@
[2014/01/07] 18:47 andrew was killed by andrew1 absX: 3087 absY: 3900
@@ -1 +0,0 @@
[2019/11/21] 19:51 andrew5 was killed by andrew44 absX: 3104 absY: 3898
@@ -1 +0,0 @@
[2014/01/07] 18:47 andrew1 killed andrew absX: 3088 absY: 3900
@@ -1,2 +0,0 @@
[2014/01/14] 18:40 andrew45 said hi
[2014/01/14] 18:48 andrew45 said hi
@@ -1,10 +0,0 @@
andrew1 was reported by andrew2, Offensive language, January, 06
.
andrew2 was reported by andrew, Offensive language, January, 06
-[01:09:58: andrew2]: asdfasdfa
-[01:09:59: andrew2]: aa
-[01:09:59: andrew2]: sdfa
-[01:10:00: andrew]: adsfasdfadsfa
.
@@ -1 +0,0 @@
[2019/11/08] 19:22 bot bought newcomer map from store id: 88 for 1 coins
@@ -1 +0,0 @@
[2019/11/08] 19:22 bot sold newcomer map to store id: 88 for 1 coins
@@ -1,23 +0,0 @@
[2019/10/04] 10:46 irdb sold thread to store id: 24 for 2 coins
[2019/10/04] 10:47 irdb sold bronze dagger to store id: 88 for 8 coins
[2019/10/04] 16:54 irdb sold bronze dagger to store id: 88 for 8 coins
[2019/10/04] 16:54 irdb sold bucket to store id: 88 for 0 coins
[2019/10/04] 16:54 irdb sold bucket to store id: 88 for 0 coins
[2019/10/04] 16:54 irdb sold bucket to store id: 88 for 0 coins
[2019/10/04] 16:54 irdb sold bucket to store id: 88 for 0 coins
[2019/10/04] 16:54 irdb sold bucket to store id: 88 for 0 coins
[2019/10/04] 16:54 irdb sold bucket to store id: 88 for 0 coins
[2019/10/04] 16:54 irdb sold bucket to store id: 88 for 0 coins
[2019/10/04] 16:54 irdb sold bucket to store id: 88 for 0 coins
[2019/10/04] 16:54 irdb sold bucket to store id: 88 for 0 coins
[2019/10/04] 16:54 irdb sold bucket to store id: 88 for 0 coins
[2019/10/04] 16:55 irdb sold bucket to store id: 88 for 0 coins
[2019/10/04] 16:55 irdb sold bucket to store id: 88 for 0 coins
[2019/10/04] 16:55 irdb sold bucket to store id: 88 for 0 coins
[2019/10/04] 16:55 irdb sold bucket to store id: 88 for 0 coins
[2019/10/04] 16:55 irdb sold bucket to store id: 88 for 0 coins
[2019/10/04] 16:55 irdb sold bucket to store id: 88 for 0 coins
[2019/10/04] 16:55 irdb sold bucket to store id: 88 for 0 coins
[2019/10/04] 16:55 irdb sold bucket to store id: 88 for 0 coins
[2019/10/04] 16:55 irdb sold bucket to store id: 88 for 0 coins
[2019/10/04] 16:55 irdb sold bucket to store id: 88 for 0 coins
@@ -1,13 +0,0 @@
[2020/01/03] 07:19 andrew was traded by andrew5 and recieved 1 Knife
[2020/01/03] 07:19 andrew was traded by andrew5 and recieved 1 Logs
[2020/01/03] 07:19 andrew was traded by andrew5 and recieved 1 Logs
[2020/01/03] 07:19 andrew was traded by andrew5 and recieved 1 Logs
[2020/01/03] 07:19 andrew was traded by andrew5 and recieved 1 Logs
[2020/01/03] 07:19 andrew was traded by andrew5 and recieved 1 Logs
[2020/01/03] 07:19 andrew was traded by andrew5 and recieved 1 Logs
[2020/01/03] 07:19 andrew was traded by andrew5 and recieved 1 Logs
[2020/01/03] 07:19 andrew was traded by andrew5 and recieved 1 Logs
[2020/01/03] 07:19 andrew was traded by andrew5 and recieved 1 Logs
[2020/01/03] 07:19 andrew was traded by andrew5 and recieved 1 Logs
[2020/01/03] 07:19 andrew was traded by andrew5 and recieved 1 Logs
[2020/01/03] 07:19 andrew was traded by andrew5 and recieved 1 Logs
@@ -1,2 +0,0 @@
[2019/10/27] 14:45 irdb2 was traded by irdb3 and recieved 1 Bronze dagger
[2019/10/27] 14:45 irdb2 was traded by irdb3 and recieved 1 Wooden shield
-1
View File
@@ -1 +0,0 @@
0
-12
View File
@@ -1,12 +0,0 @@
<net>
<rsa>
<modulus>91553247461173033466542043374346300088148707506479543786501537350363031301992107112953015516557748875487935404852620239974482067336878286174236183516364787082711186740254168914127361643305190640280157664988536979163450791820893999053469529344247707567448479470137716627440246788713008490213212272520901741443</modulus>
<private-exponent>33280025241734061313051117678670856264399753710527826596057587687835856000539511539311834363046145710983857746766009612538140077973762171163294453513440619295457626227183742315140865830778841533445402605660729039310637444146319289077374748018792349647460850308384280105990607337322160553135806205784213241305</private-exponent>
</rsa>
<ports>
<http>8080</http>
<service>43594</service>
<jaggrab>43595</jaggrab>
</ports>
</net>
@@ -12,62 +12,66 @@ import java.util.stream.Collectors;
public class ConfigLoader {
public static void loadSettings(String config) throws IOException {
BufferedReader br = new BufferedReader(new FileReader(config));
String out = br.lines().collect(Collectors.joining("\n"));
JSONObject obj = new JSONObject(out);
BufferedReader br = new BufferedReader(new FileReader(config));
String out = br.lines().collect(Collectors.joining("\n"));
JSONObject obj = new JSONObject(out);
if(obj.has("server_name"))
GameConstants.SERVER_NAME = obj.getString("server_name");
if(obj.has("server_test_version"))
GameConstants.TEST_VERSION = obj.getDouble("server_test_version");
if(obj.has("gui_enabled"))
GameConstants.GUI_ENABLED = obj.getBoolean("gui_enabled");
if(obj.has("website_link"))
GameConstants.WEBSITE_LINK = obj.getString("website_link");
if(obj.has("server_debug"))
GameConstants.SERVER_DEBUG = obj.getBoolean("server_debug");
if(obj.has("file_server"))
GameConstants.FILE_SERVER = obj.getBoolean("file_server");
if(obj.has("world_id"))
GameConstants.WORLD = obj.getInt("world_id");
if(obj.has("members_only"))
GameConstants.MEMBERS_ONLY = obj.getBoolean("members_only");
if(obj.has("tutorial_island_enabled"))
GameConstants.TUTORIAL_ISLAND = obj.getBoolean("tutorial_island_enabled");
if(obj.has("party_room_enabled"))
GameConstants.PARTY_ROOM_DISABLED = !obj.getBoolean("party_room_enabled");
if(obj.has("clues_enabled"))
GameConstants.CLUES_ENABLED = obj.getBoolean("clues_enabled");
if(obj.has("admin_can_trade"))
GameConstants.ADMIN_CAN_TRADE = obj.getBoolean("admin_can_trade");
if(obj.has("admin_can_drop_items"))
GameConstants.ADMIN_DROP_ITEMS = obj.getBoolean("admin_can_drop_items");
if(obj.has("admin_can_sell"))
GameConstants.ADMIN_CAN_SELL_ITEMS = obj.getBoolean("admin_can_sell");
if(obj.has("respawn_x"))
GameConstants.RESPAWN_X = obj.getInt("respawn_x");
if(obj.has("respawn_y"))
GameConstants.RESPAWN_Y = obj.getInt("respawn_y");
if(obj.has("save_timer"))
GameConstants.SAVE_TIMER = obj.getInt("save_timer");
if(obj.has("timeout"))
GameConstants.TIMEOUT = obj.getInt("timeout");
if(obj.has("item_requirements"))
GameConstants.ITEM_REQUIREMENTS = obj.getBoolean("item_requirements");
if(obj.has("variable_xp_rate"))
GameConstants.VARIABLE_XP_RATE = obj.getBoolean("variable_xp_rate");
if(obj.has("xp_rate"))
GameConstants.XP_RATE = obj.getDouble("xp_rate");
if(obj.has("max_players"))
GameConstants.MAX_PLAYERS = obj.getInt("max_players");
if (obj.has("variable_xp_rates")) {
JSONArray rates = obj.optJSONArray("variable_xp_rates");
for (int i = 0; i < rates.length(); ++i) {
GameConstants.VARIABLE_XP_RATES[i] = rates.optInt(i);
}
if (obj.has("server_name"))
Constants.SERVER_NAME = obj.getString("server_name");
if (obj.has("server_test_version"))
Constants.TEST_VERSION = obj.getDouble("server_test_version");
if (obj.has("gui_enabled"))
Constants.GUI_ENABLED = obj.getBoolean("gui_enabled");
if (obj.has("website_link"))
Constants.WEBSITE_LINK = obj.getString("website_link");
if (obj.has("server_debug"))
Constants.SERVER_DEBUG = obj.getBoolean("server_debug");
if (obj.has("file_server"))
Constants.FILE_SERVER = obj.getBoolean("file_server");
if (obj.has("http_port"))
Constants.HTTP_PORT = obj.getInt("http_port");
if (obj.has("jaggrab_port"))
Constants.JAGGRAB_PORT = obj.getInt("jaggrab_port");
if (obj.has("world_id"))
Constants.WORLD = obj.getInt("world_id");
if (obj.has("members_only"))
Constants.MEMBERS_ONLY = obj.getBoolean("members_only");
if (obj.has("tutorial_island_enabled"))
Constants.TUTORIAL_ISLAND = obj.getBoolean("tutorial_island_enabled");
if (obj.has("party_room_enabled"))
Constants.PARTY_ROOM_DISABLED = !obj.getBoolean("party_room_enabled");
if (obj.has("clues_enabled"))
Constants.CLUES_ENABLED = obj.getBoolean("clues_enabled");
if (obj.has("admin_can_trade"))
Constants.ADMIN_CAN_TRADE = obj.getBoolean("admin_can_trade");
if (obj.has("admin_can_drop_items"))
Constants.ADMIN_DROP_ITEMS = obj.getBoolean("admin_can_drop_items");
if (obj.has("admin_can_sell"))
Constants.ADMIN_CAN_SELL_ITEMS = obj.getBoolean("admin_can_sell");
if (obj.has("respawn_x"))
Constants.RESPAWN_X = obj.getInt("respawn_x");
if (obj.has("respawn_y"))
Constants.RESPAWN_Y = obj.getInt("respawn_y");
if (obj.has("save_timer"))
Constants.SAVE_TIMER = obj.getInt("save_timer");
if (obj.has("timeout"))
Constants.TIMEOUT = obj.getInt("timeout");
if (obj.has("item_requirements"))
Constants.ITEM_REQUIREMENTS = obj.getBoolean("item_requirements");
if (obj.has("variable_xp_rate"))
Constants.VARIABLE_XP_RATE = obj.getBoolean("variable_xp_rate");
if (obj.has("xp_rate"))
Constants.XP_RATE = obj.getDouble("xp_rate");
if (obj.has("max_players"))
Constants.MAX_PLAYERS = obj.getInt("max_players");
if (obj.has("variable_xp_rates")) {
JSONArray rates = obj.optJSONArray("variable_xp_rates");
for (int i = 0; i < rates.length(); ++i) {
Constants.VARIABLE_XP_RATES[i] = rates.optInt(i);
}
if(obj.has("website_integration"))
GameConstants.WEBSITE_INTEGRATION = obj.getBoolean("website_integration");
}
if (obj.has("website_integration"))
Constants.WEBSITE_INTEGRATION = obj.getBoolean("website_integration");
}
private static void initialize() {
@@ -99,12 +103,12 @@ public class ConfigLoader {
/*
* Sets External Services Vars
*/
if(obj.has("bot-token"))
if (obj.has("bot-token"))
JavaCord.token = obj.getString("bot-token");
if(obj.has("websitepass"))
if (obj.has("websitepass"))
PlayersOnlineWebsite.password = obj.getString("websitepass");
RegisteredAccsWebsite.password = obj.getString("websitepass");
if(obj.has("erssecret"))
RegisteredAccsWebsite.password = obj.getString("websitepass");
if (obj.has("erssecret"))
GameEngine.ersSecret = obj.getString("erssecret");
}
@@ -1,6 +1,8 @@
package com.rs2;
public class GameConstants {
import java.math.BigInteger;
public class Constants {
/**
* The Variables Below Can Be Also Changed On Server Startup By Using The ConfigLoader
@@ -8,14 +10,16 @@ public class GameConstants {
* SERVER_NAME Sets The Name The Server Will Use
* WEBSITE_LINK Defines The Server Website Links
* WORLD Sets The Servers World ID
* The HTTP Server port.
* The JAGGRAB Server port.
* GUI_ENABLED Enables/Disables The Server Control Panel
* MAX_PLAYERS Sets The Maximum Amount Of Players Allow To Be Logged In At Once
* TIMEOUT Sets The Amount Of Time Before A Player Timeouts From A Bad Connection
* SAVE_TIMER Sets In Seconds How Often The Server Shouls Auto-Save All Characters
* RESPAWN_X Sets The X Coordinate That You Will Respawn At After Death
* RESPAWN_Y Sets The Y Coordinate That You Will Respawn At After Death
* FILE_SERVER Sets Whether The FileServer Should Run With The Server
* SERVER_DEBUG Sets Whether The Server Should Start In Debug Mode
* The Amount Of Time Before A Player Timeouts From A Bad Connection
* MEMBERS_ONLY Sets Whether The World Is Members Only
* TUTORIAL_ISLAND Enables/Disables Tutorial Island For Players On First Login
* PARTY_ROOM_DISABLED Enables/Disables The Party Room Should Be Disabled
@@ -30,8 +34,7 @@ public class GameConstants {
* WEBSITE_INTEGRATION Enables/Disables Website Features(Total Accounts Registered & Players Online)
*/
public static String SERVER_NAME = "2006Scape", WEBSITE_LINK = "https://2006Scape.org";
public static int WORLD = 1, MAX_PLAYERS = 200, TIMEOUT = 60, SAVE_TIMER = 120,
RESPAWN_X = 3222, RESPAWN_Y = 3218;
public static int WORLD = 1, HTTP_PORT = 8080, JAGGRAB_PORT = 43595, MAX_PLAYERS = 200, SAVE_TIMER = 120, TIMEOUT = 60, RESPAWN_X = 3222, RESPAWN_Y = 3218;
public static boolean GUI_ENABLED = false, FILE_SERVER = true, SERVER_DEBUG = false, MEMBERS_ONLY = false, TUTORIAL_ISLAND = false,
PARTY_ROOM_DISABLED = false, CLUES_ENABLED = true, ITEM_REQUIREMENTS = true,
ADMIN_CAN_TRADE = false, ADMIN_DROP_ITEMS = false, ADMIN_CAN_SELL_ITEMS = false, VARIABLE_XP_RATE = false,
@@ -39,7 +42,6 @@ public class GameConstants {
public static int[] VARIABLE_XP_RATES = new int[] {1, 2, 5, 10};
public static double TEST_VERSION = 2.3, XP_RATE = 1.0;
/**
* The Variables Below Should Only Be Changed If You Understand What You Are Doing
*/
@@ -79,6 +81,24 @@ public class GameConstants {
public final static int BUFFER_SIZE = 10000;
/**
* The directory of the file system.
*/
public static final String FILE_SYSTEM_DIR = "./data/cache/";
public final static String SERVER_LOG_DIR = "./data/logs/";
/**
* The exponent used when decrypting the RSA block.
*/
public static final BigInteger RSA_EXPONENT = new BigInteger("33280025241734061313051117678670856264399753710527826596057587687835856000539511539311834363046145710983857746766009612538140077973762171163294453513440619295457626227183742315140865830778841533445402605660729039310637444146319289077374748018792349647460850308384280105990607337322160553135806205784213241305");;
/**
* The modulus used when decrypting the RSA block.
*/
public static final BigInteger RSA_MODULUS = new BigInteger("91553247461173033466542043374346300088148707506479543786501537350363031301992107112953015516557748875487935404852620239974482067336878286174236183516364787082711186740254168914127361643305190640280157664988536979163450791820893999053469529344247707567448479470137716627440246788713008490213212272520901741443");;
public final static int ATTACK = 0, DEFENCE = 1, STRENGTH = 2,
HITPOINTS = 3, RANGED = 4, PRAYER = 5, MAGIC = 6, COOKING = 7,
WOODCUTTING = 8, FLETCHING = 9, FISHING = 10, FIREMAKING = 11,
@@ -6,7 +6,6 @@ import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.file.Paths;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
@@ -19,12 +18,9 @@ import com.rs2.gui.ControlPanel;
import org.apollo.cache.IndexedFileSystem;
import org.apollo.cache.decoder.ItemDefinitionDecoder;
import org.apollo.cache.decoder.ObjectDefinitionDecoder;
import org.apollo.cache.def.ObjectDefinition;
import org.apollo.jagcached.Constants;
import org.apollo.jagcached.FileServer;
import com.rs2.game.bots.BotHandler;
import com.google.common.base.Stopwatch;
import com.rs2.event.CycleEventHandler;
import com.rs2.game.content.minigames.FightCaves;
import com.rs2.game.content.minigames.FightPits;
@@ -54,6 +50,7 @@ import com.rs2.world.clip.RegionFactory;
import io.netty.util.ResourceLeakDetector;
import io.netty.util.ResourceLeakDetector.Level;
import org.apollo.net.NetworkConstants;
/**
* Server.java
@@ -72,7 +69,7 @@ public class GameEngine {
private static void startMinutesCounter() {
try {
minuteFile = new BufferedReader(new FileReader(
"./data/minutes.log"));
Constants.SERVER_LOG_DIR + "minutes.log"));
minutesCounter = Long.parseLong(minuteFile.readLine());
} catch (Exception e) {
e.printStackTrace();
@@ -83,7 +80,7 @@ public class GameEngine {
private static void setMinutesCounter(long minutesCounter) {
try {
BufferedWriter minuteCounter = new BufferedWriter(new FileWriter(
"./data/minutes.log"));
Constants.SERVER_LOG_DIR + "minutes.log"));
minuteCounter.write(Long.toString(minutesCounter));
minuteCounter.close();
} catch (IOException e) {
@@ -126,9 +123,14 @@ public class GameEngine {
public static void main(java.lang.String[] args)
throws NullPointerException, IOException {
if (NetworkConstants.RSA_EXPONENT != Constants.RSA_EXPONENT) {
NetworkConstants.RSA_EXPONENT = Constants.RSA_EXPONENT;
NetworkConstants.RSA_MODULUS = Constants.RSA_MODULUS;
}
for (int i = 0; i < args.length; i++) {
if (args[i].equals("-gui"))
GameConstants.GUI_ENABLED = true;
Constants.GUI_ENABLED = true;
if (args[i].startsWith("-") && (i + 1) < args.length && !args[i + 1].startsWith("-")) {
switch (args[i]) {
case "-c":
@@ -146,7 +148,7 @@ public class GameEngine {
}
System.out.println("Starting game engine..");
if (GameConstants.SERVER_DEBUG) {
if (Constants.SERVER_DEBUG) {
System.out.println("@@@@ DEBUG MODE IS ENABLED @@@@");
}
@@ -166,7 +168,7 @@ public class GameEngine {
/**
* Starting Up Server
*/
System.out.println("Launching " + GameConstants.SERVER_NAME + " World: " + GameConstants.WORLD + "...");
System.out.println("Launching " + Constants.SERVER_NAME + " World: " + Constants.WORLD + "...");
/**
* Start Integration Services
@@ -218,7 +220,7 @@ public class GameEngine {
/**
* Makes Visible Control Panel If Enabled
*/
if(GameConstants.GUI_ENABLED) {
if(Constants.GUI_ENABLED) {
ControlPanel panel = new ControlPanel();
panel.initComponents();
panel.setVisible(true);
@@ -255,7 +257,7 @@ public class GameEngine {
objectHandler.process();
MageTrainingArena.process();
CycleEventHandler.getSingleton().process();
if (GameConstants.WEBSITE_INTEGRATION) {
if (Constants.WEBSITE_INTEGRATION) {
PlayersOnlineWebsite.addUpdatePlayersOnlineTask();
RegisteredAccsWebsite.addUpdateRegisteredUsersTask();
}
@@ -292,7 +294,7 @@ public class GameEngine {
}
//TODO debug System.out.println("Cycle took " + stopwatch.elapsed(TimeUnit.MILLISECONDS) + " ms.");
}
}, 0, GameConstants.CYCLE_TIME, TimeUnit.MILLISECONDS);
}, 0, Constants.CYCLE_TIME, TimeUnit.MILLISECONDS);
/*
* I'd recommend disabling this until I can be bothered to implement it
@@ -4,7 +4,7 @@ import java.util.ArrayList;
import java.util.NoSuchElementException;
import java.util.Scanner;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.console.commands.ListPlayers;
import com.rs2.console.commands.Stop;
@@ -33,7 +33,7 @@ public class CommandConsole implements Runnable {
@Override
public void run() {
System.out.println("Welcome to " + GameConstants.SERVER_NAME + ".");
System.out.println("Welcome to " + Constants.SERVER_NAME + ".");
while (true) {
System.out.print("> ");
String input = null;
@@ -5,7 +5,7 @@ import static com.rs2.game.players.PlayerSave.loadPlayerInfo;
import java.text.DecimalFormat;
import java.util.*;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.GameEngine;
import com.rs2.game.items.DeprecatedItems;
import com.rs2.game.players.Client;
@@ -20,7 +20,7 @@ public class Bot {
public Bot(String username, Integer x, Integer y, Integer z) {
botClient = new Client(null);
inStream = new Stream(new byte[GameConstants.BUFFER_SIZE]);
inStream = new Stream(new byte[Constants.BUFFER_SIZE]);
inStream.currentOffset = 0;
botClient.playerName = username;
botClient.playerName2 = botClient.playerName;
@@ -3,11 +3,10 @@ package com.rs2.game.bots;
import java.io.File;
import java.security.SecureRandom;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Random;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.game.players.Client;
import com.rs2.game.players.Player;
import com.rs2.game.players.PlayerHandler;
@@ -24,7 +23,7 @@ public class BotHandler {
public static Bot connectBot(String username, Integer x, Integer y, Integer z) {
Bot bot;
if (PlayerHandler.playerCount >= GameConstants.MAX_PLAYERS) {
if (PlayerHandler.playerCount >= Constants.MAX_PLAYERS) {
System.out.println("Bot could not be connected, server is full.");
return null;
}
@@ -1,6 +1,6 @@
package com.rs2.game.content.combat;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.GameEngine;
import com.rs2.game.content.combat.magic.CastOnOther;
import com.rs2.game.content.combat.magic.MagicData;
@@ -95,8 +95,8 @@ public class CombatAssistant {
if (Misc.random(4) == 1 && player.lastArrowUsed == 9242 && damage > 0) {
NpcHandler.npcs[i].gfx0(754);
damage = NpcHandler.npcs[i].HP / 5;
player.handleHitMask(player.playerLevel[GameConstants.HITPOINTS] / 10);
player.dealDamage(player.playerLevel[GameConstants.HITPOINTS] / 10);
player.handleHitMask(player.playerLevel[Constants.HITPOINTS] / 10);
player.dealDamage(player.playerLevel[Constants.HITPOINTS] / 10);
player.gfx0(754);
}
if (player.lastWeaponUsed == 11235 || player.bowSpecShot == 1) {
@@ -122,14 +122,14 @@ public class CombatAssistant {
player.getPlayerAssistant().addSkillXP(damage * CombatConstants.RANGE_EXP_RATE / 2, 4);
player.getPlayerAssistant().addSkillXP(damage / 2, 1);
player.getPlayerAssistant().addSkillXP(damage / 3, 3);
player.getPlayerAssistant().refreshSkill(GameConstants.DEFENCE);//defense
player.getPlayerAssistant().refreshSkill(GameConstants.HITPOINTS);//hp
player.getPlayerAssistant().refreshSkill(GameConstants.RANGED);//range
player.getPlayerAssistant().refreshSkill(Constants.DEFENCE);//defense
player.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);//hp
player.getPlayerAssistant().refreshSkill(Constants.RANGED);//range
} else {
player.getPlayerAssistant().addSkillXP(damage * CombatConstants.RANGE_EXP_RATE, 4);
player.getPlayerAssistant().addSkillXP(damage * CombatConstants.RANGE_EXP_RATE /3, 3);
player.getPlayerAssistant().refreshSkill(GameConstants.HITPOINTS);
player.getPlayerAssistant().refreshSkill(GameConstants.RANGED);
player.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);
player.getPlayerAssistant().refreshSkill(Constants.RANGED);
}
if (damage > 0) {
if (PestControl.npcIsPCMonster(NpcHandler.npcs[i].npcType) || PestControl.isPCPortal(NpcHandler.npcs[i].npcType)) {
@@ -201,8 +201,8 @@ public class CombatAssistant {
if (MagicData.MAGIC_SPELLS[player.oldSpellId][0] != 1161 && MagicData.MAGIC_SPELLS[player.oldSpellId][0] != 1153 && MagicData.MAGIC_SPELLS[player.oldSpellId][0] != 1157 && MagicData.MAGIC_SPELLS[player.oldSpellId][0] != 1542 && MagicData.MAGIC_SPELLS[player.oldSpellId][0] != 1543 && MagicData.MAGIC_SPELLS[player.oldSpellId][0] != 1562) {
player.getPlayerAssistant().addSkillXP(damage * CombatConstants.MAGIC_EXP_RATE / 3, 3);
}
player.getPlayerAssistant().refreshSkill(GameConstants.HITPOINTS);
player.getPlayerAssistant().refreshSkill(GameConstants.MAGIC);
player.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);
player.getPlayerAssistant().refreshSkill(Constants.MAGIC);
if (damage > 0) {
if (PestControl.npcIsPCMonster(NpcHandler.npcs[i].npcType) || PestControl.isPCPortal(NpcHandler.npcs[i].npcType)) {
player.pcDamage += damage;
@@ -227,12 +227,12 @@ public class CombatAssistant {
case 12911:
case 12929:
int heal = Misc.random(damage / 2);
if (player.playerLevel[GameConstants.HITPOINTS] + heal >= player.getPlayerAssistant().getLevelForXP(player.playerXP[GameConstants.HITPOINTS])) {
player.playerLevel[GameConstants.HITPOINTS] = player.getPlayerAssistant().getLevelForXP(player.playerXP[GameConstants.HITPOINTS]);
if (player.playerLevel[Constants.HITPOINTS] + heal >= player.getPlayerAssistant().getLevelForXP(player.playerXP[Constants.HITPOINTS])) {
player.playerLevel[Constants.HITPOINTS] = player.getPlayerAssistant().getLevelForXP(player.playerXP[Constants.HITPOINTS]);
} else {
player.playerLevel[GameConstants.HITPOINTS] += heal;
player.playerLevel[Constants.HITPOINTS] += heal;
}
player.getPlayerAssistant().refreshSkill(GameConstants.HITPOINTS);
player.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);
break;
}
}
@@ -302,15 +302,15 @@ public class CombatAssistant {
player.getPlayerAssistant().addSkillXP(damage * CombatConstants.MELEE_EXP_RATE / 3, 2);
player.getPlayerAssistant().addSkillXP(damage * CombatConstants.MELEE_EXP_RATE / 3, 3);
player.getPlayerAssistant().refreshSkill(0);
player.getPlayerAssistant().refreshSkill(GameConstants.DEFENCE);
player.getPlayerAssistant().refreshSkill(GameConstants.STRENGTH);
player.getPlayerAssistant().refreshSkill(GameConstants.HITPOINTS);
player.getPlayerAssistant().refreshSkill(Constants.DEFENCE);
player.getPlayerAssistant().refreshSkill(Constants.STRENGTH);
player.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);
} else {
if (NpcHandler.npcs[i].npcType != 2459 && NpcHandler.npcs[i].npcType != 2460 && NpcHandler.npcs[i].npcType != 2461 && NpcHandler.npcs[i].npcType != 2462) {
player.getPlayerAssistant().addSkillXP(damage * CombatConstants.MELEE_EXP_RATE, player.fightMode);
player.getPlayerAssistant().addSkillXP(damage * CombatConstants.MELEE_EXP_RATE / 3, 3);
player.getPlayerAssistant().refreshSkill(player.fightMode);
player.getPlayerAssistant().refreshSkill(GameConstants.HITPOINTS);
player.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);
}
}
if (damage > 0) {
@@ -319,11 +319,11 @@ public class CombatAssistant {
}
}
if (damage > 0 && guthansEffect) {
player.playerLevel[GameConstants.HITPOINTS] += damage;
if (player.playerLevel[GameConstants.HITPOINTS] > player.getPlayerAssistant().getLevelForXP(player.playerXP[GameConstants.HITPOINTS])) {
player.playerLevel[GameConstants.HITPOINTS] = player.getPlayerAssistant().getLevelForXP(player.playerXP[GameConstants.HITPOINTS]);
player.playerLevel[Constants.HITPOINTS] += damage;
if (player.playerLevel[Constants.HITPOINTS] > player.getPlayerAssistant().getLevelForXP(player.playerXP[Constants.HITPOINTS])) {
player.playerLevel[Constants.HITPOINTS] = player.getPlayerAssistant().getLevelForXP(player.playerXP[Constants.HITPOINTS]);
}
player.getPlayerAssistant().refreshSkill(GameConstants.HITPOINTS);
player.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);
NpcHandler.npcs[i].gfx0(398);
}
NpcHandler.npcs[i].underAttack = true;
@@ -332,15 +332,15 @@ public class CombatAssistant {
switch (player.specEffect) {
case 4:
if (damage > 0) {
if (player.playerLevel[GameConstants.HITPOINTS] + damage > player.getPlayerAssistant().getLevelForXP(player.playerXP[GameConstants.HITPOINTS])) {
if (player.playerLevel[GameConstants.HITPOINTS] > player.getPlayerAssistant().getLevelForXP(player.playerXP[GameConstants.HITPOINTS])) {
if (player.playerLevel[Constants.HITPOINTS] + damage > player.getPlayerAssistant().getLevelForXP(player.playerXP[Constants.HITPOINTS])) {
if (player.playerLevel[Constants.HITPOINTS] > player.getPlayerAssistant().getLevelForXP(player.playerXP[Constants.HITPOINTS])) {
} else {
player.playerLevel[GameConstants.HITPOINTS] = player.getPlayerAssistant().getLevelForXP(player.playerXP[GameConstants.HITPOINTS]);
player.playerLevel[Constants.HITPOINTS] = player.getPlayerAssistant().getLevelForXP(player.playerXP[Constants.HITPOINTS]);
}
} else {
player.playerLevel[GameConstants.HITPOINTS] += damage;
player.playerLevel[Constants.HITPOINTS] += damage;
}
player.getPlayerAssistant().refreshSkill(GameConstants.HITPOINTS);
player.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);
}
break;
@@ -825,7 +825,7 @@ public class CombatAssistant {
}
if (player.duelRule[9]) {
boolean canUseWeapon = false;
for (int funWeapon : GameConstants.FUN_WEAPONS) {
for (int funWeapon : Constants.FUN_WEAPONS) {
if (player.playerEquipment[player.playerWeapon] == funWeapon) {
canUseWeapon = true;
}
@@ -1098,7 +1098,7 @@ public class CombatAssistant {
public void playerDelayedHit(int i) {
if (PlayerHandler.players[i] != null) {
if (PlayerHandler.players[i].isDead || player.isDead || PlayerHandler.players[i].playerLevel[GameConstants.HITPOINTS] <= 0 || player.playerLevel[GameConstants.HITPOINTS] <= 0) {
if (PlayerHandler.players[i].isDead || player.isDead || PlayerHandler.players[i].playerLevel[Constants.HITPOINTS] <= 0 || player.playerLevel[Constants.HITPOINTS] <= 0) {
player.playerIndex = 0;
return;
}
@@ -1146,8 +1146,8 @@ public class CombatAssistant {
if (Misc.random(4) == 1 && player.lastArrowUsed == 9242 && damage > 0) {
PlayerHandler.players[i].gfx0(754);
damage = NpcHandler.npcs[i].HP / 5;
player.handleHitMask(player.playerLevel[GameConstants.HITPOINTS] / 10);
player.dealDamage(player.playerLevel[GameConstants.HITPOINTS] / 10);
player.handleHitMask(player.playerLevel[Constants.HITPOINTS] / 10);
player.dealDamage(player.playerLevel[Constants.HITPOINTS] / 10);
player.gfx0(754);
}
if (player.lastWeaponUsed == 11235 || player.bowSpecShot == 1) {
@@ -1165,11 +1165,11 @@ public class CombatAssistant {
damage2 = damage2 * 60 / 100;
}
}
if (PlayerHandler.players[i].playerLevel[GameConstants.HITPOINTS] - damage < 0) {
damage = PlayerHandler.players[i].playerLevel[GameConstants.HITPOINTS];
if (PlayerHandler.players[i].playerLevel[Constants.HITPOINTS] - damage < 0) {
damage = PlayerHandler.players[i].playerLevel[Constants.HITPOINTS];
}
if (PlayerHandler.players[i].playerLevel[GameConstants.HITPOINTS] - damage - damage2 < 0) {
damage2 = PlayerHandler.players[i].playerLevel[GameConstants.HITPOINTS] - damage;
if (PlayerHandler.players[i].playerLevel[Constants.HITPOINTS] - damage - damage2 < 0) {
damage2 = PlayerHandler.players[i].playerLevel[Constants.HITPOINTS] - damage;
}
if (damage < 0) {
damage = 0;
@@ -1187,14 +1187,14 @@ public class CombatAssistant {
player.getPlayerAssistant().addSkillXP(damage * CombatConstants.RANGE_EXP_RATE / 3, 4);
player.getPlayerAssistant().addSkillXP(damage / 3, 1);
player.getPlayerAssistant().addSkillXP(damage / 3, 3);
player.getPlayerAssistant().refreshSkill(GameConstants.DEFENCE);
player.getPlayerAssistant().refreshSkill(GameConstants.HITPOINTS);
player.getPlayerAssistant().refreshSkill(GameConstants.RANGED);
player.getPlayerAssistant().refreshSkill(Constants.DEFENCE);
player.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);
player.getPlayerAssistant().refreshSkill(Constants.RANGED);
} else {
player.getPlayerAssistant().addSkillXP(damage * CombatConstants.RANGE_EXP_RATE, 4);
player.getPlayerAssistant().addSkillXP(damage / 3, 3);
player.getPlayerAssistant().refreshSkill(GameConstants.HITPOINTS);
player.getPlayerAssistant().refreshSkill(GameConstants.RANGED);
player.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);
player.getPlayerAssistant().refreshSkill(Constants.RANGED);
}
boolean dropArrows = true;
for (int noArrowId : RangeData.NO_ARROW_DROP) {
@@ -1220,7 +1220,7 @@ public class CombatAssistant {
PlayerHandler.players[i].handleHitMask(damage2);
}
o.getPlayerAssistant().refreshSkill(GameConstants.HITPOINTS);
o.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);
PlayerHandler.players[i].updateRequired = true;
applySmite(i, damage);
if (damage2 != -1) {
@@ -1239,8 +1239,8 @@ public class CombatAssistant {
if (o.getPrayer().prayerActive[16] && System.currentTimeMillis() - o.protMageDelay > 1500) { // if prayer active reduce damage
damage = damage * 60 / 100;
}
if (PlayerHandler.players[i].playerLevel[GameConstants.HITPOINTS] - damage < 0) {
damage = PlayerHandler.players[i].playerLevel[GameConstants.HITPOINTS];
if (PlayerHandler.players[i].playerLevel[Constants.HITPOINTS] - damage < 0) {
damage = PlayerHandler.players[i].playerLevel[Constants.HITPOINTS];
}
if (damage > 0) {
applyRecoil(player, damage, i);
@@ -1249,8 +1249,8 @@ public class CombatAssistant {
if (MagicData.MAGIC_SPELLS[player.oldSpellId][0] != 1161 && MagicData.MAGIC_SPELLS[player.oldSpellId][0] != 1153 && MagicData.MAGIC_SPELLS[player.oldSpellId][0] != 1157 && MagicData.MAGIC_SPELLS[player.oldSpellId][0] != 1542 && MagicData.MAGIC_SPELLS[player.oldSpellId][0] != 1543 && MagicData.MAGIC_SPELLS[player.oldSpellId][0] != 1562) {
player.getPlayerAssistant().addSkillXP(MagicData.MAGIC_SPELLS[player.oldSpellId][7] + damage / 3, 3);
}
player.getPlayerAssistant().refreshSkill(GameConstants.HITPOINTS);
player.getPlayerAssistant().refreshSkill(GameConstants.MAGIC);
player.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);
player.getPlayerAssistant().refreshSkill(Constants.MAGIC);
if (MagicSpells.getEndGfxHeight(player) == 100 && !player.magicFailed) { // end GFX
PlayerHandler.players[i].gfx100(MagicData.MAGIC_SPELLS[player.oldSpellId][5]);
@@ -1269,7 +1269,7 @@ public class CombatAssistant {
case 13011:
case 12999:
case 13023:
PlayerHandler.players[i].playerLevel[GameConstants.ATTACK] -= o.getPlayerAssistant().getLevelForXP(PlayerHandler.players[i].playerXP[GameConstants.ATTACK]) * 10 / 100;
PlayerHandler.players[i].playerLevel[Constants.ATTACK] -= o.getPlayerAssistant().getLevelForXP(PlayerHandler.players[i].playerXP[Constants.ATTACK]) * 10 / 100;
break;
}
}
@@ -1293,51 +1293,51 @@ public class CombatAssistant {
case 12911:
case 12929:
int heal = damage / 4;
if (player.playerLevel[GameConstants.HITPOINTS] + heal > player.getPlayerAssistant().getLevelForXP(player.playerXP[GameConstants.HITPOINTS])) {
player.playerLevel[GameConstants.HITPOINTS] = player.getPlayerAssistant().getLevelForXP(player.playerXP[GameConstants.HITPOINTS]);
if (player.playerLevel[Constants.HITPOINTS] + heal > player.getPlayerAssistant().getLevelForXP(player.playerXP[Constants.HITPOINTS])) {
player.playerLevel[Constants.HITPOINTS] = player.getPlayerAssistant().getLevelForXP(player.playerXP[Constants.HITPOINTS]);
} else {
player.playerLevel[GameConstants.HITPOINTS] += heal;
player.playerLevel[Constants.HITPOINTS] += heal;
}
player.getPlayerAssistant().refreshSkill(GameConstants.HITPOINTS);
player.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);
break;
case 1153:
PlayerHandler.players[i].playerLevel[GameConstants.ATTACK] -= o.getPlayerAssistant().getLevelForXP(PlayerHandler.players[i].playerXP[GameConstants.ATTACK]) * 5 / 100;
PlayerHandler.players[i].playerLevel[Constants.ATTACK] -= o.getPlayerAssistant().getLevelForXP(PlayerHandler.players[i].playerXP[Constants.ATTACK]) * 5 / 100;
o.getPacketSender().sendMessage("Your attack level has been reduced!");
PlayerHandler.players[i].reduceSpellDelay[player.reduceSpellId] = System.currentTimeMillis();
o.getPlayerAssistant().refreshSkill(0);
break;
case 1157:
PlayerHandler.players[i].playerLevel[GameConstants.STRENGTH] -= o.getPlayerAssistant().getLevelForXP(PlayerHandler.players[i].playerXP[GameConstants.STRENGTH]) * 5 / 100;
PlayerHandler.players[i].playerLevel[Constants.STRENGTH] -= o.getPlayerAssistant().getLevelForXP(PlayerHandler.players[i].playerXP[Constants.STRENGTH]) * 5 / 100;
o.getPacketSender().sendMessage("Your strength level has been reduced!");
PlayerHandler.players[i].reduceSpellDelay[player.reduceSpellId] = System.currentTimeMillis();
o.getPlayerAssistant().refreshSkill(GameConstants.STRENGTH);
o.getPlayerAssistant().refreshSkill(Constants.STRENGTH);
break;
case 1161:
PlayerHandler.players[i].playerLevel[GameConstants.DEFENCE] -= o.getPlayerAssistant().getLevelForXP(PlayerHandler.players[i].playerXP[GameConstants.DEFENCE]) * 5 / 100;
PlayerHandler.players[i].playerLevel[Constants.DEFENCE] -= o.getPlayerAssistant().getLevelForXP(PlayerHandler.players[i].playerXP[Constants.DEFENCE]) * 5 / 100;
o.getPacketSender().sendMessage("Your defence level has been reduced!");
PlayerHandler.players[i].reduceSpellDelay[player.reduceSpellId] = System.currentTimeMillis();
o.getPlayerAssistant().refreshSkill(GameConstants.DEFENCE);
o.getPlayerAssistant().refreshSkill(Constants.DEFENCE);
break;
case 1542:
PlayerHandler.players[i].playerLevel[GameConstants.DEFENCE] -= o.getPlayerAssistant().getLevelForXP(PlayerHandler.players[i].playerXP[GameConstants.DEFENCE]) * 10 / 100;
PlayerHandler.players[i].playerLevel[Constants.DEFENCE] -= o.getPlayerAssistant().getLevelForXP(PlayerHandler.players[i].playerXP[Constants.DEFENCE]) * 10 / 100;
o.getPacketSender().sendMessage("Your defence level has been reduced!");
PlayerHandler.players[i].reduceSpellDelay[player.reduceSpellId] = System.currentTimeMillis();
o.getPlayerAssistant().refreshSkill(GameConstants.DEFENCE);
o.getPlayerAssistant().refreshSkill(Constants.DEFENCE);
break;
case 1543:
PlayerHandler.players[i].playerLevel[GameConstants.STRENGTH] -= o.getPlayerAssistant().getLevelForXP(PlayerHandler.players[i].playerXP[GameConstants.STRENGTH]) * 10 / 100;
PlayerHandler.players[i].playerLevel[Constants.STRENGTH] -= o.getPlayerAssistant().getLevelForXP(PlayerHandler.players[i].playerXP[Constants.STRENGTH]) * 10 / 100;
o.getPacketSender().sendMessage("Your strength level has been reduced!");
PlayerHandler.players[i].reduceSpellDelay[player.reduceSpellId] = System.currentTimeMillis();
o.getPlayerAssistant().refreshSkill(GameConstants.STRENGTH);
o.getPlayerAssistant().refreshSkill(Constants.STRENGTH);
break;
case 1562:
PlayerHandler.players[i].playerLevel[GameConstants.ATTACK] -= o.getPlayerAssistant().getLevelForXP(PlayerHandler.players[i].playerXP[GameConstants.ATTACK]) * 10 / 100;
PlayerHandler.players[i].playerLevel[Constants.ATTACK] -= o.getPlayerAssistant().getLevelForXP(PlayerHandler.players[i].playerXP[Constants.ATTACK]) * 10 / 100;
o.getPacketSender().sendMessage("Your attack level has been reduced!");
PlayerHandler.players[i].reduceSpellDelay[player.reduceSpellId] = System.currentTimeMillis();
o.getPlayerAssistant().refreshSkill(0);
@@ -1358,7 +1358,7 @@ public class CombatAssistant {
}
applySmite(i, damage);
player.killedBy = PlayerHandler.players[i].playerId;
o.getPlayerAssistant().refreshSkill(GameConstants.HITPOINTS);
o.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);
PlayerHandler.players[i].updateRequired = true;
player.usingMagic = false;
player.castingMagic = false;
@@ -1378,8 +1378,8 @@ public class CombatAssistant {
}
}
}
player.getPlayerAssistant().refreshSkill(GameConstants.HITPOINTS);
player.getPlayerAssistant().refreshSkill(GameConstants.MAGIC);
player.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);
player.getPlayerAssistant().refreshSkill(Constants.MAGIC);
player.oldSpellId = 0;
}
}
@@ -1434,15 +1434,15 @@ public class CombatAssistant {
damage = damage * 60 / 100;
}
if (damage > 0 && guthansEffect) {
player.playerLevel[GameConstants.HITPOINTS] += damage;
if (player.playerLevel[GameConstants.HITPOINTS] > player.getPlayerAssistant().getLevelForXP(player.playerXP[GameConstants.HITPOINTS])) {
player.playerLevel[GameConstants.HITPOINTS] = player.getPlayerAssistant().getLevelForXP(player.playerXP[GameConstants.HITPOINTS]);
player.playerLevel[Constants.HITPOINTS] += damage;
if (player.playerLevel[Constants.HITPOINTS] > player.getPlayerAssistant().getLevelForXP(player.playerXP[Constants.HITPOINTS])) {
player.playerLevel[Constants.HITPOINTS] = player.getPlayerAssistant().getLevelForXP(player.playerXP[Constants.HITPOINTS]);
}
player.getPlayerAssistant().refreshSkill(GameConstants.HITPOINTS);
player.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);
o.gfx0(398);
}
if (PlayerHandler.players[i].playerLevel[GameConstants.HITPOINTS] - damage < 0) {
damage = PlayerHandler.players[i].playerLevel[GameConstants.HITPOINTS];
if (PlayerHandler.players[i].playerLevel[Constants.HITPOINTS] - damage < 0) {
damage = PlayerHandler.players[i].playerLevel[Constants.HITPOINTS];
}
if (damage > 0) {
applyRecoil(player, damage, i);
@@ -1478,24 +1478,24 @@ public class CombatAssistant {
break;
case 3:
if (damage > 0) {
o.playerLevel[GameConstants.DEFENCE] -= damage;
o.playerLevel[Constants.DEFENCE] -= damage;
o.getPacketSender().sendMessage("You feel weak.");
if (o.playerLevel[GameConstants.DEFENCE] < 1) {
o.playerLevel[GameConstants.DEFENCE] = 1;
if (o.playerLevel[Constants.DEFENCE] < 1) {
o.playerLevel[Constants.DEFENCE] = 1;
}
o.getPlayerAssistant().refreshSkill(GameConstants.DEFENCE);
o.getPlayerAssistant().refreshSkill(Constants.DEFENCE);
}
break;
case 4:
if (damage > 0) {
if (player.playerLevel[GameConstants.HITPOINTS] + damage > player.getPlayerAssistant().getLevelForXP(player.playerXP[GameConstants.HITPOINTS])) {
if (player.playerLevel[GameConstants.HITPOINTS] < player.getPlayerAssistant().getLevelForXP(player.playerXP[GameConstants.HITPOINTS])) {
player.playerLevel[GameConstants.HITPOINTS] = player.getPlayerAssistant().getLevelForXP(player.playerXP[GameConstants.HITPOINTS]);
if (player.playerLevel[Constants.HITPOINTS] + damage > player.getPlayerAssistant().getLevelForXP(player.playerXP[Constants.HITPOINTS])) {
if (player.playerLevel[Constants.HITPOINTS] < player.getPlayerAssistant().getLevelForXP(player.playerXP[Constants.HITPOINTS])) {
player.playerLevel[Constants.HITPOINTS] = player.getPlayerAssistant().getLevelForXP(player.playerXP[Constants.HITPOINTS]);
}
} else {
player.playerLevel[GameConstants.HITPOINTS] += damage;
player.playerLevel[Constants.HITPOINTS] += damage;
}
player.getPlayerAssistant().refreshSkill(GameConstants.HITPOINTS);
player.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);
}
break;
}
@@ -1506,14 +1506,14 @@ public class CombatAssistant {
player.getPlayerAssistant().addSkillXP(damage * CombatConstants.MELEE_EXP_RATE / 3, 2);
player.getPlayerAssistant().addSkillXP(damage / 3, 3);
player.getPlayerAssistant().refreshSkill(0);
player.getPlayerAssistant().refreshSkill(GameConstants.DEFENCE);
player.getPlayerAssistant().refreshSkill(GameConstants.STRENGTH);
player.getPlayerAssistant().refreshSkill(GameConstants.HITPOINTS);
player.getPlayerAssistant().refreshSkill(Constants.DEFENCE);
player.getPlayerAssistant().refreshSkill(Constants.STRENGTH);
player.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);
} else {
player.getPlayerAssistant().addSkillXP(damage * CombatConstants.MELEE_EXP_RATE, player.fightMode);
player.getPlayerAssistant().addSkillXP(damage * CombatConstants.MELEE_EXP_RATE/3, 3);
player.getPlayerAssistant().refreshSkill(player.fightMode);
player.getPlayerAssistant().refreshSkill(GameConstants.HITPOINTS);
player.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);
}
PlayerHandler.players[i].logoutDelay = System.currentTimeMillis();
PlayerHandler.players[i].underAttackBy = player.playerId;
@@ -1530,7 +1530,7 @@ public class CombatAssistant {
PlayerHandler.players[i].damageTaken[player.playerId] += damage;
player.totalPlayerDamageDealt += damage;
PlayerHandler.players[i].updateRequired = true;
o.getPlayerAssistant().refreshSkill(GameConstants.HITPOINTS);
o.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);
break;
case 2:
@@ -1539,7 +1539,7 @@ public class CombatAssistant {
player.totalPlayerDamageDealt += damage;
PlayerHandler.players[i].updateRequired = true;
player.doubleHit = false;
o.getPlayerAssistant().refreshSkill(GameConstants.HITPOINTS);
o.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);
break;
}
PlayerHandler.players[i].handleHitMask(damage);
@@ -1554,12 +1554,12 @@ public class CombatAssistant {
}
if (PlayerHandler.players[index] != null) {
Client c2 = (Client) PlayerHandler.players[index];
c2.playerLevel[GameConstants.PRAYER] -= damage / 4;
if (c2.playerLevel[GameConstants.PRAYER] <= 0) {
c2.playerLevel[GameConstants.PRAYER] = 0;
c2.playerLevel[Constants.PRAYER] -= damage / 4;
if (c2.playerLevel[Constants.PRAYER] <= 0) {
c2.playerLevel[Constants.PRAYER] = 0;
PrayerDrain.resetPrayers(c2);
}
c2.getPlayerAssistant().refreshSkill(GameConstants.PRAYER);
c2.getPlayerAssistant().refreshSkill(Constants.PRAYER);
}
}
@@ -2,10 +2,8 @@ package com.rs2.game.content.combat;
import java.util.HashMap;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.game.content.StaticItemList;
import com.rs2.game.content.StaticNpcList;
import com.rs2.game.content.combat.range.RangeData;
import com.rs2.game.content.music.sound.CombatSounds;
import com.rs2.game.npcs.NpcHandler;
import com.rs2.game.players.Client;
@@ -212,10 +210,10 @@ public class Specials {
if (o.getPrayer().prayerActive[18] && System.currentTimeMillis() - o.protMeleeDelay > 1500) {
damage *= .6;
}
if (o.playerLevel[GameConstants.HITPOINTS] - damage <= 0) {
damage = o.playerLevel[GameConstants.HITPOINTS];
if (o.playerLevel[Constants.HITPOINTS] - damage <= 0) {
damage = o.playerLevel[Constants.HITPOINTS];
}
if (o.playerLevel[GameConstants.HITPOINTS] > 0) {
if (o.playerLevel[Constants.HITPOINTS] > 0) {
o.handleHitMask(damage);
player.startAnimation(1667);
o.gfx100(337);
@@ -278,8 +276,8 @@ public class Specials {
player2.forcedChat("Raarrrrrgggggghhhhhhh!");
player2.startAnimation(1056);
player2.specAmount -= 5;
player2.playerLevel[GameConstants.STRENGTH] = player2.getPlayerAssistant().getLevelForXP(player2.playerXP[GameConstants.STRENGTH]) + player2.getPlayerAssistant().getLevelForXP(player2.playerXP[GameConstants.STRENGTH]) * 15 / 100;
player2.getPlayerAssistant().refreshSkill(GameConstants.STRENGTH);
player2.playerLevel[Constants.STRENGTH] = player2.getPlayerAssistant().getLevelForXP(player2.playerXP[Constants.STRENGTH]) + player2.getPlayerAssistant().getLevelForXP(player2.playerXP[Constants.STRENGTH]) * 15 / 100;
player2.getPlayerAssistant().refreshSkill(Constants.STRENGTH);
player2.getItemAssistant().updateSpecialBar();
} else {
player2.getPacketSender().sendMessage("You don't have the required special energy to use this attack.");
@@ -1,6 +1,6 @@
package com.rs2.game.content.combat.magic;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.game.players.Player;
public class CastRequirements {
@@ -42,7 +42,7 @@ public class CastRequirements {
}
public static boolean hasRequiredLevel(Player c, int i) {
return c.playerLevel[GameConstants.MAGIC] >= i;
return c.playerLevel[Constants.MAGIC] >= i;
}
public static final int FIRE = 554,
@@ -3,7 +3,7 @@ package com.rs2.game.content.combat.magic;
import java.util.HashMap;
import java.util.Map;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.game.players.Player;
public class Enchanting {
@@ -209,7 +209,7 @@ public class Enchanting {
if (enc == null || ens == null) {
return;
}
if (c.playerLevel[GameConstants.MAGIC] < ens.getLevelReq()) {
if (c.playerLevel[Constants.MAGIC] < ens.getLevelReq()) {
c.getPacketSender().sendMessage(
"You need a magic level of at least "
+ ens.getLevelReq() + " to cast this spell.");
@@ -230,7 +230,7 @@ public class Enchanting {
}
// Everything is fine, Enchant the item
c.getItemAssistant().replaceItem(enc.getUnenchanted(), enc.getEnchanted());
c.getPlayerAssistant().addSkillXP(ens.getXp(), GameConstants.MAGIC);
c.getPlayerAssistant().addSkillXP(ens.getXp(), Constants.MAGIC);
CastRequirements.deleteRunes(c, getRequiredRunes(ens));
c.startAnimation(ens.getAnim());
c.gfx100(ens.getGFX());
@@ -1,14 +1,14 @@
package com.rs2.game.content.combat.magic;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.game.players.Player;
public class MagicMaxHit {
public static int mageAttackBonus(Player c) {
int magicBonus = c.playerLevel[GameConstants.MAGIC];
int magicBonus = c.playerLevel[Constants.MAGIC];
if (MagicData.fullVoidMage(c)) {
magicBonus += c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.MAGIC]) * 0.2;
magicBonus += c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.MAGIC]) * 0.2;
}
if (c.getPrayer().prayerActive[4]) {
magicBonus *= 1.05;
@@ -21,17 +21,17 @@ public class MagicMaxHit {
}
public static int mageDefenceBonus(Player c) {
int defenceBonus = c.playerLevel[GameConstants.DEFENCE] / 2 + c.playerLevel[GameConstants.MAGIC] / 2;
int defenceBonus = c.playerLevel[Constants.DEFENCE] / 2 + c.playerLevel[Constants.MAGIC] / 2;
if (c.getPrayer().prayerActive[0]) {
defenceBonus += c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.DEFENCE]) * 0.05;
defenceBonus += c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.DEFENCE]) * 0.05;
} else if (c.getPrayer().prayerActive[3]) {
defenceBonus += c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.DEFENCE]) * 0.1;
defenceBonus += c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.DEFENCE]) * 0.1;
} else if (c.getPrayer().prayerActive[9]) {
defenceBonus += c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.DEFENCE]) * 0.15;
defenceBonus += c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.DEFENCE]) * 0.15;
} else if (c.getPrayer().prayerActive[18]) {
defenceBonus += c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.DEFENCE]) * 0.2;
defenceBonus += c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.DEFENCE]) * 0.2;
} else if (c.getPrayer().prayerActive[19]) {
defenceBonus += c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.DEFENCE]) * 0.25;
defenceBonus += c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.DEFENCE]) * 0.25;
}
return defenceBonus + c.playerBonus[8] + c.playerBonus[8] / 3;
}
@@ -1,6 +1,6 @@
package com.rs2.game.content.combat.magic;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.game.items.DeprecatedItems;
import com.rs2.game.players.Player;
import com.rs2.game.players.PlayerHandler;
@@ -95,7 +95,7 @@ public class MagicRequirements {
}
// check magic level
if (c.playerLevel[GameConstants.MAGIC] < MagicData.MAGIC_SPELLS[spell][1]) {
if (c.playerLevel[Constants.MAGIC] < MagicData.MAGIC_SPELLS[spell][1]) {
c.getPacketSender().sendMessage(
"You need to have a magic level of "
+ MagicData.MAGIC_SPELLS[spell][1]
@@ -1,6 +1,6 @@
package com.rs2.game.content.combat.magic;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.game.content.combat.CombatConstants;
import com.rs2.game.content.music.sound.SoundList;
import com.rs2.game.players.Client;
@@ -31,19 +31,19 @@ public class MagicSpells extends MagicData {
if (c2.getPrayer().prayerActive[12]) {
damage *= (int) .60;
}
if (c2.playerLevel[GameConstants.HITPOINTS] - damage < 0) {
damage = c2.playerLevel[GameConstants.HITPOINTS];
if (c2.playerLevel[Constants.HITPOINTS] - damage < 0) {
damage = c2.playerLevel[Constants.HITPOINTS];
}
c.getPlayerAssistant().addSkillXP(MagicData.MAGIC_SPELLS[c.oldSpellId][7] + damage * CombatConstants.MAGIC_EXP_RATE, 6);
c.getPlayerAssistant().addSkillXP(MagicData.MAGIC_SPELLS[c.oldSpellId][7] + damage / 3, 3);
// Server.playerHandler.players[playerId].setHitDiff(damage);
// Server.playerHandler.players[playerId].setHitUpdateRequired(true);
PlayerHandler.players[playerId].handleHitMask(damage);
// Server.playerHandler.players[playerId].playerLevel[GameConstants.HITPOINTS] -=
// Server.playerHandler.players[playerId].playerLevel[Constants.HITPOINTS] -=
// damage;
PlayerHandler.players[playerId].dealDamage(damage);
PlayerHandler.players[playerId].damageTaken[c.playerId] += damage;
c2.getPlayerAssistant().refreshSkill(GameConstants.HITPOINTS);
c2.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);
c.totalPlayerDamageDealt += damage;
multiSpellEffect(c, playerId, damage);
} else {
@@ -63,21 +63,21 @@ public class MagicSpells extends MagicData {
- PlayerHandler.players[playerId].reduceStat > 35000) {
PlayerHandler.players[playerId].reduceStat = System
.currentTimeMillis();
PlayerHandler.players[playerId].playerLevel[GameConstants.ATTACK] -= PlayerHandler.players[playerId].getPlayerAssistant()
.getLevelForXP(PlayerHandler.players[playerId].playerXP[GameConstants.ATTACK]) * 10 / 100;
PlayerHandler.players[playerId].playerLevel[Constants.ATTACK] -= PlayerHandler.players[playerId].getPlayerAssistant()
.getLevelForXP(PlayerHandler.players[playerId].playerXP[Constants.ATTACK]) * 10 / 100;
}
break;
case 12919: // blood spells
case 12929:
int heal = damage / 4;
if (c.playerLevel[GameConstants.HITPOINTS] + heal >= c.getPlayerAssistant()
.getLevelForXP(c.playerXP[GameConstants.HITPOINTS])) {
c.playerLevel[GameConstants.HITPOINTS] = c.getPlayerAssistant().getLevelForXP(
c.playerXP[GameConstants.HITPOINTS]);
if (c.playerLevel[Constants.HITPOINTS] + heal >= c.getPlayerAssistant()
.getLevelForXP(c.playerXP[Constants.HITPOINTS])) {
c.playerLevel[Constants.HITPOINTS] = c.getPlayerAssistant().getLevelForXP(
c.playerXP[Constants.HITPOINTS]);
} else {
c.playerLevel[GameConstants.HITPOINTS] += heal;
c.playerLevel[Constants.HITPOINTS] += heal;
}
c.getPlayerAssistant().refreshSkill(GameConstants.HITPOINTS);
c.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);
break;
case 12891:
case 12881:
@@ -1,6 +1,6 @@
package com.rs2.game.content.combat.magic;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.game.content.randomevents.RandomEventHandler;
import com.rs2.game.players.Player;
@@ -27,7 +27,7 @@ public class MagicTeleports {
player.getPacketSender().sendMessage("You can't teleport above level 20 wilderness.");
return;
}
if (player.playerLevel[GameConstants.MAGIC] < teleport.getRequiredLevel()) {
if (player.playerLevel[Constants.MAGIC] < teleport.getRequiredLevel()) {
player.getPacketSender().sendMessage("You need a magic level of " + teleport.getRequiredLevel() + " to cast this spell.");
return;
}
@@ -38,6 +38,6 @@ public class MagicTeleports {
RandomEventHandler.addRandom(player);
CastRequirements.deleteRunes(player, teleport.getRequiredRunes());
player.getPlayerAssistant().startTeleport(teleport.getDestX(), teleport.getDestY(), teleport.getDestZ(), teleport.getType());
player.getPlayerAssistant().addSkillXP(teleport.getExperienceGained(), GameConstants.MAGIC);
player.getPlayerAssistant().addSkillXP(teleport.getExperienceGained(), Constants.MAGIC);
}
}
@@ -1,6 +1,6 @@
package com.rs2.game.content.combat.melee;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.game.content.combat.magic.MagicData;
import com.rs2.game.items.DeprecatedItems;
import com.rs2.game.items.ItemConstants;
@@ -20,21 +20,21 @@ public class MeleeData {
}
public static int calculateMeleeAttack(Player c) {
int attackLevel = c.playerLevel[GameConstants.ATTACK];
int attackLevel = c.playerLevel[Constants.ATTACK];
// 2, 5, 11, 18, 19
if (c.getPrayer().prayerActive[2]) {
attackLevel += c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.ATTACK]) * 0.05;
attackLevel += c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.ATTACK]) * 0.05;
} else if (c.getPrayer().prayerActive[7]) {
attackLevel += c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.ATTACK]) * 0.1;
attackLevel += c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.ATTACK]) * 0.1;
} else if (c.getPrayer().prayerActive[15]) {
attackLevel += c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.ATTACK]) * 0.15;
attackLevel += c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.ATTACK]) * 0.15;
} else if (c.getPrayer().prayerActive[24]) {
attackLevel += c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.ATTACK]) * 0.15;
attackLevel += c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.ATTACK]) * 0.15;
} else if (c.getPrayer().prayerActive[25]) {
attackLevel += c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.ATTACK]) * 0.2;
attackLevel += c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.ATTACK]) * 0.2;
}
if (fullVoidMelee(c)) {
attackLevel += c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.ATTACK]) * 0.1;
attackLevel += c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.ATTACK]) * 0.1;
}
attackLevel *= c.specAccuracy;
// c.sendMessage("Attack: " + (attackLevel +
@@ -62,18 +62,18 @@ public class MeleeData {
}
public static int calculateMeleeDefence(Player c) {
int defenceLevel = c.playerLevel[GameConstants.DEFENCE];
int defenceLevel = c.playerLevel[Constants.DEFENCE];
int i = c.playerBonus[bestMeleeDef(c)];
if (c.getPrayer().prayerActive[0]) {
defenceLevel += c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.DEFENCE]) * 0.05;
defenceLevel += c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.DEFENCE]) * 0.05;
} else if (c.getPrayer().prayerActive[5]) {
defenceLevel += c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.DEFENCE]) * 0.1;
defenceLevel += c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.DEFENCE]) * 0.1;
} else if (c.getPrayer().prayerActive[13]) {
defenceLevel += c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.DEFENCE]) * 0.15;
defenceLevel += c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.DEFENCE]) * 0.15;
} else if (c.getPrayer().prayerActive[24]) {
defenceLevel += c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.DEFENCE]) * 0.2;
defenceLevel += c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.DEFENCE]) * 0.2;
} else if (c.getPrayer().prayerActive[25]) {
defenceLevel += c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.DEFENCE]) * 0.25;
defenceLevel += c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.DEFENCE]) * 0.25;
}
return (int) (defenceLevel + defenceLevel * 0.15 + (i + i * 0.05));
}
@@ -1,6 +1,6 @@
package com.rs2.game.content.combat.melee;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.game.players.Player;
public class MeleeMaxHit {
@@ -8,8 +8,8 @@ public class MeleeMaxHit {
public static int calculateMeleeMaxHit(Player c) {
double maxHit = 0;
int strBonus = c.playerBonus[10];
int strength = c.playerLevel[GameConstants.STRENGTH];
int lvlForXP = c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.STRENGTH]);
int strength = c.playerLevel[Constants.STRENGTH];
int lvlForXP = c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.STRENGTH]);
if (c.getPrayer().prayerActive[1]) {
strength += (int) (lvlForXP * .05);
} else if (c.getPrayer().prayerActive[6]) {
@@ -32,7 +32,7 @@ public class MeleeMaxHit {
&& c.playerEquipment[c.playerHat] == 4716
&& c.playerEquipment[c.playerChest] == 4720
&& c.playerEquipment[c.playerLegs] == 4722) {
maxHit += (c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.HITPOINTS]) - c.playerLevel[GameConstants.HITPOINTS]) / 2;
maxHit += (c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS]) - c.playerLevel[Constants.HITPOINTS]) / 2;
}
if (c.specDamage > 1) {
maxHit = (int) (maxHit * c.specDamage);
@@ -1,6 +1,6 @@
package com.rs2.game.content.combat.npcs;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.game.content.combat.CombatConstants;
import com.rs2.game.content.combat.melee.MeleeData;
import com.rs2.game.content.minigames.FightCaves;
@@ -63,7 +63,7 @@ public class NpcCombat {
c.gfx0(NpcHandler.npcs[i].endGfx);
}
}
c.getPlayerAssistant().refreshSkill(GameConstants.HITPOINTS);
c.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);
}
}
}
@@ -330,9 +330,9 @@ public class NpcCombat {
}
break;
case 134:
if (c.playerLevel[GameConstants.PRAYER] > 0) {
c.playerLevel[GameConstants.PRAYER]--;
c.getPlayerAssistant().refreshSkill(GameConstants.PRAYER);
if (c.playerLevel[Constants.PRAYER] > 0) {
c.playerLevel[Constants.PRAYER]--;
c.getPlayerAssistant().refreshSkill(Constants.PRAYER);
c.getPlayerAssistant().appendPoison(5);
c.getCombatAssistant().resetPlayerAttack();
}
@@ -557,8 +557,8 @@ public class NpcCombat {
damage = 0;
}
if (NpcData.cantKillYou(NpcHandler.npcs[i].npcType)) {
if (damage >= c.playerLevel[GameConstants.HITPOINTS]) {
damage = c.playerLevel[GameConstants.HITPOINTS] - 1;
if (damage >= c.playerLevel[Constants.HITPOINTS]) {
damage = c.playerLevel[Constants.HITPOINTS] - 1;
}
}
if (c.getPrayer().prayerActive[18] && !(NpcHandler.npcs[i].npcType == 2030)) { // protect from melee
@@ -574,8 +574,8 @@ public class NpcCombat {
damage = 0;
}
}
if (c.playerLevel[GameConstants.HITPOINTS] - damage < 0) {
damage = c.playerLevel[GameConstants.HITPOINTS];
if (c.playerLevel[Constants.HITPOINTS] - damage < 0) {
damage = c.playerLevel[Constants.HITPOINTS];
}
}
@@ -588,15 +588,15 @@ public class NpcCombat {
damage = 0;
}
if (NpcData.cantKillYou(NpcHandler.npcs[i].npcType)) {
if (damage >= c.playerLevel[GameConstants.HITPOINTS]) {
damage = c.playerLevel[GameConstants.HITPOINTS] - 1;
if (damage >= c.playerLevel[Constants.HITPOINTS]) {
damage = c.playerLevel[Constants.HITPOINTS] - 1;
}
}
if (c.getPrayer().prayerActive[17]) { // protect from range
damage = 0;
}
if (c.playerLevel[GameConstants.HITPOINTS] - damage < 0) {
damage = c.playerLevel[GameConstants.HITPOINTS];
if (c.playerLevel[Constants.HITPOINTS] - damage < 0) {
damage = c.playerLevel[Constants.HITPOINTS];
}
}
@@ -608,8 +608,8 @@ public class NpcCombat {
magicFailed = true;
}
if (NpcData.cantKillYou(NpcHandler.npcs[i].npcType)) {
if (damage >= c.playerLevel[GameConstants.HITPOINTS]) {
damage = c.playerLevel[GameConstants.HITPOINTS] - 1;
if (damage >= c.playerLevel[Constants.HITPOINTS]) {
damage = c.playerLevel[Constants.HITPOINTS] - 1;
}
}
if(c.getPrayer().prayerActive[16]) { // protect from magic
@@ -620,8 +620,8 @@ public class NpcCombat {
damage = 0;
}
magicFailed = true;
if (c.playerLevel[GameConstants.HITPOINTS] - damage < 0) {
damage = c.playerLevel[GameConstants.HITPOINTS];
if (c.playerLevel[Constants.HITPOINTS] - damage < 0) {
damage = c.playerLevel[Constants.HITPOINTS];
}
if(NpcHandler.npcs[i].endGfx > 0 && (!magicFailed || FightCaves.isFightCaveNpc(i))) {
c.gfx100(NpcHandler.npcs[i].endGfx);
@@ -656,18 +656,18 @@ public class NpcCombat {
if (c.getPlayerAssistant().savePlayer()) {
c.getPlayerAssistant().handleROL();
} else {
int difference = c.playerLevel[GameConstants.HITPOINTS] - damage;
if (difference <= c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.HITPOINTS]) / 10 && difference > 0) {
int difference = c.playerLevel[Constants.HITPOINTS] - damage;
if (difference <= c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS]) / 10 && difference > 0) {
c.appendRedemption();
}
if (c.playerLevel[GameConstants.HITPOINTS] - damage < 0) {
damage = c.playerLevel[GameConstants.HITPOINTS];
if (c.playerLevel[Constants.HITPOINTS] - damage < 0) {
damage = c.playerLevel[Constants.HITPOINTS];
}
NpcHandler.handleSpecialEffects(c, i, damage);
c.logoutDelay = System.currentTimeMillis(); // logout delay
c.handleHitMask(damage);
c.playerLevel[GameConstants.HITPOINTS] -= damage;
c.getPlayerAssistant().refreshSkill(GameConstants.HITPOINTS);
c.playerLevel[Constants.HITPOINTS] -= damage;
c.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);
FightCaves.tzKihEffect(c, i, damage);
if (damage > 0)
{
@@ -1,6 +1,6 @@
package com.rs2.game.content.combat.prayer;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.game.content.music.sound.SoundList;
import com.rs2.game.players.Player;
@@ -19,13 +19,13 @@ public class ActivatePrayers {
"Prayer has been disabled in this duel!");
return;
}
if (i == 24 && player.playerLevel[GameConstants.DEFENCE] < 65) {
if (i == 24 && player.playerLevel[Constants.DEFENCE] < 65) {
player.getPacketSender().sendConfig(player.getPrayer().PRAYER_GLOW[i], 0);
player.getPacketSender().sendMessage(
"You may not use this prayer yet.");
return;
}
if (i == 25 && player.playerLevel[GameConstants.DEFENCE] < 70) {
if (i == 25 && player.playerLevel[Constants.DEFENCE] < 70) {
player.getPacketSender().sendConfig(player.getPrayer().PRAYER_GLOW[i], 0);
player.getPacketSender().sendMessage(
"You may not use this prayer yet.");
@@ -37,8 +37,8 @@ public class ActivatePrayers {
int[] rangePrayer = { 3, 11, 19 };
int[] magePrayer = { 4, 12, 20 };
if (player.playerLevel[GameConstants.PRAYER] > 0) {
if (player.getPlayerAssistant().getLevelForXP(player.playerXP[GameConstants.PRAYER]) >= player
if (player.playerLevel[Constants.PRAYER] > 0) {
if (player.getPlayerAssistant().getLevelForXP(player.playerXP[Constants.PRAYER]) >= player
.getPrayer().PRAYER_LEVEL_REQUIRED[i]) {
boolean headIcon = false;
switch (i) {
@@ -1,6 +1,6 @@
package com.rs2.game.content.combat.prayer;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.game.players.Player;
public class PrayerDrain {
@@ -26,16 +26,16 @@ public class PrayerDrain {
}
public static void reducePrayerLevel(Player c) {
if (c.playerLevel[GameConstants.PRAYER] - 1 > 0) {
c.playerLevel[GameConstants.PRAYER] -= 1;
if (c.playerLevel[Constants.PRAYER] - 1 > 0) {
c.playerLevel[Constants.PRAYER] -= 1;
} else {
c.getPacketSender().sendMessage(
"You have run out of prayer points!");
c.playerLevel[GameConstants.PRAYER] = 0;
c.playerLevel[Constants.PRAYER] = 0;
resetPrayers(c);
c.getPrayer().prayerId = -1;
}
c.getPlayerAssistant().refreshSkill(GameConstants.PRAYER);
c.getPlayerAssistant().refreshSkill(Constants.PRAYER);
}
public static void resetPrayers(Player player) {
@@ -1,6 +1,6 @@
package com.rs2.game.content.combat.range;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.GameEngine;
import com.rs2.event.CycleEvent;
import com.rs2.event.CycleEventContainer;
@@ -79,7 +79,7 @@ public class DwarfCannon {
player.getItemAssistant().deleteItem(StaticItemList.STEEL_BAR, 1);
player.getItemAssistant().addItem(2, 4);
player.getPacketSender().sendMessage("You make some cannonballs.");
player.getPlayerAssistant().addSkillXP(26, GameConstants.SMITHING);
player.getPlayerAssistant().addSkillXP(26, Constants.SMITHING);
player.getPacketSender().sendSound(352, 100, 0);
}
}
@@ -432,7 +432,7 @@ public class DwarfCannon {
target.hitUpdateRequired2 = true;
target.updateRequired = true;
myBalls -= 1;
player.getPlayerAssistant().addSkillXP(damage * CombatConstants.RANGE_EXP_RATE, GameConstants.RANGED);
player.getPlayerAssistant().addSkillXP(damage * CombatConstants.RANGE_EXP_RATE, Constants.RANGED);
}
}
@@ -503,7 +503,7 @@ public class DwarfCannon {
}
public boolean canAttackSlayer(int i){
return player.playerLevel[GameConstants.SLAYER] >= player.getSlayer().getRequiredLevel(NpcHandler.npcs[i].npcType);
return player.playerLevel[Constants.SLAYER] >= player.getSlayer().getRequiredLevel(NpcHandler.npcs[i].npcType);
}
private void cannonProjectile(Npc n) {
@@ -1,31 +1,31 @@
package com.rs2.game.content.combat.range;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.game.players.Player;
public class RangeMaxHit {
public static int calculateRangeDefence(Player c) {
int defenceLevel = c.playerLevel[GameConstants.DEFENCE];
int defenceLevel = c.playerLevel[Constants.DEFENCE];
if (c.getPrayer().prayerActive[0]) {
defenceLevel += c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.DEFENCE]) * 0.05;
defenceLevel += c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.DEFENCE]) * 0.05;
} else if (c.getPrayer().prayerActive[5]) {
defenceLevel += c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.DEFENCE]) * 0.1;
defenceLevel += c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.DEFENCE]) * 0.1;
} else if (c.getPrayer().prayerActive[13]) {
defenceLevel += c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.DEFENCE]) * 0.15;
defenceLevel += c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.DEFENCE]) * 0.15;
} else if (c.getPrayer().prayerActive[24]) {
defenceLevel += c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.DEFENCE]) * 0.2;
defenceLevel += c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.DEFENCE]) * 0.2;
} else if (c.getPrayer().prayerActive[25]) {
defenceLevel += c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.DEFENCE]) * 0.25;
defenceLevel += c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.DEFENCE]) * 0.25;
}
return defenceLevel + c.playerBonus[9] + c.playerBonus[9] / 2;
}
public static int calculateRangeAttack(Player c) {
int rangeLevel = c.playerLevel[GameConstants.RANGED];
int rangeLevel = c.playerLevel[Constants.RANGED];
rangeLevel *= c.specAccuracy;
if (RangeData.fullVoidRange(c)) {
rangeLevel += c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.RANGED]) * 0.1;
rangeLevel += c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.RANGED]) * 0.1;
}
if (c.getPrayer().prayerActive[3]) {
rangeLevel *= 1.05;
@@ -42,7 +42,7 @@ public class RangeMaxHit {
}
public static int rangeMaxHit(Player c) {
int rangeLevel = c.playerLevel[GameConstants.RANGED];
int rangeLevel = c.playerLevel[Constants.RANGED];
int itemUsed = getRangeStr(c.usingBow ? c.lastArrowUsed : c.lastWeaponUsed);
double modifier = 1.00;
if (c.getPrayer().prayerActive[3]) {
@@ -1,6 +1,6 @@
package com.rs2.game.content.consumables;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.event.*;
import com.rs2.game.players.Player;
import com.rs2.util.Misc;
@@ -129,50 +129,50 @@ public class Beverages {
switch (id) {
case 1917:
case 7740://beer
double beerEffectStrength = c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.STRENGTH]) * .04 + c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.STRENGTH]);
double beerEffectAttack = c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.ATTACK]) * .07;
if (c.playerLevel[GameConstants.STRENGTH] < beerEffectStrength) {
c.playerLevel[GameConstants.STRENGTH] = (int) beerEffectStrength;
double beerEffectStrength = c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.STRENGTH]) * .04 + c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.STRENGTH]);
double beerEffectAttack = c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.ATTACK]) * .07;
if (c.playerLevel[Constants.STRENGTH] < beerEffectStrength) {
c.playerLevel[Constants.STRENGTH] = (int) beerEffectStrength;
}
if (c.playerLevel[GameConstants.ATTACK] > 0) {
c.playerLevel[GameConstants.ATTACK] -= beerEffectAttack;
if (c.playerLevel[Constants.ATTACK] > 0) {
c.playerLevel[Constants.ATTACK] -= beerEffectAttack;
}
if (c.playerLevel[GameConstants.ATTACK] <= 0) {
c.playerLevel[GameConstants.ATTACK] = 1;
if (c.playerLevel[Constants.ATTACK] <= 0) {
c.playerLevel[Constants.ATTACK] = 1;
}
c.getPlayerAssistant().refreshSkill(0);
c.getPlayerAssistant().refreshSkill(GameConstants.STRENGTH);
c.getPlayerAssistant().refreshSkill(Constants.STRENGTH);
break;
case 1913: //dwarven stout
c.playerLevel[GameConstants.MINING] = c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.MINING]) + 1;
c.playerLevel[GameConstants.SMITHING] = c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.SMITHING]) + 1;
c.getPlayerAssistant().refreshSkill(GameConstants.MINING);
c.getPlayerAssistant().refreshSkill(GameConstants.SMITHING);
c.playerLevel[Constants.MINING] = c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.MINING]) + 1;
c.playerLevel[Constants.SMITHING] = c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.SMITHING]) + 1;
c.getPlayerAssistant().refreshSkill(Constants.MINING);
c.getPlayerAssistant().refreshSkill(Constants.SMITHING);
break;
case 1907://wizard's mind bomb
if (c.playerLevel[GameConstants.MAGIC] < 50) {
c.playerLevel[GameConstants.MAGIC] = c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.MAGIC]) + 2;
if (c.playerLevel[Constants.MAGIC] < 50) {
c.playerLevel[Constants.MAGIC] = c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.MAGIC]) + 2;
} else {
c.playerLevel[GameConstants.MAGIC] = c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.MAGIC]) + 3;
c.playerLevel[Constants.MAGIC] = c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.MAGIC]) + 3;
}
c.playerLevel[GameConstants.STRENGTH] = c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.STRENGTH]) - 3;
c.playerLevel[GameConstants.DEFENCE] = c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.DEFENCE]) - 3;
c.playerLevel[GameConstants.ATTACK] = c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.ATTACK]) - 4;
c.getPlayerAssistant().refreshSkill(GameConstants.DEFENCE);
c.getPlayerAssistant().refreshSkill(GameConstants.MAGIC);
c.getPlayerAssistant().refreshSkill(GameConstants.ATTACK);
c.getPlayerAssistant().refreshSkill(GameConstants.STRENGTH);
c.playerLevel[Constants.STRENGTH] = c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.STRENGTH]) - 3;
c.playerLevel[Constants.DEFENCE] = c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.DEFENCE]) - 3;
c.playerLevel[Constants.ATTACK] = c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.ATTACK]) - 4;
c.getPlayerAssistant().refreshSkill(Constants.DEFENCE);
c.getPlayerAssistant().refreshSkill(Constants.MAGIC);
c.getPlayerAssistant().refreshSkill(Constants.ATTACK);
c.getPlayerAssistant().refreshSkill(Constants.STRENGTH);
break;
case 1915://grog
c.playerLevel[GameConstants.STRENGTH] = c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.STRENGTH]) + 3;
if (c.playerLevel[GameConstants.ATTACK] > 0) {
c.playerLevel[GameConstants.ATTACK] = c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.ATTACK]) - 2;
c.playerLevel[Constants.STRENGTH] = c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.STRENGTH]) + 3;
if (c.playerLevel[Constants.ATTACK] > 0) {
c.playerLevel[Constants.ATTACK] = c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.ATTACK]) - 2;
}
if (c.playerLevel[GameConstants.ATTACK] <= 0) {
c.playerLevel[GameConstants.ATTACK] = 1;
if (c.playerLevel[Constants.ATTACK] <= 0) {
c.playerLevel[Constants.ATTACK] = 1;
}
c.getPlayerAssistant().refreshSkill(0);
c.getPlayerAssistant().refreshSkill(GameConstants.STRENGTH);
c.getPlayerAssistant().refreshSkill(Constants.STRENGTH);
break;
}
}
@@ -2,7 +2,7 @@ package com.rs2.game.content.consumables;
import java.util.HashMap;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.game.content.music.sound.SoundList;
import com.rs2.game.items.impl.RareProtection;
import com.rs2.game.players.Player;
@@ -209,7 +209,7 @@ public class Food {
}
public static void eat(Player player, int id, int slot) {
if (player.isDead || player.playerLevel[GameConstants.HITPOINTS] <= 0) {
if (player.isDead || player.playerLevel[Constants.HITPOINTS] <= 0) {
return;
}
if (player.duelRule[6]) {
@@ -219,7 +219,7 @@ public class Food {
if (!RareProtection.eatDupedItem(player, id)) {
return;
}
if (System.currentTimeMillis() - player.foodDelay >= 1800 && player.playerLevel[GameConstants.HITPOINTS] > 0) {
if (System.currentTimeMillis() - player.foodDelay >= 1800 && player.playerLevel[Constants.HITPOINTS] > 0) {
player.getCombatAssistant().resetPlayerAttack();
player.attackTimer += 2;
player.startAnimation(829);
@@ -256,14 +256,14 @@ public class Food {
player.getPacketSender().sendSound(SoundList.DRINK, 100, 0);
}
player.foodDelay = System.currentTimeMillis();
if (player.playerLevel[GameConstants.HITPOINTS] < player.getPlayerAssistant().getLevelForXP(player.playerXP[GameConstants.HITPOINTS])) {
player.playerLevel[GameConstants.HITPOINTS] += f.getHeal();
if (player.playerLevel[Constants.HITPOINTS] < player.getPlayerAssistant().getLevelForXP(player.playerXP[Constants.HITPOINTS])) {
player.playerLevel[Constants.HITPOINTS] += f.getHeal();
player.getPacketSender().sendMessage("It heals some health.");
if (player.playerLevel[GameConstants.HITPOINTS] > player.getPlayerAssistant().getLevelForXP(player.playerXP[GameConstants.HITPOINTS])) {
player.playerLevel[GameConstants.HITPOINTS] = player.getPlayerAssistant().getLevelForXP(player.playerXP[GameConstants.HITPOINTS]);
if (player.playerLevel[Constants.HITPOINTS] > player.getPlayerAssistant().getLevelForXP(player.playerXP[Constants.HITPOINTS])) {
player.playerLevel[Constants.HITPOINTS] = player.getPlayerAssistant().getLevelForXP(player.playerXP[Constants.HITPOINTS]);
}
}
player.getPlayerAssistant().refreshSkill(GameConstants.HITPOINTS);
player.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);
}
}
@@ -274,33 +274,33 @@ public class Food {
player.forcedChat("Aaah, nothing like a nice cuppa tea!");
break;
case 1907:
if (player.playerLevel[GameConstants.MAGIC] < 50) {
player.playerLevel[GameConstants.MAGIC] = player.getPlayerAssistant().getLevelForXP(player.playerXP[GameConstants.MAGIC]) + 2;
if (player.playerLevel[Constants.MAGIC] < 50) {
player.playerLevel[Constants.MAGIC] = player.getPlayerAssistant().getLevelForXP(player.playerXP[Constants.MAGIC]) + 2;
} else {
player.playerLevel[GameConstants.MAGIC] = player.getPlayerAssistant().getLevelForXP(player.playerXP[GameConstants.MAGIC]) + 3;
player.playerLevel[Constants.MAGIC] = player.getPlayerAssistant().getLevelForXP(player.playerXP[Constants.MAGIC]) + 3;
}
if (player.playerLevel[GameConstants.STRENGTH] < 4) {
player.playerLevel[GameConstants.STRENGTH] = 1;
if (player.playerLevel[Constants.STRENGTH] < 4) {
player.playerLevel[Constants.STRENGTH] = 1;
}
if (player.playerLevel[GameConstants.ATTACK] < 5) {
player.playerLevel[GameConstants.ATTACK] = 1;
if (player.playerLevel[Constants.ATTACK] < 5) {
player.playerLevel[Constants.ATTACK] = 1;
} else {
player.playerLevel[GameConstants.ATTACK] = player.getPlayerAssistant().getLevelForXP(player.playerXP[GameConstants.ATTACK]) - 4;
player.playerLevel[Constants.ATTACK] = player.getPlayerAssistant().getLevelForXP(player.playerXP[Constants.ATTACK]) - 4;
}
if (player.playerLevel[GameConstants.DEFENCE] < 4) {
player.playerLevel[GameConstants.DEFENCE] = 1;
if (player.playerLevel[Constants.DEFENCE] < 4) {
player.playerLevel[Constants.DEFENCE] = 1;
} else {
player.playerLevel[GameConstants.DEFENCE] = player.getPlayerAssistant().getLevelForXP(player.playerXP[GameConstants.DEFENCE]) - 3;
player.playerLevel[Constants.DEFENCE] = player.getPlayerAssistant().getLevelForXP(player.playerXP[Constants.DEFENCE]) - 3;
}
if (player.playerLevel[GameConstants.STRENGTH] < 4) {
player.playerLevel[GameConstants.STRENGTH] = 1;
if (player.playerLevel[Constants.STRENGTH] < 4) {
player.playerLevel[Constants.STRENGTH] = 1;
} else {
player.playerLevel[GameConstants.STRENGTH] = player.getPlayerAssistant().getLevelForXP(player.playerXP[GameConstants.STRENGTH]) - 3;
player.playerLevel[Constants.STRENGTH] = player.getPlayerAssistant().getLevelForXP(player.playerXP[Constants.STRENGTH]) - 3;
}
player.getPlayerAssistant().refreshSkill(0);
player.getPlayerAssistant().refreshSkill(GameConstants.DEFENCE);
player.getPlayerAssistant().refreshSkill(GameConstants.STRENGTH);
player.getPlayerAssistant().refreshSkill(GameConstants.MAGIC);
player.getPlayerAssistant().refreshSkill(Constants.DEFENCE);
player.getPlayerAssistant().refreshSkill(Constants.STRENGTH);
player.getPlayerAssistant().refreshSkill(Constants.MAGIC);
break;
}
}
@@ -1,6 +1,6 @@
package com.rs2.game.content.consumables;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.game.players.Player;
import com.rs2.util.Misc;
@@ -51,10 +51,10 @@ public class Kebabs {
} else if (Misc.random(100.0f) <= eff2) { // 61.24% heals 10% of HP
c.getPacketSender()
.sendMessage("It restores some life points.");
if (c.playerLevel[GameConstants.HITPOINTS] < c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.HITPOINTS])) {
c.playerLevel[GameConstants.HITPOINTS] += c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.HITPOINTS]) * 0.10;
if (c.playerLevel[GameConstants.HITPOINTS] > c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.HITPOINTS])) {
c.playerLevel[GameConstants.HITPOINTS] = c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.HITPOINTS]);
if (c.playerLevel[Constants.HITPOINTS] < c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS])) {
c.playerLevel[Constants.HITPOINTS] += c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS]) * 0.10;
if (c.playerLevel[Constants.HITPOINTS] > c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS])) {
c.playerLevel[Constants.HITPOINTS] = c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS]);
}
}
@@ -62,10 +62,10 @@ public class Kebabs {
} else if (Misc.random(100.0f) <= eff3) { // 21.12% + 10-20 HP
c.getPacketSender().sendMessage(
"That was a good kebab. You feel a lot better. ");
if (c.playerLevel[GameConstants.HITPOINTS] < c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.HITPOINTS])) {
c.playerLevel[GameConstants.HITPOINTS] += Misc.random(20);
if (c.playerLevel[GameConstants.HITPOINTS] > c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.HITPOINTS])) {
c.playerLevel[GameConstants.HITPOINTS] = c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.HITPOINTS]);
if (c.playerLevel[Constants.HITPOINTS] < c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS])) {
c.playerLevel[Constants.HITPOINTS] += Misc.random(20);
if (c.playerLevel[Constants.HITPOINTS] > c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS])) {
c.playerLevel[Constants.HITPOINTS] = c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS]);
}
}
@@ -74,16 +74,16 @@ public class Kebabs {
c.getPacketSender()
.sendMessage(
"Wow, that was an amazing kebab! You feel really invigorated.");
c.playerLevel[GameConstants.DEFENCE] += 2 + Misc.random(1); // def
c.playerLevel[GameConstants.STRENGTH] += 2 + Misc.random(1); // str
c.playerLevel[GameConstants.ATTACK] += 2 + Misc.random(1); // atk
c.getPlayerAssistant().refreshSkill(GameConstants.DEFENCE);
c.getPlayerAssistant().refreshSkill(GameConstants.STRENGTH);
c.getPlayerAssistant().refreshSkill(GameConstants.HITPOINTS);
if (c.playerLevel[GameConstants.HITPOINTS] < c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.HITPOINTS])) {
c.playerLevel[GameConstants.HITPOINTS] += Misc.random(30);
if (c.playerLevel[GameConstants.HITPOINTS] > c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.HITPOINTS])) {
c.playerLevel[GameConstants.HITPOINTS] = c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.HITPOINTS]);
c.playerLevel[Constants.DEFENCE] += 2 + Misc.random(1); // def
c.playerLevel[Constants.STRENGTH] += 2 + Misc.random(1); // str
c.playerLevel[Constants.ATTACK] += 2 + Misc.random(1); // atk
c.getPlayerAssistant().refreshSkill(Constants.DEFENCE);
c.getPlayerAssistant().refreshSkill(Constants.STRENGTH);
c.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);
if (c.playerLevel[Constants.HITPOINTS] < c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS])) {
c.playerLevel[Constants.HITPOINTS] += Misc.random(30);
if (c.playerLevel[Constants.HITPOINTS] > c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS])) {
c.playerLevel[Constants.HITPOINTS] = c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS]);
}
}
@@ -105,8 +105,8 @@ public class Kebabs {
*/
public static void eat(Player player, int slot) {
if (System.currentTimeMillis() - player.foodDelay >= 1500
&& player.playerLevel[GameConstants.HITPOINTS] > 0) {
if (player.playerLevel[GameConstants.HITPOINTS] == player.getPlayerAssistant().getLevelForXP(player.playerXP[GameConstants.HITPOINTS])) { // If
&& player.playerLevel[Constants.HITPOINTS] > 0) {
if (player.playerLevel[Constants.HITPOINTS] == player.getPlayerAssistant().getLevelForXP(player.playerXP[Constants.HITPOINTS])) { // If
// full
// health,
// does
@@ -120,7 +120,7 @@ public class Kebabs {
player.getItemAssistant().deleteItem(Kebab, slot, 1);
player.getPacketSender().sendSound(317, 100, 0);
player.foodDelay = System.currentTimeMillis();
player.getPlayerAssistant().refreshSkill(GameConstants.HITPOINTS);
player.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);
return;
}
player.getCombatAssistant().resetPlayerAttack();
@@ -131,7 +131,7 @@ public class Kebabs {
player.getItemAssistant().deleteItem(Kebab, slot, 1);
player.getPacketSender().sendSound(317, 100, 0);
player.foodDelay = System.currentTimeMillis();
player.getPlayerAssistant().refreshSkill(GameConstants.HITPOINTS);
player.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);
}
}
}
@@ -1,8 +1,8 @@
package com.rs2.game.content.consumables;
import com.rs2.Constants;
import org.apollo.cache.def.ItemDefinition;
import com.rs2.GameConstants;
import com.rs2.event.CycleEvent;
import com.rs2.event.CycleEventContainer;
import com.rs2.event.CycleEventHandler;
@@ -23,7 +23,7 @@ public class Potions {
"You may not drink potions in this duel.");
return;
}
if (c.isDead || c.playerLevel[GameConstants.HITPOINTS] <= 0) {
if (c.isDead || c.playerLevel[Constants.HITPOINTS] <= 0) {
return;
}
if (System.currentTimeMillis() - c.potDelay >= 1200) {
@@ -330,14 +330,14 @@ public class Potions {
// c.startAnimation(829);
c.playerItems[slot] = replaceItem + 1;
c.getItemAssistant().resetItems(3214);
c.playerLevel[GameConstants.PRAYER] += c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.PRAYER]) * .33;
c.playerLevel[Constants.PRAYER] += c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.PRAYER]) * .33;
if (rest) {
c.playerLevel[GameConstants.PRAYER] += 1;
c.playerLevel[Constants.PRAYER] += 1;
}
if (c.playerLevel[GameConstants.PRAYER] > c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.PRAYER])) {
c.playerLevel[GameConstants.PRAYER] = c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.PRAYER]);
if (c.playerLevel[Constants.PRAYER] > c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.PRAYER])) {
c.playerLevel[Constants.PRAYER] = c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.PRAYER]);
}
c.getPlayerAssistant().refreshSkill(GameConstants.PRAYER);
c.getPlayerAssistant().refreshSkill(Constants.PRAYER);
if (rest) {
restoreStats();
}
@@ -374,21 +374,21 @@ public class Potions {
c.getPacketSender().setSkillLevel(tD, c.playerLevel[tD],
c.playerXP[tD]);
}
c.playerLevel[GameConstants.ATTACK] += getBrewStat(0, .20);
if (c.playerLevel[GameConstants.ATTACK] > c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.ATTACK]) * 1.2 + 1) {
c.playerLevel[GameConstants.ATTACK] = (int) (c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.ATTACK]) * 1.2);
c.playerLevel[Constants.ATTACK] += getBrewStat(0, .20);
if (c.playerLevel[Constants.ATTACK] > c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.ATTACK]) * 1.2 + 1) {
c.playerLevel[Constants.ATTACK] = (int) (c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.ATTACK]) * 1.2);
}
c.playerLevel[GameConstants.STRENGTH] += getBrewStat(2, .12);
if (c.playerLevel[GameConstants.STRENGTH] > c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.STRENGTH]) * 1.2 + 1) {
c.playerLevel[GameConstants.STRENGTH] = (int) (c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.STRENGTH]) * 1.2);
c.playerLevel[Constants.STRENGTH] += getBrewStat(2, .12);
if (c.playerLevel[Constants.STRENGTH] > c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.STRENGTH]) * 1.2 + 1) {
c.playerLevel[Constants.STRENGTH] = (int) (c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.STRENGTH]) * 1.2);
}
c.playerLevel[GameConstants.PRAYER] += getBrewStat(5, .10);
if (c.playerLevel[GameConstants.PRAYER] > c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.PRAYER]) * 1.2 + 1) {
c.playerLevel[GameConstants.PRAYER] = (int) (c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.PRAYER]) * 1.2);
c.playerLevel[Constants.PRAYER] += getBrewStat(5, .10);
if (c.playerLevel[Constants.PRAYER] > c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.PRAYER]) * 1.2 + 1) {
c.playerLevel[Constants.PRAYER] = (int) (c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.PRAYER]) * 1.2);
}
c.getPlayerAssistant().refreshSkill(0);
c.getPlayerAssistant().refreshSkill(GameConstants.STRENGTH);
c.getPlayerAssistant().refreshSkill(GameConstants.PRAYER);
c.getPlayerAssistant().refreshSkill(Constants.STRENGTH);
c.getPlayerAssistant().refreshSkill(Constants.PRAYER);
c.hitUpdateRequired = true;
c.hitDiff = 9;
}
@@ -412,17 +412,17 @@ public class Potions {
c.getPacketSender().setSkillLevel(tD, c.playerLevel[tD],
c.playerXP[tD]);
}
c.playerLevel[GameConstants.DEFENCE] += getBrewStat(1, .20);
if (c.playerLevel[GameConstants.DEFENCE] > c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.DEFENCE]) * 1.2 + 1) {
c.playerLevel[GameConstants.DEFENCE] = (int) (c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.DEFENCE]) * 1.2);
c.playerLevel[Constants.DEFENCE] += getBrewStat(1, .20);
if (c.playerLevel[Constants.DEFENCE] > c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.DEFENCE]) * 1.2 + 1) {
c.playerLevel[Constants.DEFENCE] = (int) (c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.DEFENCE]) * 1.2);
}
c.getPlayerAssistant().refreshSkill(GameConstants.DEFENCE);
c.getPlayerAssistant().refreshSkill(Constants.DEFENCE);
c.playerLevel[GameConstants.HITPOINTS] += getBrewStat(3, .15);
if (c.playerLevel[GameConstants.HITPOINTS] > c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.HITPOINTS]) * 1.17 + 1) {
c.playerLevel[GameConstants.HITPOINTS] = (int) (c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.HITPOINTS]) * 1.17);
c.playerLevel[Constants.HITPOINTS] += getBrewStat(3, .15);
if (c.playerLevel[Constants.HITPOINTS] > c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS]) * 1.17 + 1) {
c.playerLevel[Constants.HITPOINTS] = (int) (c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS]) * 1.17);
}
c.getPlayerAssistant().refreshSkill(GameConstants.HITPOINTS);
c.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);
}
public void enchanceStat(int skillID, boolean sup) {
@@ -1,6 +1,6 @@
package com.rs2.game.content.guilds;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.game.content.quests.QuestAssistant;
import com.rs2.game.globalworldobjects.PassDoor;
import com.rs2.game.objects.impl.Climbing;
@@ -17,7 +17,7 @@ public class Guilds {
private static boolean hasCompletedLegends = false;
public static void attemptGuild(Player player, int objectId) {
if (!GameConstants.GUILDS) {
if (!Constants.GUILDS) {
player.getPacketSender().sendMessage("Guilds are currently disabled.");
return;
}
@@ -131,35 +131,35 @@ public class Guilds {
}
break;
case 2641: // Prayer Guild
if (player.getPlayerAssistant().getLevelForXP(player.playerXP[GameConstants.PRAYER]) < 31) {
if (player.getPlayerAssistant().getLevelForXP(player.playerXP[Constants.PRAYER]) < 31) {
player.getDialogueHandler().sendStatement("You need 31 prayer to enter this guild!");
player.nextChat = 0;
return false;
}
break;
case 2712: // Cooking Guild
if (player.playerLevel[GameConstants.COOKING] < 32 || player.playerEquipment[player.playerHat] != 1949) {
if (player.playerLevel[Constants.COOKING] < 32 || player.playerEquipment[player.playerHat] != 1949) {
player.getDialogueHandler().sendStatement("You need 32 cooking and a chefs hat to enter this guild!");
player.nextChat = 0;
return false;
}
break;
case 2647: // Crafting Guild
if (player.playerLevel[GameConstants.CRAFTING] < 40 || player.playerEquipment[player.playerChest] != 1757) {
if (player.playerLevel[Constants.CRAFTING] < 40 || player.playerEquipment[player.playerChest] != 1757) {
player.getDialogueHandler().sendStatement("You need 40 Crafting and a Brown Apron to enter this guild!");
player.nextChat = 0;
return false;
}
break;
case 2113: // Mining Guild
if (player.playerLevel[GameConstants.MINING] < 60) {
if (player.playerLevel[Constants.MINING] < 60) {
player.getDialogueHandler().sendStatement("You need 60 Mining to enter this guild!");
player.nextChat = 0;
return false;
}
break;
case 2025: // Fishing Guild
if (player.playerLevel[GameConstants.FISHING] < 68) {
if (player.playerLevel[Constants.FISHING] < 68) {
player.getDialogueHandler().sendStatement("You need 68 Fishing to enter this guild!");
player.nextChat = 0;
return false;
@@ -167,14 +167,14 @@ public class Guilds {
break;
case 1600:
case 1601: // Wizards Guild
if (player.playerLevel[GameConstants.MAGIC] < 66) {
if (player.playerLevel[Constants.MAGIC] < 66) {
player.getDialogueHandler().sendStatement("You need 66 Magic to enter this guild!");
player.nextChat = 0;
return false;
}
break;
case 2514:
if (player.playerLevel[GameConstants.RANGED] < 40) { // Ranging Guild
if (player.playerLevel[Constants.RANGED] < 40) { // Ranging Guild
player.getDialogueHandler().sendStatement("You need 40 Range to enter this guild!");
player.nextChat = 0;
return false;
@@ -2,15 +2,14 @@ package com.rs2.game.content.minigames;
import java.util.concurrent.CopyOnWriteArrayList;
import com.rs2.Constants;
import org.apollo.cache.def.ItemDefinition;
import com.rs2.GameConstants;
import com.rs2.GameEngine;
import com.rs2.game.content.combat.prayer.PrayerDrain;
import com.rs2.game.content.minigames.castlewars.CastleWars;
import com.rs2.game.items.DeprecatedItems;
import com.rs2.game.items.GameItem;
import com.rs2.game.items.ItemData;
import com.rs2.game.items.ItemConstants;
import com.rs2.game.items.impl.RareProtection;
import com.rs2.game.players.Client;
@@ -154,8 +153,8 @@ public class Dueling {
} else {
player.getOutStream().writeByte(item.amount);
}
if (item.id > GameConstants.ITEM_LIMIT || item.id < 0) {
item.id = GameConstants.ITEM_LIMIT;
if (item.id > Constants.ITEM_LIMIT || item.id < 0) {
item.id = Constants.ITEM_LIMIT;
}
player.getOutStream().writeWordBigEndianA(item.id + 1);
@@ -183,8 +182,8 @@ public class Dueling {
} else {
player.getOutStream().writeByte(item.amount);
}
if (item.id > GameConstants.ITEM_LIMIT || item.id < 0) {
item.id = GameConstants.ITEM_LIMIT;
if (item.id > Constants.ITEM_LIMIT || item.id < 0) {
item.id = Constants.ITEM_LIMIT;
}
player.getOutStream().writeWordBigEndianA(item.id + 1);
current++;
@@ -579,7 +578,7 @@ public class Dueling {
Client opponent = (Client) PlayerHandler.players[player.duelingWith];
opponent.getDueling().duelVictory();
player.getDueling().resetDuel();
player.getPlayerAssistant().movePlayer(GameConstants.DUELING_RESPAWN_X + Misc.random(5), GameConstants.DUELING_RESPAWN_Y + Misc.random(5), 0);
player.getPlayerAssistant().movePlayer(Constants.DUELING_RESPAWN_X + Misc.random(5), Constants.DUELING_RESPAWN_Y + Misc.random(5), 0);
player.getPacketSender().sendMessage("You have lost the duel!");
}
@@ -607,14 +606,14 @@ public class Dueling {
player.headIconPk = -1;
player.getPlayerAssistant().requestUpdates();
}
player.getPlayerAssistant().refreshSkill(GameConstants.HITPOINTS);
player.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);
duelRewardInterface();
player.getPacketSender().showInterface(6733);
player.getPacketSender().sendMessage("You have won the duel!");
if (player.getPlayerAssistant().isPlayer()) {
GameLogger.writeLog(player.playerName, "duelingkiller", player.playerName + " killed " + opponent.playerName + " in the duel arena.");
}
player.getPlayerAssistant().movePlayer(GameConstants.DUELING_RESPAWN_X + Misc.random(5), GameConstants.DUELING_RESPAWN_Y + Misc.random(5), 0);
player.getPlayerAssistant().movePlayer(Constants.DUELING_RESPAWN_X + Misc.random(5), Constants.DUELING_RESPAWN_Y + Misc.random(5), 0);
player.getPlayerAssistant().requestUpdates();
player.getPacketSender().showOption(3, 0, "Challenge", 3);
player.getPacketSender().createPlayerHints(10, -1);
@@ -640,8 +639,8 @@ public class Dueling {
} else {
player.getOutStream().writeByte(item.amount);
}
if (item.id > GameConstants.ITEM_LIMIT || item.id < 0) {
item.id = GameConstants.ITEM_LIMIT;
if (item.id > Constants.ITEM_LIMIT || item.id < 0) {
item.id = Constants.ITEM_LIMIT;
}
player.getOutStream().writeWordBigEndianA(item.id + 1);
}
@@ -1,6 +1,6 @@
package com.rs2.game.content.minigames;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.GameEngine;
import com.rs2.event.CycleEvent;
import com.rs2.event.CycleEventContainer;
@@ -185,9 +185,9 @@ public class FightCaves {
public static void tzKihEffect(Client player, int i, int damage) {
if (NpcHandler.npcs[i].npcType == TZ_KIH) {
if (player != null) {
if (player.playerLevel[GameConstants.PRAYER] > 0) {
player.playerLevel[GameConstants.PRAYER] -= 1 + damage;
player.getPlayerAssistant().refreshSkill(GameConstants.PRAYER);
if (player.playerLevel[Constants.PRAYER] > 0) {
player.playerLevel[Constants.PRAYER] -= 1 + damage;
player.getPlayerAssistant().refreshSkill(Constants.PRAYER);
}
}
}
@@ -3,7 +3,7 @@ package com.rs2.game.content.minigames.castlewars;
import java.util.HashMap;
import java.util.Iterator;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.game.items.DeprecatedItems;
import com.rs2.game.players.Player;
import com.rs2.util.Misc;
@@ -109,7 +109,7 @@ public class CastleWars {
&& teamPlayer.absX < COLLAPSE_ROCKS[cave][1]
&& teamPlayer.absY > COLLAPSE_ROCKS[cave][2]
&& teamPlayer.absY < COLLAPSE_ROCKS[cave][3]) {
int dmg = teamPlayer.playerLevel[GameConstants.HITPOINTS];
int dmg = teamPlayer.playerLevel[Constants.HITPOINTS];
teamPlayer.handleHitMask(dmg);
teamPlayer.dealDamage(99);// 99 damage?
}
@@ -2,7 +2,7 @@ package com.rs2.game.content.minigames.magetrainingarena;
import java.util.Random;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.game.content.combat.magic.MagicData;
import com.rs2.game.content.combat.magic.MagicRequirements;
import com.rs2.game.content.music.sound.SoundList;
@@ -93,7 +93,7 @@ public class Alchemy {
player.getItemAssistant().deleteItem(995, coins);
player.alchemyPoints += points;
player.getItemAssistant().addItemToBank(995, toBank);
player.getPlayerAssistant().addSkillXP(bonusExp, GameConstants.MAGIC);
player.getPlayerAssistant().addSkillXP(bonusExp, Constants.MAGIC);
warned = false;
}
@@ -2,7 +2,7 @@ package com.rs2.game.content.minigames.magetrainingarena;
import java.util.Random;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.game.content.combat.magic.CastRequirements;
import com.rs2.game.content.combat.magic.Enchanting.EnchantSpell;
import com.rs2.game.items.DeprecatedItems;
@@ -24,7 +24,7 @@ public class Enchanting {
public void enchantItem(int itemID, int spellID) {
EnchantSpell spell = EnchantSpell.forId(spellID);
if (player.playerLevel[GameConstants.MAGIC] < spell.getLevelReq()) {
if (player.playerLevel[Constants.MAGIC] < spell.getLevelReq()) {
player.getPacketSender().sendMessage("You need a magic level of at least " + spell.getLevelReq() + " to cast this spell.");
return;
}
@@ -54,7 +54,7 @@ public class Enchanting {
player.enchantmentPoints += points;
player.getItemAssistant().replaceItem(itemID, 6902);
player.getPlayerAssistant().addSkillXP(spell.getXp() * 0.75, GameConstants.MAGIC);
player.getPlayerAssistant().addSkillXP(spell.getXp() * 0.75, Constants.MAGIC);
CastRequirements.deleteRunes(player, player.getEnchanting().getRequiredRunes(spell));
player.startAnimation(spell.getAnim());
player.gfx100(spell.getGFX());
@@ -2,11 +2,9 @@ package com.rs2.game.content.minigames.magetrainingarena;
import java.util.Random;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.game.content.combat.magic.MagicData;
import com.rs2.game.content.combat.magic.MagicRequirements;
import com.rs2.game.content.music.sound.SoundList;
import com.rs2.game.npcs.NpcHandler;
import com.rs2.game.players.Player;
import com.rs2.game.players.PlayerHandler;
import com.rs2.world.Boundary;
@@ -38,8 +36,8 @@ public class Graveyard {
player.boneDelay = System.currentTimeMillis();
player.startAnimation(MagicData.MAGIC_SPELLS[spellID][2]);
player.gfx100(MagicData.MAGIC_SPELLS[spellID][3]);
player.getPlayerAssistant().addSkillXP(MagicData.MAGIC_SPELLS[spellID][7], GameConstants.MAGIC);
player.getPlayerAssistant().refreshSkill(GameConstants.MAGIC);
player.getPlayerAssistant().addSkillXP(MagicData.MAGIC_SPELLS[spellID][7], Constants.MAGIC);
player.getPlayerAssistant().refreshSkill(Constants.MAGIC);
player.getPacketSender().sendShowTab(6);
player.getPacketSender().sendSound(SoundList.BONES_TO_BANNAS, 100, 0);
int amount = 0;
@@ -3,7 +3,7 @@ package com.rs2.game.content.minigames.magetrainingarena;
import java.awt.Point;
import java.util.Random;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.GameEngine;
import com.rs2.event.CycleEvent;
import com.rs2.event.CycleEventContainer;
@@ -133,8 +133,8 @@ public class Telekinetic {
player.gfx100(MagicData.MAGIC_SPELLS[51][3]);
player.getPlayerAssistant().createPlayersStillGfx(144, itemX, itemY, 0, 72);
player.getPlayerAssistant().createPlayersProjectile(player.getX(), player.getY(), offX, offY, 50, 70, MagicData.MAGIC_SPELLS[51][4], 50, 10, 0, 50);
player.getPlayerAssistant().addSkillXP(MagicData.MAGIC_SPELLS[51][7], GameConstants.MAGIC);
player.getPlayerAssistant().refreshSkill(GameConstants.MAGIC);
player.getPlayerAssistant().addSkillXP(MagicData.MAGIC_SPELLS[51][7], Constants.MAGIC);
player.getPlayerAssistant().refreshSkill(Constants.MAGIC);
player.stopMovement();
Maze maze = Maze.getMaze(itemX, itemY, player.heightLevel);
@@ -162,8 +162,8 @@ public class Telekinetic {
if (player.telekineticMazesSolved % 5 == 0) {
player.telekineticPoints += 8;
player.getItemAssistant().addOrDropItem(563, 10);
player.getPlayerAssistant().addSkillXP(1000, GameConstants.MAGIC);
player.getPlayerAssistant().refreshSkill(GameConstants.MAGIC);
player.getPlayerAssistant().addSkillXP(1000, Constants.MAGIC);
player.getPlayerAssistant().refreshSkill(Constants.MAGIC);
}
resetStatue(newPosition.x, newPosition.y);
@@ -3,7 +3,7 @@ package com.rs2.game.content.minigames.trawler;
import java.util.ArrayList;
import java.util.Random;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.GameEngine;
import com.rs2.event.CycleEvent;
import com.rs2.event.CycleEventContainer;
@@ -485,7 +485,7 @@ public class Trawler extends GroupMinigame {
return;
}
p.startAnimation(net_interaction);
if (skillCheck(p.playerLevel[GameConstants.CRAFTING], 1, 0)) {
if (skillCheck(p.playerLevel[Constants.CRAFTING], 1, 0)) {
p.getItemAssistant().deleteItem(rope, 1);
net_ripped = false;
playerUpdates();
@@ -662,24 +662,24 @@ public class Trawler extends GroupMinigame {
public int chanceByLevel(Player p, int fish) {
switch (fish) {
case 381:
if (p.playerLevel[GameConstants.FISHING] >= 81
&& p.playerLevel[GameConstants.FISHING] < 90) {
if (p.playerLevel[Constants.FISHING] >= 81
&& p.playerLevel[Constants.FISHING] < 90) {
return 5;
} else if (p.playerLevel[GameConstants.FISHING] >= 90
&& p.playerLevel[GameConstants.FISHING] < 99) {
} else if (p.playerLevel[Constants.FISHING] >= 90
&& p.playerLevel[Constants.FISHING] < 99) {
return 9;
} else if (p.playerLevel[GameConstants.FISHING] == 99) {
} else if (p.playerLevel[Constants.FISHING] == 99) {
return 13;
}
return 0;
case 395:
if (p.playerLevel[GameConstants.FISHING] >= 79
&& p.playerLevel[GameConstants.FISHING] < 85) {
if (p.playerLevel[Constants.FISHING] >= 79
&& p.playerLevel[Constants.FISHING] < 85) {
return 8;
} else if (p.playerLevel[GameConstants.FISHING] >= 85
&& p.playerLevel[GameConstants.FISHING] < 95) {
} else if (p.playerLevel[Constants.FISHING] >= 85
&& p.playerLevel[Constants.FISHING] < 95) {
return 13;
} else if (p.playerLevel[GameConstants.FISHING] >= 95) {
} else if (p.playerLevel[Constants.FISHING] >= 95) {
return 17;
}
return 0;
@@ -782,31 +782,31 @@ public class Trawler extends GroupMinigame {
int xpToAdd = 0;
if (manta > 0) {
toReturn.add(new GameItem(389, manta));
if (p.playerLevel[GameConstants.FISHING] >= 81) {
if (p.playerLevel[Constants.FISHING] >= 81) {
xpToAdd += (manta * 46);
}
}
if (turt > 0) {
toReturn.add(new GameItem(395, turt));
if (p.playerLevel[GameConstants.FISHING] >= 79) {
if (p.playerLevel[Constants.FISHING] >= 79) {
xpToAdd += (manta * 38);
}
}
if (lobs > 0) {
toReturn.add(new GameItem(377, lobs));
if (p.playerLevel[GameConstants.FISHING] >= 40) {
if (p.playerLevel[Constants.FISHING] >= 40) {
xpToAdd += (manta * 90);
}
}
if (swordFish > 0) {
toReturn.add(new GameItem(371, swordFish));
if (p.playerLevel[GameConstants.FISHING] >= 50) {
if (p.playerLevel[Constants.FISHING] >= 50) {
xpToAdd += (manta * 100);
}
}
if (junk > 0)
toReturn.add(new GameItem(685, junk));
p.getPlayerAssistant().addSkillXP(xpToAdd, GameConstants.FISHING);
p.getPlayerAssistant().addSkillXP(xpToAdd, Constants.FISHING);
return toReturn;
}
@@ -1,6 +1,6 @@
package com.rs2.game.content.quests;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.game.players.Player;
/**
@@ -34,7 +34,7 @@ public class QuestRewards {
questReward(player, "Knight's Sword Quest", "1 Quest Point", "12,725 Smithing XP", "", "", "", "", 0);
QUEST_NAME = "The Knight's Sword";
player.getPacketSender().sendString("@gre@" + QUEST_NAME + "", 7346);
player.getPlayerAssistant().addSkillXP(12725, GameConstants.SMITHING);
player.getPlayerAssistant().addSkillXP(12725, Constants.SMITHING);
player.questPoints ++;
player.knightS = 9;
}
@@ -46,7 +46,7 @@ public class QuestRewards {
player.getItemAssistant().addOrDropItem(1897, 1);
player.getItemAssistant().addOrDropItem(2003, 1);
player.getItemAssistant().addOrDropItem(1560, 1);
player.getPlayerAssistant().addSkillXP(1525, GameConstants.COOKING);
player.getPlayerAssistant().addSkillXP(1525, Constants.COOKING);
player.questPoints++;
player.gertCat = 7;
}
@@ -64,7 +64,7 @@ public class QuestRewards {
questReward(client, "Witch's Potion", "1 Quest Point", "325 Magic XP", "", "", "", "", 325);
QUEST_NAME = "Witch's Potion";
client.getPacketSender().sendString("@gre@" + QUEST_NAME + "", 7348);
client.getPlayerAssistant().addSkillXP(325, GameConstants.MAGIC);
client.getPlayerAssistant().addSkillXP(325, Constants.MAGIC);
client.questPoints++;
client.witchspot = 3;
}
@@ -81,7 +81,7 @@ public class QuestRewards {
questReward(client, "Restless Ghost", "1 Quest Point", "125 Prayer XP", "", "", "", "", 0);
QUEST_NAME = "Restless Ghost";
client.getPacketSender().sendString("@gre@" + QUEST_NAME + "", 7337);
client.getPlayerAssistant().addSkillXP(125, GameConstants.PRAYER);
client.getPlayerAssistant().addSkillXP(125, Constants.PRAYER);
client.questPoints++;
client.restGhost = 5;
}
@@ -90,7 +90,7 @@ public class QuestRewards {
questReward(player, "Vampyre Slayer", "3 Quest Points", "4,825 Attack XP", "", "", "", "", 0);
QUEST_NAME = "Vampyre Slayer";
player.getPacketSender().sendString("@gre@" + QUEST_NAME + "", 7347);
player.getPlayerAssistant().addSkillXP(4825, GameConstants.ATTACK);
player.getPlayerAssistant().addSkillXP(4825, Constants.ATTACK);
player.questPoints += 3;
player.vampSlayer = 5;
}
@@ -109,7 +109,7 @@ public class QuestRewards {
QUEST_NAME = "Sheep Shearer";
player.getPacketSender().sendString("@gre@" + QUEST_NAME + "", 7344);
player.getItemAssistant().addOrDropItem(995, 60);
player.getPlayerAssistant().addSkillXP(150, GameConstants.CRAFTING);
player.getPlayerAssistant().addSkillXP(150, Constants.CRAFTING);
player.questPoints++;
player.sheepShear = 2;
}
@@ -119,7 +119,7 @@ public class QuestRewards {
QUEST_NAME = "Doric's Quest";
player.getPacketSender().sendString("@gre@" + QUEST_NAME + "", 7336);
player.getItemAssistant().addOrDropItem(995, 180);
player.getPlayerAssistant().addSkillXP(1300, GameConstants.MINING);
player.getPlayerAssistant().addSkillXP(1300, Constants.MINING);
player.questPoints++;
player.doricQuest = 3;
}
@@ -129,7 +129,7 @@ public class QuestRewards {
QUEST_NAME = "Imp Catcher";
player.getPacketSender().sendString("@gre@" + QUEST_NAME + "", 7340);
player.getItemAssistant().addOrDropItem(1478, 1);
player.getPlayerAssistant().addSkillXP(875, GameConstants.MAGIC);
player.getPlayerAssistant().addSkillXP(875, Constants.MAGIC);
player.questPoints++;
player.impsC = 2;
}
@@ -139,7 +139,7 @@ public class QuestRewards {
QUEST_NAME = "Cook's Assistant";
player.getPacketSender().sendString("@gre@" + QUEST_NAME + "", 7333);
player.getItemAssistant().addOrDropItem(995, 500);
player.getPlayerAssistant().addSkillXP(300, GameConstants.COOKING);
player.getPlayerAssistant().addSkillXP(300, Constants.COOKING);
player.questPoints++;
player.cookAss = 3;
}
@@ -1,6 +1,6 @@
package com.rs2.game.content.random;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.game.players.PlayerHandler;
/**
@@ -23,7 +23,7 @@ public enum HolidayDrops {
// amount
public static int dropAmount() {
int amount = DROP_AMOUNT;
if (GameConstants.SERVER_DEBUG) {
if (Constants.SERVER_DEBUG) {
return amount * 60;
}
return amount;
@@ -1,15 +1,13 @@
package com.rs2.game.content.random;
import java.awt.Point;
import java.util.ArrayList;
import java.util.Random;
import com.rs2.Constants;
import org.apollo.cache.def.ItemDefinition;
import com.rs2.GameConstants;
import com.rs2.GameEngine;
import com.rs2.game.items.ItemConstants;
import com.rs2.game.objects.Objects;
import com.rs2.game.players.Player;
import com.rs2.game.players.PlayerHandler;
import com.rs2.world.Boundary;
@@ -121,7 +119,7 @@ public class PartyRoom {
}
public static void open(Player player) {
if (!GameConstants.PARTY_ROOM_DISABLED) {
if (!Constants.PARTY_ROOM_DISABLED) {
updateGlobal(player);
updateDeposit(player);
player.getItemAssistant().resetItems(5064); // Player inventory
@@ -1,6 +1,6 @@
package com.rs2.game.content.randomevents;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.game.npcs.NpcHandler;
import com.rs2.game.players.Player;
import com.rs2.util.Misc;
@@ -18,7 +18,7 @@ public class RiverTroll {
for (int[] element : riverTroll) {
if (hasRiverTroll == false) {
if (client.combatLevel >= element[0] && client.combatLevel <= element[1] && hasRiverTroll == false) {
NpcHandler.spawnNpc(client, element[2], client.absX + Misc.random(1), client.absY + Misc.random(1), client.heightLevel, 0, element[3], element[4], client.playerLevel[GameConstants.ATTACK] * 2, client.playerLevel[GameConstants.DEFENCE] * 2, true, false);
NpcHandler.spawnNpc(client, element[2], client.absX + Misc.random(1), client.absY + Misc.random(1), client.heightLevel, 0, element[3], element[4], client.playerLevel[Constants.ATTACK] * 2, client.playerLevel[Constants.DEFENCE] * 2, true, false);
client.randomActions = 0;
hasRiverTroll = true;
NpcHandler.npcs[element[2]].forceChat("Fishies be mine! Leave dem fishies!");
@@ -1,6 +1,6 @@
package com.rs2.game.content.randomevents;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.game.npcs.NpcHandler;
import com.rs2.game.players.Client;
import com.rs2.game.players.Player;
@@ -15,9 +15,9 @@ public class Swarm {
private static int checkStats(Player c, boolean bot) {
if (bot) {
return c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.HITPOINTS]) * 3;
return c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS]) * 3;
} else {
return c.getPlayerAssistant().getLevelForXP(c.playerXP[GameConstants.HITPOINTS]) * 2;
return c.getPlayerAssistant().getLevelForXP(c.playerXP[Constants.HITPOINTS]) * 2;
}
}
@@ -1,6 +1,6 @@
package com.rs2.game.content.randomevents;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.game.npcs.NpcHandler;
import com.rs2.game.players.Player;
import com.rs2.util.Misc;
@@ -14,7 +14,7 @@ public class TreeSpirit {
{ 91, 110, 442, 130, 5 }, { 111, 138, 443, 160, 7 }, };
private static int checkStats(Player p) {
return p.getPlayerAssistant().getLevelForXP(p.playerXP[GameConstants.HITPOINTS]) * 2;
return p.getPlayerAssistant().getLevelForXP(p.playerXP[Constants.HITPOINTS]) * 2;
}
public static void spawnTreeSpirit(Player p) {
@@ -23,7 +23,7 @@ public class TreeSpirit {
if (p.combatLevel >= element[0] && p.combatLevel <= element[1]) {
NpcHandler.spawnNpc(p, element[2], p.absX + Misc.random(1),
p.absY + Misc.random(1), p.heightLevel, 0, element[3],
element[4], checkStats(p), p.playerLevel[GameConstants.DEFENCE] * 2, true,
element[4], checkStats(p), p.playerLevel[Constants.DEFENCE] * 2, true,
false);
NpcHandler.npcs[element[2]]
.forceChat("Leave these woods and never return!");
@@ -2,7 +2,7 @@ package com.rs2.game.content.skills;
import java.util.Random;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.event.CycleEventHandler;
import com.rs2.game.content.skills.cooking.Cooking;
import com.rs2.game.content.skills.core.Fishing;
@@ -40,13 +40,13 @@ public class SkillHandler {
public static boolean isSkilling(Player player) {
if (player.playerSkilling[GameConstants.FISHING] || player.playerStun || player.playerSkilling[GameConstants.CRAFTING]
if (player.playerSkilling[Constants.FISHING] || player.playerStun || player.playerSkilling[Constants.CRAFTING]
|| player.playerIsFletching || player.isFletching || player.playerIsCooking
|| player.isMining || player.isWoodcutting || player.isSmithing
|| player.isSmelting || player.isSpinning || player.isPotionMaking
|| player.isPotCrafting || player.isFiremaking
|| player.playerSkilling[GameConstants.HERBLORE]
|| player.playerSkilling[GameConstants.SMITHING]) {
|| player.playerSkilling[Constants.HERBLORE]
|| player.playerSkilling[Constants.SMITHING]) {
return true;
}
return false;
@@ -64,7 +64,7 @@ public class SkillHandler {
player.isSmithing = false;
} else if (isSkilling[12]) {// crafting
isSkilling[12] = false;
} else if (player.isSmelting || player.playerSkilling[GameConstants.SMITHING]) {// smelting
} else if (player.isSmelting || player.playerSkilling[Constants.SMITHING]) {// smelting
Smelting.resetSmelting(player);
} else if (player.isCrafting) {
player.isCrafting = false;
@@ -83,7 +83,7 @@ public class SkillHandler {
public static void resetSkills(Player player) {// call when walking, dropping,
// picking up, leveling up
if (player.playerSkilling[GameConstants.FISHING]) {// fishing
if (player.playerSkilling[Constants.FISHING]) {// fishing
Fishing.resetFishing(player);
} else if (player.isMining) {// mining
Mining.resetMining(player);
@@ -95,7 +95,7 @@ public class SkillHandler {
player.isSmithing = false;
} else if (isSkilling[12]) {// crafting
isSkilling[12] = false;
} else if (player.isSmelting || player.playerSkilling[GameConstants.SMITHING]) {// smelting
} else if (player.isSmelting || player.playerSkilling[Constants.SMITHING]) {// smelting
Smelting.resetSmelting(player);
} else if (player.isCrafting) {
player.isCrafting = false;
@@ -1,6 +1,6 @@
package com.rs2.game.content.skills.agility;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.event.CycleEvent;
import com.rs2.event.CycleEventContainer;
import com.rs2.event.CycleEventHandler;
@@ -79,7 +79,7 @@ public class Agility {
if (player.stopPlayerPacket) {
return;
}
if (player.playerLevel[GameConstants.AGILITY] < 12) {
if (player.playerLevel[Constants.AGILITY] < 12) {
player.getDialogueHandler().sendStatement("You need 12 agility to use these stepping stones");
player.nextChat = 0;
return;
@@ -97,7 +97,7 @@ public class Agility {
@Override
public void stop() {
// c.getPlayerAssistant().addSkillXP(100, GameConstants.AGILITY);
// c.getPlayerAssistant().addSkillXP(100, Constants.AGILITY);
}
}, 1);
CycleEventHandler.getSingleton().addEvent(player, new CycleEvent() {
@@ -122,7 +122,7 @@ public class Agility {
@Override
public void stop() {
// c.getPlayerAssistant().addSkillXP(300, GameConstants.AGILITY);
// c.getPlayerAssistant().addSkillXP(300, Constants.AGILITY);
setAnimationBack(player);
player.stopPlayerPacket = false;
}
@@ -500,7 +500,7 @@ public class Agility {
public void lapFinished() {
if (agilityProgress[5]) {
c.getPlayerAssistant().addSkillXP(lapBonus, GameConstants.AGILITY);
c.getPlayerAssistant().addSkillXP(lapBonus, Constants.AGILITY);
c.getPacketSender().sendMessage("You received some bonus experience for completing the track!");
resetAgilityProgress();
}
@@ -550,7 +550,7 @@ public class Agility {
moveY = 2851;
moveH = 1;
walk(1, 0, 2753, -1);
c.getPlayerAssistant().addSkillXP(14, GameConstants.AGILITY);
c.getPlayerAssistant().addSkillXP(14, Constants.AGILITY);
agilityTimer = 2;
}
@@ -559,7 +559,7 @@ public class Agility {
moveY = 2832;
moveH = 1;
walk(-1, 0, 2753, -1);
c.getPlayerAssistant().addSkillXP(14, GameConstants.AGILITY);
c.getPlayerAssistant().addSkillXP(14, Constants.AGILITY);
agilityTimer = 2;
}
@@ -568,7 +568,7 @@ public class Agility {
moveY = 2832;
moveH = 1;
walk(-1, 0, 2753, -1);
c.getPlayerAssistant().addSkillXP(14, GameConstants.AGILITY);
c.getPlayerAssistant().addSkillXP(14, Constants.AGILITY);
agilityTimer = 2;
}
@@ -577,7 +577,7 @@ public class Agility {
moveY = 2841;
moveH = 2;
walk(0, 1, 2753, -1);
c.getPlayerAssistant().addSkillXP(14, GameConstants.AGILITY);
c.getPlayerAssistant().addSkillXP(14, Constants.AGILITY);
agilityTimer = 2;
}
@@ -586,7 +586,7 @@ public class Agility {
moveY = 2849;
moveH = 2;
walk(0, 1, 2753, -1);
c.getPlayerAssistant().addSkillXP(14, GameConstants.AGILITY);
c.getPlayerAssistant().addSkillXP(14, Constants.AGILITY);
agilityTimer = 2;
}
@@ -595,7 +595,7 @@ public class Agility {
moveY = 2849;
moveH = 2;
walk(1, 0, 2753, -1);
c.getPlayerAssistant().addSkillXP(14, GameConstants.AGILITY);
c.getPlayerAssistant().addSkillXP(14, Constants.AGILITY);
agilityTimer = 2;
}
@@ -604,7 +604,7 @@ public class Agility {
moveY = 2836;
moveH = 2;
walk(0, -1, 2753, -1);
c.getPlayerAssistant().addSkillXP(14, GameConstants.AGILITY);
c.getPlayerAssistant().addSkillXP(14, Constants.AGILITY);
agilityTimer = 2;
}
@@ -613,7 +613,7 @@ public class Agility {
moveY = 2834;
moveH = 2;
walk(-1, 0, 2753, -1);
c.getPlayerAssistant().addSkillXP(14, GameConstants.AGILITY);
c.getPlayerAssistant().addSkillXP(14, Constants.AGILITY);
agilityTimer = 2;
}
@@ -622,7 +622,7 @@ public class Agility {
moveY = 2847;
moveH = 3;
walk(0, 1, 2753, -1);
c.getPlayerAssistant().addSkillXP(14, GameConstants.AGILITY);
c.getPlayerAssistant().addSkillXP(14, Constants.AGILITY);
agilityTimer = 2;
}
@@ -631,7 +631,7 @@ public class Agility {
moveY = 2840;
moveH = 3;
walk(0, -1, 2753, -1);
c.getPlayerAssistant().addSkillXP(14, GameConstants.AGILITY);
c.getPlayerAssistant().addSkillXP(14, Constants.AGILITY);
}
if (agilityTimer > 0) {
@@ -650,7 +650,7 @@ public class Agility {
}
public boolean checkLevel(int objectId) {
if (getLevelRequired(objectId) > c.playerLevel[GameConstants.AGILITY]) {
if (getLevelRequired(objectId) > c.playerLevel[Constants.AGILITY]) {
c.getPacketSender().sendMessage(
"You need atleast " + getLevelRequired(objectId)
+ " agility to do this.");
@@ -1,6 +1,6 @@
package com.rs2.game.content.skills.agility;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.game.players.Player;
/**
@@ -13,7 +13,7 @@ public class AgilityShortcut {
private static final int WALK = 1, MOVE = 2, AGILITY = 3, DOWN = 4, UP = 5;
private static void handleAgility(Player player, int x, int y, int levelReq, int anim, int walk, String message) {
if (player.playerLevel[GameConstants.AGILITY] < levelReq) {
if (player.playerLevel[Constants.AGILITY] < levelReq) {
player.getPacketSender().sendMessage("You need " + levelReq + " agility to use this shortcut.");
return;
}
@@ -1,6 +1,6 @@
package com.rs2.game.content.skills.agility;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.event.CycleEvent;
import com.rs2.event.CycleEventContainer;
import com.rs2.event.CycleEventHandler;
@@ -38,7 +38,7 @@ public class ApeAtollAgility {
c.getAgility().walk(-2, 0,
c.getAgility().getAnimation(objectId), -1);
c.getPlayerAssistant().addSkillXP(
c.getAgility().getXp(objectId), GameConstants.AGILITY);
c.getAgility().getXp(objectId), Constants.AGILITY);
c.getAgility().resetAgilityProgress();
c.getAgility().agilityProgress[0] = true;
}
@@ -58,7 +58,7 @@ public class ApeAtollAgility {
"You managed to climb up the Tree.");
c.getAgility().climbUpTropicalTree(c.getX(), c.getY(), 2);
c.getPlayerAssistant().addSkillXP(
c.getAgility().getXp(objectId), GameConstants.AGILITY);
c.getAgility().getXp(objectId), Constants.AGILITY);
if (c.getAgility().agilityProgress[0]) {
c.getAgility().agilityProgress[1] = true;
}
@@ -81,7 +81,7 @@ public class ApeAtollAgility {
c.getAgility().walk(-5, 0,
c.getAgility().getAnimation(objectId), -1);
c.getPlayerAssistant().addSkillXP(
c.getAgility().getXp(objectId), GameConstants.AGILITY);
c.getAgility().getXp(objectId), Constants.AGILITY);
if (c.getAgility().agilityProgress[1]) {
c.getAgility().agilityProgress[2] = true;
}
@@ -101,7 +101,7 @@ public class ApeAtollAgility {
c.getAgility().walk(-5, 0,
c.getAgility().getAnimation(objectId), -1);
c.getPlayerAssistant().addSkillXP(
c.getAgility().getXp(objectId), GameConstants.AGILITY);
c.getAgility().getXp(objectId), Constants.AGILITY);
c.getPacketSender().sendMessage("You climb your way up");
if (c.getAgility().agilityProgress[2]) {
c.getAgility().agilityProgress[3] = true;
@@ -122,7 +122,7 @@ public class ApeAtollAgility {
c.getAgility().walk(1, 0,
c.getAgility().getAnimation(objectId), -1);
c.getPlayerAssistant().addSkillXP(
c.getAgility().getXp(objectId), GameConstants.AGILITY);
c.getAgility().getXp(objectId), Constants.AGILITY);
if (c.getAgility().agilityProgress[3]) {
c.getAgility().agilityProgress[4] = true;
}
@@ -161,7 +161,7 @@ public class ApeAtollAgility {
c.getAgility().tropicalTreeUpdate = 2;
c.getAgility().moveHeight = 0;
c.getPlayerAssistant().addSkillXP(c.getAgility().getXp(objectId),
GameConstants.AGILITY);
Constants.AGILITY);
if (c.getAgility().agilityProgress[4]) {
c.getAgility().agilityProgress[5] = true;
}
@@ -1,6 +1,6 @@
package com.rs2.game.content.skills.agility;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.event.CycleEvent;
import com.rs2.event.CycleEventContainer;
import com.rs2.event.CycleEventHandler;
@@ -29,7 +29,7 @@ public class BarbarianAgility {
c.getAgility().walk(0, -1,
c.getAgility().getAnimation(objectId), -1);
c.getPlayerAssistant().addSkillXP(
c.getAgility().getXp(objectId), GameConstants.AGILITY);
c.getAgility().getXp(objectId), Constants.AGILITY);
c.getAgility().resetAgilityProgress();
c.getAgility().agilityProgress[0] = true;
CycleEventHandler.getSingleton().addEvent(c, new CycleEvent() {
@@ -56,7 +56,7 @@ public class BarbarianAgility {
}
if (c.getAgility().hotSpot(2551, 3546)) {
c.getAgility().walk(-10, 0, c.getAgility().getAnimation(objectId), -1);
c.getPlayerAssistant().addSkillXP(c.getAgility().getXp(objectId), GameConstants.AGILITY);
c.getPlayerAssistant().addSkillXP(c.getAgility().getXp(objectId), Constants.AGILITY);
if (c.getAgility().agilityProgress[0]) {
c.getAgility().agilityProgress[1] = true;
}
@@ -72,7 +72,7 @@ public class BarbarianAgility {
if (c.absX == 2539 && c.absY > 3544 && c.absY < 3547) {
c.getAgility().climbUp(c.getX() - 1, c.getY(), 1);
c.getPlayerAssistant().addSkillXP(c.getAgility().getXp(objectId),
GameConstants.AGILITY);
Constants.AGILITY);
if (c.getAgility().agilityProgress[1]) {
c.getAgility().agilityProgress[2] = true;
}
@@ -90,7 +90,7 @@ public class BarbarianAgility {
c.getAgility().walk(-4, 0,
c.getAgility().getAnimation(objectId), -1);
c.getPlayerAssistant().addSkillXP(
c.getAgility().getXp(objectId), GameConstants.AGILITY);
c.getAgility().getXp(objectId), Constants.AGILITY);
if (c.getAgility().agilityProgress[2]) {
c.getAgility().agilityProgress[3] = true;
}
@@ -100,7 +100,7 @@ public class BarbarianAgility {
return true;
case BARBARIAN_LADDER_OBJECT:
if (c.playerLevel[GameConstants.AGILITY] < 35 && c.objectX != 2776
if (c.playerLevel[Constants.AGILITY] < 35 && c.objectX != 2776
&& c.objectY != 3121) {
c.getPacketSender().sendMessage(
"You need 35 agility to use this ladder.");
@@ -123,7 +123,7 @@ public class BarbarianAgility {
c.getAgility().walk(2, 0,
c.getAgility().getAnimation(objectId), -1);
c.getPlayerAssistant().addSkillXP(
c.getAgility().getXp(objectId), GameConstants.AGILITY);
c.getAgility().getXp(objectId), Constants.AGILITY);
if (c.getAgility().agilityProgress[4]) {
c.getAgility().agilityProgress[5] = true;
}
@@ -137,7 +137,7 @@ public class BarbarianAgility {
c.getAgility().walk(3, 0,
c.getAgility().getAnimation(objectId), -1);
c.getPlayerAssistant().addSkillXP(
c.getAgility().getXp(objectId), GameConstants.AGILITY);
c.getAgility().getXp(objectId), Constants.AGILITY);
} else if (c.absX == 2542 && c.absY == 3553) {
c.getAgility().walk(1, 0,
c.getAgility().getAnimation(objectId), -1);
@@ -146,7 +146,7 @@ public class BarbarianAgility {
c.getAgility().walk(2, 0,
c.getAgility().getAnimation(objectId), -1);
c.getPlayerAssistant().addSkillXP(
c.getAgility().getXp(objectId), GameConstants.AGILITY);
c.getAgility().getXp(objectId), Constants.AGILITY);
return true;
}
}
@@ -1,6 +1,6 @@
package com.rs2.game.content.skills.agility;
import com.rs2.GameConstants;
import com.rs2.Constants;
import com.rs2.game.players.Player;
public class GnomeAgility {
@@ -27,14 +27,14 @@ public class GnomeAgility {
} else if (c.absX == 2474 && c.absY > 3429 && c.absY < 3436) {
c.getPlayerAssistant().movePlayer(2474, 3429, 0);
}
c.getPlayerAssistant().addSkillXP(c.getAgility().getXp(objectId), GameConstants.AGILITY);
c.getPlayerAssistant().addSkillXP(c.getAgility().getXp(objectId), Constants.AGILITY);
c.getAgility().resetAgilityProgress();
c.getAgility().agilityProgress[0] = true;
return true;
case NET1_OBJECT:
c.getAgility().climbUp(c.getX(), c.getY() - 2, 1);
c.getPlayerAssistant().addSkillXP(c.getAgility().getXp(objectId), GameConstants.AGILITY);
c.getPlayerAssistant().addSkillXP(c.getAgility().getXp(objectId), Constants.AGILITY);
if (c.getAgility().agilityProgress[0]) {
c.getAgility().agilityProgress[1] = true;
}
@@ -42,7 +42,7 @@ public class GnomeAgility {
case TREE_OBJECT:
c.getAgility().climbUp(c.getX(), c.getY() - 3, 2);
c.getPlayerAssistant().addSkillXP(c.getAgility().getXp(objectId), GameConstants.AGILITY);
c.getPlayerAssistant().addSkillXP(c.getAgility().getXp(objectId), Constants.AGILITY);
if (c.getAgility().agilityProgress[1]) {
c.getAgility().agilityProgress[2] = true;
}
@@ -58,7 +58,7 @@ public class GnomeAgility {
// cheat
c.getPlayerAssistant().movePlayer(2483, 3420, 2);
}
c.getPlayerAssistant().addSkillXP(c.getAgility().getXp(objectId), GameConstants.AGILITY);
c.getPlayerAssistant().addSkillXP(c.getAgility().getXp(objectId), Constants.AGILITY);
if (c.getAgility().agilityProgress[2]) {
c.getAgility().agilityProgress[3] = true;
}
@@ -66,7 +66,7 @@ public class GnomeAgility {
case TREE_BRANCH_OBJECT:
c.getAgility().climbDown(c.getX(), c.getY(), 0);
c.getPlayerAssistant().addSkillXP(c.getAgility().getXp(objectId), GameConstants.AGILITY);
c.getPlayerAssistant().addSkillXP(c.getAgility().getXp(objectId), Constants.AGILITY);
if (c.getAgility().agilityProgress[3]) {
c.getAgility().agilityProgress[4] = true;
}
@@ -78,7 +78,7 @@ public class GnomeAgility {
}
if (c.getY() == 3425 && System.currentTimeMillis() - clickTimer > 1800) {
c.getAgility().climbUp(c.getX(), c.getY() + 2, 0);
c.getPlayerAssistant().addSkillXP(c.getAgility().getXp(objectId), GameConstants.AGILITY);
c.getPlayerAssistant().addSkillXP(c.getAgility().getXp(objectId), Constants.AGILITY);
clickTimer = System.currentTimeMillis();
if (c.getAgility().agilityProgress[4]) {
c.getAgility().agilityProgress[5] = true;
@@ -90,12 +90,12 @@ public class GnomeAgility {
if (c.getAgility().hotSpot(2484, 3430)) {
c.getAgility().walk(0, 7, c.getAgility().getAnimation(objectId), 748);
if (c.getAgility().agilityProgress[5]) {
c.getPlayerAssistant().addSkillXP(c.getAgility().getXp(objectId), GameConstants.AGILITY);
c.getPlayerAssistant().addSkillXP(c.getAgility().getXp(objectId), Constants.AGILITY);
c.getAgility().lapBonus = 1400 / 30;
c.getAgility().lapFinished();
} else {
c.getPlayerAssistant().addSkillXP(
c.getAgility().getXp(objectId), GameConstants.AGILITY);
c.getAgility().getXp(objectId), Constants.AGILITY);
}
c.getAgility().resetAgilityProgress();
} else if (c.absY > 3430 && c.absY < 3436 && System.currentTimeMillis() - clickTimer > 1800) {
@@ -108,12 +108,12 @@ public class GnomeAgility {
c.getAgility().walk(0, 7, c.getAgility().getAnimation(objectId), 748);
if (c.getAgility().agilityProgress[5]) {
c.getPlayerAssistant().addSkillXP(
c.getAgility().getXp(objectId), GameConstants.AGILITY);
c.getAgility().getXp(objectId), Constants.AGILITY);
c.getAgility().lapBonus = 1400 / 30;
c.getAgility().lapFinished();
} else {
c.getPlayerAssistant().addSkillXP(
c.getAgility().getXp(objectId), GameConstants.AGILITY);
c.getAgility().getXp(objectId), Constants.AGILITY);
}
c.getAgility().resetAgilityProgress();
} else if (c.absY > 3430 && c.absY < 3436) {

Some files were not shown because too many files have changed in this diff Show More