mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-02 16:49:03 +00:00
Compare commits
38 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e26f32439a | |||
| 2f26fbe5fb | |||
| 2aef86ed25 | |||
| 6cda5d5c78 | |||
| d53ed61064 | |||
| 679fad7b18 | |||
| dc3f561868 | |||
| c6155eb529 | |||
| 4db7ee6761 | |||
| 8d14d76313 | |||
| aaf0a48140 | |||
| 68013f3498 | |||
| afd1da91e1 | |||
| 4490de88c4 | |||
| 58dab39d3b | |||
| 8ef0b3662e | |||
| 6b4b1eddf7 | |||
| c2a768a354 | |||
| 3a50391304 | |||
| c152a1c8d9 | |||
| e2f700de67 | |||
| f13f0af171 | |||
| 2ade1073b9 | |||
| 452ee7a637 | |||
| 87440ecd2a | |||
| dcc7984e27 | |||
| 0a11ce01d1 | |||
| 9db31e52c9 | |||
| ff75851cad | |||
| a176bfa9cb | |||
| 16b23be1d5 | |||
| bb936bf809 | |||
| 5c4ca489ef | |||
| fcb3fa255f | |||
| b02950045c | |||
| dcf6cbdc45 | |||
| efc6b3c8be | |||
| 9950dbe315 |
@@ -1 +1,3 @@
|
||||
2006Redone\ Server/data/characters/
|
||||
.idea/
|
||||
.idea/workspace.xml
|
||||
|
||||
Generated
+1
-1
@@ -7,7 +7,7 @@
|
||||
<sourceFolder url="file://$MODULE_DIR$/2006Redone file_server/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/2006Redone Client/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
|
||||
Generated
+11
@@ -0,0 +1,11 @@
|
||||
<component name="ArtifactManager">
|
||||
<artifact type="jar" name="2006rebotted:jar">
|
||||
<output-path>$PROJECT_DIR$/CompiledServer/artifacts/2006rebotted_jar</output-path>
|
||||
<root id="archive" name="2006rebotted.jar">
|
||||
<element id="directory" name="META-INF">
|
||||
<element id="file-copy" path="$PROJECT_DIR$/2006Redone Client/METAs/Client Meta/META-INF/MANIFEST.MF" />
|
||||
</element>
|
||||
<element id="module-output" name="2006rebotted" />
|
||||
</root>
|
||||
</artifact>
|
||||
</component>
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
<component name="ArtifactManager">
|
||||
<artifact type="jar" name="localhost_2006rebotted:jar">
|
||||
<output-path>$PROJECT_DIR$/CompiledServer/artifacts/localhost_2006rebotted_jar</output-path>
|
||||
<root id="archive" name="localhost_2006rebotted.jar">
|
||||
<element id="directory" name="META-INF">
|
||||
<element id="file-copy" path="$PROJECT_DIR$/2006Redone Client/METAs/Local Client Meta/META-INF/MANIFEST.MF" />
|
||||
</element>
|
||||
<element id="module-output" name="2006rebotted" />
|
||||
</root>
|
||||
</artifact>
|
||||
</component>
|
||||
Generated
+242
@@ -0,0 +1,242 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ArtifactsWorkspaceSettings">
|
||||
<artifacts-to-build>
|
||||
<artifact name="localhost_2006rebotted:jar" />
|
||||
</artifacts-to-build>
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="9c1d485e-b413-4c80-b742-7c5a88c1c73c" name="Default Changelist" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/2006Redone Server/data/logs/shopbuying/bot.txt" beforeDir="false" afterPath="$PROJECT_DIR$/2006Redone Server/data/logs/shopbuying/bot.txt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/2006Redone Server/src/redone/game/content/combat/CombatAssistant.java" beforeDir="false" afterPath="$PROJECT_DIR$/2006Redone Server/src/redone/game/content/combat/CombatAssistant.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/content/combat/CombatAssistant.class" beforeDir="false" afterPath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/content/combat/CombatAssistant.class" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/players/Trading$1.class" beforeDir="false" afterPath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/players/Trading$1.class" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/players/Trading.class" beforeDir="false" afterPath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/players/Trading.class" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/shops/ShopAssistant.class" beforeDir="false" afterPath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/game/shops/ShopAssistant.class" afterDir="false" />
|
||||
</list>
|
||||
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="FileEditorManager">
|
||||
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/2006Redone Server/src/redone/game/shops/ShopAssistant.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="618">
|
||||
<caret line="396" column="115" selection-start-line="396" selection-start-column="115" selection-end-line="396" selection-end-column="115" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/2006Redone Server/src/redone/game/content/combat/CombatAssistant.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="197">
|
||||
<caret line="2066" column="71" selection-start-line="2066" selection-start-column="71" selection-end-line="2066" selection-end-column="71" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/2006Redone Server/src/redone/game/players/Trading.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="404">
|
||||
<caret line="74" column="108" lean-forward="true" selection-start-line="74" selection-start-column="108" selection-end-line="74" selection-end-column="108" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/2006Redone Server/src/redone/util/Misc.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="115">
|
||||
<caret line="8" column="30" lean-forward="true" selection-start-line="8" selection-start-column="30" selection-end-line="8" selection-end-column="30" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
</leaf>
|
||||
</component>
|
||||
<component name="FindInProjectRecents">
|
||||
<findStrings>
|
||||
<find>math.sq</find>
|
||||
</findStrings>
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="IdeDocumentHistory">
|
||||
<option name="CHANGED_PATHS">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/2006Redone Server/src/redone/game/content/combat/CombatAssistant.java" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectId" id="1Sr1PyvKre5eWJ6XgOrqWrHM5hp" />
|
||||
<component name="PropertiesComponent">
|
||||
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$/2006Redone Client/METAs/Client Meta" />
|
||||
<property name="project.structure.last.edited" value="Project" />
|
||||
<property name="project.structure.proportion" value="0.15" />
|
||||
<property name="project.structure.side.proportion" value="0.2" />
|
||||
</component>
|
||||
<component name="RunDashboard">
|
||||
<option name="ruleStates">
|
||||
<list>
|
||||
<RuleState>
|
||||
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
|
||||
</RuleState>
|
||||
<RuleState>
|
||||
<option name="name" value="StatusDashboardGroupingRule" />
|
||||
</RuleState>
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="RunManager" selected="Application.Server">
|
||||
<configuration name="Client" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
|
||||
<option name="MAIN_CLASS_NAME" value="Client" />
|
||||
<module name="2006rebotted" />
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration name="FileServer" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
|
||||
<option name="MAIN_CLASS_NAME" value="org.apollo.jagcached.FileServer" />
|
||||
<module name="2006rebotted" />
|
||||
<option name="WORKING_DIRECTORY" value="2006Redone file_server" />
|
||||
<extension name="coverage">
|
||||
<pattern>
|
||||
<option name="PATTERN" value="org.apollo.jagcached.*" />
|
||||
<option name="ENABLED" value="true" />
|
||||
</pattern>
|
||||
</extension>
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration name="Server" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
|
||||
<option name="MAIN_CLASS_NAME" value="redone.Server" />
|
||||
<module name="2006rebotted" />
|
||||
<option name="WORKING_DIRECTORY" value="2006Redone Server" />
|
||||
<extension name="coverage">
|
||||
<pattern>
|
||||
<option name="PATTERN" value="redone.*" />
|
||||
<option name="ENABLED" value="true" />
|
||||
</pattern>
|
||||
</extension>
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<list>
|
||||
<item itemvalue="Application.FileServer" />
|
||||
<item itemvalue="Application.Server" />
|
||||
<item itemvalue="Application.Client" />
|
||||
</list>
|
||||
<recent_temporary>
|
||||
<list>
|
||||
<item itemvalue="Application.Server" />
|
||||
<item itemvalue="Application.FileServer" />
|
||||
<item itemvalue="Application.Client" />
|
||||
</list>
|
||||
</recent_temporary>
|
||||
</component>
|
||||
<component name="SvnConfiguration">
|
||||
<configuration />
|
||||
</component>
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="Default task">
|
||||
<changelist id="e34c4650-a3c9-498e-b05e-c1cbb72d0ad7" name="Default Changelist" comment="" />
|
||||
<created>1572306880139</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1572306880139</updated>
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
<frame x="-7" y="0" width="974" height="1047" extended-state="0" />
|
||||
<editor active="true" />
|
||||
<layout>
|
||||
<window_info content_ui="combo" id="Project" order="0" weight="0.25" />
|
||||
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
|
||||
<window_info id="Image Layers" order="2" />
|
||||
<window_info id="Designer" order="3" />
|
||||
<window_info id="UI Designer" order="4" />
|
||||
<window_info id="Capture Tool" order="5" />
|
||||
<window_info id="Favorites" order="6" side_tool="true" />
|
||||
<window_info anchor="bottom" id="Message" order="0" />
|
||||
<window_info anchor="bottom" id="Find" order="1" />
|
||||
<window_info active="true" anchor="bottom" id="Run" order="2" visible="true" weight="0.032822758" />
|
||||
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
|
||||
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
|
||||
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
|
||||
<window_info anchor="bottom" id="TODO" order="6" />
|
||||
<window_info anchor="bottom" id="Terminal" order="7" />
|
||||
<window_info anchor="bottom" id="Event Log" order="8" side_tool="true" />
|
||||
<window_info anchor="bottom" id="Version Control" order="9" />
|
||||
<window_info anchor="bottom" id="Messages" order="10" />
|
||||
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
|
||||
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="1" weight="0.25" />
|
||||
<window_info anchor="right" id="Palette" order="2" />
|
||||
<window_info anchor="right" id="Ant Build" order="3" weight="0.25" />
|
||||
<window_info anchor="right" id="Maven" order="4" />
|
||||
<window_info anchor="right" id="Theme Preview" order="5" />
|
||||
<window_info anchor="right" id="Capture Analysis" order="6" />
|
||||
<window_info anchor="right" id="Palette	" order="7" />
|
||||
</layout>
|
||||
</component>
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
<option name="TAB_STATES">
|
||||
<map>
|
||||
<entry key="MAIN">
|
||||
<value>
|
||||
<State>
|
||||
<option name="RECENTLY_FILTERED_USER_GROUPS">
|
||||
<collection />
|
||||
</option>
|
||||
<option name="RECENTLY_FILTERED_BRANCH_GROUPS">
|
||||
<collection />
|
||||
</option>
|
||||
<option name="COLUMN_ORDER" />
|
||||
</State>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
<option name="RECENT_FILTERS">
|
||||
<map>
|
||||
<entry key="Branch">
|
||||
<value>
|
||||
<list />
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="User">
|
||||
<value>
|
||||
<list />
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
<component name="editorHistoryManager">
|
||||
<entry file="file://$PROJECT_DIR$/2006Redone Server/src/redone/game/players/Trading.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="404">
|
||||
<caret line="74" column="108" lean-forward="true" selection-start-line="74" selection-start-column="108" selection-end-line="74" selection-end-column="108" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/2006Redone Server/src/redone/game/content/combat/CombatAssistant.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="197">
|
||||
<caret line="2066" column="71" selection-start-line="2066" selection-start-column="71" selection-end-line="2066" selection-end-column="71" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</component>
|
||||
</project>
|
||||
@@ -0,0 +1,3 @@
|
||||
Manifest-Version: 1.0
|
||||
Main-Class: Client
|
||||
|
||||
@@ -10,11 +10,11 @@ public class ClientSettings {
|
||||
/**
|
||||
* The Servers Name
|
||||
*/
|
||||
public final static String SERVER_NAME = "2006Redone";
|
||||
public final static String SERVER_NAME = "2006rebotted";
|
||||
/**
|
||||
* The Servers Website
|
||||
*/
|
||||
public final static String SERVER_WEBSITE = "www.2006redone.org";
|
||||
public final static String SERVER_WEBSITE = "www.2006rebotted.tk";
|
||||
/**
|
||||
* The Servers Ip
|
||||
*
|
||||
@@ -22,8 +22,8 @@ public class ClientSettings {
|
||||
* on localhost
|
||||
*
|
||||
*/
|
||||
public static String SERVER_IP = "35.226.247.68";
|
||||
//public final static String SERVER_IP = "127.0.0.1;
|
||||
//public static String SERVER_IP = "35.226.247.68"; //NOW SET IN Main,java
|
||||
public static String SERVER_IP = "127.0.0.1";
|
||||
/**
|
||||
* The Npc Bits for the Server
|
||||
*/
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* NOTICE: IF YOU CHANGE ANYTHING IN GAME.JAVA, PLEASE COPY-PASTE THE WHOLE CLASS OVER TO LOCALGAME.JAVA
|
||||
* THIS IS TO ALLOW LOCAL PARABOT TO CONTINUE TO WORK
|
||||
*/
|
||||
|
||||
import java.applet.AppletContext;
|
||||
import java.awt.Color;
|
||||
import java.awt.Component;
|
||||
@@ -20,8 +25,13 @@ import java.text.DecimalFormatSymbols;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* NOTICE: IF YOU CHANGE ANYTHING IN GAME.JAVA, PLEASE COPY-PASTE THE WHOLE CLASS OVER TO LOCALGAME.JAVA
|
||||
* THIS IS TO ALLOW LOCAL PARABOT TO CONTINUE TO WORK
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class Game extends RSApplet {
|
||||
private boolean graphicsEnabled = true;
|
||||
|
||||
public static String intToKOrMilLongName(int i) {
|
||||
String s = String.valueOf(i);
|
||||
@@ -4761,6 +4771,9 @@ public class Game extends RSApplet {
|
||||
inputTaken = true;
|
||||
}
|
||||
if ((j == 13 || j == 10) && inputString.length() > 0) {
|
||||
if (inputString.equals("::gfxtgl") || inputString.equals("::tglgfx")) {
|
||||
graphicsEnabled = !graphicsEnabled;
|
||||
}
|
||||
if (myPrivilege == 2) {
|
||||
if (inputString.equals("::clientdrop")) {
|
||||
dropClient();
|
||||
@@ -11474,20 +11487,25 @@ public class Game extends RSApplet {
|
||||
Model.anInt1685 = super.mouseX - 4;
|
||||
Model.anInt1686 = super.mouseY - 4;
|
||||
DrawingArea.setAllPixelsToZero();
|
||||
// xxx disables graphics if(graphicsEnabled){
|
||||
worldController.method313(xCameraPos, yCameraPos, xCameraCurve, zCameraPos, j, yCameraCurve);
|
||||
worldController.clearObj5Cache();
|
||||
updateEntities();
|
||||
drawHeadIcon();
|
||||
if(graphicsEnabled){
|
||||
worldController.method313(xCameraPos, yCameraPos, xCameraCurve, zCameraPos, j, yCameraCurve);
|
||||
worldController.clearObj5Cache();
|
||||
updateEntities();
|
||||
drawHeadIcon();
|
||||
}
|
||||
// Allow tabs to work
|
||||
method37(k2);
|
||||
// Allow stuff inside the tabs to work
|
||||
draw3dScreen();
|
||||
// Show overlays on main screen
|
||||
aRSImageProducer_1165.drawGraphics(4, super.graphics, 4);
|
||||
xCameraPos = l;
|
||||
zCameraPos = i1;
|
||||
yCameraPos = j1;
|
||||
yCameraCurve = k1;
|
||||
xCameraCurve = l1;
|
||||
// }
|
||||
if(graphicsEnabled) {
|
||||
xCameraPos = l;
|
||||
zCameraPos = i1;
|
||||
yCameraPos = j1;
|
||||
yCameraCurve = k1;
|
||||
xCameraCurve = l1;
|
||||
}
|
||||
}
|
||||
|
||||
public void closeOpenInterfaces() {
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* NOTICE: IF YOU CHANGE ANYTHING IN GAME.JAVA, PLEASE COPY-PASTE THE WHOLE CLASS OVER TO LOCALGAME.JAVA
|
||||
* THIS IS TO ALLOW LOCAL PARABOT TO CONTINUE TO WORK
|
||||
*/
|
||||
|
||||
import java.applet.AppletContext;
|
||||
import java.awt.*;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.io.*;
|
||||
import java.net.InetAddress;
|
||||
import java.net.Socket;
|
||||
import java.net.URL;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.DecimalFormatSymbols;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* NOTICE: IF YOU CHANGE ANYTHING IN GAME.JAVA, PLEASE COPY-PASTE THE WHOLE CLASS OVER TO LOCALGAME.JAVA
|
||||
* THIS IS TO ALLOW LOCAL PARABOT TO CONTINUE TO WORK
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class LocalGame extends Game {
|
||||
public LocalGame() {
|
||||
super();
|
||||
server = ClientSettings.SERVER_IP;
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,7 @@ public final class Main {
|
||||
*/
|
||||
|
||||
public static void main(String[] args) {
|
||||
ClientSettings.SERVER_IP = "35.226.247.68";
|
||||
if (args.length > 1)
|
||||
{
|
||||
System.out.println("Running local");
|
||||
|
||||
@@ -111,6 +111,14 @@ public final class RSInterface {
|
||||
rsInterface.actions[l3] = null;
|
||||
}
|
||||
}
|
||||
if(rsInterface.parentID == 3822) {
|
||||
rsInterface.actions[2] = "Sell 10";
|
||||
rsInterface.actions[3] = "Sell X";
|
||||
}
|
||||
if(rsInterface.id == 3900) {
|
||||
rsInterface.actions[2] = "Buy 10";
|
||||
rsInterface.actions[3] = "Buy X";
|
||||
}
|
||||
}
|
||||
if (rsInterface.type == 3) {
|
||||
rsInterface.aBoolean227 = stream.readUnsignedByte() == 1;
|
||||
|
||||
@@ -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") + "/.2006redone_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:/.2006redone_file_system/");
|
||||
File file = new File("C:/.2006rebotted_file_system/");
|
||||
if (!file.exists()) {
|
||||
file.mkdirs();
|
||||
}
|
||||
|
||||
@@ -49,9 +49,9 @@ shop = 48 Kjut's_Kebabs 2 2 1971 1000
|
||||
shop = 49 Flynn's Mace Shop 2 2 1422 10 1420 10 1424 8 1428 6 1430 4
|
||||
shop = 50 Ali's_Discount_Wares 2 2 1931 30 1935 10 1823 30 1833 10 1837 10 1925 10 4593 10 4591 10 970 10 946 10 590 10 1265 10 2138 10
|
||||
shop = 51 Betty's_Magic_emporium 2 2 554 300 555 300 556 300 557 100 558 100 562 30 560 10 221 100 579 10 1017 10
|
||||
shop = 52 Aubury_Magic_Shop 2 2 554 5000000 555 5000000 556 5000000 557 5000000 558 5000000 559 5000000 562 5000000 560 5000000
|
||||
shop = 53 Wizards_Guild_Shop 2 2 554 5000000 555 5000000 556 5000000 557 5000000 558 5000000 559 5000000 562 5000000 561 5000000 560 5000000 563 5000000 565 5000000 1387 5000000 1383 5000000 1381 5000000 1385 5000000
|
||||
shop = 54 Lundails_Rune_Shop 2 2 554 5000000 555 5000000 556 5000000 557 5000000 558 5000000 559 5000000 561 5000000 562 5000000 563 5000000 564 5000000 560 5000000
|
||||
shop = 52 Aubury_Magic_Shop 2 2 554 5000 555 5000 556 5000 557 5000 558 5000 559 5000 562 250 560 250
|
||||
shop = 53 Wizards_Guild_Shop 2 2 554 5000 555 5000 556 5000 557 5000 558 5000 559 5000 562 250 561 250 560 250 563 250 565 250 1387 2 1383 2 1381 2 1385 2
|
||||
shop = 54 Lundails_Rune_Shop 2 2 554 200 555 200 556 200 557 200 558 140 559 140 561 250 562 250 563 250 564 20 565 250 560 250
|
||||
shop = 55 Battle_Runes 2 2 554 100 555 100 556 100 557 100 559 100 558 100 562 30 560 30
|
||||
shop = 56 Tutab's_Magic_Market 2 2 554 1000 555 1000 556 1000 557 1000 563 100 221 10 4006 10 4023 10
|
||||
shop = 57 Void_Knight_Magic_Store 2 2 554 1000 555 1000 556 1000 557 1000 558 1000 559 1000 562 300 560 300
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
[2019/11/10] 22:30 spamtest1 dropped 1 grimy lantadyme absX: 3231 absY: 3207
|
||||
@@ -0,0 +1,2 @@
|
||||
[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
|
||||
@@ -0,0 +1 @@
|
||||
[2019/11/08] 19:22 bot bought newcomer map from store id: 88 for 1 coins
|
||||
@@ -0,0 +1 @@
|
||||
[2019/11/08] 19:22 bot sold newcomer map to store id: 88 for 1 coins
|
||||
@@ -930,9 +930,6 @@ public class CombatAssistant {
|
||||
resetPlayerAttack();
|
||||
return;
|
||||
}
|
||||
// c.getPacketDispatcher().sendMessage("Made it here0.");
|
||||
c.followId = i;
|
||||
c.followId2 = 0;
|
||||
if (c.attackTimer <= 0) {
|
||||
c.usingBow = false;
|
||||
c.specEffect = 0;
|
||||
@@ -953,8 +950,6 @@ public class CombatAssistant {
|
||||
c.attackTimer = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
// c.getPacketDispatcher().sendMessage("Made it here1.");
|
||||
if (!c.usingMagic) {
|
||||
for (int bowId : RangeData.BOWS) {
|
||||
if (c.playerEquipment[c.playerWeapon] == bowId) {
|
||||
@@ -977,7 +972,6 @@ public class CombatAssistant {
|
||||
c.spellId = c.autocastId;
|
||||
c.usingMagic = true;
|
||||
}
|
||||
// c.getPacketDispatcher().sendMessage("Made it here2.");
|
||||
if (c.spellId > 0) {
|
||||
c.usingMagic = true;
|
||||
}
|
||||
@@ -997,7 +991,6 @@ public class CombatAssistant {
|
||||
return;
|
||||
}
|
||||
}
|
||||
// c.getPacketDispatcher().sendMessage("Made it here3.");
|
||||
if (c.duelRule[2] && (usingBow || usingOtherRangeWeapons)) {
|
||||
c.getActionSender().sendMessage(
|
||||
"Range has been disabled in this duel!");
|
||||
@@ -1189,8 +1182,6 @@ public class CombatAssistant {
|
||||
CombatSounds.getMagicSound(c, c.spellId), 100,
|
||||
0);
|
||||
}
|
||||
c.mageFollow = true;
|
||||
c.followId = c.playerIndex;
|
||||
}
|
||||
PlayerHandler.players[i].underAttackBy = c.playerId;
|
||||
PlayerHandler.players[i].logoutDelay = System.currentTimeMillis();
|
||||
@@ -2057,20 +2048,20 @@ public class CombatAssistant {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (CastOnOther.castOnOtherSpells(c)) {
|
||||
if (CastOnOther.castOnOtherSpells(c.castingSpellId)) {
|
||||
return true;
|
||||
}
|
||||
if (!PlayerHandler.players[c.playerIndex].inWild()
|
||||
&& !PlayerHandler.players[c.playerIndex].inCwGame()
|
||||
&& !CastOnOther.castOnOtherSpells(c)) {
|
||||
&& !CastOnOther.castOnOtherSpells(c.castingSpellId)) {
|
||||
c.getActionSender().sendMessage(
|
||||
"That player is not in the wilderness.");
|
||||
"That player is not in the wilderness." + c.castingSpellId);
|
||||
c.stopMovement();
|
||||
resetPlayerAttack();
|
||||
return false;
|
||||
}
|
||||
if (!c.inWild() && !PlayerHandler.players[c.playerIndex].inCwGame()
|
||||
&& !CastOnOther.castOnOtherSpells(c)) {
|
||||
&& !CastOnOther.castOnOtherSpells(c.castingSpellId)) {
|
||||
c.getActionSender().sendMessage(
|
||||
"You are not in the wilderness.");
|
||||
c.stopMovement();
|
||||
|
||||
@@ -8,10 +8,10 @@ import redone.game.players.PlayerHandler;
|
||||
|
||||
public class CastOnOther extends CastRequirements {
|
||||
|
||||
public static boolean castOnOtherSpells(Client c) {
|
||||
public static boolean castOnOtherSpells(int castingSpellId) {
|
||||
int[] spells = { 12435, 12455, 12425, 30298, 30290, 30282, };
|
||||
for (int spell : spells) {
|
||||
if (c.castingSpellId == spell) {
|
||||
if (castingSpellId == spell) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -44,9 +44,9 @@ public class CastOnOther extends CastRequirements {
|
||||
if (castOn != null) {
|
||||
if (castOn.distanceToPoint(c.absX, c.absY) <= 15) {
|
||||
if (c.heightLevel == castOn.heightLevel) {
|
||||
c.getPlayerAssistant().sendFrame126(location[type], 12560);
|
||||
c.getPlayerAssistant().sendFrame126(c.playerName, 12558);
|
||||
c.getPlayerAssistant().showInterface(12468);
|
||||
castOn.getPlayerAssistant().sendFrame126(location[type], 12560);
|
||||
castOn.getPlayerAssistant().sendFrame126(c.playerName, 12558);
|
||||
castOn.getPlayerAssistant().showInterface(12468);
|
||||
castOn.teleotherType = type;
|
||||
}
|
||||
}
|
||||
@@ -57,7 +57,7 @@ public class CastOnOther extends CastRequirements {
|
||||
boolean decline) {
|
||||
c.getPlayerAssistant().removeAllWindows();
|
||||
final int[][] coords = { { 3222, 3218 }, // LUMBRIDGE
|
||||
{ 2964, 3378 }, // FALADOR
|
||||
{ 2967, 3378 }, // FALADOR
|
||||
{ 2757, 3477 }, // CAMELOT
|
||||
};
|
||||
if (!decline) {
|
||||
|
||||
@@ -6,30 +6,26 @@ import redone.game.npcs.NpcHandler;
|
||||
|
||||
public class NpcAggressive {
|
||||
|
||||
/**
|
||||
* Aggressive monsters
|
||||
*/
|
||||
private static final int[] AGGRESSIVE_MONSTERS = {
|
||||
1155, 374, 1157, 1158, 1159, 1160, 141, 1459, 1456, 96, 97, 142,
|
||||
2550, 2551, 2552, 2553, 2558, 2559, 2560, 2561, 2562, 2563,
|
||||
2564, 2565, 2892, 2894, 2881, 2882, 2883, 172, 1593, 144, 112, 84, 3068,
|
||||
50, 1590, 1591, 1592, 53, 54, 55, 178, 49, 174, 2455, 2456, 2454,
|
||||
82, 752, 1608, 1609, 1610, 1827, 2783, 1926, 1931, 2457, 412, 1604, 1612,
|
||||
110, 1611, 83, 941, 49, 117, 111, 125, 1154, 107, 1342, 1338, 447, 448, 449, 917,
|
||||
1265, 1267
|
||||
};
|
||||
|
||||
public static boolean isAggressive(int i) {
|
||||
int[] data = {
|
||||
1155, 374, 1157, 1158, 1159, 1160, 141, 1459, 1456, 96, 97, 142,
|
||||
2550, 2551, 2552, 2553, 2558, 2559, 2560, 2561, 2562, 2563,
|
||||
2564, 2565, 2892, 2894, 2881, 2882, 2883, 172, 1593, 144, 112, 84, 3068, 1265,
|
||||
50, 1590, 1591, 1592, 53, 54, 55, 178, 1267, 49, 174, 2455, 2456, 2454,
|
||||
82, 752, 1608, 1609, 1610, 1827, 2783, 1926, 1931, 2457, 412, 1604, 1612,
|
||||
110, 1611, 83, 941, 49, 117, 111, 125, 1154, 107, 1342, 1338, 447, 448, 449, 917
|
||||
};
|
||||
for (int element : data) {
|
||||
if (NpcHandler.npcs[i].npcType == element) {
|
||||
boolean aggressive = NpcHandler.npcs[i].inWild() || PestControl.npcIsPCMonster(NpcHandler.npcs[i].npcType) || FightCaves.isFightCaveNpc(i);
|
||||
for (int element : AGGRESSIVE_MONSTERS) {
|
||||
if (NpcHandler.npcs[i].npcType == element || aggressive) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (PestControl.npcIsPCMonster(NpcHandler.npcs[i].npcType)) {
|
||||
return true;
|
||||
}
|
||||
if (NpcHandler.npcs[i].inWild() && NpcHandler.npcs[i].MaxHP > 0) {
|
||||
return true;
|
||||
}
|
||||
if (FightCaves.isFightCaveNpc(i)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -96,10 +96,28 @@ public class Woodcutting {
|
||||
}
|
||||
|
||||
public static void handleCanoe(final Client player, final int objectId) {
|
||||
Boolean gotAxe = false;
|
||||
if (player.playerLevel[player.playerWoodcutting] < 12) {
|
||||
player.getActionSender().sendMessage("You need a woodcutting level of at least 12 to use the canoe station.");
|
||||
return;
|
||||
}
|
||||
|
||||
for (int axes[] : Axe_Settings) {
|
||||
int type = axes[0];
|
||||
if ( player.getItemAssistant().playerHasItem(type) || player.playerEquipment[player.playerWeapon] == type)
|
||||
{
|
||||
gotAxe = true;
|
||||
}
|
||||
}
|
||||
if (gotAxe)
|
||||
{
|
||||
player.getActionSender().sendMessage("You swing your axe at the station.");
|
||||
}
|
||||
else
|
||||
{
|
||||
player.getActionSender().sendMessage("You need an axe to cut the station.");
|
||||
return;
|
||||
}
|
||||
for (int axes[] : Axe_Settings) {
|
||||
int type = axes[0];
|
||||
int level = axes[1];
|
||||
@@ -107,7 +125,6 @@ public class Woodcutting {
|
||||
if (player.playerLevel[player.playerWoodcutting] >= level && player.getItemAssistant().playerHasItem(type) || player.playerLevel[player.playerWoodcutting] >= level && player.playerEquipment[player.playerWeapon] == type) {
|
||||
player.turnPlayerTo(player.objectX, player.objectY);
|
||||
player.startAnimation(anim);
|
||||
player.getActionSender().sendMessage("You swing your axe at the station.");
|
||||
CycleEventHandler.getSingleton().addEvent(player, new CycleEvent() {
|
||||
@Override
|
||||
public void execute(CycleEventContainer container) {
|
||||
@@ -175,7 +192,7 @@ public class Woodcutting {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean hasAxe(Client player) {
|
||||
public static boolean hasAxe(Client player) {
|
||||
for (int i = 0; i < Axe_Settings.length; i++) {
|
||||
if (player.getItemAssistant().playerHasItem(Axe_Settings[i][0]) || player.playerEquipment[player.playerWeapon] == Axe_Settings[i][0]) {
|
||||
return true;
|
||||
|
||||
@@ -347,7 +347,7 @@ public class CraftingData extends SkillHandler {
|
||||
public static enum amuletData {
|
||||
GOLD(1673, 1692), SAPPHIRE(1675, 1694), EMERALD(1677, 1696), RUBY(1679,
|
||||
1698), DIAMOND(1681, 1700), DRAGONSTONE(1683, 1702), ONYX(6579,
|
||||
6851);
|
||||
6581);
|
||||
|
||||
private final int amuletId, product;
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ public class Item {
|
||||
6062 };
|
||||
public static int rings[] = { 8082, 773, 1635, 1637, 1639, 1641, 1643,
|
||||
1645, 2550, 2552, 2554, 2556, 2558, 2560, 2562, 2564, 2566, 2568,
|
||||
2570, 2572, 4202, 4657, 6465, 6737, 6731, 6735, 6735, 6583, 6733 };
|
||||
2570, 2572, 4202, 4657, 6465, 6737, 6731, 6735, 6583, 6733 };
|
||||
public static int body[] = { 7608, 2520, 430, 7362, 7364, 636, 638, 640,
|
||||
642, 644, 8064, 426, 430, 1005, 1757, 7592, 8031, 8027, 6617, 8019,
|
||||
8014, 8002, 7376, 544, 7372, 7370, 577, 7974, 7970, 7965, 7961,
|
||||
|
||||
@@ -76,7 +76,7 @@ public class LightSources {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
c.getActionSender().sendMessage("It's recommened that you get a light source to continue.");
|
||||
c.getActionSender().sendMessage("It's recommended that you get a light source to continue.");
|
||||
brightness1(c);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ import java.io.BufferedReader;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
|
||||
import redone.Constants;
|
||||
import redone.Server;
|
||||
import redone.game.content.combat.npcs.NpcAggressive;
|
||||
@@ -414,24 +413,13 @@ public class NpcHandler {
|
||||
continue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attacking player
|
||||
**/
|
||||
|
||||
if (NpcAggressive.isAggressive(i) && !npcs[i].underAttack && !npcs[i].isDead && !switchesAttackers(i)) {
|
||||
Client client = (Client) PlayerHandler.players[NpcData.getCloseRandomPlayer(i)];
|
||||
if (client != null && getNpcListCombat(npcs[i].npcType) * 2 > client.combatLevel || npcs[i].npcType == 1265 || npcs[i].npcType == 1267 || npcs[i].npcType == 96 || npcs[i].npcType == 97 || npcs[i].npcType == 141) {
|
||||
npcs[i].killerId = NpcData.getCloseRandomPlayer(i);
|
||||
}
|
||||
} else if (NpcAggressive.isAggressive(i) && !npcs[i].underAttack && !npcs[i].isDead && switchesAttackers(i)) {
|
||||
Client c = (Client) PlayerHandler.players[NpcData.getCloseRandomPlayer(i)];
|
||||
if (c != null && getNpcListCombat(npcs[i].npcType) * 2 > c.combatLevel) {
|
||||
Client client = (Client) PlayerHandler.players[NpcData.getCloseRandomPlayer(i)];
|
||||
if (client != null) {
|
||||
boolean aggressive = (NpcAggressive.isAggressive(i) || getNpcListCombat(npcs[i].npcType) * 2 > client.combatLevel);
|
||||
if (aggressive && !npcs[i].underAttack && !npcs[i].isDead && npcs[i].MaxHP > 0) {
|
||||
npcs[i].killerId = NpcData.getCloseRandomPlayer(i);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Attacking player
|
||||
*/
|
||||
|
||||
if (System.currentTimeMillis() - npcs[i].lastDamageTaken > 5000) {
|
||||
npcs[i].underAttackBy = 0;
|
||||
@@ -935,7 +923,7 @@ public class NpcHandler {
|
||||
break;
|
||||
}
|
||||
if (Misc.random(1, 256) == 1) {
|
||||
int level = npcs[i].combatLevel;
|
||||
int level = getNpcListCombat(npcs[i].npcType);
|
||||
if (level >= 2 && level <= 24) // easy
|
||||
Server.itemHandler.createGroundItem(c, 2677, npcs[i].absX, npcs[i].absY, 1, c.playerId);
|
||||
else if (level <= 40) // easy → medium
|
||||
@@ -944,8 +932,8 @@ public class NpcHandler {
|
||||
Server.itemHandler.createGroundItem(c, 2678, npcs[i].absX, npcs[i].absY, 1, c.playerId);
|
||||
else if (level <= 150) // medium → hard
|
||||
Server.itemHandler.createGroundItem(c, 2678 + Misc.random(0, 1), npcs[i].absX, npcs[i].absY, 1, c.playerId);
|
||||
else // hard
|
||||
Server.itemHandler.createGroundItem(c, 2678 + Misc.random(0, 1), npcs[i].absX, npcs[i].absY, 1, c.playerId);
|
||||
else if (level > 150)// hard
|
||||
Server.itemHandler.createGroundItem(c, 2679, npcs[i].absX, npcs[i].absY, 1, c.playerId);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1387,16 +1375,10 @@ public class NpcHandler {
|
||||
token = token.trim();
|
||||
token2 = line.substring(spot + 1);
|
||||
token2 = token2.trim();
|
||||
token2_2 = token2.replaceAll("\t\t", "\t");
|
||||
token2_2 = token2_2.replaceAll("\t\t", "\t");
|
||||
token2_2 = token2_2.replaceAll("\t\t", "\t");
|
||||
token2_2 = token2_2.replaceAll("\t\t", "\t");
|
||||
token2_2 = token2_2.replaceAll("\t\t", "\t");
|
||||
token2_2 = token2.replaceAll("\t+", "\t");
|
||||
token3 = token2_2.split("\t");
|
||||
if (token.equals("npc")) {
|
||||
newNPCList(Integer.parseInt(token3[0]), token3[1],
|
||||
Integer.parseInt(token3[2]),
|
||||
Integer.parseInt(token3[3]));
|
||||
newNPCList(Integer.parseInt(token3[0]), token3[1], Integer.parseInt(token3[2]), Integer.parseInt(token3[3]));
|
||||
}
|
||||
} else {
|
||||
if (line.equals("[ENDOFNPCLIST]")) {
|
||||
|
||||
@@ -65,11 +65,6 @@ public class ObjectsActions {
|
||||
player.getActionSender().sendMessage("This object does not exist. Please report this to a staff member.");
|
||||
return;
|
||||
}
|
||||
if (player.isBotting == true) {
|
||||
player.getActionSender().sendMessage("You can't click any objects until you confirm you are not botting.");
|
||||
player.getActionSender().sendMessage("If you need to you can type ::amibotting, to see if your botting.");
|
||||
return;
|
||||
}
|
||||
if (Webs.webs(player, objectType)) {
|
||||
Webs.slashWeb(player, objectType, objectX, objectY);
|
||||
return;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package redone.game.objects.impl;
|
||||
|
||||
import redone.game.content.skills.core.Woodcutting;
|
||||
import redone.game.players.Client;
|
||||
|
||||
/**
|
||||
@@ -8,6 +9,11 @@ import redone.game.players.Client;
|
||||
public class BrimhavenVines {
|
||||
|
||||
public static void handleBrimhavenVines(Client c, int objectType) {
|
||||
if (!Woodcutting.hasAxe(c)) {
|
||||
c.getActionSender().sendMessage("You will need an axe to chop through these!");
|
||||
return;
|
||||
}
|
||||
c.getActionSender().sendMessage("You chop your way through the vines.");
|
||||
switch (objectType) {
|
||||
case 12987:
|
||||
case 12986:
|
||||
@@ -31,21 +37,23 @@ public class BrimhavenVines {
|
||||
}
|
||||
}
|
||||
|
||||
public static void moveThroughVinesX(Client c, int originX, int x1, int y1,
|
||||
int x2, int y2) {
|
||||
public static void moveThroughVinesX(Client c, int originX, int x1, int y1, int x2, int y2) {
|
||||
int x = c.getX();
|
||||
int y = c.getY();
|
||||
if (c.absX <= originX) {
|
||||
c.getPlayerAssistant().walkTo(x1, y1);
|
||||
c.getPlayerAssistant().movePlayer(x + x1, y + y1, 0);
|
||||
} else {
|
||||
c.getPlayerAssistant().walkTo(x2, y2);
|
||||
c.getPlayerAssistant().movePlayer(x + x2, y + y2, 0);
|
||||
}
|
||||
}
|
||||
|
||||
public static void moveThroughVinesY(Client c, int originY, int x1, int y1,
|
||||
int x2, int y2) {
|
||||
public static void moveThroughVinesY(Client c, int originY, int x1, int y1, int x2, int y2) {
|
||||
int x = c.getX();
|
||||
int y = c.getY();
|
||||
if (c.absY <= originY) {
|
||||
c.getPlayerAssistant().walkTo(x1, y1);
|
||||
c.getPlayerAssistant().movePlayer(x + x1, y + y1, 0);
|
||||
} else {
|
||||
c.getPlayerAssistant().walkTo(x2, y2);
|
||||
c.getPlayerAssistant().movePlayer(x + x2, y + y2, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -565,7 +565,7 @@ public class Client extends Player {
|
||||
Server.clanChat.leaveClan(playerId, clanId);
|
||||
}
|
||||
|
||||
if(!Server.ersSecret.equals("")) {
|
||||
if(Server.ersSecret != null && !Server.ersSecret.equals("") && this.playerRights < 2) {
|
||||
boolean debugMessage = false;
|
||||
System.out.println("Updating highscores for " + this.playerName + "!");
|
||||
com.everythingrs.hiscores.Hiscores.update(Server.ersSecret, "Normal Mode", this.playerName, this.playerRights, this.playerXP, debugMessage);
|
||||
@@ -657,11 +657,10 @@ public class Client extends Player {
|
||||
getActionSender().sendMessage("Welcome to @blu@" + Constants.SERVER_NAME + "@bla@ - we are currently in Server Stage v@blu@" + Constants.TEST_VERSION + "@bla@.");
|
||||
getActionSender().sendMessage("@red@Did you know?@bla@ We're open source! Pull requests are welcome");
|
||||
getActionSender().sendMessage("Source code at github.com/dginovker/2006rebotted");
|
||||
getActionSender().sendMessage("Welcome to the Beta! A reset will occur before main release -");
|
||||
getActionSender().sendMessage("Join our Discord: discord.gg/4zrA2Wy");
|
||||
if (!hasBankpin) {
|
||||
getActionSender().sendMessage("You do not, have a bank pin it is highly recommened you set one.");
|
||||
}
|
||||
/*if (!hasBankpin) { //Kind of annoying. Maybe add Random % 10 or something.
|
||||
getActionSender().sendMessage("You do not have a bank pin it is highly recommended you set one.");
|
||||
}*/
|
||||
}
|
||||
getPlayerAssistant().firstTimeTutorial();
|
||||
getItemAssistant().sendWeapon(playerEquipment[playerWeapon], ItemAssistant.getItemName(playerEquipment[playerWeapon]));
|
||||
@@ -760,8 +759,12 @@ public class Client extends Player {
|
||||
flushOutStream();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void logout() {
|
||||
logout(false);
|
||||
}
|
||||
|
||||
public void logout(boolean forceLogout) {
|
||||
synchronized (this) {
|
||||
if(Server.trawler.players.contains(this)) {
|
||||
Server.trawler.players.remove(this);
|
||||
@@ -796,7 +799,7 @@ public class Client extends Player {
|
||||
PestControl.leaveWaitingBoat(this);
|
||||
getPlayerAssistant().movePlayer(2657, 2639, 0);
|
||||
}
|
||||
if(underAttackBy > 0 || underAttackBy2 > 0) {
|
||||
if(!forceLogout && (underAttackBy > 0 || underAttackBy2 > 0)) {
|
||||
getActionSender().sendMessage("You can't logout during combat!");
|
||||
return;
|
||||
}
|
||||
@@ -808,7 +811,7 @@ public class Client extends Player {
|
||||
if (hasNpc == true) {
|
||||
getSummon().pickUpClean(this, summonId);
|
||||
}
|
||||
if (System.currentTimeMillis() - logoutDelay > 2500) {
|
||||
if (forceLogout || System.currentTimeMillis() - logoutDelay > 2500) {
|
||||
outStream.createFrame(109);
|
||||
properLogout = true;
|
||||
} else {
|
||||
@@ -935,7 +938,7 @@ public class Client extends Player {
|
||||
@Override
|
||||
public void process() {
|
||||
|
||||
if (playerEnergy < 100&& System.currentTimeMillis() - lastIncrease >= getPlayerAssistant().raiseTimer()) {
|
||||
if (playerEnergy < 100 && System.currentTimeMillis() - lastIncrease >= getPlayerAssistant().raiseTimer()) {
|
||||
playerEnergy += 1;
|
||||
lastIncrease = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
@@ -1,62 +1,62 @@
|
||||
package redone.game.players;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
|
||||
import static redone.game.players.PlayerSave.loadPlayerInfo;
|
||||
|
||||
public class HighscoresHandler {
|
||||
public ArrayList<Client> players = new ArrayList<>();
|
||||
|
||||
public HighscoresHandler() {
|
||||
File dir = new File("./data/characters");
|
||||
File[] directoryListing = dir.listFiles();
|
||||
for (File child : directoryListing) {
|
||||
Client player = new Client(null, -1);
|
||||
player.playerName = child.getName().split("\\.")[0];
|
||||
loadPlayerInfo(player, child.getName().split("\\.")[0], "", false);
|
||||
players.add(player);
|
||||
}
|
||||
}
|
||||
|
||||
public String getRank(int i, String sortBy) {
|
||||
if (players.size() <= i)
|
||||
return "Nobody";
|
||||
|
||||
switch (sortBy)
|
||||
{
|
||||
case "level":
|
||||
players.sort(new totalLevelComparator());
|
||||
return players.get(i).playerName + ": " + players.get(i).getPlayerAssistant().getTotalLevel();
|
||||
case "gold":
|
||||
players.sort(new totalGoldComparator());
|
||||
return players.get(i).playerName + ": " + players.get(i).getPlayerAssistant().totalGold() + "gp";
|
||||
default:
|
||||
players.sort(new globalDmgComparator());
|
||||
return players.get(i).playerName + ": " + players.get(i).globalDamageDealt;
|
||||
}
|
||||
}
|
||||
|
||||
private class totalLevelComparator implements Comparator<Client> {
|
||||
@Override
|
||||
public int compare(Client client, Client t1) {
|
||||
return - client.getPlayerAssistant().getTotalLevel() + t1.getPlayerAssistant().getTotalLevel();
|
||||
}
|
||||
}
|
||||
|
||||
private class totalGoldComparator implements Comparator<Client> {
|
||||
@Override
|
||||
public int compare(Client client, Client t1) {
|
||||
return - client.getPlayerAssistant().totalGold() + t1.getPlayerAssistant().totalGold();
|
||||
}
|
||||
}
|
||||
|
||||
private class globalDmgComparator implements Comparator<Client> {
|
||||
@Override
|
||||
public int compare(Client client, Client t1) {
|
||||
return - client.globalDamageDealt + t1.globalDamageDealt;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
package redone.game.players;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
|
||||
import static redone.game.players.PlayerSave.loadPlayerInfo;
|
||||
|
||||
public class HighscoresHandler {
|
||||
public ArrayList<Client> players = new ArrayList<>();
|
||||
|
||||
public HighscoresHandler() {
|
||||
File dir = new File("./data/characters");
|
||||
File[] directoryListing = dir.listFiles();
|
||||
for (File child : directoryListing) {
|
||||
Client player = new Client(null, -1);
|
||||
player.playerName = child.getName().split("\\.")[0];
|
||||
loadPlayerInfo(player, child.getName().split("\\.")[0], "", false);
|
||||
players.add(player);
|
||||
}
|
||||
}
|
||||
|
||||
public String getRank(Client player, int i, String sortBy) {
|
||||
if (players.size() <= i || player.playerRights >= 2) {
|
||||
return "Nobody";
|
||||
}
|
||||
|
||||
switch (sortBy) {
|
||||
case "level":
|
||||
players.sort(new totalLevelComparator());
|
||||
return players.get(i).playerName + ": " + players.get(i).getPlayerAssistant().getTotalLevel();
|
||||
case "gold":
|
||||
players.sort(new totalGoldComparator());
|
||||
return players.get(i).playerName + ": " + players.get(i).getPlayerAssistant().totalGold() + "gp";
|
||||
default:
|
||||
players.sort(new globalDmgComparator());
|
||||
return players.get(i).playerName + ": " + players.get(i).globalDamageDealt;
|
||||
}
|
||||
}
|
||||
|
||||
private class totalLevelComparator implements Comparator<Client> {
|
||||
@Override
|
||||
public int compare(Client client, Client t1) {
|
||||
return - client.getPlayerAssistant().getTotalLevel() + t1.getPlayerAssistant().getTotalLevel();
|
||||
}
|
||||
}
|
||||
|
||||
private class totalGoldComparator implements Comparator<Client> {
|
||||
@Override
|
||||
public int compare(Client client, Client t1) {
|
||||
return - client.getPlayerAssistant().totalGold() + t1.getPlayerAssistant().totalGold();
|
||||
}
|
||||
}
|
||||
|
||||
private class globalDmgComparator implements Comparator<Client> {
|
||||
@Override
|
||||
public int compare(Client client, Client t1) {
|
||||
return - client.globalDamageDealt + t1.globalDamageDealt;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ public abstract class Player {
|
||||
public ArrayList<String> killedPlayers = new ArrayList<String>();
|
||||
public ArrayList<Integer> attackedPlayers = new ArrayList<Integer>();
|
||||
public ArrayList<String> lastKilledPlayers = new ArrayList<String>();
|
||||
|
||||
|
||||
public int CraftInt, Dcolor, FletchInt, clanId = -1;
|
||||
|
||||
public int[][] barrowCrypt = {
|
||||
@@ -970,32 +970,9 @@ public abstract class Player {
|
||||
wQueueWritePtr = next;
|
||||
// }
|
||||
}
|
||||
|
||||
public boolean goodDistance(int objectX, int objectY, int playerX,
|
||||
int playerY, int distance) {
|
||||
for (int i = 0; i <= distance; i++) {
|
||||
for (int j = 0; j <= distance; j++) {
|
||||
if (objectId == 2282 || objectId == 10883 || objectId == 2322
|
||||
|| objectId == 4493 || objectId == 12164
|
||||
|| objectId == 1721 || objectId == 1722
|
||||
|| objectId == 4304 && playerX == 2619
|
||||
&& playerY == 3667) {
|
||||
return true;
|
||||
}
|
||||
if (objectX + i == playerX
|
||||
&& (objectY + j == playerY || objectY - j == playerY || objectY == playerY)) {
|
||||
return true;
|
||||
} else if (objectX - i == playerX
|
||||
&& (objectY + j == playerY || objectY - j == playerY || objectY == playerY)) {
|
||||
return true;
|
||||
} else if (objectX == playerX
|
||||
&& (objectY + j == playerY || objectY - j == playerY || objectY == playerY)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public boolean goodDistance(int objectX, int objectY, int playerX, int playerY, int distance) {
|
||||
return ((objectX-playerX <= distance && objectX-playerX >= -distance) && (objectY-playerY <= distance && objectY-playerY >= -distance));
|
||||
}
|
||||
|
||||
public int getNextWalkingDirection() {
|
||||
if (wQueueReadPtr == wQueueWritePtr) {
|
||||
|
||||
@@ -430,10 +430,14 @@ public class PlayerAssistant {
|
||||
}
|
||||
|
||||
public void writeEnergy() {
|
||||
if (player.playerEnergy > 0) {
|
||||
sendFrame126((int) Math.ceil(player.playerEnergy) + "%", 149);
|
||||
} else {
|
||||
sendFrame126("0%", 149);
|
||||
if (player.playerEnergy >= 100) {
|
||||
sendFrame126("100%", 149);
|
||||
} else {
|
||||
if (player.playerEnergy > 0 && player.playerEnergy < 100) {
|
||||
sendFrame126((int) Math.ceil(player.playerEnergy) + "%", 149);
|
||||
} else if (player.playerEnergy <= 0) {
|
||||
sendFrame126("0%", 149);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2440,7 +2444,7 @@ public class PlayerAssistant {
|
||||
if (!player.hasBankpin) {
|
||||
player.getActionSender()
|
||||
.sendMessage(
|
||||
"You do not, have a bank pin it is highly recommened you set one.");
|
||||
"You do not, have a bank pin it is highly recommended you set one.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,9 +70,9 @@ public class Trading {
|
||||
}
|
||||
}
|
||||
public boolean isCloseTo(Client tradedPlayer) {
|
||||
ValueRange PlayerCoordRangeX = ValueRange.of(tradedPlayer.currentX - 3, tradedPlayer.currentX + 3);
|
||||
ValueRange PlayerCoordRangeY = ValueRange.of(tradedPlayer.currentY - 3, tradedPlayer.currentY + 3);
|
||||
if (PlayerCoordRangeX.isValidIntValue(player.currentX) && PlayerCoordRangeY.isValidIntValue(player.currentY)) {
|
||||
ValueRange PlayerCoordRangeX = ValueRange.of(tradedPlayer.absX - 3, tradedPlayer.absX + 3);
|
||||
ValueRange PlayerCoordRangeY = ValueRange.of(tradedPlayer.absY - 3, tradedPlayer.absY + 3);
|
||||
if (PlayerCoordRangeX.isValidIntValue(player.absX) && PlayerCoordRangeY.isValidIntValue(player.absY)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@@ -252,7 +252,7 @@ public class Trading {
|
||||
if (o == null) {
|
||||
return false;
|
||||
}
|
||||
if (!(player.playerItems[fromSlot] == itemID + 1 && player.playerItemsN[fromSlot] >= amount)) {
|
||||
if (!(player.playerItems[fromSlot] == itemID + 1 )){//&& player.playerItemsN[fromSlot] >= amount)) { I removed this check to permit trading max amount of item in inventory even when amount is higher than quantity in inventory.
|
||||
player.getActionSender().sendMessage("You don't have that amount!");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ import redone.game.items.ItemDefinitions;
|
||||
import redone.game.players.Client;
|
||||
import redone.game.players.Player;
|
||||
import redone.game.players.PlayerHandler;
|
||||
import redone.net.ActionSender;
|
||||
import redone.util.GameLogger;
|
||||
|
||||
|
||||
@@ -68,13 +67,13 @@ public class ShopAssistant {
|
||||
public void resetShop(int ShopID) {
|
||||
synchronized (player) {
|
||||
int TotalItems = 0;
|
||||
for (int i = 0; i < ShopHandler.MaxShopItems; i++) {
|
||||
for (int i = 0; i < ShopHandler.MaxShopItems; i++) { //adds items in store when items are sold until max value.
|
||||
if (ShopHandler.ShopItems[ShopID][i] > 0) {
|
||||
TotalItems++;
|
||||
}
|
||||
}
|
||||
if (TotalItems > ShopHandler.MaxShopItems) {
|
||||
TotalItems = ShopHandler.MaxShopItems;
|
||||
TotalItems = ShopHandler.MaxShopItems; //sets the stack of item sold to max value if the resulting amount is higher than max value.
|
||||
}
|
||||
player.getOutStream().createFrameVarSizeWord(53);
|
||||
player.getOutStream().writeWord(3900);
|
||||
@@ -334,6 +333,7 @@ public class ShopAssistant {
|
||||
}
|
||||
|
||||
public boolean sellItem(int itemID, int fromSlot, int amount) {
|
||||
player.getItemAssistant();
|
||||
for (int i : Constants.ITEM_SELLABLE) {
|
||||
if (i == itemID) {
|
||||
player.getItemAssistant();
|
||||
@@ -364,14 +364,11 @@ public class ShopAssistant {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (amount > player.playerItemsN[fromSlot] && (ItemDefinitions.getDef()[player.playerItems[fromSlot] - 1].isNoteable == true || ItemDefinitions.getDef()[player.playerItems[fromSlot] - 1].isStackable == true)) {
|
||||
amount = player.playerItemsN[fromSlot];
|
||||
} else if (amount > player.getItemAssistant().getItemAmount(itemID) && ItemDefinitions.getDef()[player.playerItems[fromSlot] - 1].isNoteable == false && ItemDefinitions.getDef()[player.playerItems[fromSlot] - 1].isStackable == false) {
|
||||
amount = player.getItemAssistant().getItemAmount(itemID);
|
||||
}
|
||||
// double ShopValue;
|
||||
// double TotPrice;
|
||||
String itemName = ItemAssistant.getItemName(itemID).toLowerCase();
|
||||
int TotPrice2 = 0;
|
||||
if (player.myShopId == 138 || player.myShopId == 58 || player.myShopId == 139) {
|
||||
@@ -381,9 +378,13 @@ public class ShopAssistant {
|
||||
}
|
||||
if (player.getItemAssistant().freeSlots() > 0 || player.getItemAssistant().playerHasItem(995) || player.getItemAssistant().playerHasItem(6529)) { //Checks to see if player has room for coins.
|
||||
if (!ItemDefinitions.getDef()[itemID].isNoteable) { //Check to see if its notable.
|
||||
player.getItemAssistant().deleteItem(itemID, player.getItemAssistant().getItemSlot(itemID), amount); //don't really understand if the item isn't notable why it still needs to find the slot.
|
||||
player.getItemAssistant().deleteItem2(itemID, amount);
|
||||
} else {
|
||||
player.getItemAssistant().deleteItem(itemID, fromSlot, amount);
|
||||
player.getItemAssistant().deleteItem2(itemID, amount);
|
||||
String ItemNameUnNotedItem = ItemAssistant.getItemName(itemID - 1).toLowerCase();
|
||||
if (itemName.contains(ItemNameUnNotedItem)) {
|
||||
itemID = itemID - 1; //Replace the noted item by it's un-noted version.
|
||||
}
|
||||
}
|
||||
if (player.myShopId == 138 || player.myShopId == 139 || player.myShopId == 58) {
|
||||
player.getItemAssistant().addItem(6529, TotPrice2); //Add the tokkul to your inventory.
|
||||
@@ -393,7 +394,7 @@ public class ShopAssistant {
|
||||
addShopItem(itemID, amount); //Add item to the shop.
|
||||
if (player.getPlayerAssistant().isPlayer()) { //Logger
|
||||
GameLogger.writeLog(player.playerName, "shopselling", player.playerName + " sold " + itemName + " to store id: " + player.myShopId + " for" + GameLogger.formatCurrency(TotPrice2) + " coins");
|
||||
player.getActionSender().sendMessage("You sold " + amount + " " +itemName + " for " + TotPrice2 + " gp." );
|
||||
//Remove this later. I added it to push this class because a fuck happened with my last commit.
|
||||
}
|
||||
} else {
|
||||
player.getActionSender().sendMessage("You don't have enough space in your inventory.");
|
||||
@@ -401,7 +402,7 @@ public class ShopAssistant {
|
||||
player.getItemAssistant().resetItems(3823);
|
||||
resetShop(player.myShopId);
|
||||
updatePlayerShop();
|
||||
player.getActionSender().sendMessage("You sold " + amount + " " +itemName + " for " + TotPrice2 + " gp." );
|
||||
player.getActionSender().sendMessage("You sold " + amount + " " +itemName + " for " + TotPrice2 + " coins." );
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
@@ -437,10 +438,50 @@ public class ShopAssistant {
|
||||
private static final int FISHING_ITEMS[] = {383, 371, 377, 359, 321, 341, 353, 345, 327, 317};
|
||||
|
||||
public boolean buyItem(int itemID, int fromSlot, int amount) {
|
||||
int iValue = 0;
|
||||
int boughtQty = 0;
|
||||
boolean boughtItem = false;
|
||||
if (amount > 0) {
|
||||
if (amount > ShopHandler.ShopItemsN[player.myShopId][fromSlot]) {
|
||||
//S4
|
||||
if (ShopHandler.ShopItemsN[player.myShopId][fromSlot] == 0) {
|
||||
player.getActionSender().sendMessage("You can't buy that right now!");
|
||||
return false;
|
||||
}
|
||||
if (amount > ShopHandler.ShopItemsN[player.myShopId][fromSlot] && ShopHandler.ShopItemsN[player.myShopId][fromSlot] > 0) {
|
||||
amount = ShopHandler.ShopItemsN[player.myShopId][fromSlot];
|
||||
}
|
||||
|
||||
if (amount % 23 == 0) {
|
||||
amount = amount / 23;
|
||||
iValue = 23; }
|
||||
else if (amount % 19 == 0) {
|
||||
amount = amount / 19;
|
||||
iValue = 19;
|
||||
} else if (amount % 17 == 0) {
|
||||
amount = amount / 17;
|
||||
iValue = 17;
|
||||
} else if (amount % 13 == 0) {
|
||||
amount = amount / 13;
|
||||
iValue = 13;
|
||||
} else if (amount % 11 == 0) {
|
||||
amount = amount / 11;
|
||||
iValue = 11;
|
||||
} else if (amount % 7 == 0) {
|
||||
amount = amount / 7;
|
||||
iValue = 7;
|
||||
} else if (amount % 5 == 0) {
|
||||
amount = amount / 5;
|
||||
iValue = 5;
|
||||
}
|
||||
else if (amount % 3 == 0) {
|
||||
amount = amount / 3;
|
||||
iValue = 3;
|
||||
} else if (amount % 2 == 0) {
|
||||
amount = amount / 2;
|
||||
iValue = 2;
|
||||
} else{
|
||||
iValue = 1;
|
||||
}
|
||||
if(!player.isShopping) {
|
||||
return false;
|
||||
}
|
||||
@@ -456,15 +497,13 @@ public class ShopAssistant {
|
||||
if (!shopSellsItem(itemID)) {
|
||||
return false;
|
||||
}
|
||||
// double ShopValue;
|
||||
// double TotPrice;
|
||||
int TotPrice2 = 0;
|
||||
// int Overstock;
|
||||
int Slot = 0;
|
||||
int tokkulSlot = 0;// Tokkul
|
||||
int TotPrice2 = 0; //ShopPrice
|
||||
int RemainingToBuy; //Remaining of item to buy to fill the order. It's the remaining that can't fit in the loop. It has to be processed by itself after the loop.
|
||||
int Slot = 0; //gp (995)
|
||||
int tokkulSlot = 0;
|
||||
int rangeSlot = 0;
|
||||
int castleSlot = 0;
|
||||
for (int i = amount; i > 0; i--) {
|
||||
for (int i = amount; iValue > 0; iValue--) {
|
||||
if (player.myShopId != 138 && player.myShopId != 58 && player.myShopId != 139 && player.myShopId != RANGE_SHOP && player.myShopId != PEST_SHOP && player.myShopId != CASTLE_SHOP) {
|
||||
TotPrice2 = (int) Math.floor(getItemShopValue(itemID, 0, false));
|
||||
} else if (player.myShopId == 138 || player.myShopId == 58 || player.myShopId == 139) {
|
||||
@@ -577,34 +616,93 @@ public class ShopAssistant {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (player.playerItemsN[Slot] >= TotPrice2) {
|
||||
if (player.getItemAssistant().freeSlots() > 0 || (player.getItemAssistant().playerHasItem(itemID) && ItemDefinitions.getDef()[itemID].isStackable)) {
|
||||
if (player.playerItemsN[Slot] >= TotPrice2 * amount) {
|
||||
if (player.getItemAssistant().freeSlots() >= amount || (player.getItemAssistant().playerHasItem(itemID) && ItemDefinitions.getDef()[itemID].isStackable) || player.getItemAssistant().freeSlots() >= 1 && ItemDefinitions.getDef()[itemID].isStackable) {
|
||||
player.getItemAssistant().deleteItem(995,
|
||||
player.getItemAssistant().getItemSlot(995),
|
||||
TotPrice2);
|
||||
player.getItemAssistant().addItem(itemID, 1);
|
||||
ShopHandler.ShopItemsN[player.myShopId][fromSlot] -= 1;
|
||||
ShopHandler.ShopItemsDelay[player.myShopId][fromSlot] = 0;
|
||||
TotPrice2 * amount);
|
||||
player.getItemAssistant().addItem(itemID, amount); //All of these actions are performed in a loop. We are in the loop right now.
|
||||
boughtQty+=amount;
|
||||
ShopHandler.ShopItemsN[player.myShopId][fromSlot] -= amount; //Delete X item from shop at the slot the item is.
|
||||
ShopHandler.ShopItemsDelay[player.myShopId][fromSlot] = 0; //Shit ass delay
|
||||
if (fromSlot + 1 > ShopHandler.ShopItemsStandard[player.myShopId]) {
|
||||
ShopHandler.ShopItems[player.myShopId][fromSlot] = 0;
|
||||
ShopHandler.ShopItems[player.myShopId][fromSlot] = itemID + 1;
|
||||
}
|
||||
} else {
|
||||
player.getActionSender()
|
||||
.sendMessage(
|
||||
"You don't have enough space in your inventory.");
|
||||
if (player.getItemAssistant().freeSlots() == 0) {
|
||||
player.getActionSender().sendMessage(
|
||||
"You don't have enough space in your inventory.");
|
||||
} else {
|
||||
//Buys the remaining item to fill the inventory slots.
|
||||
RemainingToBuy = player.getItemAssistant().freeSlots();
|
||||
amount = RemainingToBuy;
|
||||
player.getItemAssistant().deleteItem(995,
|
||||
player.getItemAssistant().getItemSlot(995),
|
||||
TotPrice2 * amount);
|
||||
player.getItemAssistant().addItem(itemID, amount);
|
||||
boughtQty+=amount;
|
||||
ShopHandler.ShopItemsN[player.myShopId][fromSlot] -= amount;
|
||||
ShopHandler.ShopItemsDelay[player.myShopId][fromSlot] = 0;
|
||||
if (fromSlot + 1 > ShopHandler.ShopItemsStandard[player.myShopId]) {
|
||||
ShopHandler.ShopItems[player.myShopId][fromSlot] = itemID + 1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
boughtItem = true;
|
||||
} else {
|
||||
player.getActionSender().sendMessage(
|
||||
"You don't have enough coins.");
|
||||
break;
|
||||
if (player.playerItemsN[Slot] / TotPrice2 > 0) {
|
||||
amount = (int)Math.floor(player.playerItemsN[Slot] / TotPrice2);
|
||||
} else {
|
||||
player.getActionSender().sendMessage("You don't have enough coins.");
|
||||
player.getItemAssistant().resetItems(3823);
|
||||
resetShop(player.myShopId);
|
||||
updatePlayerShop();
|
||||
return false;
|
||||
}
|
||||
if (player.getItemAssistant().freeSlots() >= amount || (player.getItemAssistant().playerHasItem(itemID) && ItemDefinitions.getDef()[itemID].isStackable) || player.getItemAssistant().freeSlots() >= 1 && ItemDefinitions.getDef()[itemID].isStackable) {
|
||||
player.getItemAssistant().deleteItem(995,
|
||||
player.getItemAssistant().getItemSlot(995),
|
||||
TotPrice2 * amount);
|
||||
player.getItemAssistant().addItem(itemID, amount); //All of these actions are performed in a loop. We are in the loop right now.
|
||||
boughtQty+=amount;
|
||||
ShopHandler.ShopItemsN[player.myShopId][fromSlot] -= amount; //Delete X item from shop at the slot the item is.
|
||||
ShopHandler.ShopItemsDelay[player.myShopId][fromSlot] = 0; //Shit ass delay
|
||||
if (fromSlot + 1 > ShopHandler.ShopItemsStandard[player.myShopId]) {
|
||||
ShopHandler.ShopItems[player.myShopId][fromSlot] = itemID + 1;
|
||||
}
|
||||
} else {
|
||||
if (player.getItemAssistant().freeSlots() == 0) {
|
||||
player.getActionSender().sendMessage(
|
||||
"You don't have enough space in your inventory.");
|
||||
} else {
|
||||
//Buys the remaining item to fill the inventory slots.
|
||||
RemainingToBuy = player.getItemAssistant().freeSlots();
|
||||
amount = RemainingToBuy;
|
||||
player.getItemAssistant().deleteItem(995,
|
||||
player.getItemAssistant().getItemSlot(995),
|
||||
TotPrice2 * amount);
|
||||
player.getItemAssistant().addItem(itemID, amount);
|
||||
boughtQty+=amount;
|
||||
ShopHandler.ShopItemsN[player.myShopId][fromSlot] -= amount;
|
||||
ShopHandler.ShopItemsDelay[player.myShopId][fromSlot] = 0;
|
||||
if (fromSlot + 1 > ShopHandler.ShopItemsStandard[player.myShopId]) {
|
||||
ShopHandler.ShopItems[player.myShopId][fromSlot] = itemID + 1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
boughtItem = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (boughtItem) {
|
||||
player.getActionSender().sendMessage("You bought " + boughtQty + " " + ItemAssistant.getItemName(itemID).toLowerCase() + " for " + TotPrice2 * boughtQty + " coins." );
|
||||
}
|
||||
player.getItemAssistant().resetItems(3823);
|
||||
resetShop(player.myShopId);
|
||||
updatePlayerShop();
|
||||
return true;
|
||||
return true; //return TRUE / FALSE Update = shop&Inventory / Doesnt Update
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.io.FileNotFoundException;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
|
||||
import redone.game.players.Client;
|
||||
import redone.game.players.PlayerHandler;
|
||||
import redone.util.Misc;
|
||||
|
||||
@@ -16,7 +17,7 @@ public class ShopHandler {
|
||||
|
||||
public static int MaxShops = 200;
|
||||
public static int MaxShopItems = 200;
|
||||
public static int MaxShowDelay = 10;
|
||||
public static int MaxShowDelay = 2;
|
||||
public static int MaxSpecShowDelay = 60;
|
||||
public static int TotalShops = 0;
|
||||
public static int[][] ShopItems = new int[MaxShops][MaxShopItems];
|
||||
@@ -48,7 +49,7 @@ public class ShopHandler {
|
||||
switch(itemId) {
|
||||
|
||||
default:
|
||||
return 5000;
|
||||
return 1000;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ public class DiscordActivity {
|
||||
private static int count = 50;
|
||||
|
||||
public static void updateActivity() {
|
||||
if (!JavaCord.token.equals("")) {
|
||||
if (JavaCord.token != null && !JavaCord.token.equals("")) {
|
||||
if (count == 0) {
|
||||
if (PlayerHandler.getPlayerCount() != 1) {
|
||||
JavaCord.api.updateActivity(PlayerHandler.getPlayerCount() + " Players Online");
|
||||
|
||||
@@ -195,9 +195,10 @@ public class AttackPlayer implements PacketType {
|
||||
|
||||
c.playerIndex = c.getInStream().readSignedWordA();
|
||||
int castingSpellId = c.getInStream().readSignedWordBigEndian();
|
||||
c.castingSpellId = castingSpellId;
|
||||
c.usingMagic = false;
|
||||
|
||||
boolean teleother = CastOnOther.castOnOtherSpells(c);
|
||||
boolean teleother = CastOnOther.castOnOtherSpells(castingSpellId);
|
||||
|
||||
if (PlayerHandler.players[c.playerIndex] == null) {
|
||||
break;
|
||||
@@ -209,11 +210,26 @@ public class AttackPlayer implements PacketType {
|
||||
|
||||
if (c.playerRights == 3) {
|
||||
c.getActionSender().sendMessage(
|
||||
"Casting Spell id: " + c.castingSpellId + ".");
|
||||
"Casting Spell id: " + castingSpellId + ".");
|
||||
}
|
||||
|
||||
if (teleother) {
|
||||
if (c.inTrade) {
|
||||
c.getTrading().declineTrade(true);
|
||||
}
|
||||
if (c.inWild()
|
||||
&& c.wildLevel > Constants.NO_TELEPORT_WILD_LEVEL) {
|
||||
c.getActionSender().sendMessage(
|
||||
"You can't teleport above level "
|
||||
+ Constants.NO_TELEPORT_WILD_LEVEL
|
||||
+ " in the wilderness.");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
switch (c.castingSpellId) {
|
||||
case 12425:
|
||||
CastOnOther.teleOtherDistance(c, 1, c.playerIndex);
|
||||
CastOnOther.teleOtherDistance(c, 0, c.playerIndex);
|
||||
break;
|
||||
case 12435:
|
||||
CastOnOther.teleOtherDistance(c, 1, c.playerIndex);
|
||||
@@ -222,12 +238,10 @@ public class AttackPlayer implements PacketType {
|
||||
CastOnOther.teleOtherDistance(c, 2, c.playerIndex);
|
||||
break;
|
||||
}
|
||||
|
||||
if (teleother) {
|
||||
c.stopMovement();
|
||||
c.getCombatAssistant().resetPlayerAttack();
|
||||
if (c.inTrade) {
|
||||
c.getTrading().declineTrade(true);
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < MagicData.MAGIC_SPELLS.length; i++) {
|
||||
@@ -288,21 +302,8 @@ public class AttackPlayer implements PacketType {
|
||||
c.stopMovement();
|
||||
c.getCombatAssistant().resetPlayerAttack();
|
||||
}
|
||||
|
||||
if (c.usingMagic) {
|
||||
if (c.goodDistance(c.getX(), c.getY(),
|
||||
PlayerHandler.players[c.playerIndex].getX(),
|
||||
PlayerHandler.players[c.playerIndex].getY(), 7)) {
|
||||
c.stopMovement();
|
||||
}
|
||||
if (c.getCombatAssistant().checkReqs()) {
|
||||
c.followId = c.playerIndex;
|
||||
c.mageFollow = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ public class Bank5 implements PacketType {
|
||||
JewelryMaking.mouldItem(player, removeId, 5);
|
||||
break;
|
||||
case 3900:
|
||||
player.getShopAssistant().buyItem(removeId, removeSlot, 1);
|
||||
player.getShopAssistant().buyItem(removeId, removeSlot, 1); //this says 1 in BANKx5 but it's banking 5 for real... strange shit.
|
||||
break;
|
||||
|
||||
case 3823:
|
||||
|
||||
@@ -20,15 +20,21 @@ public class BankAll implements PacketType {
|
||||
player.endCurrentTask();
|
||||
switch (interfaceId) {
|
||||
case 3900:
|
||||
player.getShopAssistant().buyItem(removeId, removeSlot, 10);
|
||||
player.outStream.createFrame(27);
|
||||
player.xRemoveSlot = removeSlot;
|
||||
player.xRemoveId = removeId;
|
||||
player.xInterfaceId = interfaceId;
|
||||
break;
|
||||
|
||||
case 3823:
|
||||
if(!player.getItemAssistant().playerHasItem(removeId)) {
|
||||
return;
|
||||
}
|
||||
player.getShopAssistant().sellItem(removeId,
|
||||
removeSlot, player.playerItemsN[removeSlot] );
|
||||
|
||||
player.outStream.createFrame(27);
|
||||
player.xRemoveSlot = removeSlot;
|
||||
player.xRemoveId = removeId;
|
||||
player.xInterfaceId = interfaceId;
|
||||
break;
|
||||
|
||||
case 7423:
|
||||
|
||||
@@ -20,14 +20,7 @@ public class BankX1 implements PacketType {
|
||||
c.xInterfaceId = c.getInStream().readUnsignedWordA();
|
||||
c.xRemoveId = c.getInStream().readSignedWordBigEndian();
|
||||
}
|
||||
if (c.xInterfaceId == 3900) {
|
||||
c.getShopAssistant().buyItem(c.xRemoveId, c.xRemoveSlot, 20);// buy
|
||||
// 20
|
||||
c.xRemoveSlot = 0;
|
||||
c.xInterfaceId = 0;
|
||||
c.xRemoveId = 0;
|
||||
return;
|
||||
} else {
|
||||
else {
|
||||
if (c.xInterfaceId == 7423) {
|
||||
c.getItemAssistant().bankItem(c.xRemoveId, c.xRemoveSlot,
|
||||
Xamount);// Depo
|
||||
@@ -35,7 +28,6 @@ public class BankX1 implements PacketType {
|
||||
c.getItemAssistant().resetItems(7423);
|
||||
}
|
||||
}
|
||||
|
||||
if (packetType == PART1) {
|
||||
synchronized (c) {
|
||||
c.getOutStream().createFrame(27);
|
||||
|
||||
@@ -20,52 +20,56 @@ public class BankX2 implements PacketType {
|
||||
Xamount = 1;
|
||||
}
|
||||
switch (player.xInterfaceId) {
|
||||
case 5064:
|
||||
/*if(!player.getItemAssistant().playerHasItem(player.playerItems[player.xRemoveSlot], Xamount))
|
||||
return;*/
|
||||
if (player.inPartyRoom) {
|
||||
PartyRoom.depositItem(player, player.xRemoveId, player.getItemAssistant().itemAmount(player.playerItems[player.xRemoveSlot]));
|
||||
case 5064:
|
||||
if (player.inPartyRoom) {
|
||||
PartyRoom.depositItem(player, player.xRemoveId, player.getItemAssistant().itemAmount(player.playerItems[player.xRemoveSlot]));
|
||||
break;
|
||||
}
|
||||
if (player.inTrade) {
|
||||
player.getActionSender().sendMessage("You can't store items while trading!");
|
||||
return;
|
||||
}
|
||||
player.getItemAssistant().bankItem(player.playerItems[player.xRemoveSlot], player.xRemoveSlot, Xamount);
|
||||
break;
|
||||
}
|
||||
if (player.inTrade) {
|
||||
player.getActionSender().sendMessage("You can't store items while trading!");
|
||||
return;
|
||||
}
|
||||
player.getItemAssistant().bankItem(player.playerItems[player.xRemoveSlot], player.xRemoveSlot, Xamount);
|
||||
break;
|
||||
|
||||
case 5382:
|
||||
/*if(!player.getItemAssistant().playerHasItem(player.playerItems[player.xRemoveSlot], Xamount))
|
||||
return;*/
|
||||
player.getItemAssistant().fromBank(player.bankItems[player.xRemoveSlot], player.xRemoveSlot, Xamount);
|
||||
break;
|
||||
case 5382:
|
||||
player.getItemAssistant().fromBank(player.bankItems[player.xRemoveSlot], player.xRemoveSlot, Xamount);
|
||||
break;
|
||||
|
||||
case 7423:
|
||||
if (player.storing) {
|
||||
return;
|
||||
}
|
||||
player.getItemAssistant().bankItem(player.playerItems[player.xRemoveSlot],
|
||||
player.xRemoveSlot, Xamount);
|
||||
player.getItemAssistant().resetItems(7423);
|
||||
break;
|
||||
case 7423:
|
||||
if (player.storing) {
|
||||
return;
|
||||
}
|
||||
player.getItemAssistant().bankItem(player.playerItems[player.xRemoveSlot],
|
||||
player.xRemoveSlot, Xamount);
|
||||
player.getItemAssistant().resetItems(7423);
|
||||
break;
|
||||
|
||||
case 3322:
|
||||
if (player.duelStatus <= 0) {
|
||||
player.getTrading().tradeItem(player.xRemoveId, player.xRemoveSlot, Xamount);
|
||||
} else {
|
||||
player.getDueling().stakeItem(player.xRemoveId, player.xRemoveSlot, Xamount);
|
||||
}
|
||||
break;
|
||||
case 3322:
|
||||
if (player.duelStatus <= 0) {
|
||||
player.getTrading().tradeItem(player.xRemoveId, player.xRemoveSlot, Xamount);
|
||||
} else {
|
||||
player.getDueling().stakeItem(player.xRemoveId, player.xRemoveSlot, Xamount);
|
||||
}
|
||||
break;
|
||||
|
||||
case 3415:
|
||||
if (player.duelStatus <= 0) {
|
||||
player.getTrading().fromTrade(player.xRemoveId, player.xRemoveSlot, Xamount);
|
||||
}
|
||||
break;
|
||||
case 3415:
|
||||
if (player.duelStatus <= 0) {
|
||||
player.getTrading().fromTrade(player.xRemoveId, player.xRemoveSlot, Xamount);
|
||||
}
|
||||
break;
|
||||
|
||||
case 6669:
|
||||
player.getDueling().fromDuel(player.xRemoveId, player.xRemoveSlot, Xamount);
|
||||
break;
|
||||
case 6669:
|
||||
player.getDueling().fromDuel(player.xRemoveId, player.xRemoveSlot, Xamount);
|
||||
break;
|
||||
|
||||
case 3900:
|
||||
player.getShopAssistant().buyItem(player.xRemoveId, player.xRemoveSlot, Xamount);
|
||||
break;
|
||||
|
||||
case 3823:
|
||||
player.getShopAssistant().sellItem(player.xRemoveId, player.xRemoveSlot, Xamount);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,13 +166,13 @@ public class Commands implements PacketType {
|
||||
"@dre@Highscores",
|
||||
"",
|
||||
"Top 5 Total Level:",
|
||||
hs.getRank(0, "level"), hs.getRank(1, "level"), hs.getRank(2, "level"), hs.getRank(3, "level"), hs.getRank(4, "level"),
|
||||
hs.getRank(player, 0, "level"), hs.getRank(player,1, "level"), hs.getRank(player,2, "level"), hs.getRank(player,3, "level"), hs.getRank(player,4, "level"),
|
||||
"",
|
||||
"Top 5 Wealthiest Players:",
|
||||
hs.getRank(0, "gold"), hs.getRank(1, "gold"), hs.getRank(2, "gold"), hs.getRank(3, "gold"), hs.getRank(4, "gold"),
|
||||
hs.getRank(player,0, "gold"), hs.getRank(player,1, "gold"), hs.getRank(player,2, "gold"), hs.getRank(player,3, "gold"), hs.getRank(player, 4, "gold"),
|
||||
"",
|
||||
"Top 5 Highest Total Damage:",
|
||||
hs.getRank(0, "damage"), hs.getRank(1, "damage"), hs.getRank(2, "damage"), hs.getRank(3, "damage"), hs.getRank(4, "damage"),
|
||||
hs.getRank(player,0, "damage"), hs.getRank(player,1, "damage"), hs.getRank(player,2, "damage"), hs.getRank(player, 3, "damage"), hs.getRank(player, 4, "damage"),
|
||||
};
|
||||
|
||||
for (int i = 8144; i < 8245; i++) {
|
||||
@@ -196,6 +196,28 @@ public class Commands implements PacketType {
|
||||
|
||||
public static void moderatorCommands(Client player, String playerCommand, String[] arguments) {
|
||||
switch (playerCommand.toLowerCase()) {
|
||||
case "kick":
|
||||
try {
|
||||
if (arguments.length == 0) {
|
||||
player.getActionSender().sendMessage("You must specify a player name: ::kick playername");
|
||||
return;
|
||||
}
|
||||
String playerToKick = String.join(" ", arguments);
|
||||
for(Player player2 : PlayerHandler.players) {
|
||||
if(player2 != null) {
|
||||
if(player2.playerName.equalsIgnoreCase(playerToKick)) {
|
||||
Client c2 = (Client)player2;
|
||||
player.getActionSender().sendMessage("You have kicked " + playerToKick + ".");
|
||||
c2.disconnected = true;
|
||||
c2.logout(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch(Exception e) {
|
||||
player.getActionSender().sendMessage("Player Must Be Online.");
|
||||
}
|
||||
break;
|
||||
case "yell":
|
||||
for (int j = 0; j < PlayerHandler.players.length; j++) {
|
||||
if (PlayerHandler.players[j] != null) {
|
||||
@@ -470,7 +492,7 @@ public class Commands implements PacketType {
|
||||
player.playerLevel[skill] = player.getPlayerAssistant().getLevelForXP(player.playerXP[skill]);
|
||||
player.getPlayerAssistant().refreshSkill(skill);
|
||||
player.getPlayerAssistant().levelUp(skill);
|
||||
} catch (Exception ಠ_ಠ) {}
|
||||
} catch (Exception e) {}
|
||||
break;
|
||||
case "spellbook":
|
||||
if (player.inWild()) {
|
||||
@@ -506,7 +528,7 @@ public class Commands implements PacketType {
|
||||
} else {
|
||||
player.getActionSender().sendMessage("No such item.");
|
||||
}
|
||||
} catch (Exception ಠ_ಠ) {}
|
||||
} catch (Exception e) {}
|
||||
break;
|
||||
case "master":
|
||||
for (int i = 0; i < 25; i++) {
|
||||
@@ -522,6 +544,7 @@ public class Commands implements PacketType {
|
||||
public static void developerCommands(Client player, String playerCommand, String[] arguments) {
|
||||
switch (playerCommand.toLowerCase()) {
|
||||
case "clicktotele":
|
||||
case "ctt": // alias
|
||||
player.clickToTele = !player.clickToTele;
|
||||
player.getActionSender().sendMessage("Click to teleport: " + (player.clickToTele ? "Enabled" : "Disabled"));
|
||||
break;
|
||||
@@ -538,7 +561,7 @@ public class Commands implements PacketType {
|
||||
Client c2 = (Client)PlayerHandler.players[i];
|
||||
player.getActionSender().sendMessage("You have given " + playerToAdmin + " admin.");
|
||||
c2.playerRights = 2;
|
||||
c2.logout();
|
||||
c2.logout(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -560,7 +583,7 @@ public class Commands implements PacketType {
|
||||
Client c2 = (Client)PlayerHandler.players[i];
|
||||
player.getActionSender().sendMessage("You have demoted " + playerToAdmin + ".");
|
||||
c2.playerRights = 0;
|
||||
c2.logout();
|
||||
c2.logout(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -582,7 +605,7 @@ public class Commands implements PacketType {
|
||||
Client c2 = (Client)PlayerHandler.players[i];
|
||||
player.getActionSender().sendMessage("You have given " + playerToMod + " mod.");
|
||||
c2.playerRights = 1;
|
||||
c2.logout();
|
||||
c2.logout(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -625,9 +648,9 @@ public class Commands implements PacketType {
|
||||
} else {
|
||||
player.getActionSender().sendMessage("Npc " + newNPC + " does not exist.");
|
||||
}
|
||||
} catch (Exception ಠ_ಠ) {}
|
||||
} catch (Exception e) {}
|
||||
break;
|
||||
case "cantAttack":
|
||||
case "cantattack":
|
||||
player.npcCanAttack = !player.npcCanAttack;
|
||||
player.getActionSender().sendMessage("Npcs " + (player.npcCanAttack ? "can" : "can no longer") + " attack you.");
|
||||
break;
|
||||
@@ -684,7 +707,7 @@ public class Commands implements PacketType {
|
||||
PlayerHandler.updateAnnounced = false;
|
||||
PlayerHandler.updateRunning = true;
|
||||
PlayerHandler.updateStartTime = System.currentTimeMillis();
|
||||
} catch (Exception ಠ_ಠ) {}
|
||||
} catch (Exception e) {}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -305,9 +305,7 @@ public int itemAmount(String name, int itemId, int itemX, int itemY) {
|
||||
|
||||
public ItemList ItemList[] = new ItemList[Constants.ITEM_LIMIT];
|
||||
|
||||
public void newItemList(int ItemId, String ItemName,
|
||||
String ItemDescription, double ShopValue, double LowAlch,
|
||||
double HighAlch, int Bonuses[]) {
|
||||
public void newItemList(int ItemId, String ItemName, String ItemDescription, double ShopValue, double LowAlch, double HighAlch, int Bonuses[]) {
|
||||
// first, search for a free slot
|
||||
int slot = -1;
|
||||
for (int i = 0; i < 11740; i++) {
|
||||
@@ -386,11 +384,7 @@ public int itemAmount(String name, int itemId, int itemX, int itemY) {
|
||||
token = token.trim();
|
||||
token2 = line.substring(spot + 1);
|
||||
token2 = token2.trim();
|
||||
token2_2 = token2.replaceAll("\t\t", "\t");
|
||||
token2_2 = token2_2.replaceAll("\t\t", "\t");
|
||||
token2_2 = token2_2.replaceAll("\t\t", "\t");
|
||||
token2_2 = token2_2.replaceAll("\t\t", "\t");
|
||||
token2_2 = token2_2.replaceAll("\t\t", "\t");
|
||||
token2_2 = token2.replaceAll("\t+", "\t");
|
||||
token3 = token2_2.split("\t");
|
||||
if (token.equals("item")) {
|
||||
int[] Bonuses = new int[12];
|
||||
@@ -412,8 +406,7 @@ public int itemAmount(String name, int itemId, int itemX, int itemY) {
|
||||
if (line.equals("[ENDOFITEMLIST]")) {
|
||||
try {
|
||||
characterfile.close();
|
||||
} catch (IOException ioexception) {
|
||||
}
|
||||
} catch (IOException ಠ_ಠ) {}
|
||||
//return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.io.FileNotFoundException;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import redone.Server;
|
||||
@@ -139,19 +140,17 @@ public class ObjectHandler {
|
||||
for (Player p : PlayerHandler.players) {
|
||||
if (p != null) {
|
||||
Client person = (Client) p;
|
||||
if (person != null) {
|
||||
if (person.heightLevel == o.getObjectHeight()
|
||||
&& o.objectTicks == 0) {
|
||||
if (person.distanceToPoint(o.getObjectX(),
|
||||
o.getObjectY()) <= 60) {
|
||||
removeAllObjects(o);
|
||||
globalObjects.add(o);
|
||||
person.getActionSender().object(
|
||||
o.getObjectId(), o.getObjectX(),
|
||||
o.getObjectY(), o.getObjectFace(),
|
||||
o.getObjectType());
|
||||
//Region.addObject(o.getObjectId(), o.getObjectX(), o.getObjectY(), o.getObjectHeight(), o.getObjectType(), o.getObjectFace(), true);
|
||||
}
|
||||
if (person.heightLevel == o.getObjectHeight()
|
||||
&& o.objectTicks == 0) {
|
||||
if (person.distanceToPoint(o.getObjectX(),
|
||||
o.getObjectY()) <= 60) {
|
||||
removeAllObjects(o);
|
||||
globalObjects.add(o);
|
||||
person.getActionSender().object(
|
||||
o.getObjectId(), o.getObjectX(),
|
||||
o.getObjectY(), o.getObjectFace(),
|
||||
o.getObjectType());
|
||||
//Region.addObject(o.getObjectId(), o.getObjectX(), o.getObjectY(), o.getObjectHeight(), o.getObjectType(), o.getObjectFace(), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -159,13 +158,10 @@ public class ObjectHandler {
|
||||
}
|
||||
|
||||
public void removeAllObjects(Objects o) {
|
||||
for (Objects s : globalObjects) {
|
||||
if (o.getObjectX() == o.objectX && o.getObjectY() == o.objectY
|
||||
&& s.getObjectHeight() == o.getObjectHeight()) {
|
||||
globalObjects.remove(s);
|
||||
break;
|
||||
}
|
||||
}
|
||||
//Using Iterator for concurrency
|
||||
globalObjects.removeIf(s -> s.getObjectX() == o.getObjectX() &&
|
||||
s.getObjectY() == o.getObjectY() &&
|
||||
s.getObjectHeight() == o.getObjectHeight());
|
||||
}
|
||||
|
||||
public void process() {
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -38,31 +38,17 @@ Step 12: Click File -> Project Structure
|
||||
|
||||
Step 13: Set Project SDK to 1.8, Project Language Level to 8, & Project Compiler Output to any valid folder [Image](https://i.imgur.com/9PJDk0Q.png)
|
||||
|
||||
Step 14: Click "Modules" and make sure it looks like what I have highlighted. If it doesn't, join the Discord and I'll help you create one. ([Image](https://i.imgur.com/NBAnk0A.png))
|
||||
Step 14: Hit OK in the project structure screen
|
||||
|
||||
Step 15: Click "Dependencies", then click the "Add" arrow and select "JARs or directories"([Image](https://i.imgur.com/tGI9QNI.png))
|
||||
Step 15: Start the FileServer [Image](https://i.imgur.com/moNKg9u.png)
|
||||
|
||||
Step 16: Navigate to your 2006rebotted folder, open `2006Redone file_server` > `libs`. Holding "Shift" on your keyboard, select all the .jar files in the `libs` folder there, and hit OK. ([Image](https://i.imgur.com/Yv3SX1q.png))
|
||||
Step 16: Start the Server [Image](https://i.imgur.com/uUw522i.png)
|
||||
|
||||
Step 17: Hit OK in the project structure screen after all your JARs are imported: ([Image](https://i.imgur.com/Yv3SX1q.png))
|
||||
|
||||
Step 18: Navigate to the FileServer class (`2006Redone file_server/src/org/apollo/jagcached/FileServer.java`), Right Click -> Run. It will fail since we need to start it in the right directory: [Image](https://i.imgur.com/LFkr39U.png)
|
||||
|
||||
Step 19: To fix the directory issue, click FileServer and hit Edit Configurations at the top: [Image](https://i.imgur.com/lJdBPCs.png)
|
||||
|
||||
Step 20: Under Working Directory, add `2006Redone file_server` to the path (on Windows, you may need a \\ for paths instead of a /. Not sure): [Image](https://i.imgur.com/ANkbgBl.png)
|
||||
|
||||
Step 21: Navigate to the Server class (`2006Redone Server/src/redone/Server.java`), Right Click -> Run. It will fail since we need to start it in the right directory
|
||||
|
||||
Step 22: To fix the directory issue, click Server and hit Edit Configurations at the top
|
||||
|
||||
Step 23: Under Working Directory, add `2006Redone Server` to the path ([Image]("/home/dr_cookie/Projects/2006rebotted/2006Redone Client/src/Client.java"))
|
||||
|
||||
Step 24: Navigate to the Client class (`2006Redone Client/src/Client.java`), Right Click -> Run.
|
||||
Step 17: Start the Client [Image](https://i.imgur.com/dHTiU0I.png)
|
||||
|
||||
|
||||
# Using Parabot with your local server:
|
||||
- **1:** Download the latest `localhost_2006rebotted.jar` from [here](https://github.com/dginovker/2006rebotted/releases)
|
||||
- **1:** Download the latest `localhost_2006rebotted.jar` from [here](https://github.com/dginovker/2006rebotted/releases) (or, if testing server changes, compile it yourself like [this](https://i.imgur.com/uDrF0gl.png))
|
||||
- **2:** Download the latest `Provider-version.jar` file from [here](http://v3.bdn.parabot.org/api/bot/download/default-provider?nightly=false)
|
||||
- **3:** Create a file called `localhost.json` in `{user}\Documents\Parabot\servers`
|
||||
- **4:** Put the following in the file
|
||||
@@ -71,7 +57,7 @@ Step 24: Navigate to the Client class (`2006Redone Client/src/Client.java`), Rig
|
||||
"name": "localhost",
|
||||
"author": "RedSparr0w",
|
||||
"version": 1.0,
|
||||
"client-class": "Game",
|
||||
"client-class": "LocalGame",
|
||||
"locations":{
|
||||
"provider": "pathToYourJar/Provider-1.21.5.jar",
|
||||
"server": "pathToYourJar/localhost_2006rebotted.jar",
|
||||
|
||||
Reference in New Issue
Block a user