Commit 51319a29 authored by Scott T's avatar Scott T

Implement runecrafting on android

parent 9c3500f9
......@@ -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
}
......@@ -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);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -852,9 +852,9 @@ public final class SkillGuideInterface {
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"));
//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"));
......@@ -883,7 +883,7 @@ public final class SkillGuideInterface {
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(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"));
......
......@@ -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;
......
......@@ -9161,7 +9161,7 @@ public final class mudclient implements Runnable {
int index = 0, questNum = 0;
this.panelQuestInfo.setListEntry(this.controlQuestInfoPanel, index++,
"@whi@Quest-list (green=completed)", 0, null, null);
for (questNum = 0; questNum < questGuideRequirements.length; ++questNum) {
for (questNum = 0; questNum < questNames.length; ++questNum) {
if (this.questNames[questNum] != null) {
this.panelQuestInfo.setListEntry(this.controlQuestInfoPanel, index++,
(questStages[questNum] < 0 ? "@gre@" :
......@@ -10163,13 +10163,11 @@ public final class mudclient implements Runnable {
for (updateIndex = 0; updateIndex < this.gameObjectInstanceCount; ++updateIndex) {
var10 = this.gameObjectInstanceX[updateIndex];
waypointIndexCurrent = this.gameObjectInstanceZ[updateIndex];
if (var10 >= 0 && waypointIndexCurrent >= 0 && var10 < 96 && waypointIndexCurrent < 96
&& this.gameObjectInstanceID[updateIndex] == 74) {
this.gameObjectInstanceModel[updateIndex].addRotation(1, 0, 0);
}
if (var10 >= 0 && waypointIndexCurrent >= 0 && var10 < 96 && waypointIndexCurrent < 96
&& EntityHandler.getObjectDef(this.gameObjectInstanceID[updateIndex]).getObjectModel() == "portal") {
this.gameObjectInstanceModel[updateIndex].addRotation(0, 1, 0);
if (var10 >= 0 && waypointIndexCurrent >= 0 && var10 < 96 && waypointIndexCurrent < 96) {
if (this.gameObjectInstanceID[updateIndex] == 74)
this.gameObjectInstanceModel[updateIndex].addRotation(1, 0, 0);
else if (EntityHandler.getObjectDef(this.gameObjectInstanceID[updateIndex]).getObjectModel() == "portal")
this.gameObjectInstanceModel[updateIndex].addRotation(0, 1, 0);
}
}
......@@ -11915,24 +11913,8 @@ public final class mudclient implements Runnable {
errorLoadingData = true;
return;
}
int numEntries = DataOperations.getUnsigned2Bytes(models, 0);/*
int offset = 2 + numEntries * 10;
for (int entry = 0; entry < numEntries; entry++) {
int fileHash = (models[entry * 10 + 2] & 0xff) * 0x1000000 + (models[entry * 10 + 3] & 0xff) * 0x10000
+ (models[entry * 10 + 4] & 0xff) * 256 + (models[entry * 10 + 5] & 0xff);
int fileSize = (models[entry * 10 + 9] & 0xff) * 0x10000 + (models[entry * 10 + 10] & 0xff) * 256
+ (models[entry * 10 + 11] & 0xff);
RSModel temp = new RSModel(models, entry, true);
offset += fileSize;
}
*/
for (int j = 0; j < EntityHandler.getModelCount(); j++) {
if (EntityHandler.getModelName(j) == "dolmen")
j = j;
int k = DataOperations.getDataFileOffset(EntityHandler.getModelName(j) + ".ob3", models);
if (k == 0) {
modelCache[j] = new RSModel(1, 1);
......@@ -14185,7 +14167,8 @@ public final class mudclient implements Runnable {
System.out.println(Config.S_ALLOW_RESIZE + " 49");
System.out.println(Config.S_LENIENT_CONTACT_DETAILS + " 50");
System.out.println(Config.S_WANT_FATIGUE + " 51");
System.out.println(Config.S_WANT_RUNECRAFTING + " 52");
System.out.println(Config.S_WANT_RUNECRAFTING + " 60");
System.out.println(S_WANT_CUSTOM_LANDSCAPE + " 61");
}
try {
this.loadGameConfig(false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment