Update server skill magic numbers (#502)

This commit is contained in:
Danial
2021-09-24 00:34:58 +12:00
committed by GitHub
parent 06b509c4d0
commit d30e833dd8
91 changed files with 856 additions and 794 deletions
@@ -1,5 +1,6 @@
package com.rs2.game.items;
import com.rs2.GameConstants;
import com.rs2.game.content.skills.cooking.Cooking;
import com.rs2.game.content.skills.crafting.BattleStaffs;
import com.rs2.game.content.skills.crafting.GemCutting;
@@ -177,19 +178,19 @@ public class UseItem {
LogCutting.wolfBoneArrow(player);
}
if (itemUsed == 771 && useWith == 946
&& player.playerLevel[player.playerCrafting] > 30) {
&& player.playerLevel[GameConstants.CRAFTING] > 30) {
player.getItemAssistant().deleteItem(771, 1);
player.getItemAssistant().addItem(772, 1);
} else if (player.playerLevel[player.playerCrafting] < 31 && itemUsed == 771
} else if (player.playerLevel[GameConstants.CRAFTING] < 31 && itemUsed == 771
&& useWith == 946) {
player.getPacketSender().sendMessage(
"You need 31 crafting to make this.");
}
if (itemUsed == 946 && useWith == 771
&& player.playerLevel[player.playerCrafting] > 30) {
&& player.playerLevel[GameConstants.CRAFTING] > 30) {
player.getItemAssistant().deleteItem(771, 1);
player.getItemAssistant().addItem(772, 1);
} else if (player.playerLevel[player.playerCrafting] < 31 && itemUsed == 946
} else if (player.playerLevel[GameConstants.CRAFTING] < 31 && itemUsed == 946
&& useWith == 771) {
player.getPacketSender().sendMessage(
"You need 31 crafting to make this.");
@@ -241,12 +242,12 @@ public class UseItem {
player.getItemAssistant().deleteItem(4548, 1);
}
if (itemUsed == 1095 && useWith == 2370 || itemUsed == 2370
&& useWith == 1095 && player.playerLevel[player.playerCrafting] > 43) {// chaps
&& useWith == 1095 && player.playerLevel[GameConstants.CRAFTING] > 43) {// chaps
player.getItemAssistant().deleteItem(2370, 1);
player.getItemAssistant().deleteItem(1095, 1);
player.getItemAssistant().addItem(1097, 1);
player.getPlayerAssistant().addSkillXP(42, player.playerCrafting);
} else if (itemUsed == 1095 && useWith == 2370 || itemUsed == 2370 && useWith == 1095 && player.playerLevel[player.playerCrafting] < 44) {
player.getPlayerAssistant().addSkillXP(42, GameConstants.CRAFTING);
} else if (itemUsed == 1095 && useWith == 2370 || itemUsed == 2370 && useWith == 1095 && player.playerLevel[GameConstants.CRAFTING] < 44) {
player.getPacketSender().sendMessage("You need 44 crafting to make this.");
}
if (itemUsed == 946 && useWith == 1963 || itemUsed == 1963 && useWith == 946) {
@@ -259,12 +260,12 @@ public class UseItem {
player.getItemAssistant().addItem(1975, 1);
player.getPacketSender().sendMessage("You slice your chocolate bar.");
}
if (itemUsed == 1129 && useWith == 2370 || itemUsed == 2370 && useWith == 1129 && player.playerLevel[player.playerCrafting] > 40) {// body
if (itemUsed == 1129 && useWith == 2370 || itemUsed == 2370 && useWith == 1129 && player.playerLevel[GameConstants.CRAFTING] > 40) {// body
player.getItemAssistant().deleteItem(2370, 1);
player.getItemAssistant().deleteItem(1129, 1);
player.getItemAssistant().addItem(1133, 1);
player.getPlayerAssistant().addSkillXP(40, player.playerCrafting);
} else if (itemUsed == 1129 && useWith == 2370 || itemUsed == 2370 && useWith == 1129 && player.playerLevel[player.playerCrafting] < 41) {
player.getPlayerAssistant().addSkillXP(40, GameConstants.CRAFTING);
} else if (itemUsed == 1129 && useWith == 2370 || itemUsed == 2370 && useWith == 1129 && player.playerLevel[GameConstants.CRAFTING] < 41) {
player.getPacketSender().sendMessage("You need 41 crafting to make this.");
}
if (itemUsed == 4593 && useWith == 4591 || useWith == 4591 && itemUsed == 4593) {
@@ -369,11 +370,11 @@ public class UseItem {
if (itemUsed == 1987 && useWith == 1937 || itemUsed == 1937
&& useWith == 1987) {
if (player.playerLevel[player.playerCooking] >= 35) {
if (player.playerLevel[GameConstants.COOKING] >= 35) {
player.getItemAssistant().addItem(1993, 1);
player.getItemAssistant().deleteItem(1937, 1);
player.getItemAssistant().deleteItem(1987, 1);
player.getPlayerAssistant().addSkillXP(200, player.playerCooking);
player.getPlayerAssistant().addSkillXP(200, GameConstants.COOKING);
} else {
player.getPacketSender().sendMessage(
"You need grapes and a jug of water to make wine.");