Commit ea270642 authored by Marwolf's avatar Marwolf 💬

Merge branch 'runecrafting' into '2.0.0'

Runecrafting

See merge request !2235
parents ce8f5813 98c67ad2
......@@ -211,7 +211,7 @@ public final class ExperienceConfigInterface {
experienceConfig.clearList(experienceConfigScroll);
for (int i = 0; i < skillNames.length; i++) {
for (int i = 0; i < mudclient.skillCount; i++) {
experienceConfig.setListEntry(experienceConfigScroll, i, "@whi@" + skillNames[i], 0, (String) null, (String) null);
}
......@@ -281,4 +281,4 @@ public final class ExperienceConfigInterface {
public void setVisible(boolean visible) {
this.visible = visible;
}
}
\ No newline at end of file
}
......@@ -2,13 +2,12 @@ package com.openrsc.interfaces.misc;
import com.openrsc.client.entityhandling.EntityHandler;
import com.openrsc.client.entityhandling.defs.ItemDef;
import java.util.ArrayList;
import orsc.graphics.gui.Panel;
import orsc.graphics.two.GraphicsController;
import orsc.mudclient;
import java.util.ArrayList;
public final class SkillGuideInterface {
public int curTab = 0;
......@@ -842,6 +841,56 @@ public final class SkillGuideInterface {
skillItems.add(new SkillItem(714, "82", "Yanille Agility Dungeon"));
}
}
if (mc.getSkillGuideChosen().equalsIgnoreCase("Runecrafting")) {
if (curTab == 0) {
skillItems.add(new SkillItem(33, "1","Air Rune"));
skillItems.add(new SkillItem(35, "1","Mind Rune"));
skillItems.add(new SkillItem(32, "5","Water Rune"));
skillItems.add(new SkillItem(34, "9","Earth Rune"));
skillItems.add(new SkillItem(31, "14","Fire Rune"));
skillItems.add(new SkillItem(36, "20","Body Rune"));
skillItems.add(new SkillItem(46, "27","Cosmic Rune"));
skillItems.add(new SkillItem(41, "35","Chaos Rune"));
skillItems.add(new SkillItem(40, "44","Nature Rune"));
//skillItems.add(new SkillItem(42, "54","Law Rune"));
//skillItems.add(new SkillItem(38, "65","Death Rune"));
//skillItems.add(new SkillItem(619, "77","Blood Rune"));
} else if (curTab == 1) {
skillItems.add(new SkillItem(33, "11","Air Rune x2"));
skillItems.add(new SkillItem(35, "14","Mind Rune x2"));
skillItems.add(new SkillItem(32, "19","Water Rune x2"));
skillItems.add(new SkillItem(33, "22","Air Rune x3"));
skillItems.add(new SkillItem(34, "26","Earth Rune x2"));
skillItems.add(new SkillItem(35, "28","Mind Rune x3"));
skillItems.add(new SkillItem(33, "33","Air Rune x4"));
skillItems.add(new SkillItem(31, "35","Fire Rune x2"));
skillItems.add(new SkillItem(32, "38","Water Rune x3"));
skillItems.add(new SkillItem(35, "42","Mind Rune x4"));
skillItems.add(new SkillItem(33, "44","Air Rune x5"));
skillItems.add(new SkillItem(36, "46","Body Rune x2"));
skillItems.add(new SkillItem(34, "52","Earth Rune x3"));
skillItems.add(new SkillItem(33, "55","Air Rune x6"));
skillItems.add(new SkillItem(35, "56","Mind Rune x5"));
skillItems.add(new SkillItem(32, "57","Water Rune x4"));
skillItems.add(new SkillItem(46, "59","Cosmic Rune x2"));
skillItems.add(new SkillItem(33, "66","Air Rune x7"));
skillItems.add(new SkillItem(35, "70","Mind Rune x6"));
skillItems.add(new SkillItem(31, "70","Fire Rune x3"));
skillItems.add(new SkillItem(41, "74","Chaos Rune x2"));
skillItems.add(new SkillItem(32, "76","Water Rune x5"));
skillItems.add(new SkillItem(33, "77","Air Rune x8"));
skillItems.add(new SkillItem(34, "78","Earth Rune x4"));
skillItems.add(new SkillItem(40, "82","Nature Rune x2"));
skillItems.add(new SkillItem(35, "84","Mind Rune x7"));
skillItems.add(new SkillItem(33, "88","Air Rune x9"));
//skillItems.add(new SkillItem(42, "91","Law Rune x2"));
skillItems.add(new SkillItem(36, "92","Body Rune x3"));
skillItems.add(new SkillItem(32, "95","Water Rune x6"));
skillItems.add(new SkillItem(35, "98","Mind Rune x8"));
skillItems.add(new SkillItem(33, "99","Air Rune x10"));
}
}
}
public boolean isVisible() {
......
......@@ -29,9 +29,9 @@ public final class ClanInterface {
public int clanName_field;
public int clanTag_field;
public int clanSearch_field;
public int selectedClanMate = -1;
public int selectedClanInSearch = -1;
public ArrayList<ClanResult> readClans;
private int selectedClanMate = -1;
private int selectedClanInSearch = -1;
private ArrayList<ClanResult> readClans;
private boolean visible;
private boolean menu_visible = false;
......@@ -895,4 +895,4 @@ public final class ClanInterface {
}
};
}
\ No newline at end of file
}
......@@ -16,8 +16,8 @@ public class Config {
public static String WELCOME_TEXT = "You need a members account to use this server";
public static String SERVER_IP = null; // Modify this to override "Cache/ip.txt"
public static int SERVER_PORT; // Modify SERVER_IP above to override "Cache/port.txt" with this value
public static final int CLIENT_VERSION = 3;
private static final int CACHE_VERSION = 3;
public static final int CLIENT_VERSION = 4;
private static final int CACHE_VERSION = 4;
public static boolean MEMBER_WORLD = false;
public static boolean DISPLAY_LOGO_SPRITE = false;
private static final boolean CUSTOM_CACHE_DIR_ENABLED = false;
......@@ -44,7 +44,7 @@ public class Config {
public static final String DL_URL = "androidcheck.openrsc.com"; // needs to be set as public for the Android client to use
public static final String ANDROID_DOWNLOAD_PATH = "https://" + DL_URL + "/downloads/";
public static final String CACHE_URL = "https://" + DL_URL + "/downloads/cache/";
public static final int ANDROID_CLIENT_VERSION = 44; // Important! Depends on web server android_version.txt to check for an updated version
public static final int ANDROID_CLIENT_VERSION = 45; // Important! Depends on web server android_version.txt to check for an updated version
public static boolean F_SHOWING_KEYBOARD = false;
public static boolean C_HOLD_AND_CHOOSE = true;
public static int C_LONG_PRESS_TIMER = 5; // default hold timer setting
......@@ -76,6 +76,7 @@ public class Config {
public static boolean S_WANT_BANK_NOTES = false;
public static boolean S_WANT_CERT_DEPOSIT = false;
public static boolean S_CUSTOM_FIREMAKING = false;
public static boolean S_WANT_RUNECRAFTING = false;
public static boolean S_WANT_DROP_X = false;
public static boolean S_WANT_EXP_INFO = false;
public static boolean S_WANT_WOODCUTTING_GUILD = false;
......@@ -114,6 +115,7 @@ public class Config {
public static boolean S_LENIENT_CONTACT_DETAILS = false;
public static boolean S_WANT_FATIGUE = true;
public static boolean S_WANT_CUSTOM_SPRITES = false;
public static boolean S_WANT_CUSTOM_LANDSCAPE = false;
public static boolean S_WANT_PLAYER_COMMANDS = false;
public static boolean S_WANT_PETS = false;
public static int S_MAX_WALKING_SPEED = 1;
......@@ -122,6 +124,7 @@ public class Config {
public static boolean S_FISHING_SPOTS_DEPLETABLE = false;
public static boolean S_PROPER_MAGIC_TREE_NAME = false;
public static void set(String key, Object value) {
prop.setProperty(key, value.toString());
}
......
......@@ -212,7 +212,7 @@ public class PacketHandler {
loadStats();
loadExperience();
loadQuestPoints();
mc.updateQuestRewards();
// Set Death Screen Timeout
} else if (opcode == 83) mc.setDeathScreenTimeout(250);
......@@ -744,7 +744,7 @@ public class PacketHandler {
int wantDropX, wantExpInfo, wantWoodcuttingGuild, wantFixedOverheadChat, wantPets, showUnidentifiedHerbNames;
int wantDecanting, wantCertsToBank, wantCustomRankDisplay, wantRightClickBank, wantPlayerCommands;
int getFPS, wantEmail, wantRegistrationLimit, allowResize, lenientContactDetails, wantFatigue, wantCustomSprites;
int fishingSpotsDepletable, properMagicTreeName;
int fishingSpotsDepletable, properMagicTreeName, wantRunecrafting, wantCustomLandscape;
String logoSpriteID;
if (!mc.gotInitialConfigs) {
......@@ -807,6 +807,8 @@ public class PacketHandler {
wantQuestStartedIndicator = this.getClientStream().getUnsignedByte(); // 57
fishingSpotsDepletable = this.getClientStream().getUnsignedByte(); //58
properMagicTreeName = this.getClientStream().getUnsignedByte(); //59
wantRunecrafting = this.getClientStream().getUnsignedByte(); //60
wantCustomLandscape = this.getClientStream().getUnsignedByte(); //61
} else {
serverName = packetsIncoming.readString(); // 1
serverNameWelcome = packetsIncoming.readString(); // 2
......@@ -867,6 +869,8 @@ public class PacketHandler {
wantQuestStartedIndicator = packetsIncoming.getUnsignedByte(); // 57
fishingSpotsDepletable = packetsIncoming.getUnsignedByte(); //58
properMagicTreeName = packetsIncoming.getUnsignedByte(); //59
wantRunecrafting = packetsIncoming.getUnsignedByte(); //60
wantCustomLandscape = packetsIncoming.getUnsignedByte(); //61
}
if (Config.DEBUG) {
......@@ -929,7 +933,9 @@ public class PacketHandler {
"\nS_SHOW_UNIDENTIFIED_HERB_NAMES " + showUnidentifiedHerbNames + // 56
"\nS_WANT_QUEST_STARTED_INDICATOR " + wantQuestStartedIndicator + // 57
"\nS_FISHING_SPOTS_DEPLETABLE " + fishingSpotsDepletable + // 58
"\nS_PROPER_MAGIC_TREE_NAME " + properMagicTreeName // 59
"\nS_PROPER_MAGIC_TREE_NAME " + properMagicTreeName +// 59
"\nS_WANT_RUNECRAFTING " + wantRunecrafting +// 60
"\nS_WANT_CUSTOM_LANDSCAPE " + wantCustomLandscape// 61
);
}
......@@ -994,6 +1000,8 @@ public class PacketHandler {
props.setProperty("S_WANT_QUEST_STARTED_INDICATOR", wantQuestStartedIndicator == 1 ? "true" : "false"); // 57
props.setProperty("S_FISHING_SPOTS_DEPLETABLE", fishingSpotsDepletable == 1 ? "true" : "false"); //58
props.setProperty("S_PROPER_MAGIC_TREE_NAME", properMagicTreeName == 1 ? "true" : "false"); //59
props.setProperty("S_WANT_RUNECRAFTING", wantRunecrafting == 1 ? "true" : "false"); //60
props.setProperty("S_WANT_CUSTOM_LANDSCAPE", wantCustomLandscape == 1 ? "true" : "false"); //61
Config.updateServerConfiguration(props);
......@@ -1451,17 +1459,17 @@ public class PacketHandler {
}
private void loadStats() {
for (int stat = 0; stat < 18; ++stat) {
for (int stat = 0; stat < mudclient.skillCount; ++stat) {
mc.setPlayerStatCurrent(stat, packetsIncoming.getUnsignedByte());
}
for (int stat = 0; stat < 18; ++stat) {
for (int stat = 0; stat < mudclient.skillCount; ++stat) {
mc.setPlayerStatBase(stat, packetsIncoming.getUnsignedByte());
}
}
private void loadExperience() {
for (int skill = 0; skill < 18; ++skill) {
for (int skill = 0; skill < mudclient.skillCount; ++skill) {
mc.setPlayerExperience(skill, packetsIncoming.get32() / 4);
}
}
......
......@@ -3,6 +3,10 @@ package orsc.graphics.three;
import com.openrsc.client.entityhandling.EntityHandler;
import com.openrsc.client.model.Sector;
import com.openrsc.data.DataConversions;
import orsc.Config;
import orsc.graphics.two.GraphicsController;
import orsc.util.FastMath;
import orsc.util.GenUtil;
import java.io.BufferedInputStream;
import java.io.File;
......@@ -11,11 +15,6 @@ import java.util.Objects;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import orsc.Config;
import orsc.graphics.two.GraphicsController;
import orsc.util.FastMath;
import orsc.util.GenUtil;
public final class World {
private final int[] colorToResource = new int[256];
......@@ -76,7 +75,10 @@ public final class World {
sectors = new Sector[4];
try {
tileArchive = new ZipFile(new File(Config.F_CACHE_DIR + File.separator + "Landscape.orsc"));
if (Config.S_WANT_CUSTOM_LANDSCAPE)
tileArchive = new ZipFile(new File(Config.F_CACHE_DIR + File.separator + "Custom_Landscape.orsc"));
else
tileArchive = new ZipFile(new File(Config.F_CACHE_DIR + File.separator + "Authentic_Landscape.orsc"));
} catch (Exception e) {
e.printStackTrace();
System.exit(1);
......
......@@ -139,6 +139,7 @@ CREATE TABLE IF NOT EXISTS `openrsc_curstats` (
`cur_herblaw` tinyint(3) UNSIGNED NOT NULL DEFAULT 1,
`cur_agility` tinyint(3) UNSIGNED NOT NULL DEFAULT 1,
`cur_thieving` tinyint(3) UNSIGNED NOT NULL DEFAULT 1,
`cur_runecraft` tinyint(3) UNSIGNED NOT NUTT DEFAULT 1,
PRIMARY KEY (`id`),
KEY `playerID` (`playerID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
......@@ -176,6 +177,7 @@ CREATE TABLE IF NOT EXISTS `openrsc_experience` (
`exp_herblaw` int(9) UNSIGNED NOT NULL DEFAULT 0,
`exp_agility` int(9) UNSIGNED NOT NULL DEFAULT 0,
`exp_thieving` int(9) UNSIGNED NOT NULL DEFAULT 0,
`exp_runecraft` int(9) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY `playerID` (`playerID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
......
This diff is collapsed.
No preview for this file type
......@@ -206,7 +206,7 @@ public final class ExperienceConfigInterface {
experienceConfig.clearList(experienceConfigScroll);
for (int i = 0; i < skillNames.length; i++) {
for (int i = 0; i < mudclient.skillCount; i++) {
experienceConfig.setListEntry(experienceConfigScroll, i, "@whi@" + skillNames[i], 0, (String) null, (String) null);
}
......
......@@ -841,6 +841,55 @@ public final class SkillGuideInterface {
skillItems.add(new SkillItem(714, "82", "Yanille Agility Dungeon"));
}
}
if (mc.getSkillGuideChosen().equals("Runecrafting")) {
if (curTab == 0) {
skillItems.add(new SkillItem(33, "1","Air Rune"));
skillItems.add(new SkillItem(35, "1","Mind Rune"));
skillItems.add(new SkillItem(32, "5","Water Rune"));
skillItems.add(new SkillItem(34, "9","Earth Rune"));
skillItems.add(new SkillItem(31, "14","Fire Rune"));
skillItems.add(new SkillItem(36, "20","Body Rune"));
skillItems.add(new SkillItem(46, "27","Cosmic Rune"));
skillItems.add(new SkillItem(41, "35","Chaos Rune"));
skillItems.add(new SkillItem(40, "44","Nature Rune"));
//skillItems.add(new SkillItem(42, "54","Law Rune"));
//skillItems.add(new SkillItem(38, "65","Death Rune"));
//skillItems.add(new SkillItem(619, "77","Blood Rune"));
} else if (curTab == 1) {
skillItems.add(new SkillItem(33, "11","Air Rune x2"));
skillItems.add(new SkillItem(35, "14","Mind Rune x2"));
skillItems.add(new SkillItem(32, "19","Water Rune x2"));
skillItems.add(new SkillItem(33, "22","Air Rune x3"));
skillItems.add(new SkillItem(34, "26","Earth Rune x2"));
skillItems.add(new SkillItem(35, "28","Mind Rune x3"));
skillItems.add(new SkillItem(33, "33","Air Rune x4"));
skillItems.add(new SkillItem(31, "35","Fire Rune x2"));
skillItems.add(new SkillItem(32, "38","Water Rune x3"));
skillItems.add(new SkillItem(35, "42","Mind Rune x4"));
skillItems.add(new SkillItem(33, "44","Air Rune x5"));
skillItems.add(new SkillItem(36, "46","Body Rune x2"));
skillItems.add(new SkillItem(34, "52","Earth Rune x3"));
skillItems.add(new SkillItem(33, "55","Air Rune x6"));
skillItems.add(new SkillItem(35, "56","Mind Rune x5"));
skillItems.add(new SkillItem(32, "57","Water Rune x4"));
skillItems.add(new SkillItem(46, "59","Cosmic Rune x2"));
skillItems.add(new SkillItem(33, "66","Air Rune x7"));
skillItems.add(new SkillItem(35, "70","Mind Rune x6"));
skillItems.add(new SkillItem(31, "70","Fire Rune x3"));
skillItems.add(new SkillItem(41, "74","Chaos Rune x2"));
skillItems.add(new SkillItem(32, "76","Water Rune x5"));
skillItems.add(new SkillItem(33, "77","Air Rune x8"));
skillItems.add(new SkillItem(34, "78","Earth Rune x4"));
skillItems.add(new SkillItem(40, "82","Nature Rune x2"));
skillItems.add(new SkillItem(35, "84","Mind Rune x7"));
skillItems.add(new SkillItem(33, "88","Air Rune x9"));
//skillItems.add(new SkillItem(42, "91","Law Rune x2"));
skillItems.add(new SkillItem(36, "92","Body Rune x3"));
skillItems.add(new SkillItem(32, "95","Water Rune x6"));
skillItems.add(new SkillItem(35, "98","Mind Rune x8"));
skillItems.add(new SkillItem(33, "99","Air Rune x10"));
}
}
}
public boolean isVisible() {
......
......@@ -46,7 +46,7 @@ public final class ClanInterface {
private String[] clanMateTable = {"Username", "Rank", "Kills", "Deaths", "Ratio"};
private Menu rightClickMenu;
ClanInterface(mudclient mc) {
public ClanInterface(mudclient mc) {
this.mc = mc;
width = 408;
......
......@@ -16,8 +16,8 @@ public class Config {
public static String WELCOME_TEXT = "You need a members account to use this server";
public static String SERVER_IP = null; // Modify this to override "Cache/ip.txt"
public static int SERVER_PORT; // Modify SERVER_IP above to override "Cache/port.txt" with this value
public static final int CLIENT_VERSION = 3;
private static final int CACHE_VERSION = 3;
public static final int CLIENT_VERSION = 4;
private static final int CACHE_VERSION = 4;
public static boolean MEMBER_WORLD = false;
public static boolean DISPLAY_LOGO_SPRITE = false;
private static final boolean CUSTOM_CACHE_DIR_ENABLED = false;
......@@ -44,7 +44,7 @@ public class Config {
public static final String DL_URL = "game.openrsc.com"; // needs to be set as public for the Android client to use
public static final String ANDROID_DOWNLOAD_PATH = "https://" + DL_URL + "/downloads/";
public static final String CACHE_URL = "https://" + DL_URL + "/downloads/cache/";
public static final int ANDROID_CLIENT_VERSION = 44; // Important! Depends on web server android_version.txt to check for an updated version
public static final int ANDROID_CLIENT_VERSION = 45; // Important! Depends on web server android_version.txt to check for an updated version
public static boolean F_SHOWING_KEYBOARD = false;
public static boolean C_HOLD_AND_CHOOSE = true;
public static int C_LONG_PRESS_TIMER = 5; // default hold timer setting
......@@ -76,6 +76,7 @@ public class Config {
public static boolean S_WANT_BANK_NOTES = false;
public static boolean S_WANT_CERT_DEPOSIT = false;
public static boolean S_CUSTOM_FIREMAKING = false;
public static boolean S_WANT_RUNECRAFTING = false;
public static boolean S_WANT_DROP_X = false;
public static boolean S_WANT_EXP_INFO = false;
public static boolean S_WANT_WOODCUTTING_GUILD = false;
......@@ -114,6 +115,7 @@ public class Config {
public static boolean S_LENIENT_CONTACT_DETAILS = false;
public static boolean S_WANT_FATIGUE = true;
public static boolean S_WANT_CUSTOM_SPRITES = false;
public static boolean S_WANT_CUSTOM_LANDSCAPE = false;
public static boolean S_WANT_PLAYER_COMMANDS = false;
public static boolean S_WANT_PETS = false;
public static int S_MAX_WALKING_SPEED = 1;
......@@ -122,6 +124,7 @@ public class Config {
public static boolean S_FISHING_SPOTS_DEPLETABLE = false;
public static boolean S_PROPER_MAGIC_TREE_NAME = false;
public static void set(String key, Object value) {
prop.setProperty(key, value.toString());
}
......
......@@ -212,7 +212,7 @@ public class PacketHandler {
loadStats();
loadExperience();
loadQuestPoints();
mc.updateQuestRewards();
// Set Death Screen Timeout
} else if (opcode == 83) mc.setDeathScreenTimeout(250);
......@@ -744,7 +744,7 @@ public class PacketHandler {
int wantDropX, wantExpInfo, wantWoodcuttingGuild, wantFixedOverheadChat, wantPets, showUnidentifiedHerbNames;
int wantDecanting, wantCertsToBank, wantCustomRankDisplay, wantRightClickBank, wantPlayerCommands;
int getFPS, wantEmail, wantRegistrationLimit, allowResize, lenientContactDetails, wantFatigue, wantCustomSprites;
int fishingSpotsDepletable, properMagicTreeName;
int fishingSpotsDepletable, properMagicTreeName, wantRunecrafting, wantCustomLandscape;
String logoSpriteID;
if (!mc.gotInitialConfigs) {
......@@ -807,6 +807,8 @@ public class PacketHandler {
wantQuestStartedIndicator = this.getClientStream().getUnsignedByte(); // 57
fishingSpotsDepletable = this.getClientStream().getUnsignedByte(); //58
properMagicTreeName = this.getClientStream().getUnsignedByte(); //59
wantRunecrafting = this.getClientStream().getUnsignedByte(); //60
wantCustomLandscape = this.getClientStream().getUnsignedByte(); //61
} else {
serverName = packetsIncoming.readString(); // 1
serverNameWelcome = packetsIncoming.readString(); // 2
......@@ -867,6 +869,8 @@ public class PacketHandler {
wantQuestStartedIndicator = packetsIncoming.getUnsignedByte(); // 57
fishingSpotsDepletable = packetsIncoming.getUnsignedByte(); //58
properMagicTreeName = packetsIncoming.getUnsignedByte(); //59
wantRunecrafting = packetsIncoming.getUnsignedByte(); //60
wantCustomLandscape = packetsIncoming.getUnsignedByte(); //61
}
if (Config.DEBUG) {
......@@ -929,7 +933,9 @@ public class PacketHandler {
"\nS_SHOW_UNIDENTIFIED_HERB_NAMES " + showUnidentifiedHerbNames + // 56
"\nS_WANT_QUEST_STARTED_INDICATOR " + wantQuestStartedIndicator + // 57
"\nS_FISHING_SPOTS_DEPLETABLE " + fishingSpotsDepletable + // 58
"\nS_PROPER_MAGIC_TREE_NAME " + properMagicTreeName // 59
"\nS_PROPER_MAGIC_TREE_NAME " + properMagicTreeName +// 59
"\nS_WANT_RUNECRAFTING " + wantRunecrafting +// 60
"\nS_WANT_CUSTOM_LANDSCAPE " + wantCustomLandscape// 61
);
}
......@@ -994,6 +1000,8 @@ public class PacketHandler {
props.setProperty("S_WANT_QUEST_STARTED_INDICATOR", wantQuestStartedIndicator == 1 ? "true" : "false"); // 57
props.setProperty("S_FISHING_SPOTS_DEPLETABLE", fishingSpotsDepletable == 1 ? "true" : "false"); //58
props.setProperty("S_PROPER_MAGIC_TREE_NAME", properMagicTreeName == 1 ? "true" : "false"); //59
props.setProperty("S_WANT_RUNECRAFTING", wantRunecrafting == 1 ? "true" : "false"); //60
props.setProperty("S_WANT_CUSTOM_LANDSCAPE", wantCustomLandscape == 1 ? "true" : "false"); //61
Config.updateServerConfiguration(props);
......@@ -1451,17 +1459,17 @@ public class PacketHandler {
}
private void loadStats() {
for (int stat = 0; stat < 18; ++stat) {
for (int stat = 0; stat < mudclient.skillCount; ++stat) {
mc.setPlayerStatCurrent(stat, packetsIncoming.getUnsignedByte());
}
for (int stat = 0; stat < 18; ++stat) {
for (int stat = 0; stat < mudclient.skillCount; ++stat) {
mc.setPlayerStatBase(stat, packetsIncoming.getUnsignedByte());
}
}
private void loadExperience() {
for (int skill = 0; skill < 18; ++skill) {
for (int skill = 0; skill < mudclient.skillCount; ++skill) {
mc.setPlayerExperience(skill, packetsIncoming.get32() / 4);
}
}
......
......@@ -75,7 +75,10 @@ public final class World {
sectors = new Sector[4];
try {
tileArchive = new ZipFile(new File(Config.F_CACHE_DIR + File.separator + "Landscape.orsc"));
if (Config.S_WANT_CUSTOM_LANDSCAPE)
tileArchive = new ZipFile(new File(Config.F_CACHE_DIR + File.separator + "Custom_Landscape.orsc"));
else
tileArchive = new ZipFile(new File(Config.F_CACHE_DIR + File.separator + "Authentic_Landscape.orsc"));
} catch (Exception e) {
e.printStackTrace();
System.exit(1);
......
This diff is collapsed.
......@@ -45,4 +45,5 @@
<entry key="ObjectFishingDef">com.openrsc.server.external.ObjectFishingDef</entry>
<entry key="ObjectFishDef">com.openrsc.server.external.ObjectFishDef</entry>
<entry key="ItemDropDef">com.openrsc.server.external.ItemDropDef</entry>
<entry key="ObjectRunecraftingDef">com.openrsc.server.external.ObjectRunecraftingDef</entry>
</properties>
......@@ -106,6 +106,8 @@
<entry key = "looted_chests_stuck">true</entry> <!-- MODIFIED -->
<entry key = "want_discord_updates">false</entry>
<entry key = "discord_webhook_url">null</entry>
<entry key = "want_runecrafting">false</entry>
<entry key = "custom_landscape">false</entry>
<!-- Bank -->
<entry key = "right_click_bank">true</entry> <!-- MODIFIED -->
......
......@@ -107,6 +107,8 @@
<entry key = "looted_chests_stuck">true</entry> <!-- MODIFIED -->
<entry key = "want_discord_updates">false</entry>
<entry key = "discord_webhook_url">null</entry>
<entry key = "want_runecrafting">false</entry>
<entry key = "custom_landscape">false</entry>
<!-- Bank -->
<entry key = "right_click_bank">true</entry> <!-- MODIFIED -->
......
......@@ -107,6 +107,8 @@
<entry key = "looted_chests_stuck">false</entry>
<entry key = "want_discord_updates">false</entry>
<entry key = "discord_webhook_url">null</entry>
<entry key = "want_runecrafting">false</entry>
<entry key = "custom_landscape">false</entry>
<!-- Bank -->
<entry key = "right_click_bank">true</entry> <!-- MODIFIED -->
......
......@@ -20,7 +20,7 @@ import com.openrsc.server.external.ItemLoc;
import com.openrsc.server.external.NPCDef;
import com.openrsc.server.external.NpcId;
import com.openrsc.server.model.Point;
import com.openrsc.server.model.Skills;
import com.openrsc.server.model.Skills.SKILLS;
import com.openrsc.server.model.container.Item;
import com.openrsc.server.model.entity.Entity;
import com.openrsc.server.model.entity.GameObject;
......@@ -650,8 +650,8 @@ public final class Admins implements CommandListener {
return;
}
p.getUpdateFlags().setDamage(new Damage(player, p.getSkills().getLevel(Skills.HITPOINTS) - p.getSkills().getMaxStat(Skills.HITPOINTS)));
p.getSkills().normalize(Skills.HITPOINTS);
p.getUpdateFlags().setDamage(new Damage(player, p.getSkills().getLevel(SKILLS.HITS.id()) - p.getSkills().getMaxStat(SKILLS.HITS.id())));
p.getSkills().normalize(SKILLS.HITS.id());
if (p.getUsernameHash() != player.getUsernameHash()) {
p.message(messagePrefix + "You have been healed by an admin");
}
......@@ -666,7 +666,7 @@ public final class Admins implements CommandListener {
return;
}
p.getSkills().normalize(Skills.PRAYER);
p.getSkills().normalize(SKILLS.PRAYER.id());
if (p.getUsernameHash() != player.getUsernameHash()) {
p.message(messagePrefix + "Your prayer has been recharged by an admin");
}
......@@ -699,14 +699,14 @@ public final class Admins implements CommandListener {
return;
}
if (newHits > p.getSkills().getMaxStat(Skills.HITPOINTS))
newHits = p.getSkills().getMaxStat(Skills.HITPOINTS);
if (newHits > p.getSkills().getMaxStat(SKILLS.HITS.id()))
newHits = p.getSkills().getMaxStat(SKILLS.HITS.id());
if (newHits < 0)
newHits = 0;
p.getUpdateFlags().setDamage(new Damage(player, p.getSkills().getLevel(Skills.HITPOINTS) - newHits));
p.getSkills().setLevel(Skills.HITPOINTS, newHits);
if (p.getSkills().getLevel(Skills.HITPOINTS) <= 0)
p.getUpdateFlags().setDamage(new Damage(player, p.getSkills().getLevel(SKILLS.HITS.id()) - newHits));
p.getSkills().setLevel(SKILLS.HITS.id(), newHits);
if (p.getSkills().getLevel(SKILLS.HITS.id()) <= 0)
p.killedBy(player);
if (p.getUsernameHash() != player.getUsernameHash()) {
......@@ -741,13 +741,13 @@ public final class Admins implements CommandListener {
return;