mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-03 00:31:51 +00:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e3c4114e39 | |||
| d29c32a9ca | |||
| 11aeae631a | |||
| e7d5f36880 | |||
| 01008c7254 | |||
| 8946b3a691 | |||
| f094bb6a8e | |||
| 61ccbf0fc3 | |||
| bafb40b61f |
@@ -5790,7 +5790,7 @@ public class Game extends RSApplet {
|
||||
}
|
||||
if (k == 4) {
|
||||
loginMessage1 = "Your account has been disabled.";
|
||||
loginMessage2 = "Please check your message-center for details.";
|
||||
loginMessage2 = "Or you entered an invalid character for user/pass";
|
||||
return;
|
||||
}
|
||||
if (k == 5) {
|
||||
@@ -5932,7 +5932,7 @@ public class Game extends RSApplet {
|
||||
}
|
||||
} else {
|
||||
loginMessage1 = "No response from server";
|
||||
loginMessage2 = "Please try using a different world.";
|
||||
loginMessage2 = "Please try closing and opening your client again.";
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -159,7 +159,7 @@ public class Constants {
|
||||
public final static int MAGIC_EXP_RATE = 1;
|
||||
public final static int CASTLE_WARS_X = 2439;
|
||||
public final static int CASTLE_WARS_Y = 3087;
|
||||
public static double SERVER_EXP_BONUS = 5;
|
||||
public static double SERVER_EXP_BONUS = 1;
|
||||
public final static int INCREASE_SPECIAL_AMOUNT = 17500;
|
||||
public final static boolean PRAYER_POINTS_REQUIRED = true;
|
||||
public final static boolean PRAYER_LEVEL_REQUIRED = true;
|
||||
|
||||
@@ -133,6 +133,11 @@ public class CombatAssistant {
|
||||
if (NpcHandler.npcs[i].HP - damage <= 0 && damage2 > 0) {
|
||||
damage2 = 0;
|
||||
}
|
||||
c.globalDamageDealt += damage;
|
||||
if (damage2 > 0)
|
||||
{
|
||||
c.globalDamageDealt += damage2;
|
||||
}
|
||||
if (c.fightMode == 3) {//range shared
|
||||
c.getPlayerAssistant().addSkillXP(damage * Constants.RANGE_EXP_RATE / 3, 4);
|
||||
c.getPlayerAssistant().addSkillXP(damage / 3, 1);
|
||||
@@ -219,6 +224,7 @@ public class CombatAssistant {
|
||||
}
|
||||
//magic
|
||||
c.getPlayerAssistant().addSkillXP(MagicData.MAGIC_SPELLS[c.oldSpellId][7] + damage * Constants.MAGIC_EXP_RATE, 6);
|
||||
c.totalDamageDealt += damage;
|
||||
if (MagicData.MAGIC_SPELLS[c.oldSpellId][0] != 1161 && MagicData.MAGIC_SPELLS[c.oldSpellId][0] != 1153 && MagicData.MAGIC_SPELLS[c.oldSpellId][0] != 1157 && MagicData.MAGIC_SPELLS[c.oldSpellId][0] != 1542 && MagicData.MAGIC_SPELLS[c.oldSpellId][0] != 1543 && MagicData.MAGIC_SPELLS[c.oldSpellId][0] != 1562) {
|
||||
c.getPlayerAssistant().addSkillXP(damage * Constants.MAGIC_EXP_RATE / 3, 3);
|
||||
}
|
||||
@@ -315,13 +321,14 @@ public class CombatAssistant {
|
||||
damage = 0;
|
||||
}
|
||||
}
|
||||
if (NpcHandler.npcs[i].HP - damage > 0) {
|
||||
if (NpcHandler.npcs[i].npcType == FightCaves.TZTOK_JAD && NpcHandler.npcs[i].spawnedBy == c.getId() && ((NpcHandler.npcs[i].HP > (FightCaves.getHp(FightCaves.TZTOK_JAD)/2)) &&
|
||||
(NpcHandler.npcs[i].HP-damage < (FightCaves.getHp(FightCaves.TZTOK_JAD)/2)))) {
|
||||
if (c.canHealersRespawn)
|
||||
FightCaves.spawnHealers(c, i, 4-c.spawnedHealers);
|
||||
}
|
||||
}
|
||||
c.globalDamageDealt += damage;
|
||||
if (NpcHandler.npcs[i].HP - damage > 0) {
|
||||
if (NpcHandler.npcs[i].npcType == FightCaves.TZTOK_JAD && NpcHandler.npcs[i].spawnedBy == c.getId() && ((NpcHandler.npcs[i].HP > (FightCaves.getHp(FightCaves.TZTOK_JAD)/2)) &&
|
||||
(NpcHandler.npcs[i].HP-damage < (FightCaves.getHp(FightCaves.TZTOK_JAD)/2)))) {
|
||||
if (c.canHealersRespawn)
|
||||
FightCaves.spawnHealers(c, i, 4-c.spawnedHealers);
|
||||
}
|
||||
}
|
||||
boolean guthansEffect = false;
|
||||
if (c.getPlayerAssistant().fullGuthans()) {
|
||||
if (Misc.random(3) == 1) {
|
||||
|
||||
@@ -49,6 +49,8 @@ public class DoubleDoors {
|
||||
DoubleDoors doorClicked = getDoor(id, x, y, z);
|
||||
|
||||
if (doorClicked == null) {
|
||||
Server.objectHandler.placeObject(new Objects(-1, x, y, z, 0, 0, 0));
|
||||
System.out.println("Removed null door for poor lad");
|
||||
return true;
|
||||
}
|
||||
if (doorClicked.doorId > 12000) {
|
||||
|
||||
@@ -653,6 +653,8 @@ 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("Release date will be this August! Join our Discord: discord.gg/4zrA2Wy");
|
||||
}
|
||||
for (int i = 0; i < 25; i++) {
|
||||
getActionSender().setSkillLevel(i, playerLevel[i], playerXP[i]);
|
||||
|
||||
@@ -2,7 +2,6 @@ package redone.game.players;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
|
||||
import static redone.game.players.PlayerSave.loadPlayerInfo;
|
||||
@@ -31,8 +30,8 @@ public class HighscoresHandler {
|
||||
players.sort(new totalGoldComparator());
|
||||
return players.get(i).playerName + ": " + players.get(i).getPlayerAssistant().totalGold() + "gp";
|
||||
default:
|
||||
players.sort(new totalDmgComparator());
|
||||
return players.get(i).playerName + ": " + players.get(i).totalDamageDealt;
|
||||
players.sort(new globalDmgComparator());
|
||||
return players.get(i).playerName + ": " + players.get(i).globalDamageDealt;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,10 +49,10 @@ public class HighscoresHandler {
|
||||
}
|
||||
}
|
||||
|
||||
private class totalDmgComparator implements Comparator<Client> {
|
||||
private class globalDmgComparator implements Comparator<Client> {
|
||||
@Override
|
||||
public int compare(Client client, Client t1) {
|
||||
return - client.totalDamageDealt + t1.totalDamageDealt;
|
||||
return - client.globalDamageDealt + t1.globalDamageDealt;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ public abstract class Player {
|
||||
dialogueAction = 0, autocastId, followDistance, followId2,
|
||||
barrageCount = 0, delayedDamage = 0, delayedDamage2 = 0,
|
||||
pcPoints = 0, magePoints = 0, desertTreasure = 0,
|
||||
lastArrowUsed = -1, autoRet = 1, pcDamage = 0, xInterfaceId = 0,
|
||||
lastArrowUsed = -1, autoRet = 0, pcDamage = 0, xInterfaceId = 0,
|
||||
xRemoveId = 0, xRemoveSlot = 0, tzhaarToKill = 0, tzhaarKilled = 0,
|
||||
waveId, frozenBy = 0, poisonDamage = 0, teleAction = 0,
|
||||
bonusAttack = 0, lastNpcAttacked = 0, killCount = 0, witchspot,
|
||||
@@ -397,7 +397,7 @@ public abstract class Player {
|
||||
playerIndex, oldPlayerIndex, lastWeaponUsed, projectileStage,
|
||||
crystalBowArrowCount, playerMagicBook, teleGfx, teleEndAnimation,
|
||||
teleHeight, teleX, teleY, rangeItemUsed, killingNpcIndex,
|
||||
totalDamageDealt, oldNpcIndex, fightMode, attackTimer;
|
||||
totalDamageDealt, globalDamageDealt, oldNpcIndex, fightMode, attackTimer;
|
||||
public boolean magicFailed, oldMagicFailed;
|
||||
public int bowSpecShot, clickNpcType, clickObjectType, objectId, objectX,
|
||||
objectY, objectXOffset, objectYOffset, objectDistance;
|
||||
|
||||
@@ -39,6 +39,11 @@ public class PlayerSave {
|
||||
if (File1) {
|
||||
// new File ("./characters/"+playerName+".txt");
|
||||
} else {
|
||||
if (playerName.equals(""))
|
||||
{
|
||||
//it's the .gitignore :P
|
||||
return 0;
|
||||
}
|
||||
Misc.println(playerName + ": character file not found.");
|
||||
player.newPlayer = false;
|
||||
return 0;
|
||||
@@ -135,6 +140,9 @@ public class PlayerSave {
|
||||
case "debugMode":
|
||||
player.debugMode = Boolean.parseBoolean(token2);
|
||||
break;
|
||||
case "global-damage":
|
||||
player.globalDamageDealt = Integer.parseInt(token2);
|
||||
break;
|
||||
case "skull-timer":
|
||||
player.skullTimer = Integer.parseInt(token2);
|
||||
break;
|
||||
@@ -622,6 +630,10 @@ public class PlayerSave {
|
||||
characterfile.write(Boolean.toString(player.isBotting), 0,
|
||||
Boolean.toString(player.isBotting).length());
|
||||
characterfile.newLine();
|
||||
characterfile.write("global-damage = ", 0, 16);
|
||||
characterfile.write(Integer.toString(player.globalDamageDealt), 0, Integer
|
||||
.toString(player.globalDamageDealt).length());
|
||||
characterfile.newLine();
|
||||
characterfile.write("brightness = ", 0, 13);
|
||||
characterfile.write(Integer.toString(player.brightness), 0, Integer
|
||||
.toString(player.brightness).length());
|
||||
|
||||
@@ -38,11 +38,11 @@ public class ClickObject implements PacketType {
|
||||
if (player.playerRights == 3 || player.debugMode) {
|
||||
player.getActionSender().sendMessage("ObjectId: " + player.objectId + " ObjectX: " + player.objectX + " ObjectY: " + player.objectY + " Objectclick = 1, Xoff: " + (player.getX() - player.objectX) + " Yoff: " + (player.getY() - player.objectY));
|
||||
}
|
||||
if(player.goodDistance(player.getX(), player.getY(), player.objectX, player.objectY, 1)) {
|
||||
//if(player.goodDistance(player.getX(), player.getY(), player.objectX, player.objectY, 1)) {
|
||||
if (Doors.getSingleton().handleDoor(player.objectId, player.objectX, player.objectY, player.heightLevel)) {
|
||||
System.out.println("Door debug?");
|
||||
}
|
||||
}
|
||||
//}
|
||||
|
||||
/*if (client.performingAction) {
|
||||
return;
|
||||
|
||||
@@ -2,11 +2,10 @@ package redone.net.packets.impl;
|
||||
|
||||
import redone.Connection;
|
||||
import redone.Constants;
|
||||
import redone.Server;
|
||||
import redone.game.items.ItemAssistant;
|
||||
import redone.game.npcs.NpcHandler;
|
||||
import redone.game.players.Client;
|
||||
import redone.game.players.HighscoresHandler;
|
||||
import redone.game.players.PlayerHandler;
|
||||
import redone.game.players.*;
|
||||
import redone.net.packets.PacketType;
|
||||
import redone.util.GameLogger;
|
||||
import redone.util.Misc;
|
||||
@@ -53,6 +52,15 @@ public class Commands implements PacketType {
|
||||
return;
|
||||
}
|
||||
|
||||
if (playerCommand.startsWith("gfx100"))
|
||||
{
|
||||
player.gfx100(Integer.parseInt(playerCommand.split(" ")[1]));
|
||||
}
|
||||
if (playerCommand.startsWith("gfx0"))
|
||||
{
|
||||
player.gfx0(Integer.parseInt(playerCommand.split(" ")[1]));
|
||||
}
|
||||
|
||||
String message = null;
|
||||
switch (playerCommand)
|
||||
{
|
||||
@@ -83,30 +91,39 @@ public class Commands implements PacketType {
|
||||
player.getActionSender().sendMessage(message);
|
||||
break;
|
||||
case "highscores":
|
||||
HighscoresHandler hs = new HighscoresHandler();
|
||||
String[] highscores = new String[]{
|
||||
"@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"),
|
||||
"",
|
||||
"Top 5 Wealthiest Players:",
|
||||
hs.getRank(0, "gold"), hs.getRank(1, "gold"), hs.getRank(2, "gold"), hs.getRank(3, "gold"), hs.getRank(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"),
|
||||
};
|
||||
for (Player p : PlayerHandler.players) {
|
||||
if (p == null) {
|
||||
continue;
|
||||
}
|
||||
PlayerSave.saveGame((Client) p);
|
||||
System.out.println("Saved game for " + p.playerName
|
||||
+ ".");
|
||||
Server.lastMassSave = System.currentTimeMillis();
|
||||
}
|
||||
HighscoresHandler hs = new HighscoresHandler();
|
||||
String[] highscores = new String[]{
|
||||
"@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"),
|
||||
"",
|
||||
"Top 5 Wealthiest Players:",
|
||||
hs.getRank(0, "gold"), hs.getRank(1, "gold"), hs.getRank(2, "gold"), hs.getRank(3, "gold"), hs.getRank(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"),
|
||||
};
|
||||
|
||||
for (int i = 8144; i < 8195; i++) {
|
||||
for (int i = 8144; i < 8245; i++) {
|
||||
player.getPlayerAssistant().sendFrame126("", i);
|
||||
}
|
||||
|
||||
for (int i = 8144; i < 8144 + highscores.length; i++) {
|
||||
player.getPlayerAssistant().sendFrame126(highscores[i - 8144], i+3);
|
||||
}
|
||||
player.getPlayerAssistant().showInterface(8134);
|
||||
player.getPlayerAssistant().sendFrame126(highscores[i - 8144], i+3);
|
||||
}
|
||||
player.getPlayerAssistant().showInterface(8134);
|
||||
|
||||
break;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
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.
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.
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.
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.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user