Compare commits

...

31 Commits

Author SHA1 Message Date
Daniel Ginovker e26f32439a Revert "Npc definitions/npc aggressiveness (#169)" (#171)
This reverts commit 2aef86ed25.
2019-11-11 00:22:35 -05:00
Daniel Ginovker 2f26fbe5fb Lag fixed :) (#170) 2019-11-11 00:21:40 -05:00
Mr Extremez 2aef86ed25 Npc definitions/npc aggressiveness (#169)
Let me know how it works
2019-11-11 00:20:00 -05:00
Danial 6cda5d5c78 Disable graphics, lower CPU & GPU usage (#168)
* Fix local Parabot instructions

* Add kick command, and force logout function

* Add graphics toggle option

* add alias
2019-11-10 23:32:33 -05:00
Mr Extremez d53ed61064 Finally should fix aggressiveness smh (#165)
closes #160

Let me know if this doesn't work, but hoping it does. My local testing had it working perfectly
2019-11-10 22:09:54 -05:00
dginovker 679fad7b18 latest compile 2019-11-10 19:50:19 -05:00
Gptaqbc dc3f561868 Faster shop restocking - Brought back normal stack of items in shops … (#164)
* Faster shop restocking - Brought back normal stack of items in shops - Added chat message to camoe transport system

Faster shop restocking - Brought back normal stack of items in shops - Added chat message to camoe transport system

* Fixed typo

Fixed typo
2019-11-10 19:46:24 -05:00
dginovker c6155eb529 4u Captcha 2019-11-10 13:00:54 -05:00
Gptaqbc 4db7ee6761 Fixed an issue with teleother that wasnt working at all. (#159)
Fixed an issue with teleother that wasnt working at all.
2019-11-10 12:26:41 -05:00
dginovker 8d14d76313 latest compile 2019-11-10 12:20:34 -05:00
Mr Extremez aaf0a48140 Fixes npc aggressiveness (#155)
closes #142
2019-11-10 12:18:00 -05:00
Danial 68013f3498 Add kick command, and force logout function (#154)
* Fix local Parabot instructions

* Add kick command, and force logout function
2019-11-10 12:17:47 -05:00
dginovker afd1da91e1 Latest compile 2019-11-09 18:14:00 -05:00
Josh Shippam 4490de88c4 Merge pull request #151 from Dark98/master
Fix Onyx Amulet Stringing
2019-11-09 22:06:19 +00:00
Dark98 58dab39d3b Fix Onyx Amulet Stringing 2019-11-09 22:05:29 +00:00
Josh Shippam 8ef0b3662e Merge pull request #150 from Dark98/master
Fix Highscores problem & only Save Highscores for Mod & Lower
2019-11-09 21:53:13 +00:00
Dark98 6b4b1eddf7 Fix Highscores problem & only Save Highscores for Mod & Lower 2019-11-09 21:51:05 +00:00
Dark98 c2a768a354 Merge https://github.com/dginovker/2006rebotted 2019-11-09 21:49:22 +00:00
Josh Shippam 3a50391304 Update Cache Path to 2006rebotted (#149)
Cool
2019-11-09 16:45:58 -05:00
Dark98 c152a1c8d9 Update Cache Path to 2006rebotted 2019-11-09 21:36:24 +00:00
dginovker e2f700de67 Merge branch 'master' of https://github.com/dginovker/2006rebotted 2019-11-09 15:36:46 -05:00
dginovker f13f0af171 2006rebotted rename + latest compile 2019-11-09 15:35:57 -05:00
Gptaqbc 2ade1073b9 Fixed issue #143 - When casting spells without autocast your player will always move next to the player you casted a spell on. (#147)
Fixed issue #143 - When casting spells without autocast your player will always move next to the player you casted a spell on.
2019-11-09 15:09:59 -05:00
dginovker 452ee7a637 Latest compile 2019-11-09 00:12:56 -05:00
Gptaqbc 87440ecd2a Removing double sell message "You sold x items for x gp". (#141)
* Update NpcHandler.class

Fixed the diagonal safefpotting combat bug. The NPC will move when it detects that the player is standing diagonally to it.

Still have some issue around objects but that's another story.

* Update NpcHandler.java

Fixed the diagonal safefpotting combat bug. The NPC will move when it detects that the player is standing diagonally to it.

Still have some issue around objects but that's another story.

closes #47

* Buy/Sell-X--Buying-loop-lagging-issue-fix--General-shop-using-fixes--Trading-amount-fix

- Added buy/sell X feature
- Fixed a lag with the buying loop when buying high amount. Instead of spam buying 1 at a  times it divide the amount to buy in equal parts and buy in increments.
- Cant remember at all I'll edit after eating.

* Removing double sell message "You sold x items for x gp".

Removing double sell message "You sold x items for x gp".

* Fixing trading bug not working at some places and re commiting the shopAssistant removal of sell message twice

Fixing trading bug not working at some places and re commiting the shopAssistant removal of sell message twice

* reverting stuff I broke in this file

reverting stuff I broke in this file
2019-11-09 00:09:33 -05:00
Gptaqbc dcc7984e27 Teleother (#144)
* Update NpcHandler.class

Fixed the diagonal safefpotting combat bug. The NPC will move when it detects that the player is standing diagonally to it.

Still have some issue around objects but that's another story.

* Update NpcHandler.java

Fixed the diagonal safefpotting combat bug. The NPC will move when it detects that the player is standing diagonally to it.

Still have some issue around objects but that's another story.

closes #47

* Buy/Sell-X--Buying-loop-lagging-issue-fix--General-shop-using-fixes--Trading-amount-fix

- Added buy/sell X feature
- Fixed a lag with the buying loop when buying high amount. Instead of spam buying 1 at a  times it divide the amount to buy in equal parts and buy in increments.
- Cant remember at all I'll edit after eating.

* Removing double sell message "You sold x items for x gp".

Removing double sell message "You sold x items for x gp".

* Fixing trading bug not working at some places and re commiting the shopAssistant removal of sell message twice

Fixing trading bug not working at some places and re commiting the shopAssistant removal of sell message twice

* reverting stuff I broke in this file

reverting stuff I broke in this file

* Teleother fixed

Teleother fixed.

* fixed an issue I forgot to test :)

fixed an issue I forgot to test :)
2019-11-09 00:08:56 -05:00
dginovker 0a11ce01d1 Fix localhost Parabot 2019-11-08 19:25:53 -05:00
dginovker 9db31e52c9 Latest compile 2019-11-06 11:10:27 -05:00
Mr Extremez ff75851cad Fixes run energy, aggressiveness, and highscores (#137)
* Update ShopAssistant.java

Adds ability to sell tokkul items back to shop for tokkul

* Fixes npc aggressiveness closes #132

* Fixes highscores for admin + ingame. Closes #131

* Caps run energy at 100%. Closes #135
2019-11-06 10:55:08 -05:00
dginovker a176bfa9cb Fix for Parabot localhost 2019-11-04 19:57:33 -05:00
Daniel Ginovker 16b23be1d5 fix artifacts (#134) 2019-11-04 18:34:42 -05:00
74 changed files with 411 additions and 288 deletions
+1
View File
@@ -1,2 +1,3 @@
2006Redone\ Server/data/characters/
.idea/
.idea/workspace.xml
+1 -32
View File
@@ -6,37 +6,6 @@
<element id="file-copy" path="$PROJECT_DIR$/2006Redone Client/METAs/Client Meta/META-INF/MANIFEST.MF" />
</element>
<element id="module-output" name="2006rebotted" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/slf4j-nop.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone file_server/libs/commons-lang3-3.1.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone file_server/libs/javac++.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone file_server/libs/netty-3.6.6.Final.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone file_server/libs/mina.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone file_server/libs/mysql-connector-java-5.1.23-bin.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone file_server/libs/slf4j-nop.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone file_server/libs/slf4j.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone file_server/libs/xpp3-1.1.4c.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone file_server/libs/xstream-1.4.1.jar" path-in-jar="/" />
<element id="library" level="project" name="libs" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/commons-lang3-3.1.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/javac++.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/mysql-connector-java-5.1.23-bin.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/xstream-1.4.1.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/xpp3-1.1.4c.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/mina.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/slf4j.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/okio-1.13.0.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/okhttp-3.9.1.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/json-20190722.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/everythingrs-api.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/log4j-api-2.11.0.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/netty-3.6.6.Final.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/jackson-core-2.9.3.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/javacord-api-3.0.4.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/javacord-core-3.0.4.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/jackson-databind-2.9.3.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/nv-websocket-client-2.6.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/jackson-annotations-2.9.0.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/logging-interceptor-3.9.1.jar" path-in-jar="/" />
</root>
</artifact>
</component>
</component>
+1 -32
View File
@@ -6,37 +6,6 @@
<element id="file-copy" path="$PROJECT_DIR$/2006Redone Client/METAs/Local Client Meta/META-INF/MANIFEST.MF" />
</element>
<element id="module-output" name="2006rebotted" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/slf4j-nop.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone file_server/libs/commons-lang3-3.1.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone file_server/libs/javac++.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone file_server/libs/netty-3.6.6.Final.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone file_server/libs/mina.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone file_server/libs/mysql-connector-java-5.1.23-bin.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone file_server/libs/slf4j-nop.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone file_server/libs/slf4j.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone file_server/libs/xpp3-1.1.4c.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone file_server/libs/xstream-1.4.1.jar" path-in-jar="/" />
<element id="library" level="project" name="libs" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/commons-lang3-3.1.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/javac++.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/mysql-connector-java-5.1.23-bin.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/xstream-1.4.1.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/xpp3-1.1.4c.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/mina.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/slf4j.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/okio-1.13.0.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/okhttp-3.9.1.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/json-20190722.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/everythingrs-api.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/log4j-api-2.11.0.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/netty-3.6.6.Final.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/jackson-core-2.9.3.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/javacord-api-3.0.4.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/javacord-core-3.0.4.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/jackson-databind-2.9.3.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/nv-websocket-client-2.6.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/jackson-annotations-2.9.0.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/2006Redone Server/libs/logging-interceptor-3.9.1.jar" path-in-jar="/" />
</root>
</artifact>
</component>
</component>
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" project-jdk-name="1.8.0_222 (2)" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/CompiledServer" />
</component>
</project>
+128 -8
View File
@@ -7,13 +7,13 @@
</component>
<component name="ChangeListManager">
<list default="true" id="9c1d485e-b413-4c80-b742-7c5a88c1c73c" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/2006Redone Server/src/redone/game/npcs/NpcHandler.java" beforeDir="false" afterPath="$PROJECT_DIR$/2006Redone Server/src/redone/game/npcs/NpcHandler.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/2006Redone Server/src/redone/net/packets/impl/Commands.java" beforeDir="false" afterPath="$PROJECT_DIR$/2006Redone Server/src/redone/net/packets/impl/Commands.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/2006Redone Server/src/redone/world/ObjectHandler.java" beforeDir="false" afterPath="$PROJECT_DIR$/2006Redone Server/src/redone/world/ObjectHandler.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/net/packets/impl/Commands.class" beforeDir="false" afterPath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/net/packets/impl/Commands.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/world/ObjectHandler.class" beforeDir="false" afterPath="$PROJECT_DIR$/CompiledServer/production/2006rebotted/redone/world/ObjectHandler.class" 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" />
@@ -21,9 +21,61 @@
<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" />
@@ -44,7 +96,7 @@
</list>
</option>
</component>
<component name="RunManager" selected="Application.FileServer">
<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" />
@@ -87,8 +139,8 @@
</list>
<recent_temporary>
<list>
<item itemvalue="Application.FileServer" />
<item itemvalue="Application.Server" />
<item itemvalue="Application.FileServer" />
<item itemvalue="Application.Client" />
</list>
</recent_temporary>
@@ -106,17 +158,85 @@
</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&#9;" 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>
+4 -4
View File
@@ -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
*/
+29 -11
View File
@@ -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() {
+28
View File
@@ -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;
}
}
+1
View File
@@ -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");
+2 -2
View File
@@ -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();
}
+3 -3
View File
@@ -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) {
@@ -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;
@@ -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;
@@ -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;
@@ -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);
@@ -759,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);
@@ -795,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;
}
@@ -807,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 {
@@ -934,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;
}
}
}
@@ -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,9 +252,6 @@ public class Trading {
if (o == null) {
return false;
}
player.getActionSender().sendMessage("amount: " + amount);
player.getActionSender().sendMessage("player.playerItems[fromSlot]: " + player.playerItems[fromSlot]);
player.getActionSender().sendMessage("itemID + 1: " + itemID + 1);
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;
@@ -394,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.");
@@ -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;
}
}
@@ -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;
}
}
@@ -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++) {
@@ -539,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;
}
}
@@ -561,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;
}
}
@@ -583,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;
}
}
@@ -626,7 +648,7 @@ public class Commands implements PacketType {
} else {
player.getActionSender().sendMessage("Npc " + newNPC + " does not exist.");
}
} catch (Exception ಠ_ಠ) {}
} catch (Exception e) {}
break;
case "cantattack":
player.npcCanAttack = !player.npcCanAttack;
@@ -685,7 +707,7 @@ public class Commands implements PacketType {
PlayerHandler.updateAnnounced = false;
PlayerHandler.updateRunning = true;
PlayerHandler.updateStartTime = System.currentTimeMillis();
} catch (Exception ಠ_ಠ) {}
} catch (Exception e) {}
break;
}
}
@@ -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.
+2 -2
View File
@@ -48,7 +48,7 @@ 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
@@ -57,7 +57,7 @@ Step 17: Start the Client [Image](https://i.imgur.com/dHTiU0I.png)
"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",