mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-03 00:31:51 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b78d903188 |
@@ -1,24 +0,0 @@
|
||||
# This workflow will build a Java project with Maven
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
|
||||
|
||||
name: Java CI with Maven
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up JDK 1.8
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
- name: Build with Maven
|
||||
run: mvn -B clean install
|
||||
+2
-13
@@ -1,17 +1,6 @@
|
||||
2006Scape\ Server/data/characters/
|
||||
2006Redone\ Server/data/characters/
|
||||
.idea/
|
||||
.idea/workspace.xml
|
||||
**/.idea/workspace.xml
|
||||
**/.idea/*
|
||||
*/*.jar
|
||||
*.iml
|
||||
.DS_Store
|
||||
2006Scape Server/data/logs
|
||||
*.class
|
||||
*.project
|
||||
2006Scape Client/bin/
|
||||
*.prefs
|
||||
*.classpath
|
||||
|
||||
# Ignore any json files in the server root (should only be config files, the sample file should still be updated)
|
||||
2006Scape Server/*.json
|
||||
*.iml
|
||||
@@ -0,0 +1,11 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.6
|
||||
@@ -3,8 +3,8 @@
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>2006Scape</artifactId>
|
||||
<groupId>com.rs2</groupId>
|
||||
<artifactId>2006redone</artifactId>
|
||||
<groupId>com.rebotted</groupId>
|
||||
<version>1.0</version>
|
||||
</parent>
|
||||
|
||||
@@ -47,4 +47,4 @@
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
</project>
|
||||
@@ -0,0 +1,22 @@
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
|
||||
public final class Client {
|
||||
|
||||
public static void main(String[] args) {
|
||||
ClientSettings.SERVER_IP = "127.0.0.1";
|
||||
try {
|
||||
Game game = new Game();
|
||||
Game.nodeID = 10;
|
||||
Game.portOff = 0;
|
||||
Game.setHighMem();
|
||||
Game.isMembers = true;
|
||||
Signlink.storeid = 32;
|
||||
Signlink.startpriv(InetAddress.getLocalHost());
|
||||
game.createClientFrame(503, 765);
|
||||
} catch (UnknownHostException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+7
-19
@@ -6,36 +6,24 @@ import java.math.BigInteger;
|
||||
*/
|
||||
|
||||
public class ClientSettings {
|
||||
|
||||
public static String SNOW_MONTH = ".12";
|
||||
|
||||
public static String SNOW_MONTH = ".12";
|
||||
/**
|
||||
* The Servers Name
|
||||
*/
|
||||
public final static String SERVER_NAME = "2006Scape";
|
||||
public final static String SERVER_NAME = "2006rebotted";
|
||||
/**
|
||||
* The Servers Website
|
||||
*/
|
||||
public final static String SERVER_WEBSITE = "www.2006Scape.org";
|
||||
public final static String SERVER_WEBSITE = "www.rsrebotted.com";
|
||||
/**
|
||||
* The Servers Ip
|
||||
*
|
||||
* You don't have to change this, the client will automatically connect to the server
|
||||
* on localhost (Assuming you're running Client and LocalGame respectively)
|
||||
*
|
||||
*/
|
||||
public static String SERVER_IP = "server.2006Scape.org";
|
||||
/**
|
||||
* The Servers World
|
||||
* This Determines The Port The Server Will Connect On
|
||||
* World 1 Will Connect On Port 43594
|
||||
* World 2 Will Connect On Port 43598
|
||||
*/
|
||||
public static int SERVER_WORLD = 1;
|
||||
|
||||
/**
|
||||
* Enables/Disables FileServer CRC Checking For Cache Updates
|
||||
* FileServer Must Be Running Before Starting The Client If This Is True
|
||||
*/
|
||||
public static boolean CHECK_CRC = true;
|
||||
|
||||
public static String SERVER_IP = "127.0.0.1";
|
||||
/**
|
||||
* The Npc Bits for the Server
|
||||
*/
|
||||
-2
@@ -525,8 +525,6 @@ final class CollisionMap {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Something to do with moving to objects/npcs etc when clicked on
|
||||
// Maybe checking distance?
|
||||
public boolean method221(int i, int j, int k, int l, int i1, int j1, int k1) {
|
||||
int l1 = j + j1 - 1;
|
||||
int i2 = i + l - 1;
|
||||
@@ -0,0 +1,233 @@
|
||||
// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
|
||||
// Jad home page: http://www.kpdus.com/jad.html
|
||||
// Decompiler options: packimports(3)
|
||||
|
||||
public class DrawingArea extends NodeSub {
|
||||
|
||||
public static void initDrawingArea(int i, int j, int ai[]) {
|
||||
pixels = ai;
|
||||
width = j;
|
||||
height = i;
|
||||
setDrawingArea(i, 0, j, 0);
|
||||
}
|
||||
|
||||
public static void defaultDrawingAreaSize() {
|
||||
topX = 0;
|
||||
topY = 0;
|
||||
bottomX = width;
|
||||
bottomY = height;
|
||||
centerX = bottomX - 1;
|
||||
centerY = bottomX / 2;
|
||||
}
|
||||
|
||||
public static void setDrawingArea(int i, int j, int k, int l) {
|
||||
if (j < 0) {
|
||||
j = 0;
|
||||
}
|
||||
if (l < 0) {
|
||||
l = 0;
|
||||
}
|
||||
if (k > width) {
|
||||
k = width;
|
||||
}
|
||||
if (i > height) {
|
||||
i = height;
|
||||
}
|
||||
topX = j;
|
||||
topY = l;
|
||||
bottomX = k;
|
||||
bottomY = i;
|
||||
centerX = bottomX - 1;
|
||||
centerY = bottomX / 2;
|
||||
anInt1387 = bottomY / 2;
|
||||
}
|
||||
|
||||
public static void setAllPixelsToZero() {
|
||||
int i = width * height;
|
||||
for (int j = 0; j < i; j++) {
|
||||
pixels[j] = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void method335(int i, int j, int k, int l, int i1, int k1) {
|
||||
if (k1 < topX) {
|
||||
k -= topX - k1;
|
||||
k1 = topX;
|
||||
}
|
||||
if (j < topY) {
|
||||
l -= topY - j;
|
||||
j = topY;
|
||||
}
|
||||
if (k1 + k > bottomX) {
|
||||
k = bottomX - k1;
|
||||
}
|
||||
if (j + l > bottomY) {
|
||||
l = bottomY - j;
|
||||
}
|
||||
int l1 = 256 - i1;
|
||||
int i2 = (i >> 16 & 0xff) * i1;
|
||||
int j2 = (i >> 8 & 0xff) * i1;
|
||||
int k2 = (i & 0xff) * i1;
|
||||
int k3 = width - k;
|
||||
int l3 = k1 + j * width;
|
||||
for (int i4 = 0; i4 < l; i4++) {
|
||||
for (int j4 = -k; j4 < 0; j4++) {
|
||||
int l2 = (pixels[l3] >> 16 & 0xff) * l1;
|
||||
int i3 = (pixels[l3] >> 8 & 0xff) * l1;
|
||||
int j3 = (pixels[l3] & 0xff) * l1;
|
||||
int k4 = (i2 + l2 >> 8 << 16) + (j2 + i3 >> 8 << 8) + (k2 + j3 >> 8);
|
||||
pixels[l3++] = k4;
|
||||
}
|
||||
|
||||
l3 += k3;
|
||||
}
|
||||
}
|
||||
|
||||
public static void method336(int i, int j, int l, int i1, int k) {
|
||||
if (k < topX) {
|
||||
i1 -= topX - k;
|
||||
k = topX;
|
||||
}
|
||||
if (j < topY) {
|
||||
i -= topY - j;
|
||||
j = topY;
|
||||
}
|
||||
if (k + i1 > bottomX) {
|
||||
i1 = bottomX - k;
|
||||
}
|
||||
if (j + i > bottomY) {
|
||||
i = bottomY - j;
|
||||
}
|
||||
int k1 = width - i1;
|
||||
int l1 = k + j * width;
|
||||
for (int i2 = -i; i2 < 0; i2++) {
|
||||
for (int j2 = -i1; j2 < 0; j2++) {
|
||||
pixels[l1++] = l;
|
||||
}
|
||||
|
||||
l1 += k1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void fillPixels(int i1, int k, int l, int i, int j) {
|
||||
method339(i1, l, j, i);
|
||||
method339(i1 + k - 1, l, j, i);
|
||||
method341(i1, l, k, i);
|
||||
method341(i1, l, k, i + j - 1);
|
||||
}
|
||||
|
||||
public static void method338(int i, int j, int k, int l, int i1, int j1) {
|
||||
method340(l, i1, i, k, j1);
|
||||
method340(l, i1, i + j - 1, k, j1);
|
||||
if (j >= 3) {
|
||||
method342(l, j1, k, i + 1, j - 2);
|
||||
method342(l, j1 + i1 - 1, k, i + 1, j - 2);
|
||||
}
|
||||
}
|
||||
|
||||
public static void method339(int i, int j, int k, int l) {
|
||||
if (i < topY || i >= bottomY) {
|
||||
return;
|
||||
}
|
||||
if (l < topX) {
|
||||
k -= topX - l;
|
||||
l = topX;
|
||||
}
|
||||
if (l + k > bottomX) {
|
||||
k = bottomX - l;
|
||||
}
|
||||
int i1 = l + i * width;
|
||||
for (int j1 = 0; j1 < k; j1++) {
|
||||
pixels[i1 + j1] = j;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static void method340(int i, int j, int k, int l, int i1) {
|
||||
if (k < topY || k >= bottomY) {
|
||||
return;
|
||||
}
|
||||
if (i1 < topX) {
|
||||
j -= topX - i1;
|
||||
i1 = topX;
|
||||
}
|
||||
if (i1 + j > bottomX) {
|
||||
j = bottomX - i1;
|
||||
}
|
||||
int j1 = 256 - l;
|
||||
int k1 = (i >> 16 & 0xff) * l;
|
||||
int l1 = (i >> 8 & 0xff) * l;
|
||||
int i2 = (i & 0xff) * l;
|
||||
int i3 = i1 + k * width;
|
||||
for (int j3 = 0; j3 < j; j3++) {
|
||||
int j2 = (pixels[i3] >> 16 & 0xff) * j1;
|
||||
int k2 = (pixels[i3] >> 8 & 0xff) * j1;
|
||||
int l2 = (pixels[i3] & 0xff) * j1;
|
||||
int k3 = (k1 + j2 >> 8 << 16) + (l1 + k2 >> 8 << 8) + (i2 + l2 >> 8);
|
||||
pixels[i3++] = k3;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void method341(int i, int j, int k, int l) {
|
||||
if (l < topX || l >= bottomX) {
|
||||
return;
|
||||
}
|
||||
if (i < topY) {
|
||||
k -= topY - i;
|
||||
i = topY;
|
||||
}
|
||||
if (i + k > bottomY) {
|
||||
k = bottomY - i;
|
||||
}
|
||||
int j1 = l + i * width;
|
||||
for (int k1 = 0; k1 < k; k1++) {
|
||||
pixels[j1 + k1 * width] = j;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static void method342(int i, int j, int k, int l, int i1) {
|
||||
if (j < topX || j >= bottomX) {
|
||||
return;
|
||||
}
|
||||
if (l < topY) {
|
||||
i1 -= topY - l;
|
||||
l = topY;
|
||||
}
|
||||
if (l + i1 > bottomY) {
|
||||
i1 = bottomY - l;
|
||||
}
|
||||
int j1 = 256 - k;
|
||||
int k1 = (i >> 16 & 0xff) * k;
|
||||
int l1 = (i >> 8 & 0xff) * k;
|
||||
int i2 = (i & 0xff) * k;
|
||||
int i3 = j + l * width;
|
||||
for (int j3 = 0; j3 < i1; j3++) {
|
||||
int j2 = (pixels[i3] >> 16 & 0xff) * j1;
|
||||
int k2 = (pixels[i3] >> 8 & 0xff) * j1;
|
||||
int l2 = (pixels[i3] & 0xff) * j1;
|
||||
int k3 = (k1 + j2 >> 8 << 16) + (l1 + k2 >> 8 << 8) + (i2 + l2 >> 8);
|
||||
pixels[i3] = k3;
|
||||
i3 += width;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
DrawingArea() {
|
||||
}
|
||||
|
||||
public static int pixels[];
|
||||
public static int width;
|
||||
public static int height;
|
||||
public static int topY;
|
||||
public static int bottomY;
|
||||
public static int topX;
|
||||
public static int bottomX;
|
||||
public static int centerX;
|
||||
public static int centerY;
|
||||
public static int anInt1387;
|
||||
|
||||
}
|
||||
+2
-4
@@ -25,7 +25,7 @@ public final class EntityDef {
|
||||
break;
|
||||
|
||||
case 945:
|
||||
entityDef.name = ClientSettings.SERVER_NAME + " Guide";
|
||||
entityDef.name = "2006Redone Guide";
|
||||
break;
|
||||
}
|
||||
return entityDef;
|
||||
@@ -92,12 +92,10 @@ public final class EntityDef {
|
||||
}
|
||||
}
|
||||
|
||||
public static int totalNPCs;
|
||||
|
||||
public static void unpackConfig(StreamLoader streamLoader) {
|
||||
stream = new Stream(streamLoader.getDataForName("npc.dat"));
|
||||
Stream stream2 = new Stream(streamLoader.getDataForName("npc.idx"));
|
||||
totalNPCs = stream2.readUnsignedWord();
|
||||
int totalNPCs = stream2.readUnsignedWord();
|
||||
streamIndices = new int[totalNPCs];
|
||||
int i = 2;
|
||||
for (int j = 0; j < totalNPCs; j++) {
|
||||
+353
-962
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -1,6 +1,6 @@
|
||||
// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
|
||||
// Jad home page: http://www.kpdus.com/jad.html
|
||||
// Decompiler options: packimports(3) package com.rs2;
|
||||
// Decompiler options: packimports(3) package com.rebotted;
|
||||
|
||||
public final class ISAACRandomGen {
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@ final class Item extends Animable {
|
||||
@Override
|
||||
public final Model getRotatedModel() {
|
||||
ItemDef itemDef = ItemDef.forID(ID);
|
||||
return itemDef.method201(amount);
|
||||
return itemDef.method201(anInt1559);
|
||||
}
|
||||
|
||||
public Item() {
|
||||
@@ -16,5 +16,5 @@ final class Item extends Animable {
|
||||
public int ID;
|
||||
public int x;
|
||||
public int y;
|
||||
public int amount;
|
||||
public int anInt1559;
|
||||
}
|
||||
+3
-3
@@ -2103,7 +2103,7 @@ public final class ItemDef {
|
||||
int j3 = DrawingArea.bottomY;
|
||||
Texture.aBoolean1464 = false;
|
||||
DrawingArea.initDrawingArea(32, 32, sprite2.pixels);
|
||||
DrawingArea.fillArea(32, 0, 0, 32, 0);
|
||||
DrawingArea.method336(32, 0, 0, 32, 0);
|
||||
Texture.method364();
|
||||
int k3 = itemDef.modelZoom;
|
||||
if (k == -1) {
|
||||
@@ -2372,7 +2372,7 @@ public final class ItemDef {
|
||||
private int[] originalModelColors;
|
||||
public boolean membersObject;
|
||||
private int anInt162;
|
||||
public int certTemplateID;
|
||||
private int certTemplateID;
|
||||
private int anInt164;
|
||||
private int anInt165;
|
||||
private int anInt166;
|
||||
@@ -2405,7 +2405,7 @@ public final class ItemDef {
|
||||
private int anInt197;
|
||||
public int modelRotation2;
|
||||
private int anInt200;
|
||||
public int[] stackAmounts;
|
||||
private int[] stackAmounts;
|
||||
public int team;
|
||||
public static int totalItems;
|
||||
private int anInt204;
|
||||
@@ -0,0 +1,39 @@
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
|
||||
public final class Main {
|
||||
|
||||
/*
|
||||
|
||||
DEAR DEVELOPER!
|
||||
|
||||
If you want to run the client locally, the easiest way to do that is run the class "Client.java" instead!
|
||||
|
||||
If you REALLY want to use this class, add two random program arguments.
|
||||
But seriously, Client.java is just a copy-paste of this class and does it locally. Use that instead!
|
||||
|
||||
|
||||
*/
|
||||
|
||||
public static void main(String[] args) {
|
||||
ClientSettings.SERVER_IP = "2006rebotted.hopto.org";
|
||||
if (args.length > 1)
|
||||
{
|
||||
System.out.println("Running local");
|
||||
ClientSettings.SERVER_IP = "127.0.0.1";
|
||||
}
|
||||
try {
|
||||
Game game = new Game();
|
||||
Game.nodeID = 10;
|
||||
Game.portOff = 0;
|
||||
Game.setHighMem();
|
||||
Game.isMembers = true;
|
||||
Signlink.storeid = 32;
|
||||
Signlink.startpriv(InetAddress.getLocalHost());
|
||||
game.createClientFrame(503, 765);
|
||||
} catch (UnknownHostException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+2
-5
@@ -113,7 +113,7 @@ public final class Model extends Animable {
|
||||
if (aClass21Array1661 == null) {
|
||||
return null;
|
||||
}
|
||||
Class21 class21 = aClass21Array1661.length < j ? null : aClass21Array1661[j];
|
||||
Class21 class21 = aClass21Array1661[j];
|
||||
if (class21 == null) {
|
||||
aOnDemandFetcherParent_1662.method548(j);
|
||||
return null;
|
||||
@@ -1335,10 +1335,7 @@ public final class Model extends Animable {
|
||||
int k2 = k1 * j + j2 * k >> 16;
|
||||
int l2 = anInt1650 * k >> 16;
|
||||
int i3 = k2 + l2;
|
||||
// Check distance of model to camera for rendering (default 3500)
|
||||
int distance = WorldController.drawDistance * 256;
|
||||
distance *= 1 + (Game.zoom / 10);
|
||||
if (i3 <= 50 || k2 >= distance) {
|
||||
if (i3 <= 50 || k2 >= 3500) {
|
||||
return;
|
||||
}
|
||||
int j3 = l1 * l + j1 * i1 >> 16;
|
||||
+1
-3
@@ -83,12 +83,10 @@ public final class ObjectDef {
|
||||
stream = null;
|
||||
}
|
||||
|
||||
public static int totalObjects;
|
||||
|
||||
public static void unpackConfig(StreamLoader streamLoader) {
|
||||
stream = new Stream(streamLoader.getDataForName("loc.dat"));
|
||||
Stream stream = new Stream(streamLoader.getDataForName("loc.idx"));
|
||||
totalObjects = stream.readUnsignedWord();
|
||||
int totalObjects = stream.readUnsignedWord();
|
||||
streamIndices = new int[totalObjects];
|
||||
int i = 2;
|
||||
for (int j = 0; j < totalObjects; j++) {
|
||||
+1
-7
@@ -11,14 +11,12 @@ import java.awt.event.KeyEvent;
|
||||
import java.awt.event.KeyListener;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.awt.event.MouseListener;
|
||||
import java.awt.event.MouseWheelEvent;
|
||||
import java.awt.event.MouseWheelListener;
|
||||
import java.awt.event.MouseMotionListener;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.awt.event.WindowListener;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class RSApplet extends Applet implements Runnable, MouseListener, MouseWheelListener, MouseMotionListener, KeyListener, FocusListener, WindowListener {
|
||||
public class RSApplet extends Applet implements Runnable, MouseListener, MouseMotionListener, KeyListener, FocusListener, WindowListener {
|
||||
|
||||
public static boolean ctrlDown = false;
|
||||
public static boolean shiftDown = false;
|
||||
@@ -47,7 +45,6 @@ public class RSApplet extends Applet implements Runnable, MouseListener, MouseWh
|
||||
public void run() {
|
||||
getGameComponent().addMouseListener(this);
|
||||
getGameComponent().addMouseMotionListener(this);
|
||||
getGameComponent().addMouseWheelListener(this);
|
||||
getGameComponent().addKeyListener(this);
|
||||
getGameComponent().addFocusListener(this);
|
||||
if (gameFrame != null) {
|
||||
@@ -299,9 +296,6 @@ public class RSApplet extends Applet implements Runnable, MouseListener, MouseWh
|
||||
mouseY = j;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseWheelMoved(MouseWheelEvent e) {}
|
||||
|
||||
@Override
|
||||
public void keyPressed(KeyEvent keyevent) {
|
||||
idleTime = 0;
|
||||
+2
-1
@@ -4,11 +4,12 @@
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
final class RSFrame extends Frame {
|
||||
|
||||
public RSFrame(RSApplet RSApplet_, int i, int j) {
|
||||
rsApplet = RSApplet_;
|
||||
setTitle(ClientSettings.SERVER_NAME + " World: " + ClientSettings.SERVER_WORLD);
|
||||
setTitle(ClientSettings.SERVER_NAME);
|
||||
setResizable(false);
|
||||
setMinimumSize(new Dimension(i + 8, j + 28));
|
||||
setVisible(true);
|
||||
+2
@@ -25,6 +25,8 @@ public final class RSInterface {
|
||||
rsInterface.id = k;
|
||||
rsInterface.parentID = i;
|
||||
rsInterface.type = stream.readUnsignedByte();
|
||||
//if(rsInterface.type == 0)
|
||||
// System.out.println(rsInterface.parentID+":"+k);
|
||||
rsInterface.atActionType = stream.readUnsignedByte();
|
||||
rsInterface.anInt214 = stream.readUnsignedWord();
|
||||
rsInterface.width = stream.readUnsignedWord();
|
||||
+15
-15
@@ -278,7 +278,7 @@ public final class Signlink implements Runnable {
|
||||
public static Synthesizer synthesizer = null;
|
||||
|
||||
public static String findcachedir() {
|
||||
String path = System.getProperty("user.home") + "/.2006Scape_file_system/";
|
||||
String path = System.getProperty("user.home") + "/.2006rebotted_file_system/";
|
||||
File file = new File(path);
|
||||
if (!file.exists()) {
|
||||
if (!file.mkdirs()) {
|
||||
@@ -289,7 +289,7 @@ public final class Signlink implements Runnable {
|
||||
}
|
||||
|
||||
public static String secondDir() {
|
||||
File file = new File("C:/.2006Scape_file_system/");
|
||||
File file = new File("C:/.2006rebotted_file_system/");
|
||||
if (!file.exists()) {
|
||||
file.mkdirs();
|
||||
}
|
||||
@@ -404,17 +404,17 @@ public final class Signlink implements Runnable {
|
||||
public static boolean reporterror = true;
|
||||
public static String errorname = "";
|
||||
public static Midi midii = new Midi();
|
||||
private static int savelen;
|
||||
private static String saveReq = null;
|
||||
private static byte savebuf[] = null;
|
||||
public static boolean play;
|
||||
private static int midiPos;
|
||||
public static String midi = null;
|
||||
public static int midiVolume;
|
||||
public static int midifade;
|
||||
private static boolean waveplay;
|
||||
private static int wavepos;
|
||||
public static String wave = null;
|
||||
public static int wavevol;
|
||||
private static int savelen;
|
||||
private static String saveReq = null;
|
||||
private static byte savebuf[] = null;
|
||||
public static boolean play;
|
||||
private static int midiPos;
|
||||
public static String midi = null;
|
||||
public static int midiVolume;
|
||||
public static int midifade;
|
||||
private static boolean waveplay;
|
||||
private static int wavepos;
|
||||
public static String wave = null;
|
||||
public static int wavevol;
|
||||
|
||||
}
|
||||
}
|
||||
+16
-20
@@ -75,20 +75,16 @@ public final class TextDrawingArea extends DrawingArea {
|
||||
}
|
||||
}
|
||||
|
||||
public void textRight(int i, String s, int k, int l) {
|
||||
textLeft(i, s, k, l - method384(s));
|
||||
public void method380(String s, int i, int j, int k) {
|
||||
method385(j, s, k, i - method384(s));
|
||||
}
|
||||
|
||||
public void textCenter(int i, String s, int k, int l) {
|
||||
textLeft(i, s, k, l - method384(s) / 2);
|
||||
public void drawText(int i, String s, int k, int l) {
|
||||
method385(i, s, k, l - method384(s) / 2);
|
||||
}
|
||||
|
||||
public void textCenterShadow(int _color, int _x, String s, int _y, boolean _shadow) {
|
||||
textLeftShadow(_shadow, _x - getTextWidth(s) / 2, _color, s, _y);
|
||||
}
|
||||
|
||||
public void textRightShadow(boolean _shadow, int _x, int _color, String s, int _y) {
|
||||
textLeftShadow(_shadow, _x - getTextWidth(s), _color, s, _y);
|
||||
public void method382(int i, int j, String s, int l, boolean flag) {
|
||||
method389(flag, j - getTextWidth(s) / 2, i, s, l);
|
||||
}
|
||||
|
||||
public int getTextWidth(String s) {
|
||||
@@ -118,7 +114,7 @@ public final class TextDrawingArea extends DrawingArea {
|
||||
return j;
|
||||
}
|
||||
|
||||
public void textLeft(int i, String s, int j, int l) {
|
||||
public void method385(int i, String s, int j, int l) {
|
||||
if (s == null) {
|
||||
return;
|
||||
}
|
||||
@@ -184,37 +180,37 @@ public final class TextDrawingArea extends DrawingArea {
|
||||
|
||||
}
|
||||
|
||||
public void textLeftShadow(boolean _shadow, int _x, int _color, String s, int _y) {
|
||||
public void method389(boolean flag1, int i, int j, String s, int k) {
|
||||
aBoolean1499 = false;
|
||||
int l = _x;
|
||||
int l = i;
|
||||
if (s == null) {
|
||||
return;
|
||||
}
|
||||
_y -= anInt1497;
|
||||
k -= anInt1497;
|
||||
for (int i1 = 0; i1 < s.length(); i1++) {
|
||||
if (s.charAt(i1) == '@' && i1 + 4 < s.length() && s.charAt(i1 + 4) == '@') {
|
||||
int j1 = getColorByName(s.substring(i1 + 1, i1 + 4));
|
||||
if (j1 != -1) {
|
||||
_color = j1;
|
||||
j = j1;
|
||||
}
|
||||
i1 += 4;
|
||||
} else {
|
||||
char c = s.charAt(i1);
|
||||
if (c != ' ') {
|
||||
if (_shadow) {
|
||||
method392(aByteArrayArray1491[c], _x + anIntArray1494[c] + 1, _y + anIntArray1495[c] + 1, anIntArray1492[c], anIntArray1493[c], 0);
|
||||
if (flag1) {
|
||||
method392(aByteArrayArray1491[c], i + anIntArray1494[c] + 1, k + anIntArray1495[c] + 1, anIntArray1492[c], anIntArray1493[c], 0);
|
||||
}
|
||||
try {
|
||||
method392(aByteArrayArray1491[c], _x + anIntArray1494[c], _y + anIntArray1495[c], anIntArray1492[c], anIntArray1493[c], _color);
|
||||
method392(aByteArrayArray1491[c], i + anIntArray1494[c], k + anIntArray1495[c], anIntArray1492[c], anIntArray1493[c], j);
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
}
|
||||
_x += anIntArray1496[c];
|
||||
i += anIntArray1496[c];
|
||||
}
|
||||
}
|
||||
if (aBoolean1499) {
|
||||
DrawingArea.drawHorizontalLine(_y + (int) (anInt1497 * 0.69999999999999996D), 0x800000, _x - l, l);
|
||||
DrawingArea.method339(k + (int) (anInt1497 * 0.69999999999999996D), 0x800000, i - l, l);
|
||||
}
|
||||
}
|
||||
|
||||
+31
-32
@@ -3,7 +3,6 @@
|
||||
// Decompiler options: packimports(3)
|
||||
|
||||
final class WorldController {
|
||||
public static int drawDistance = 25;
|
||||
|
||||
public WorldController(int ai[][][]) {
|
||||
int i = 104;// was parameter
|
||||
@@ -795,7 +794,7 @@ final class WorldController {
|
||||
anInt498 = l;
|
||||
anInt493 = k / 2;
|
||||
anInt494 = l / 2;
|
||||
boolean aflag[][][][] = new boolean[9][32][256][256];
|
||||
boolean aflag[][][][] = new boolean[9][32][53][53];
|
||||
for (int i1 = 128; i1 <= 384; i1 += 32) {
|
||||
for (int j1 = 0; j1 < 2048; j1 += 64) {
|
||||
anInt458 = Model.modelIntArray1[i1];
|
||||
@@ -804,8 +803,8 @@ final class WorldController {
|
||||
anInt461 = Model.modelIntArray2[j1];
|
||||
int l1 = (i1 - 128) / 32;
|
||||
int j2 = j1 / 64;
|
||||
for (int l2 = -(drawDistance + 1); l2 <= (drawDistance + 1); l2++) {
|
||||
for (int j3 = -(drawDistance + 1); j3 <= (drawDistance + 1); j3++) {
|
||||
for (int l2 = -26; l2 <= 26; l2++) {
|
||||
for (int j3 = -26; j3 <= 26; j3++) {
|
||||
int k3 = l2 * 128;
|
||||
int i4 = j3 * 128;
|
||||
boolean flag2 = false;
|
||||
@@ -817,7 +816,7 @@ final class WorldController {
|
||||
break;
|
||||
}
|
||||
|
||||
aflag[l1][j2][l2 + drawDistance + 1][j3 + drawDistance + 1] = flag2;
|
||||
aflag[l1][j2][l2 + 25 + 1][j3 + 25 + 1] = flag2;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -828,19 +827,19 @@ final class WorldController {
|
||||
|
||||
for (int k1 = 0; k1 < 8; k1++) {
|
||||
for (int i2 = 0; i2 < 32; i2++) {
|
||||
for (int k2 = -drawDistance; k2 < drawDistance; k2++) {
|
||||
for (int i3 = -drawDistance; i3 < drawDistance; i3++) {
|
||||
for (int k2 = -25; k2 < 25; k2++) {
|
||||
for (int i3 = -25; i3 < 25; i3++) {
|
||||
boolean flag1 = false;
|
||||
label0 : for (int l3 = -1; l3 <= 1; l3++) {
|
||||
for (int j4 = -1; j4 <= 1; j4++) {
|
||||
if (aflag[k1][i2][k2 + l3 + drawDistance + 1][i3 + j4 + drawDistance + 1]) {
|
||||
if (aflag[k1][i2][k2 + l3 + 25 + 1][i3 + j4 + 25 + 1]) {
|
||||
flag1 = true;
|
||||
} else if (aflag[k1][(i2 + 1) % 31][k2 + l3 + drawDistance + 1][i3 + j4 + drawDistance + 1]) {
|
||||
} else if (aflag[k1][(i2 + 1) % 31][k2 + l3 + 25 + 1][i3 + j4 + 25 + 1]) {
|
||||
flag1 = true;
|
||||
} else if (aflag[k1 + 1][i2][k2 + l3 + drawDistance + 1][i3 + j4 + drawDistance + 1]) {
|
||||
} else if (aflag[k1 + 1][i2][k2 + l3 + 25 + 1][i3 + j4 + 25 + 1]) {
|
||||
flag1 = true;
|
||||
} else {
|
||||
if (!aflag[k1 + 1][(i2 + 1) % 31][k2 + l3 + drawDistance + 1][i3 + j4 + drawDistance + 1]) {
|
||||
if (!aflag[k1 + 1][(i2 + 1) % 31][k2 + l3 + 25 + 1][i3 + j4 + 25 + 1]) {
|
||||
continue;
|
||||
}
|
||||
flag1 = true;
|
||||
@@ -850,7 +849,7 @@ final class WorldController {
|
||||
|
||||
}
|
||||
|
||||
aBooleanArrayArrayArrayArray491[k1][i2][k2 + drawDistance][i3 + drawDistance] = flag1;
|
||||
aBooleanArrayArrayArrayArray491[k1][i2][k2 + 25][i3 + 25] = flag1;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -905,19 +904,19 @@ final class WorldController {
|
||||
anInt453 = i / 128;
|
||||
anInt454 = j / 128;
|
||||
anInt447 = i1;
|
||||
anInt449 = anInt453 - drawDistance;
|
||||
anInt449 = anInt453 - 25;
|
||||
if (anInt449 < 0) {
|
||||
anInt449 = 0;
|
||||
}
|
||||
anInt451 = anInt454 - drawDistance;
|
||||
anInt451 = anInt454 - 25;
|
||||
if (anInt451 < 0) {
|
||||
anInt451 = 0;
|
||||
}
|
||||
anInt450 = anInt453 + drawDistance;
|
||||
anInt450 = anInt453 + 25;
|
||||
if (anInt450 > anInt438) {
|
||||
anInt450 = anInt438;
|
||||
}
|
||||
anInt452 = anInt454 + drawDistance;
|
||||
anInt452 = anInt454 + 25;
|
||||
if (anInt452 > anInt439) {
|
||||
anInt452 = anInt439;
|
||||
}
|
||||
@@ -929,7 +928,7 @@ final class WorldController {
|
||||
for (int k2 = anInt451; k2 < anInt452; k2++) {
|
||||
Ground class30_sub3 = aclass30_sub3[i2][k2];
|
||||
if (class30_sub3 != null) {
|
||||
if (class30_sub3.anInt1321 > i1 || !aBooleanArrayArray492[i2 - anInt453 + drawDistance][k2 - anInt454 + drawDistance] && anIntArrayArrayArray440[k1][i2][k2] - l < 50) {
|
||||
if (class30_sub3.anInt1321 > i1 || !aBooleanArrayArray492[i2 - anInt453 + 25][k2 - anInt454 + 25] && anIntArrayArrayArray440[k1][i2][k2] - l < 2000) {
|
||||
class30_sub3.aBoolean1322 = false;
|
||||
class30_sub3.aBoolean1323 = false;
|
||||
class30_sub3.anInt1325 = 0;
|
||||
@@ -948,11 +947,11 @@ final class WorldController {
|
||||
|
||||
for (int l1 = anInt442; l1 < anInt437; l1++) {
|
||||
Ground aclass30_sub3_1[][] = groundArray[l1];
|
||||
for (int l2 = -drawDistance; l2 <= 0; l2++) {
|
||||
for (int l2 = -25; l2 <= 0; l2++) {
|
||||
int i3 = anInt453 + l2;
|
||||
int k3 = anInt453 - l2;
|
||||
if (i3 >= anInt449 || k3 < anInt450) {
|
||||
for (int i4 = -drawDistance; i4 <= 0; i4++) {
|
||||
for (int i4 = -25; i4 <= 0; i4++) {
|
||||
int k4 = anInt454 + i4;
|
||||
int i5 = anInt454 - i4;
|
||||
if (i3 >= anInt449) {
|
||||
@@ -996,11 +995,11 @@ final class WorldController {
|
||||
|
||||
for (int j2 = anInt442; j2 < anInt437; j2++) {
|
||||
Ground aclass30_sub3_2[][] = groundArray[j2];
|
||||
for (int j3 = -drawDistance; j3 <= 0; j3++) {
|
||||
for (int j3 = -25; j3 <= 0; j3++) {
|
||||
int l3 = anInt453 + j3;
|
||||
int j4 = anInt453 - j3;
|
||||
if (l3 >= anInt449 || j4 < anInt450) {
|
||||
for (int l4 = -drawDistance; l4 <= 0; l4++) {
|
||||
for (int l4 = -25; l4 <= 0; l4++) {
|
||||
int j5 = anInt454 + l4;
|
||||
int k5 = anInt454 - l4;
|
||||
if (l3 >= anInt449) {
|
||||
@@ -1692,15 +1691,15 @@ final class WorldController {
|
||||
for (int k = 0; k < j; k++) {
|
||||
Class47 class47 = aclass47[k];
|
||||
if (class47.anInt791 == 1) {
|
||||
int l = class47.anInt787 - anInt453 + drawDistance;
|
||||
int l = class47.anInt787 - anInt453 + 25;
|
||||
if (l < 0 || l > 50) {
|
||||
continue;
|
||||
}
|
||||
int k1 = class47.anInt789 - anInt454 + drawDistance;
|
||||
int k1 = class47.anInt789 - anInt454 + 25;
|
||||
if (k1 < 0) {
|
||||
k1 = 0;
|
||||
}
|
||||
int j2 = class47.anInt790 - anInt454 + drawDistance;
|
||||
int j2 = class47.anInt790 - anInt454 + 25;
|
||||
if (j2 > 50) {
|
||||
j2 = 50;
|
||||
}
|
||||
@@ -1732,15 +1731,15 @@ final class WorldController {
|
||||
continue;
|
||||
}
|
||||
if (class47.anInt791 == 2) {
|
||||
int i1 = class47.anInt789 - anInt454 + drawDistance;
|
||||
int i1 = class47.anInt789 - anInt454 + 25;
|
||||
if (i1 < 0 || i1 > 50) {
|
||||
continue;
|
||||
}
|
||||
int l1 = class47.anInt787 - anInt453 + drawDistance;
|
||||
int l1 = class47.anInt787 - anInt453 + 25;
|
||||
if (l1 < 0) {
|
||||
l1 = 0;
|
||||
}
|
||||
int k2 = class47.anInt788 - anInt453 + drawDistance;
|
||||
int k2 = class47.anInt788 - anInt453 + 25;
|
||||
if (k2 > 50) {
|
||||
k2 = 50;
|
||||
}
|
||||
@@ -1772,20 +1771,20 @@ final class WorldController {
|
||||
} else if (class47.anInt791 == 4) {
|
||||
int j1 = class47.anInt796 - anInt456;
|
||||
if (j1 > 128) {
|
||||
int i2 = class47.anInt789 - anInt454 + drawDistance;
|
||||
int i2 = class47.anInt789 - anInt454 + 25;
|
||||
if (i2 < 0) {
|
||||
i2 = 0;
|
||||
}
|
||||
int l2 = class47.anInt790 - anInt454 + drawDistance;
|
||||
int l2 = class47.anInt790 - anInt454 + 25;
|
||||
if (l2 > 50) {
|
||||
l2 = 50;
|
||||
}
|
||||
if (i2 <= l2) {
|
||||
int i3 = class47.anInt787 - anInt453 + drawDistance;
|
||||
int i3 = class47.anInt787 - anInt453 + 25;
|
||||
if (i3 < 0) {
|
||||
i3 = 0;
|
||||
}
|
||||
int l3 = class47.anInt788 - anInt453 + drawDistance;
|
||||
int l3 = class47.anInt788 - anInt453 + 25;
|
||||
if (l3 > 50) {
|
||||
l3 = 50;
|
||||
}
|
||||
@@ -2104,7 +2103,7 @@ final class WorldController {
|
||||
private int anInt488;
|
||||
private final int[][] anIntArrayArray489 = {new int[16], {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1}, {1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0}, {0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1}, {0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0}, {1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1}, {1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1}};
|
||||
private final int[][] anIntArrayArray490 = {{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}, {12, 8, 4, 0, 13, 9, 5, 1, 14, 10, 6, 2, 15, 11, 7, 3}, {15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}, {3, 7, 11, 15, 2, 6, 10, 14, 1, 5, 9, 13, 0, 4, 8, 12}};
|
||||
private static boolean[][][][] aBooleanArrayArrayArrayArray491 = new boolean[8][32][256][256];
|
||||
private static boolean[][][][] aBooleanArrayArrayArrayArray491 = new boolean[8][32][51][51];
|
||||
private static boolean[][] aBooleanArrayArray492;
|
||||
private static int anInt493;
|
||||
private static int anInt494;
|
||||
@@ -6,5 +6,4 @@
|
||||
.classpath
|
||||
.project
|
||||
settings.gradle
|
||||
*.iml
|
||||
server-1.0-jar-with-dependencies.jar
|
||||
*.iml
|
||||
@@ -1,4 +1,4 @@
|
||||
# 2006Scape - Game Server
|
||||
# 2006rebotted - Game Server
|
||||
|
||||
This is the Game Server component of our emulated Runescape environment.
|
||||
It's responsibility is to provide the instructions for the in-game world, its entities, and respond to player interactions.
|
||||
@@ -6,8 +6,10 @@ Contained within is an implementation of the Runescape network protocol roughly
|
||||
When run, this java application will listen on TCP port 43594.
|
||||
|
||||
### Building the project
|
||||
- `git clone https://github.com/2006-Scape/2006Scape`
|
||||
- `cd 2006Scape/2006Scape\ Server/`
|
||||
- `mvn package`
|
||||
- `./runServer.sh`
|
||||
- `git clone https://github.com/dginovker/2006rebotted`
|
||||
- `cd 2006rebotted/2006Redone\ Server/`
|
||||
- `./gradlew build`
|
||||
- `java -jar ./build/libs/2006rebotted.jar`
|
||||
- You will also have to place a copy of the `data` folder in the same location as the jar.
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user