mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-03 00:31:51 +00:00
Merge branch 'master' of https://github.com/dginovker/2006rebotted
This commit is contained in:
Binary file not shown.
@@ -62,6 +62,9 @@ public class CombatAssistant {
|
||||
NpcHandler.npcs[i].updateRequired = true;
|
||||
}
|
||||
if (CombatConstants.COMBAT_SOUNDS) {
|
||||
if (PestControl.npcIsPCMonster(NpcHandler.npcs[i].npcType) || PestControl.isPCPortal(NpcHandler.npcs[i].npcType)) {
|
||||
return;
|
||||
}
|
||||
c.getPacketSender().sendSound(CombatSounds.getNpcBlockSound(NpcHandler.npcs[c.oldNpcIndex].npcType), 100, 0);
|
||||
}
|
||||
NpcHandler.npcs[i].facePlayer(c.playerId);
|
||||
@@ -152,7 +155,7 @@ public class CombatAssistant {
|
||||
c.getPlayerAssistant().refreshSkill(4);
|
||||
}
|
||||
if (damage > 0) {
|
||||
if (NpcHandler.npcs[i].npcType >= 3777 && NpcHandler.npcs[i].npcType <= 3780 || PestControl.npcIsPCMonster(NpcHandler.npcs[i].npcType)) {
|
||||
if (PestControl.npcIsPCMonster(NpcHandler.npcs[i].npcType) || PestControl.isPCPortal(NpcHandler.npcs[i].npcType)) {
|
||||
c.pcDamage += damage;
|
||||
}
|
||||
}
|
||||
@@ -232,7 +235,7 @@ public class CombatAssistant {
|
||||
c.getPlayerAssistant().refreshSkill(6);
|
||||
|
||||
if (damage > 0) {
|
||||
if (NpcHandler.npcs[i].npcType >= 3777 && NpcHandler.npcs[i].npcType <= 3780 || PestControl.npcIsPCMonster(NpcHandler.npcs[i].npcType)) {
|
||||
if (PestControl.npcIsPCMonster(NpcHandler.npcs[i].npcType) || PestControl.isPCPortal(NpcHandler.npcs[i].npcType)) {
|
||||
c.pcDamage += damage;
|
||||
}
|
||||
}
|
||||
@@ -353,7 +356,7 @@ public class CombatAssistant {
|
||||
}
|
||||
}
|
||||
if (damage > 0) {
|
||||
if (NpcHandler.npcs[i].npcType >= 3777 && NpcHandler.npcs[i].npcType <= 3780 || PestControl.npcIsPCMonster(NpcHandler.npcs[i].npcType)) {
|
||||
if (PestControl.npcIsPCMonster(NpcHandler.npcs[i].npcType) || PestControl.isPCPortal(NpcHandler.npcs[i].npcType)) {
|
||||
c.pcDamage += damage;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ public enum SpellTeleport {
|
||||
LUMBRIDGE(31,4143, 41, 3222, 3218, 0, new int[][]{{563, 1}, {557, 1}, {556, 3}}, "modern"),
|
||||
FALADOR(37, 4146, 48, 2965, 3378, 0, new int[][]{{563, 1}, {555, 1}, {556, 3}}, "modern"),
|
||||
CAMELOT(45, 4150, 55.5, 2757, 3479, 0, new int[][]{{563, 1}, {556, 5}}, "modern"),
|
||||
ARDOUGNE(51, 6004, 61, 2262, 3304, 0, new int[][]{{563, 2}, {555, 2}}, "modern"),
|
||||
ARDOUGNE(51, 6004, 61, 2662, 3304, 0, new int[][]{{563, 2}, {555, 2}}, "modern"),
|
||||
WATCHTOWER(58, 6005, 68, 2547, 3112, 1, new int[][]{{563, 2}, {557, 2}}, "modern"),
|
||||
TROLLHEIM(61, 29031, 68, 2893, 3679, 0, new int[][]{{563, 2}, {554, 2}}, "modern"),
|
||||
APE_ATOLL(64, 72038, 74, 2798, 2798, 1, new int[][]{{563, 2}, {554, 2}, {555, 2}, {1963, 1}}, "modern"),
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.rebotted.game.content.combat.CombatAssistant;
|
||||
import com.rebotted.game.content.combat.CombatConstants;
|
||||
import com.rebotted.game.content.combat.melee.MeleeData;
|
||||
import com.rebotted.game.content.minigames.FightCaves;
|
||||
import com.rebotted.game.content.minigames.PestControl;
|
||||
import com.rebotted.game.content.music.sound.CombatSounds;
|
||||
import com.rebotted.game.content.music.sound.SoundList;
|
||||
import com.rebotted.game.npcs.NpcData;
|
||||
@@ -182,14 +183,11 @@ public class NpcCombat {
|
||||
NpcHandler.npcs[i].attackTimer = NpcData.getNpcDelay(i);
|
||||
NpcHandler.npcs[i].hitDelayTimer = NpcData.getHitDelay(i);
|
||||
NpcHandler.npcs[i].attackType = 0;
|
||||
if (CombatConstants.COMBAT_SOUNDS
|
||||
&& NpcHandler.npcs[i].npcType < 3177
|
||||
&& NpcHandler.npcs[i].npcType > 3180) {
|
||||
c.getPacketSender()
|
||||
.sendSound(
|
||||
CombatSounds
|
||||
.getNpcAttackSounds(NpcHandler.npcs[i].npcType),
|
||||
100, 0);
|
||||
if (CombatConstants.COMBAT_SOUNDS) {
|
||||
if (PestControl.npcIsPCMonster(NpcHandler.npcs[i].npcType) || PestControl.isPCPortal(NpcHandler.npcs[i].npcType)) {
|
||||
return;
|
||||
}
|
||||
c.getPacketSender().sendSound(CombatSounds.getNpcAttackSounds(NpcHandler.npcs[i].npcType), 100, 0);
|
||||
}
|
||||
if (special) {
|
||||
loadSpell2(i);
|
||||
@@ -202,14 +200,11 @@ public class NpcCombat {
|
||||
if (NpcHandler.multiAttacks(i)) {
|
||||
multiAttackGfx(i, NpcHandler.npcs[i].projectileId);
|
||||
NpcData.startAnimation(NpcEmotes.getAttackEmote(i), i);
|
||||
if (CombatConstants.COMBAT_SOUNDS
|
||||
&& NpcHandler.npcs[i].npcType < 3177
|
||||
&& NpcHandler.npcs[i].npcType > 3180) {
|
||||
c.getPacketSender()
|
||||
.sendSound(
|
||||
CombatSounds
|
||||
.getNpcAttackSounds(NpcHandler.npcs[i].npcType),
|
||||
100, 0);
|
||||
if (CombatConstants.COMBAT_SOUNDS) {
|
||||
if (PestControl.npcIsPCMonster(NpcHandler.npcs[i].npcType) || PestControl.isPCPortal(NpcHandler.npcs[i].npcType)) {
|
||||
return;
|
||||
}
|
||||
c.getPacketSender().sendSound(CombatSounds.getNpcAttackSounds(NpcHandler.npcs[i].npcType), 100, 0);
|
||||
}
|
||||
NpcHandler.npcs[i].oldIndex = c.playerId;
|
||||
return;
|
||||
@@ -242,11 +237,10 @@ public class NpcCombat {
|
||||
NpcHandler.npcs[i].oldIndex = c.playerId;
|
||||
NpcData.startAnimation(NpcEmotes.getAttackEmote(i), i);
|
||||
if (CombatConstants.COMBAT_SOUNDS) {
|
||||
c.getPacketSender()
|
||||
.sendSound(
|
||||
CombatSounds
|
||||
.getNpcAttackSounds(NpcHandler.npcs[i].npcType),
|
||||
100, 0);
|
||||
if (PestControl.npcIsPCMonster(NpcHandler.npcs[i].npcType) || PestControl.isPCPortal(NpcHandler.npcs[i].npcType)) {
|
||||
return;
|
||||
}
|
||||
c.getPacketSender().sendSound(CombatSounds.getNpcAttackSounds(NpcHandler.npcs[i].npcType), 100, 0);
|
||||
}
|
||||
c.getPacketSender().closeAllWindows();
|
||||
}
|
||||
|
||||
@@ -5,14 +5,10 @@ import com.rebotted.event.CycleEvent;
|
||||
import com.rebotted.event.CycleEventContainer;
|
||||
import com.rebotted.event.CycleEventHandler;
|
||||
import com.rebotted.game.content.combat.CombatConstants;
|
||||
import com.rebotted.game.content.skills.fletching.LogCuttingInterface;
|
||||
import com.rebotted.game.items.ItemAssistant;
|
||||
import com.rebotted.game.npcs.Npc;
|
||||
import com.rebotted.game.npcs.NpcHandler;
|
||||
import com.rebotted.game.objects.Objects;
|
||||
import com.rebotted.game.players.Client;
|
||||
import com.rebotted.game.players.Player;
|
||||
import com.rebotted.game.players.PlayerHandler;
|
||||
import com.rebotted.util.Misc;
|
||||
import com.rebotted.world.clip.Region;
|
||||
|
||||
@@ -37,8 +33,6 @@ public class DwarfCannon {
|
||||
|
||||
public final int steelBarID = 2353;
|
||||
|
||||
private final int ammoMouldID = 4;
|
||||
|
||||
public boolean settingUp = false;
|
||||
|
||||
private int setUpStage = 0;
|
||||
|
||||
@@ -7,7 +7,7 @@ public class RangeData {
|
||||
public final static int[] BOWS = { 9185, 839, 845, 847, 851, 855, 859, 841,
|
||||
843, 849, 853, 857, 861, 4212, 4214, 4215, 11235, 4216, 4217, 4218,
|
||||
4219, 4220, 4221, 4222, 4223, 6724, 4734, 4934, 4935, 4936, 4937 };
|
||||
public final static int[] ARROWS = { 882, 884, 886, 888, 890, 892, 4740,
|
||||
public final static int[] ARROWS = { 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 4740,
|
||||
11212, 9140, 9141, 4142, 9143, 9144, 9240, 9241, 9242, 9243, 9244,
|
||||
9245, 4150, 4160, 4172 };
|
||||
public final static int[] NO_ARROW_DROP = { 4212, 4214, 4215, 4216, 4217,
|
||||
@@ -50,10 +50,8 @@ public class RangeData {
|
||||
case 3202:
|
||||
case 3204:
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static int correctBowAndArrows(Player c) {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.rebotted.game.content.minigames;
|
||||
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
import com.rebotted.GameConstants;
|
||||
import com.rebotted.GameEngine;
|
||||
import com.rebotted.game.content.combat.prayer.PrayerDrain;
|
||||
@@ -17,8 +16,6 @@ import com.rebotted.game.players.PlayerSave;
|
||||
import com.rebotted.util.GameLogger;
|
||||
import com.rebotted.util.Misc;
|
||||
|
||||
import static com.rebotted.game.content.music.sound.SoundList.DUEL_WON;
|
||||
|
||||
public class Dueling {
|
||||
|
||||
private final Player player;
|
||||
@@ -575,7 +572,7 @@ public class Dueling {
|
||||
player.getPlayerAssistant().requestUpdates();
|
||||
}
|
||||
|
||||
public static void HandleForfeit(Player player)
|
||||
public static void handleForfeit(Player player)
|
||||
{
|
||||
Client opponent = (Client) PlayerHandler.players[player.duelingWith];
|
||||
opponent.getDueling().duelVictory();
|
||||
|
||||
@@ -52,6 +52,7 @@ public class PestControl {
|
||||
public int ravager = 3742 + Misc.random(4);
|
||||
public int torcher = 3752 + Misc.random(7);
|
||||
public int splater = 3727 + Misc.random(4);
|
||||
|
||||
|
||||
private final int[][] pcNPCData = { { 3777, 2628, 2591 }, // portal
|
||||
{ 3778, 2680, 2588 }, // portal
|
||||
@@ -150,40 +151,6 @@ public class PestControl {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* private void setBoatInterface() { try { for (Client c :
|
||||
* waitingBoat.keySet()) { if (c != null) { try { if (gameStarted) {
|
||||
* c.getPlayerAssistant().sendString("Next Departure: " + (waitTimer +
|
||||
* gameTimer)/60 + " minutes", 21120); } else {
|
||||
* c.getPlayerAssistant().sendString("Next Departure: " + waitTimer + "",
|
||||
* 21120); } c.getPlayerAssistant().sendString("Players Ready: " +
|
||||
* playersInBoat() + "", 21121); c.getPlayerAssistant().sendString("(Need "
|
||||
* + PLAYERS_REQUIRED + " to 25 players)", 21122);
|
||||
* c.getPlayerAssistant().sendString("Points: " + c.pcPoints + "", 21123);
|
||||
* switch (waitTimer) { case 60: c.getPacketDispatcher
|
||||
* ().sendMessage("Next game will start in: 60 seconds."); break; case 30:
|
||||
* c.
|
||||
* getPacketDispatcher().sendMessage("Next game will start in: 30 seconds."
|
||||
* ); break; } } catch (RuntimeException e) { // TODO Auto-generated catch
|
||||
* block e.printStackTrace(); } } } } catch (RuntimeException e) {
|
||||
* System.out.println("Failed to set interfaces"); e.printStackTrace(); } }
|
||||
*/
|
||||
|
||||
/*
|
||||
* private void setGameInterface() { for (Client player :
|
||||
* gamePlayers.keySet()) { if (player != null) { for (int i = 0; i <
|
||||
* portalHealth.length; i++) { if (portalHealth[i] > 0) {
|
||||
* player.getPlayerAssistant().sendString("" + portalHealth[i] + "", 21111 +
|
||||
* i); } else player.getPlayerAssistant().sendString("Dead", 21111 + i); }
|
||||
* player.getPlayerAssistant().sendString("" + KNIGHTS_HEALTH, 21115);
|
||||
* player.getPlayerAssistant().sendString("" + player.pcDamage, 21116); if
|
||||
* (gameTimer > 60) {
|
||||
* player.getPlayerAssistant().sendString("Time remaining: " +
|
||||
* (gameTimer/60) + " minutes", 21117); } else {
|
||||
* player.getPlayerAssistant().sendString("Time remaining: " + gameTimer +
|
||||
* " seconds", 21117); } } } }
|
||||
*/
|
||||
|
||||
/***
|
||||
* Moving players to arena if there's enough players
|
||||
*/
|
||||
@@ -208,10 +175,10 @@ public class PestControl {
|
||||
}
|
||||
player.getPlayerAssistant().movePlayer(2656 + Misc.random3(3), 2614 - Misc.random3(4), 0);
|
||||
player.getDialogueHandler().sendDialogues(599, 3790);
|
||||
player.getPacketSender().sendMessage("The Pest Control Game has begun!");
|
||||
player.getPacketSender().sendMessage("The Pest Control game has begun!");
|
||||
player.npcCanAttack = true;
|
||||
gamePlayers.put(player, team);
|
||||
}
|
||||
|
||||
waitingBoat.clear();
|
||||
}
|
||||
|
||||
@@ -322,14 +289,12 @@ public class PestControl {
|
||||
player.poisonDamage = 0;
|
||||
PrayerDrain.resetPrayers(player);
|
||||
for (int i = 0; i < 24; i++) {
|
||||
player.playerLevel[i] = player.getPlayerAssistant()
|
||||
.getLevelForXP(player.playerXP[i]);
|
||||
player.playerLevel[i] = player.getPlayerAssistant().getLevelForXP(player.playerXP[i]);
|
||||
player.getPlayerAssistant().refreshSkill(i);
|
||||
}
|
||||
player.specAmount = 10;
|
||||
player.pcDamage = 0;
|
||||
player.getItemAssistant().addSpecialBar(
|
||||
player.playerEquipment[player.playerWeapon]);
|
||||
player.getItemAssistant().addSpecialBar(player.playerEquipment[player.playerWeapon]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -425,7 +390,11 @@ public class PestControl {
|
||||
}
|
||||
|
||||
public static boolean npcIsPCMonster(int npcType) {
|
||||
return npcType >= 3727 && npcType <= 3776;
|
||||
return (npcType >= 3727 && npcType <= 3776);
|
||||
}
|
||||
|
||||
public static boolean isPCPortal(int npcType) {
|
||||
return (npcType >= 3777 && npcType <= 3780);
|
||||
}
|
||||
|
||||
private void spawnNPC() {
|
||||
@@ -434,8 +403,8 @@ public class PestControl {
|
||||
GameEngine.npcHandler.spawnNpc2(aPcNPCData[0], aPcNPCData[1], aPcNPCData[2], 0, 0, 200, 0, 0, playersInGame() * 200, false);
|
||||
}
|
||||
for (int[] voidMonsters : voidMonsterData) {
|
||||
//Server.npcHandler.spawnNpc2(voidMonsters[0], voidMonsters[1], voidMonsters[2], 0, 1, voidMonsters[NpcHandler.getNpcListHP(voidMonsters[0])], NpcHandler.getNpcListCombat(voidMonsters[0])/10, NpcHandler.getNpcListCombat(voidMonsters[0]), playersInGame() * 200);
|
||||
GameEngine.npcHandler.spawnNpc2(voidMonsters[0], voidMonsters[1], voidMonsters[2], 0, 1, 500, 20, 200, 25, false);
|
||||
//GameEngine.npcHandler.spawnNpc2(voidMonsters[0], voidMonsters[1], voidMonsters[2], 0, 1, voidMonsters[NpcHandler.getNpcListHP(voidMonsters[0])], NpcHandler.getNpcListCombat(voidMonsters[0])/10, NpcHandler.getNpcListCombat(voidMonsters[0]), playersInGame() * 200);
|
||||
GameEngine.npcHandler.spawnNpc2(voidMonsters[0], voidMonsters[1], voidMonsters[2], 0, 1, 50, 20, 75, 50, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -13,10 +13,10 @@ public class BlackKnightsFortress {
|
||||
client.getPacketSender().sendFrame126("I can start this quest by speaking to Sir Amik Varze in", 8147);
|
||||
client.getPacketSender().sendFrame126("Falador Castle.", 8148);
|
||||
client.getPacketSender().sendFrame126("", 8149);
|
||||
client.getPacketSender().sendFrame126("QUEST REQUIREMENTS:", 8150);
|
||||
client.getPacketSender().sendFrame126("Quest Requirements:", 8150);
|
||||
client.getPacketSender().sendFrame126("12 Quest Points", 8151);
|
||||
} else if (client.blackKnight == 1) {
|
||||
client.getPacketSender().sendFrame126("@str@I've Talked with Sir Amik Varze", 8147);
|
||||
client.getPacketSender().sendFrame126("@str@I've talked with Sir Amik Varze", 8147);
|
||||
client.getPacketSender().sendFrame126("He wants me to kill 30 Black Knights and", 8148);
|
||||
client.getPacketSender().sendFrame126("collect their notes.", 8149);
|
||||
client.getPacketSender().sendFrame126("", 8150);
|
||||
|
||||
@@ -24,7 +24,7 @@ public class PiratesTreasure {
|
||||
client.getPacketSender().sendFrame126("Port Sarim", 8148);
|
||||
client.getPacketSender().sendFrame126("", 8149);
|
||||
client.getPacketSender().sendFrame126(
|
||||
"There are no minimum requirments.", 8150);
|
||||
"There are no minimum requirements.", 8150);
|
||||
} else if (client.pirateTreasure == 1) {
|
||||
client.getPacketSender().sendFrame126("Pirate's Treasure", 8144);
|
||||
client.getPacketSender().sendFrame126(
|
||||
|
||||
@@ -10,7 +10,6 @@ import com.rebotted.game.content.skills.SkillHandler;
|
||||
import com.rebotted.game.items.ItemAssistant;
|
||||
import com.rebotted.game.items.ItemList;
|
||||
import com.rebotted.game.npcs.NpcHandler;
|
||||
import com.rebotted.game.objects.Object;
|
||||
import com.rebotted.game.players.Player;
|
||||
import com.rebotted.util.Misc;
|
||||
|
||||
@@ -18,30 +17,30 @@ public class Stalls {
|
||||
|
||||
|
||||
public static enum stallData {
|
||||
VEGETABLE_STALL(4706, 2, 10, 0, new int[] { 1965, 1 }),
|
||||
BAKER_STALL(2561, 5, 16, 3, new int[] { 2309, 1 }, new int[] { 1891, 1 }, new int[] { 1895, 1 }),
|
||||
TEA_STALL(635, 5, 16, 0, new int[] {712, 1 }),
|
||||
SILK_STALL(2560, 20, 24, 2, new int[] { 950, 1 }),
|
||||
WINE_STALL(14011, 22, 27, 0, new int[] { 1935, 1 }, new int[] {i("jug of water"), 1 }, new int[] { i("jug of wine"), 1 },
|
||||
new int[] { i("grapes"), 1 }), SEED_STALL(7053, 27, 10, 0, new int[] { i("potato seed"), 1 }, new int[] {i("onion seed"), 1 },
|
||||
new int[] { i("cabbage seed"), 1 }, new int[] {i("tomato seed"), 1 }, new int[] { i("sweetcorn seed"), 1 }, new int[] { i("strawberry seed"), 1 },
|
||||
new int[] {i("watermelon seed"), 1 }, new int[] {i("barley seed"), 1 }, new int[] { i("jute seed"), 1 }, new int[] { i("marigold seed"), 1 },
|
||||
new int[] {i("rosemary seed"), 1 }, new int[] {i("hammerstone seed"), 1 }, new int[] {i("asgarnain seed"), 1 }, new int[] {i("yanillian seed"), 1 },
|
||||
new int[] {i("krandorian seed"), 1 }, new int[] {i("wildblood seed"), 1 }), FUR_STALL(2563, 35, 36, 0, new int[] { 6814, 1 }, new int[] { 958, 1 }),
|
||||
FUR_STALL2(4278, 35, 36, 0, new int[] { 6814, 1 }, new int[] { 958, 1 }),
|
||||
FISH_STALL(4705, 42, 42, 0, new int[] { 359, 1 }),
|
||||
FISH_STALL2(4277, 42, 42, 0, new int[] { 359, 1 }),
|
||||
SILVER_STALL(2565, 50, 54, 2, new int[] { 442, 1 }, new int[] { 2355, 1 }),
|
||||
VEGETABLE_STALL(4706, 2, 10, 0, new int[] { 1965, 1 }),
|
||||
BAKER_STALL(2561, 5, 16, 3, new int[] { 2309, 1 }, new int[] { 1891, 1 }, new int[] { 1895, 1 }),
|
||||
TEA_STALL(635, 5, 16, 0, new int[] {712, 1 }),
|
||||
SILK_STALL(2560, 20, 24, 2, new int[] { 950, 1 }),
|
||||
WINE_STALL(14011, 22, 27, 0, new int[] { 1935, 1 }, new int[] {i("jug of water"), 1 }, new int[] { i("jug of wine"), 1 },
|
||||
new int[] { i("grapes"), 1 }), SEED_STALL(7053, 27, 10, 0, new int[] { i("potato seed"), 1 }, new int[] {i("onion seed"), 1 },
|
||||
new int[] { i("cabbage seed"), 1 }, new int[] {i("tomato seed"), 1 }, new int[] { i("sweetcorn seed"), 1 }, new int[] { i("strawberry seed"), 1 },
|
||||
new int[] {i("watermelon seed"), 1 }, new int[] {i("barley seed"), 1 }, new int[] { i("jute seed"), 1 }, new int[] { i("marigold seed"), 1 },
|
||||
new int[] {i("rosemary seed"), 1 }, new int[] {i("hammerstone seed"), 1 }, new int[] {i("asgarnain seed"), 1 }, new int[] {i("yanillian seed"), 1 },
|
||||
new int[] {i("krandorian seed"), 1 }, new int[] {i("wildblood seed"), 1 }), FUR_STALL(2563, 35, 36, 0, new int[] { 6814, 1 }, new int[] { 958, 1 }),
|
||||
FUR_STALL2(4278, 35, 36, 0, new int[] { 6814, 1 }, new int[] { 958, 1 }),
|
||||
FISH_STALL(4705, 42, 42, 0, new int[] { 359, 1 }),
|
||||
FISH_STALL2(4277, 42, 42, 0, new int[] { 359, 1 }),
|
||||
SILVER_STALL(2565, 50, 54, 2, new int[] { 442, 1 }, new int[] { 2355, 1 }),
|
||||
SPICE_STALL(2564, 65, 81.3, 0, new int[] { 2007, 1 }, new int[] { 946, 1 }, new int[] { 1550, 1 }), GEM_STALL(2562, 75, 160, 3,
|
||||
new int[] { 1617, 1 }, new int[] { 1619, 1 }, new int[] { 1621, 1 }, new int[] { 1623, 1 }),
|
||||
new int[] { 1617, 1 }, new int[] { 1619, 1 }, new int[] { 1621, 1 }, new int[] { 1623, 1 }),
|
||||
MAGIC_STALL(4877, 65, 100, 0, new int[] {i("air rune"), 1}, new int[] {i("water rune"), 1}, new int[] {i("fire rune"), 1}, new int[] {i("law rune"), 1}),
|
||||
SCIMITAR_STALL(4878, 65, 100, 0, new int[] {i("iron scimitar"), 1}, new int[] {i("steel scimitar"), 1});
|
||||
|
||||
|
||||
private int objectId, levelReq, face;
|
||||
private int[][] stalls;
|
||||
private double xp;
|
||||
private long respawnTime;
|
||||
|
||||
|
||||
private stallData(final int objectId, final int levelReq, final double xp, final int face, final int[]... stalls) {
|
||||
this.objectId = objectId;
|
||||
this.levelReq = levelReq;
|
||||
@@ -72,7 +71,7 @@ public class Stalls {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static int r(int random) {
|
||||
return Misc.random(random);
|
||||
}
|
||||
@@ -121,8 +120,13 @@ public class Stalls {
|
||||
if(objectId == s.getObject()) {
|
||||
// Wait for respawn
|
||||
if (System.currentTimeMillis() < s.respawnTime) {
|
||||
p.getPacketSender().sendMessage("You need to wait longer before you can thieve this stall!");
|
||||
return;
|
||||
long timeFirstStealFromStall = s.respawnTime - (GameConstants.CYCLE_TIME * getRespawnTime(s.objectId));
|
||||
|
||||
// If stealing from stall at the same tick as another player
|
||||
if(p.hasThievedStall() || System.currentTimeMillis() - timeFirstStealFromStall >= GameConstants.CYCLE_TIME) {
|
||||
p.getPacketSender().sendMessage("You need to wait longer before you can thieve this stall!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Thieving level too low
|
||||
if (p.playerLevel[p.playerThieving] < s.getLevel()) {
|
||||
@@ -144,11 +148,13 @@ public class Stalls {
|
||||
s.respawnTime = System.currentTimeMillis() + (respawnTime * GameConstants.CYCLE_TIME);
|
||||
p.getPacketSender().sendMessage("You steal a " + ItemAssistant.getItemName(random[0]) + " from the stall.");
|
||||
p.getItemAssistant().addItem(random[0], random[1]);
|
||||
p.setHasThievedStall(true);
|
||||
CycleEventHandler.getSingleton().addEvent(p, new CycleEvent() {
|
||||
@Override
|
||||
public void execute(CycleEventContainer container) {
|
||||
GameEngine.objectHandler.createAnObject(p, s.getObject(), x, y, s.getFace());
|
||||
//new Object(objectId, x, y, 0, s.getFace(), 10, j, getRespawnTime(objectId));
|
||||
p.setHasThievedStall(false);
|
||||
container.stop();
|
||||
}
|
||||
@Override
|
||||
@@ -194,7 +200,7 @@ public class Stalls {
|
||||
if (NpcHandler.npcs[i] != null) {
|
||||
if (NpcHandler.npcs[i].npcType == 32 || NpcHandler.npcs[i].npcType == 1317 || NpcHandler.npcs[i].npcType == 2236 || NpcHandler.npcs[i].npcType == 2571) {
|
||||
if (p.goodDistance(p.absX, p.absY, NpcHandler.npcs[i].absX, NpcHandler.npcs[i].absY, 7)
|
||||
&& p.heightLevel == NpcHandler.npcs[i].heightLevel) {
|
||||
&& p.heightLevel == NpcHandler.npcs[i].heightLevel) {
|
||||
if (!NpcHandler.npcs[i].underAttack) {
|
||||
NpcHandler.npcs[i].forceChat("What do you think you're doing?!?");
|
||||
NpcHandler.npcs[i].underAttack = true;
|
||||
|
||||
@@ -520,7 +520,7 @@ public class DialogueHandler {
|
||||
player.getItemAssistant().deleteItem(436, 4);
|
||||
player.getItemAssistant().deleteItem(440, 2);
|
||||
player.doricQuest = 2;
|
||||
sendNpcChat2("You brought me everything i need.", "Thank You!",
|
||||
sendNpcChat2("You brought me everything I need.", "Thank You!",
|
||||
player.talkingNpc, "Doric");
|
||||
player.nextChat = 87;
|
||||
break;
|
||||
@@ -1008,7 +1008,7 @@ public class DialogueHandler {
|
||||
break;
|
||||
case 215:
|
||||
sendNpcChat3(
|
||||
"I need time to study this, " + player.playerName + ".",
|
||||
"I need time to study this, " + Misc.capitalize(player.playerName) + ".",
|
||||
"Can you please do me this task while I study this talisman you have brought me?",
|
||||
"In the mighty town of Varrock, which", player.talkingNpc,
|
||||
"Sedridor");
|
||||
@@ -1046,7 +1046,7 @@ public class DialogueHandler {
|
||||
player.nextChat = 220;
|
||||
break;
|
||||
case 220:
|
||||
sendNpcChat2("Do this thing for me " + player.playerName + ".",
|
||||
sendNpcChat2("Do this thing for me " + Misc.capitalize(player.playerName) + ".",
|
||||
" Be rewarded in a way you can never imagine.",
|
||||
player.talkingNpc, "Sedridor");
|
||||
player.nextChat = 222;
|
||||
@@ -1152,7 +1152,7 @@ public class DialogueHandler {
|
||||
player.nextChat = 239;
|
||||
break;
|
||||
case 239:
|
||||
sendNpcChat2("Ah, " + player.playerName + ". How goes your quest?",
|
||||
sendNpcChat2("Ah, " + Misc.capitalize(player.playerName) + ". How goes your quest?",
|
||||
"Have you delivered the research notes to my friend yet?",
|
||||
player.talkingNpc, "Sedridor");
|
||||
player.nextChat = 240;
|
||||
@@ -3046,7 +3046,7 @@ public class DialogueHandler {
|
||||
break;
|
||||
|
||||
case 590:
|
||||
sendNpcChat1("Hello " + player.playerName + ".", player.talkingNpc,
|
||||
sendNpcChat1("Hello " + Misc.capitalize(player.playerName) + ".", player.talkingNpc,
|
||||
"Gnome Pilot");
|
||||
player.nextChat = 591;
|
||||
break;
|
||||
@@ -4285,7 +4285,7 @@ public class DialogueHandler {
|
||||
break;
|
||||
case 1237:
|
||||
sendNpcChat2("You have been assigned " + player.taskAmount + " " + player.getSlayer().getTaskName(player.slayerTask) + ",",
|
||||
"Good luck " + player.playerName + ".",
|
||||
"Good luck " + Misc.capitalize(player.playerName) + ".",
|
||||
player.talkingNpc,
|
||||
NpcHandler.getNpcListName(player.talkingNpc));
|
||||
player.nextChat = 0;
|
||||
@@ -4440,7 +4440,7 @@ public class DialogueHandler {
|
||||
case 1318:
|
||||
if (player.getSlayer().hasTask()) {
|
||||
sendNpcChat3(
|
||||
"Hello " + player.playerName + ".",
|
||||
"Hello " + Misc.capitalize(player.playerName) + ".",
|
||||
"You currently need to kill "
|
||||
+ player.taskAmount
|
||||
+ " more "
|
||||
@@ -4476,7 +4476,7 @@ public class DialogueHandler {
|
||||
case 1320:
|
||||
if (player.getSlayer().hasTask()) {
|
||||
sendNpcChat2(
|
||||
"Hello " + player.playerName + ".",
|
||||
"Hello " + Misc.capitalize(player.playerName) + ".",
|
||||
"I am located in "
|
||||
+ player.getSlayer().getMasterLocation(
|
||||
player.SlayerMaster) + ".",
|
||||
@@ -4495,7 +4495,7 @@ public class DialogueHandler {
|
||||
break;
|
||||
|
||||
case 1322:
|
||||
sendNpcChat2("Hello " + player.playerName + ".", "Are you interested in buying anything?", player.talkingNpc, NpcHandler.getNpcListName(player.talkingNpc));
|
||||
sendNpcChat2("Hello " + Misc.capitalize(player.playerName) + ".", "Are you interested in buying anything?", player.talkingNpc, NpcHandler.getNpcListName(player.talkingNpc));
|
||||
player.nextChat = 1323;
|
||||
break;
|
||||
|
||||
@@ -4527,7 +4527,7 @@ public class DialogueHandler {
|
||||
break;
|
||||
|
||||
case 1329:
|
||||
sendNpcChat2("Hello " + player.playerName + ".",
|
||||
sendNpcChat2("Hello " + Misc.capitalize(player.playerName) + ".",
|
||||
"Are you interested in buying anything?",
|
||||
player.talkingNpc,
|
||||
NpcHandler.getNpcListName(player.talkingNpc));
|
||||
@@ -4856,7 +4856,7 @@ public class DialogueHandler {
|
||||
case 1368:
|
||||
sendNpcChat2("You have been assigned " + player.taskAmount + " "
|
||||
+ player.getSlayer().getTaskName(player.slayerTask) + ",",
|
||||
"Good luck " + player.playerName + ".", player.talkingNpc,
|
||||
"Good luck " + Misc.capitalize(player.playerName) + ".", player.talkingNpc,
|
||||
NpcHandler.getNpcListName(player.talkingNpc));
|
||||
player.nextChat = 0;
|
||||
break;
|
||||
@@ -4895,7 +4895,7 @@ public class DialogueHandler {
|
||||
break;
|
||||
|
||||
case 1373:
|
||||
sendNpcChat2("Hello " + player.playerName + ".",
|
||||
sendNpcChat2("Hello " + Misc.capitalize(player.playerName) + ".",
|
||||
"Are you interested in buying anything?",
|
||||
player.talkingNpc,
|
||||
NpcHandler.getNpcListName(player.talkingNpc));
|
||||
@@ -4928,7 +4928,7 @@ public class DialogueHandler {
|
||||
break;
|
||||
|
||||
case 1378:
|
||||
sendNpcChat2("Hello " + player.playerName + ".",
|
||||
sendNpcChat2("Hello " + Misc.capitalize(player.playerName) + ".",
|
||||
"Are you interested in buying a candle for 1k?",
|
||||
player.talkingNpc, "Candle Seller");
|
||||
player.nextChat = 1379;
|
||||
@@ -6123,7 +6123,7 @@ public class DialogueHandler {
|
||||
break;
|
||||
|
||||
case 3118:
|
||||
sendNpcChat2("Hello " + player.playerName + ".",
|
||||
sendNpcChat2("Hello " + Misc.capitalize(player.playerName) + ".",
|
||||
"Are you interested in buying any beer?",
|
||||
player.talkingNpc,
|
||||
NpcHandler.getNpcListName(player.talkingNpc));
|
||||
@@ -6383,7 +6383,7 @@ public class DialogueHandler {
|
||||
break;
|
||||
|
||||
case 3158:
|
||||
sendNpcChat1("Hello, " + player.playerName + " what would you like to do?", player.talkingNpc, "Wyson the Gardener");
|
||||
sendNpcChat1("Hello, " + Misc.capitalize(player.playerName) + " what would you like to do?", player.talkingNpc, "Wyson the Gardener");
|
||||
player.nextChat = 3159;
|
||||
break;
|
||||
|
||||
@@ -6733,29 +6733,8 @@ public class DialogueHandler {
|
||||
player.dialogueAction = 3205;//187
|
||||
break;
|
||||
|
||||
/*case 3206:
|
||||
if (Constants.HALLOWEEN == false) {
|
||||
sendNpcChat2("The halloween event is now over,", "what would you like?", 945, "" + Constants.SERVER_NAME + " Guide");
|
||||
client.nextChat = 3207;
|
||||
} else if (client.recievedMask == false && Constants.HALLOWEEN) {
|
||||
sendNpcChat2("Thank you so much for voting!", "Enjoy your mask!", 945, "" + Constants.SERVER_NAME + " Guide");
|
||||
client.getItemAssistant().addOrDropItem(client.getPlayerAssistant().randomReward(), 1);
|
||||
VotingHandler.setAsReceived(client.playerName);
|
||||
client.recievedMask = true;
|
||||
client.nextChat = 0;
|
||||
} else if (client.recievedMask && Constants.HALLOWEEN) {
|
||||
sendNpcChat2("You have already recieved a halloween mask.", "What reward would you like?", 945, "" + Constants.SERVER_NAME + " Guide");
|
||||
client.nextChat = 3207;
|
||||
}
|
||||
break;
|
||||
|
||||
case 3207:
|
||||
sendOption3("Experience Lamp (Depends on Level of Skill)", "Coins (1-4k)", "Energy Lamp");
|
||||
client.dialogueAction = 188;
|
||||
break;*/
|
||||
|
||||
case 3208:
|
||||
sendNpcChat1("Hello, " + player.playerName + " what would you like to do?", 958, "Fadli");
|
||||
sendNpcChat1("Hello, " + Misc.capitalize(player.playerName) + " what would you like to do?", 958, "Fadli");
|
||||
player.nextChat = 3209;
|
||||
break;
|
||||
|
||||
@@ -6824,7 +6803,7 @@ public class DialogueHandler {
|
||||
break;
|
||||
|
||||
case 3221://28
|
||||
sendStatement("Congratulations, " + player.playerName + ". You've completed the barrows challenge & your reward has been delivered.");
|
||||
sendStatement("Congratulations, " + Misc.capitalize(player.playerName) + ". You've completed the barrows challenge & your reward has been delivered.");
|
||||
player.nextChat = 0;
|
||||
break;
|
||||
|
||||
@@ -6919,7 +6898,7 @@ public class DialogueHandler {
|
||||
player.nextChat = 3509;
|
||||
break;
|
||||
case 3509:
|
||||
sendNpcChat1("Thank you so much " + player.playerName + "!", player.talkingNpc, "Sir Amik Varze");
|
||||
sendNpcChat1("Thank you so much " + Misc.capitalize(player.playerName) + "!", player.talkingNpc, "Sir Amik Varze");
|
||||
player.nextChat = 0;
|
||||
break;
|
||||
case 3510:
|
||||
@@ -6933,7 +6912,7 @@ public class DialogueHandler {
|
||||
}
|
||||
break;
|
||||
case 3511:
|
||||
sendNpcChat1("Thank you very much " + player.playerName + "!",
|
||||
sendNpcChat1("Thank you very much " + Misc.capitalize(player.playerName) + "!",
|
||||
player.talkingNpc, "Sir Amik Varze");
|
||||
player.nextChat = 3512;
|
||||
break;
|
||||
|
||||
@@ -4,7 +4,6 @@ import java.io.BufferedReader;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.rebotted.GameConstants;
|
||||
import com.rebotted.GameEngine;
|
||||
import com.rebotted.event.CycleEvent;
|
||||
@@ -650,12 +649,14 @@ public class NpcHandler {
|
||||
if (npcs[i].actionTimer == 0 && npcs[i].applyDead == false && npcs[i].needRespawn == false) {
|
||||
npcs[i].updateRequired = true;
|
||||
npcs[i].facePlayer(0);
|
||||
if (npcs[i].killedBy <= 0)
|
||||
npcs[i].killedBy = NpcData.getNpcKillerId(i);
|
||||
npcs[i].killedBy = NpcData.getNpcKillerId(i);
|
||||
Player c = (Client) PlayerHandler.players[npcs[i].killedBy];
|
||||
if (c != null) {
|
||||
npcs[i].animNumber = NpcEmotes.getDeadEmote(c, i); // dead emote
|
||||
if (CombatConstants.COMBAT_SOUNDS) {
|
||||
if (PestControl.npcIsPCMonster(NpcHandler.npcs[i].npcType) || PestControl.isPCPortal(NpcHandler.npcs[i].npcType)) {
|
||||
return;
|
||||
}
|
||||
c.getPacketSender().sendSound(CombatSounds.getNpcDeathSounds(npcs[i].npcType), 100, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2012,10 +2012,10 @@ public class NPCDrops extends NPCDropsHandler {
|
||||
|
||||
public static final ItemDrop[] imp = {
|
||||
new ItemDrop(i("ashes"), 1, ALWAYS),
|
||||
new ItemDrop(i("red bead"), 1, UNCOMMON),
|
||||
new ItemDrop(i("yellow bead"), 1, UNCOMMON),
|
||||
new ItemDrop(i("black bead"), 1, UNCOMMON),
|
||||
new ItemDrop(i("white bead"), 1, UNCOMMON),
|
||||
new ItemDrop(i("red bead"), 1, COMMON),
|
||||
new ItemDrop(i("yellow bead"), 1, COMMON),
|
||||
new ItemDrop(i("black bead"), 1, COMMON),
|
||||
new ItemDrop(i("white bead"), 1, COMMON),
|
||||
new ItemDrop(i("tinderbox"), 1, UNCOMMON),
|
||||
new ItemDrop(i("ball of wool"), 1, COMMON),
|
||||
new ItemDrop(i("hammer"), 1, COMMON),
|
||||
|
||||
@@ -1462,7 +1462,7 @@ public class ObjectsActions {
|
||||
break;
|
||||
|
||||
case 14315:
|
||||
if (!PestControl.waitingBoat.containsKey(player) && player.absX == 2657 && player.absY > 2638 && player.absY < 264) {
|
||||
if (!PestControl.waitingBoat.containsKey(player) && player.absX == 2657 && player.absY > 2638 && player.absY < 2640) {
|
||||
PestControl.addToWaitRoom(player);
|
||||
} else {
|
||||
if (player.absX == 2657 && player.absY > 2638 && player.absY < 2641) {
|
||||
@@ -1691,7 +1691,7 @@ public class ObjectsActions {
|
||||
RuneCraftingActions.handleRuneCrafting(player, objectType);
|
||||
break;
|
||||
case 3203:
|
||||
Dueling.HandleForfeit(player);
|
||||
Dueling.handleForfeit(player);
|
||||
break;
|
||||
case 6481:
|
||||
player.getPlayerAssistant().movePlayer(3233, 9317, 0);
|
||||
|
||||
@@ -75,7 +75,7 @@ import com.rebotted.util.Stream;
|
||||
import com.rebotted.world.ObjectManager;
|
||||
|
||||
public abstract class Player {
|
||||
|
||||
|
||||
public byte buffer[] = null;
|
||||
public Stream inStream = null, outStream = null;
|
||||
public IoSession session;
|
||||
@@ -135,11 +135,11 @@ public abstract class Player {
|
||||
public SingleGates getSingleGates() {
|
||||
return singleGates;
|
||||
}
|
||||
|
||||
|
||||
public DoubleGates getDoubleGates() {
|
||||
return doubleGates;
|
||||
}
|
||||
|
||||
|
||||
public GateHandler getGateHandler() {
|
||||
return gateHandler;
|
||||
}
|
||||
@@ -155,19 +155,19 @@ public abstract class Player {
|
||||
public Mining getMining() {
|
||||
return mining;
|
||||
}
|
||||
|
||||
|
||||
public Barrows getBarrows() {
|
||||
return barrows;
|
||||
}
|
||||
|
||||
|
||||
public GlassBlowing getGlassBlowing() {
|
||||
return glassBlowing;
|
||||
}
|
||||
|
||||
|
||||
public RangersGuild getRangersGuild() {
|
||||
return rangersGuild;
|
||||
}
|
||||
|
||||
|
||||
public ObjectManager getObjectManager() {
|
||||
return objectManager;
|
||||
}
|
||||
@@ -251,7 +251,7 @@ public abstract class Player {
|
||||
public PlayerAction getPlayerAction() {
|
||||
return playeraction;
|
||||
}
|
||||
|
||||
|
||||
public Desert getDesert() {
|
||||
return desert;
|
||||
}
|
||||
@@ -365,16 +365,16 @@ public abstract class Player {
|
||||
}
|
||||
|
||||
private Map<Integer, TinterfaceText> interfaceText = new HashMap<Integer, TinterfaceText>();
|
||||
|
||||
|
||||
public class TinterfaceText {
|
||||
public int id;
|
||||
public String currentState;
|
||||
|
||||
|
||||
public TinterfaceText(String s, int id) {
|
||||
this.currentState = s;
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public boolean checkPacket126Update(String text, int id) {
|
||||
@@ -626,7 +626,7 @@ public abstract class Player {
|
||||
}
|
||||
@Override
|
||||
public void stop() {
|
||||
|
||||
|
||||
}
|
||||
}, 200);
|
||||
}
|
||||
@@ -644,7 +644,7 @@ public abstract class Player {
|
||||
public boolean isBusy() {
|
||||
return isBusy;
|
||||
}
|
||||
|
||||
|
||||
public int getLastLogin() {
|
||||
Calendar cal = new GregorianCalendar();
|
||||
int day = cal.get(Calendar.DAY_OF_MONTH);
|
||||
@@ -974,7 +974,7 @@ public abstract class Player {
|
||||
/**
|
||||
* Outputs a send packet which is built from the data params provided
|
||||
* towards a connected user client channel.
|
||||
*
|
||||
*
|
||||
* @param id
|
||||
* The identification number of the sound.
|
||||
* @param volume
|
||||
@@ -1000,7 +1000,7 @@ public abstract class Player {
|
||||
/**
|
||||
* Outputs a send packet which is built from the data params provided
|
||||
* towards a connected user client channel.
|
||||
*
|
||||
*
|
||||
* @param id
|
||||
* The identification number of the sound.
|
||||
* @param volume
|
||||
@@ -1013,7 +1013,7 @@ public abstract class Player {
|
||||
/**
|
||||
* Outputs a send packet which is built from the data params provided
|
||||
* towards a connected user client channel.
|
||||
*
|
||||
*
|
||||
* @param id
|
||||
* The identification number of the sound.
|
||||
*/
|
||||
@@ -1023,7 +1023,7 @@ public abstract class Player {
|
||||
|
||||
/**
|
||||
* Play sounds
|
||||
*
|
||||
*
|
||||
* @param SOUNDID
|
||||
* : ID
|
||||
* @param delay
|
||||
@@ -1074,14 +1074,14 @@ public abstract class Player {
|
||||
}
|
||||
@Override
|
||||
public void stop() {
|
||||
|
||||
|
||||
}
|
||||
}, 16);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void trawlerFade(final int x, final int y, final int height) {
|
||||
if (System.currentTimeMillis() - lastAction > 5000) {
|
||||
lastAction = System.currentTimeMillis();
|
||||
@@ -1115,7 +1115,7 @@ public abstract class Player {
|
||||
}, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void fade(final int x, final int y, final int height) {
|
||||
if (System.currentTimeMillis() - lastAction > 5000) {
|
||||
lastAction = System.currentTimeMillis();
|
||||
@@ -1166,7 +1166,7 @@ public abstract class Player {
|
||||
|
||||
/**
|
||||
* Sets the option clicked
|
||||
*
|
||||
*
|
||||
* @param i
|
||||
* the option clicked
|
||||
*/
|
||||
@@ -1174,19 +1174,19 @@ public abstract class Player {
|
||||
public void setOptionClicked(int i) {
|
||||
optionClicked = i;
|
||||
}
|
||||
|
||||
|
||||
public String statedInterface = "";
|
||||
|
||||
|
||||
public String getStatedInterface() {
|
||||
return statedInterface;
|
||||
}
|
||||
|
||||
|
||||
public void setStatedInterface(String statedInterface) {
|
||||
this.statedInterface = statedInterface;
|
||||
}
|
||||
|
||||
public String slayerMaster;
|
||||
|
||||
|
||||
public boolean lostCannon = false, refresh = false, isBot = false;
|
||||
|
||||
public int CannonSetupStage;
|
||||
@@ -1194,7 +1194,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[][] barrowCrypt = {
|
||||
{4921, 0},
|
||||
{2035, 0}
|
||||
@@ -1242,7 +1242,7 @@ public abstract class Player {
|
||||
canWalkTutorial, closeTutorialInterface, isCrafting, showedUnfire,
|
||||
showedFire, isPotCrafting, isFiremaking, playerIsFletching, milking,
|
||||
stopPlayerPacket, spiritTree = false, isSmelting,
|
||||
isSmithing, hasPaid, canTeleport, magicCharge,
|
||||
isSmithing, hasPaid, canTeleport, magicCharge,
|
||||
clickedVamp = false, allowFading, otherBank = false,
|
||||
recievedReward = false, poison, golemSpawned = false, zombieSpawned = false, shadeSpawned = false,
|
||||
treeSpiritSpawned = false, chickenSpawned = false, clickedTree = false, filter = true,
|
||||
@@ -1273,7 +1273,7 @@ public abstract class Player {
|
||||
rememberNpcIndex, ratsCaught, lastLoginDate, selectedSkill, newHerb,
|
||||
newItem, newXp, doingHerb, herbAmount, treeX, treeY, lastH,
|
||||
cookingItem, cookingObject, summonId, npcId2 = 0, leatherType = -1,
|
||||
weightCarried, teleotherType, rockX, rockY, itemUsing, tzKekTimer,
|
||||
weightCarried, teleotherType, rockX, rockY, itemUsing, tzKekTimer,
|
||||
bananas, flourAmount, grain, questPoints, questStages,
|
||||
teleGrabItem, teleGrabX, teleGrabY, duelCount, underAttackBy,
|
||||
underAttackBy2, wildLevel, teleTimer, respawnTimer, saveTimer = 0,
|
||||
@@ -1381,11 +1381,11 @@ public abstract class Player {
|
||||
public boolean[] killedPheasant = new boolean[5];
|
||||
public boolean playerHasRandomEvent;
|
||||
public boolean canLeaveArea;
|
||||
|
||||
|
||||
public int pieSelect = 0, getPheasent, kebabSelect = 0, breadID,
|
||||
chocSelect = 0, bagelSelect = 0, triangleSandwich = 0,
|
||||
squareSandwich = 0, breadSelect = 0;
|
||||
|
||||
|
||||
public String properName;
|
||||
public int lastX, lastY;
|
||||
public int[] voidStatus = new int[5];
|
||||
@@ -1582,8 +1582,18 @@ public abstract class Player {
|
||||
public int XremoveSlot, XinterfaceID, XremoveID, Xamount;
|
||||
|
||||
public boolean isMining;
|
||||
public boolean hasThievedStall;
|
||||
|
||||
public boolean hasThievedStall() {
|
||||
return hasThievedStall;
|
||||
}
|
||||
|
||||
public void setHasThievedStall(boolean hasThievedStall) {
|
||||
this.hasThievedStall = hasThievedStall;
|
||||
}
|
||||
|
||||
public boolean antiFirePot = false;
|
||||
|
||||
|
||||
public boolean underWater = false;
|
||||
public boolean prevRunning2;
|
||||
public int prevPrevPlayerRunIndex;
|
||||
@@ -1597,7 +1607,7 @@ public abstract class Player {
|
||||
public Client asClient() {
|
||||
return (Client) this;
|
||||
}
|
||||
|
||||
|
||||
private Player player;
|
||||
public Player asPlayer() {
|
||||
return (Player) player;
|
||||
@@ -1609,7 +1619,7 @@ public abstract class Player {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public boolean inTrawlerGame() {
|
||||
if(inArea(2808, 2811,3415,3425)) {
|
||||
return true;
|
||||
@@ -1712,7 +1722,7 @@ public abstract class Player {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public boolean inKqArea() {
|
||||
if (absX >= 3467 && absX <= 3506 && absY >= 9477 && absY <= 9513) {
|
||||
return true;
|
||||
@@ -1803,23 +1813,23 @@ public abstract class Player {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public boolean playerIsBusy() {
|
||||
if(isShopping || inTrade || openDuel || isBanking || duelStatus == 1) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isInBarrows() {
|
||||
|
||||
public boolean isInBarrows() {
|
||||
if(absX > 3543 && absX < 3584 && absY > 3265 && absY < 3311) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isInBarrows2() {
|
||||
|
||||
public boolean isInBarrows2() {
|
||||
if(absX > 3529 && absX < 3581 && absY > 9673 && absY < 9722) {
|
||||
return true;
|
||||
}
|
||||
@@ -1845,7 +1855,7 @@ public abstract class Player {
|
||||
return isInAreaxxyy(3090, 3099, 3487, 3500) || isInAreaxxyy(3089, 3090, 3492, 3498) || isInAreaxxyy(3249, 3258, 3413, 3428) || isInAreaxxyy(3180, 3191, 3432, 3448) || isInAreaxxyy(2945, 2948, 3365, 3374) ||
|
||||
isInAreaxxyy(2943, 2948, 3367, 3374) || isInAreaxxyy(2945, 2950, 3365, 3370) || isInAreaxxyy(3009, 3018, 3352, 3359) || isInAreaxxyy(3017, 3022, 3353, 3357);
|
||||
}
|
||||
|
||||
|
||||
public boolean inLumbBuilding() {
|
||||
return isInAreaxxyy(3205, 3216, 3209, 3228) || isInAreaxxyy(3229, 3233, 3206, 3208) || isInAreaxxyy(3228, 3233, 3201, 3205) || isInAreaxxyy(3230, 3237, 3195, 3198) || isInAreaxxyy(3238, 3229, 3209, 3211) ||
|
||||
isInAreaxxyy(3240, 3247, 3204, 3215) || isInAreaxxyy(3247, 3252, 3190, 3195) || isInAreaxxyy(3227, 3230, 3212, 3216) || isInAreaxxyy(3227, 3230, 3221, 3225) || isInAreaxxyy(3229, 3232, 3236, 3241) ||
|
||||
@@ -2125,7 +2135,7 @@ public abstract class Player {
|
||||
walkingQueueY[wQueueWritePtr] = y;
|
||||
wQueueWritePtr = next;
|
||||
}
|
||||
|
||||
|
||||
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));
|
||||
}
|
||||
@@ -3088,11 +3098,11 @@ public abstract class Player {
|
||||
}
|
||||
|
||||
public void setInStreamDecryption(ISAACRandomGen inStreamDecryption) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void setOutStreamDecryption(ISAACRandomGen outStreamDecryption) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
public boolean samePlayer() {
|
||||
@@ -3115,7 +3125,7 @@ public abstract class Player {
|
||||
logoutDelay = System.currentTimeMillis();
|
||||
singleCombatDelay = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void dealDamage(int damage) {
|
||||
if (teleTimer <= 0) {
|
||||
@@ -3133,7 +3143,7 @@ public abstract class Player {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void appendRedemption() {
|
||||
Client c = (Client) PlayerHandler.players[playerId];
|
||||
if (c.getPrayer().prayerActive[22]) {
|
||||
|
||||
@@ -1068,7 +1068,8 @@ public class PacketSender {
|
||||
*/
|
||||
|
||||
public PacketSender sendSong(int id) {
|
||||
if (player.getOutStream() == null) return this;
|
||||
if (player.getOutStream() == null)
|
||||
return this;
|
||||
if (player != null && id != -1) {
|
||||
player.getOutStream().createFrame(74);
|
||||
player.getOutStream().writeWordBigEndian(id);
|
||||
@@ -1081,7 +1082,8 @@ public class PacketSender {
|
||||
*/
|
||||
|
||||
public PacketSender sendQuickSong(int id, int songDelay) {
|
||||
if (player.getOutStream() == null) return this;
|
||||
if (player.getOutStream() == null)
|
||||
return this;
|
||||
if (player != null) {
|
||||
player.getOutStream().createFrame(121);
|
||||
player.getOutStream().writeWordBigEndian(id);
|
||||
@@ -1096,7 +1098,8 @@ public class PacketSender {
|
||||
*/
|
||||
|
||||
public PacketSender sendSound(int id, int type, int delay, int volume) {
|
||||
if (player.getOutStream() == null) return this;
|
||||
if (player.getOutStream() == null)
|
||||
return this;
|
||||
if (player != null && id != -1) {
|
||||
player.getOutStream().createFrame(174);
|
||||
player.getOutStream().writeWord(id);
|
||||
|
||||
@@ -642,11 +642,11 @@ public class Commands implements PacketType {
|
||||
player.specAmount = 100.0;
|
||||
break;
|
||||
case "hp":
|
||||
player.getPacketSender().sendMessage("You attributed yourself 999 999 hitpoints.");
|
||||
player.getPacketSender().sendMessage("You attributed yourself 999,999 hitpoints.");
|
||||
player.playerLevel[3] = 999999;
|
||||
break;
|
||||
case "pray":
|
||||
player.getPacketSender().sendMessage("You attributed yourself 999 999 prayer points.");
|
||||
player.getPacketSender().sendMessage("You attributed yourself 999,999 prayer points.");
|
||||
player.playerLevel[5] = 999999;
|
||||
break;
|
||||
case "setlevel":
|
||||
@@ -654,7 +654,7 @@ public class Commands implements PacketType {
|
||||
case "skill":
|
||||
try {
|
||||
if (arguments.length < 2) {
|
||||
player.getPacketSender().sendMessage("Must specify a skill and level: ::setlevel 1 99");
|
||||
player.getPacketSender().sendMessage("Must specify a skill and level - ::setlevel 1 99");
|
||||
return;
|
||||
}
|
||||
int skill = Integer.parseInt(arguments[0]);
|
||||
|
||||
Reference in New Issue
Block a user