text
stringlengths
33
161k
package com.rs.engine.pathfinder.reach public interface ReachStrategy { public fun reached( flags: Array<IntArray?>, x: Int, y: Int, z: Int, destX: Int, destY: Int, destWidth: Int, destHeight: Int, srcSize: Int, rotation: Int, ...
package com.rs.engine.quest; public enum Quest { COOKS_ASSISTANT(6, 1), DEMON_SLAYER(51, 2), DORICS_QUEST(99, 3), DRAGON_SLAYER(66, 4), ERNEST_CHICKEN(15, 5), GOBLIN_DIPLOMACY(137, 6), IMP_CATCHER(72, 7), KNIGHTS_SWORD(152, 8), PIRATES_TREASURE(60, 9), PRINCE_ALI_RESCUE(64, 10), RESTLESS_GHOST(27, 11), P...
package com.rs.engine.quest; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) public @interface QuestHandler { Quest quest(); String startText(); String itemsText(); String combatText(); String rewardsText(); int completedStage(); }
package com.rs.engine.quest; @PluginEventHandler public class QuestManager { public static int MAX_QUESTPOINTS = 0; public static ButtonClickHandler handleQuestTabButtons = new ButtonClickHandler(190, e -> { if (e.getComponentId() == 38) e.getPlayer().getQuestManager().setSort(e.getSlotId...
package com.rs.engine.quest; public abstract class QuestOutline { public final Quest getQuest() { return getClass().getAnnotation(QuestHandler.class).quest(); } public final int getCompletedStage() { return getClass().getAnnotation(QuestHandler.class).completedStage(); }; public abstract List<String> getJ...
package com.rs.engine.quest.data; /** * @author Trenton * Necking myself knowing that all of this was in the cache. * Regretting hours of finding varbits by looping for all the quests. */ public class QuestDefinitions { public enum Type { NORMAL, HOLIDAY; } public enum Difficulty { NOVICE, INTERMEDI...
package com.rs.engine.quest.data; public class QuestInformation { private final int id; private final String name; private int startNpc; private Tile startLocation; private final Set<Quest> preReqs = new HashSet<>(); private final Map<Integer, Integer> skillReqs = new HashMap<>(); private final Map<Integer, I...
package com.rs.engine.quest.data; public class QuestInformationParser { public static final long JOURNAL_SLOTID = 847; public static final long STARTLOC_PRE_HASH = 854; public static final long STARTLOC_HASH = 850; public static final long STEP2_LOC_HASH = 851; public static final long MEMBERS = 856; public s...
package com.rs.engine.thread; public final class AsyncTaskExecutor { public static volatile boolean SHUTDOWN; private static ScheduledExecutorService WORLD_THREAD_EXECUTOR; private static ScheduledExecutorService ASYNC_VTHREAD_EXECUTOR; private static final List<Future<?>> PENDING_FUTURES = new ObjectArrayList<...
package com.rs.engine.thread; public final class WorldThread extends Thread { public static long START_CYCLE; public static volatile long WORLD_CYCLE; private static long LOWEST_TICK = 50000; private static long TICKS; private static long TOTAL_TIME = 0; private static long HIGHEST_TICK = 0; protected Wo...
package com.rs.engine.thread; public class WorldThreadFactory implements ThreadFactory { private static final AtomicInteger poolNumber = new AtomicInteger(1); private final ThreadGroup group; private final AtomicInteger threadNumber = new AtomicInteger(1); private final String namePrefix; public WorldThreadFa...
package com.rs.game; @PluginEventHandler public final class World { public static int SYSTEM_UPDATE_DELAY = -1; public static long SYSTEM_UPDATE_START; private static final EntityList<Player> PLAYERS = new EntityList<>(Settings.PLAYERS_LIMIT); private static final Map<String, Player> PLAYER_MAP_USERNAME = new ...
package com.rs.game.content; public class AchievementTitles { public static String[] gamebreakerVariations = { " <col=DD0000>the Gamebreaker</col>", " <col=4682B4>the Gamebreaker</col>", " <col=FFFFFF>the Gam</col><col=DD0000>ebreaker</col>", " <str><col=DD0000>the Gamebreaker</col></str>", " <col=DD0000>the Game...
package com.rs.game.content; @PluginEventHandler public class AncientEffigies { public static final int[] SKILL_1 = { Constants.AGILITY, Constants.CONSTRUCTION, Constants.COOKING, Constants.FISHING, Constants.FLETCHING, Constants.HERBLORE, Constants.MINING, Constants.SUMMONING }; public static final int[] SKILL_2 ...
package com.rs.game.content; @PluginEventHandler public class Dicing { public static ItemClickHandler handleRoll = new ItemClickHandler(new Object[] { IntStream.range(15086, 15100).toArray() }, new String[] { "Drop" }, e -> handleRoll(e.getPlayer(), e.getItem().getId(), true)); public static void handleRoll(fin...
package com.rs.game.content @ServerStartupEvent fun mapDrops() { onNpcDrop(null, Bone.values().filter { bone -> !listOf(Bone.ACCURSED_ASHES, Bone.IMPIOUS_ASHES, Bone.INFERNAL_ASHES).contains(bone) }.map { it.id }.toTypedArray()) { e -> if (bonecrush(e.player, e.item)) e.deleteItem() } ...
package com.rs.game.content; @PluginEventHandler public class DwarfMultiCannon extends OwnedObject { public static final int[][] CANNON_PIECES = { { 6, 8, 10, 12 }, { 20494, 20495, 20496, 20497 }, { 20498, 20499, 20500, 20501 } }; private static final int[][] CANNON_OBJECTS = { { 7, 8, 9, 6 }, { 29398, 29401, 294...
package com.rs.game.content; public enum Effect { SKULL { @Override public void apply(Entity entity) { if (entity instanceof Player player) player.getAppearance().generateAppearanceData(); } @Override public void expire(Entity entity) { if (entity instanceof Player player) player.getAppear...
package com.rs.game.content; @PluginEventHandler public class EquipAndRemoveItems { public static ItemClickHandler handle = new ItemClickHandler(new String[] { "Wear", "Remove", "Wield" }, e -> { switch(e.getOption()) { case "Remove": Equipment.remove(e.getPlayer(), Equipment.getItemSlot(e.getItem().getId()...
package com.rs.game.content; @PluginEventHandler public class ItemConstants { public static int[] CHARM_IDS = { 12158, 12159, 12160, 12163 }; public enum ItemDegrade { AHRIM_HELM(4708, 4856, 4860, Ticks.fromHours(10), 60000), AHRIM_WEAP(4710, 4862, 4866, Ticks.fromHours(10), 100000), AHRIM_TOP(4712, 4868, ...
package com.rs.game.content; @PluginEventHandler public final class Notes { private final List<Note> notes; private transient Player player; public Notes() { notes = new ArrayList<>(30); } public void setPlayer(Player player) { this.player = player; } public static ButtonClickHandler handleButtons = n...
package com.rs.game.content; @PluginEventHandler public final class PlayerLook { public static void openCharacterCustomizing(Player player) { player.getInterfaceManager().setTopInterface(1028, false); player.getPackets().setIFRightClickOps(1028, 65, 0, 11, 0); player.getPackets().setIFRightClickOps(1028, 128,...
package com.rs.game.content; @PluginEventHandler public class Potions { public static final int VIAL = 229; public static final int FLASK = 23191; public static final int JUJU_VIAL = 19996; public static final int BEER_GLASS = 1919; public static final int EMPTY_KEG = 5769; private static final int EMPTY_CUP ...
package com.rs.game.content; @PluginEventHandler public class SkillCapeCustomizer { public static void resetSkillCapes(Player player) { player.setMaxedCapeCustomized(Arrays.copyOf(ItemDefinitions.getDefs(20767).originalModelColors, 4)); player.setCompletionistCapeCustomized(Arrays.copyOf(ItemDefinitions.getDef...
package com.rs.game.content; public enum Skillcapes { Attack(9747, 9748, 9749, 25324, "a master in the fine art of attacking"), Defence(9753, 9754, 9755, 25326, "a master in the fine art of defence"), Strength(9750, 9751, 9752, 25325, "as strong as is possible"), Constitution(9768, 9769, 9770, 25332, "as resilien...
package com.rs.game.content; public enum Statuettes { BROKEN_STATUE_HEADDRESS(14892, 5000), THIRD_AGE_CARAFE(14891, 10000), BRONZED_DRAGON_CLAW(14890, 20000), ANCIENT_PSALTERY_BRIDGE(14889, 30000), SARADOMIN_AMPHORA(14888, 40000), BANDOS_SCRIMSHAW(14887, 50000), SARADOMIN_CARVING(14886, 75000), ZAMORAK_MEDA...
package com.rs.game.content; @PluginEventHandler public class Toolbelt { public enum Tools { //General PICKAXE(10259, 1265), HAMMER(10260, 2347), CHISEL(10247, 1755), HATCHET(10261, 1351), KNIFE(10244, 946), TINDERBOX(10262, 590), SAW(10264, 8794), PESTLE_AND_MORTAR(10275, 233), MACHETE(10278,...
package com.rs.game.content @ServerStartupEvent fun mapTrophyBones() { onItemAddedToBank(24444) { e -> e.player.sendMessage("No boneception today.") e.cancel() } onItemOnObject(arrayOf("Bank booth", "Bank", "Bank chest", "Bank table", "Counter", "Shantay chest", "Darkmeyer Treasury"), arr...
package com.rs.game.content.achievements; public enum Achievement { THE_ESSENCE_OF_MAGIC_0(0), YOINK_1(1), SILKY_SMOOTH_2(2), PREACHING_TO_THE_INFECTED_3(3), PLAYING_THE_WAITING_GAME_4(4), GONE_FISHING_5(5), BOOT_CAMP_6(6), A_CAT_IS_FOR_LIFE_7(7), CREATOR_AND_DESTROYER_8(8), RED_REVOLUTION_9(9), GOING_ON_A...
package com.rs.game.content.achievements; @PluginEventHandler public class AchievementDef { private static final Map<Integer, AchievementDef> CACHE = new HashMap<>(); private static final Map<Area, Map<Difficulty, Set<AchievementDef>>> TASK_SETS = new HashMap<>(); private static final Map<Area, Map<Difficulty, M...
package com.rs.game.content.achievements; @PluginEventHandler public class AchievementInterface { //3483 enum for list of achievements public static void init(Player player) { player.getVars().setVarBit(8575, 1); //task set player.getVars().setVarBit(8582, 1); //task set player.getVars().setVarBit(8581, -1)...
package com.rs.game.content.achievements; public class AchievementReqsMisc { public static String script_3223(VarManager player, int achivementId, int reqIndex) { // int int2; String str0; str0 = ""; // int2 = 0; // switch (achivementId) { // case 147: // case 23: // case 294: // case 1...
package com.rs.game.content.achievements; @PluginEventHandler public class AchievementSetRewards { private static final Tile ARDY_FARM = Tile.of(2664, 3375, 0); private static final Tile KANDARIN_MONASTERY = Tile.of(2607, 3222, 0); public static NPCDropHandler handleNotingDagBones = new NPCDropHandler(new Objec...
package com.rs.game.content.achievements class AchievementSystemD(p: Player, npcId: Int, reward: SetReward) { init { p.startConversation { label("initialOptions") options("What would you like to say?") { op("Tell me about the Achievement System.") { ...
package com.rs.game.content.achievements; public enum SetReward { KARAMJA_GLOVES(Area.KARAMJA, new Difficulty[] { Difficulty.EASY, Difficulty.MEDIUM, Difficulty.HARD, Difficulty.ELITE }, new int[] { 11136, 11138, 11140, 19754 }), VARROCK_ARMOR(Area.VARROCK, new Difficulty[] { Difficulty.EASY, Difficulty.MEDIUM, Di...
package com.rs.game.content.bosses; public class ChaosElementalCombat extends CombatScript { @Override public Object[] getKeys() { return new Object[] { "Chaos Elemental" }; } @Override public int attack(NPC npc, final Entity target) { int atk = Utils.random(100); npc.setNextAnimation(new Animation(npc.g...
package com.rs.game.content.bosses; public class EvilChickenCombat extends CombatScript { @Override public Object[] getKeys() { return new Object[] { "Evil Chicken" }; } @Override public int attack(final NPC npc, final Entity target) { final NPCCombatDefinitions defs = npc.getCombatDefinitions(); npc.set...
package com.rs.game.content.bosses; @PluginEventHandler public class GiantMole extends NPC { private static final Tile[] COORDS = { Tile.of(1737, 5228, 0), Tile.of(1751, 5233, 0), Tile.of(1778, 5237, 0), Tile.of(1736, 5227, 0), Tile.of(1780, 5152, 0), Tile.of(1758, 5162, 0), Tile.of(1745, 5169, 0), Tile.of(1760,...
package com.rs.game.content.bosses; public class MelzarTheMadCombat extends CombatScript { @Override public Object[] getKeys() { return new Object[] { 753 }; } @Override public int attack(NPC npc, Entity target) { if(target instanceof Player) { final NPCCombatDefinitions defs = npc.getCombatDefinitions(...
package com.rs.game.content.bosses.corp; @PluginEventHandler public class CorporealBeast extends NPC { private DarkEnergyCore core; public CorporealBeast(int id, Tile tile, boolean spawned) { super(id, tile, spawned); setCapDamage(1000); setLureDelay(3000); setForceAggroDistance(64); setIntelligentRout...
package com.rs.game.content.bosses.corp; public class CorporealBeastCombat extends CombatScript { @Override public Object[] getKeys() { return new Object[] { 8133 }; } @Override public int attack(final NPC npc, final Entity target) { final NPCCombatDefinitions defs = npc.getCombatDefinitions(); if (Util...
package com.rs.game.content.bosses.corp; @PluginEventHandler public class CorporealBeastController extends Controller { public static ButtonClickHandler handleEnterWarning = new ButtonClickHandler(650, e -> { if (e.getComponentId() == 15) { e.getPlayer().stopAll(); e.getPlayer().tele(Tile.of(2974, 4384, e.g...
package com.rs.game.content.bosses.corp; public class CorporealBeastScene extends Cutscene { @Override public void construct(Player player) { camPos(2993, 4378, 1000); camLook(2984, 4383, 5000); dialogue(new Dialogue().addSimple("You peek through the door."), true); } }
package com.rs.game.content.bosses.corp; public class DarkEnergyCore extends NPC { private final CorporealBeast beast; private Entity target; public DarkEnergyCore(CorporealBeast beast) { super(8127, Tile.of(beast.getTile()), true); setForceMultiArea(true); setIgnoreDocile(true); this.beast = beast; c...
package com.rs.game.content.bosses.dagkings; @PluginEventHandler public class Spinolyp extends NPC { public Spinolyp(int id, Tile tile) { super(id, tile); setIgnoreDocile(true); setRandomWalk(false); } @Override public boolean canMove(Direction dir) { return false; } @Override public void processNPC...
package com.rs.game.content.bosses.dagkings; public class SpinolypCombat extends CombatScript { @Override public Object[] getKeys() { return new Object[] { "Spinolyp" }; } @Override public int attack(NPC npc, Entity target) { final NPCCombatDefinitions defs = npc.getCombatDefinitions(); switch (Utils.ran...
package com.rs.game.content.bosses.glacor; public class EnduringMinion extends NPC { public Glacor parent; public boolean defeated = false; public EnduringMinion(int id, Tile tile, int mapAreaNameHash, boolean canBeAttackFromOutOfArea, boolean spawned, Glacor parent) { super(id, tile, spawned); this.parent =...
package com.rs.game.content.bosses.glacor; @PluginEventHandler public class Glacor extends NPC { public enum InheritedType { ENDURING, SAPPING, UNSTABLE; } public enum Stage { FIRST, MINIONS, FINAL; } private boolean minionsSpawned = false; private InheritedType minionType = null; private Stage stage = ...
package com.rs.game.content.bosses.glacor; public class GlacorCombat extends CombatScript { @Override public Object[] getKeys() { return new Object[] { 14301 }; } final int MAGE_PROJECTILE = 634; final int RANGE_PROJECTILE = 962; final int EXPLODE_GFX = 739; final int SPECIAL_PROJECTILE = 2314; int attac...
package com.rs.game.content.bosses.glacor; public class SappingGlacyteCombat extends CombatScript { @Override public Object[] getKeys() { return new Object[] { 14303 }; } @Override public int attack(NPC npc, Entity target) { NPCCombatDefinitions defs = npc.getCombatDefinitions(); int damage = 0; npc....
package com.rs.game.content.bosses.glacor; public class SappingMinion extends NPC { public Glacor parent; public boolean defeated = false; public SappingMinion(int id, Tile tile, int mapAreaNameHash, boolean canBeAttackFromOutOfArea, boolean spawned, Glacor parent) { super(id, tile, spawned); this.parent = p...
package com.rs.game.content.bosses.glacor; public class UnstableMinion extends NPC { public Glacor parent; public boolean defeated = false; public boolean startedTimer = false; public boolean healing = false; public int gainedHp = 0; final int EXPLODE_GFX = 956; final NPC thisNpc = this; public Unstable...
package com.rs.game.content.bosses.godwars; public class GodWarMinion extends NPC { public GodWarMinion(int id, Tile tile, boolean spawned) { super(id, tile, spawned); setIgnoreDocile(true); setForceAgressive(true); setForceAggroDistance(64); setIntelligentRouteFinder(true); } public void respawn() { ...
package com.rs.game.content.bosses.godwars; @PluginEventHandler public class GodwarsController extends Controller { public static int SARADOMIN = 0; public static int ARMADYL = 1; public static int ZAROS = 2; public static int BANDOS = 3; public static int ZAMORAK = 4; private final int[] killcount = new int[...
package com.rs.game.content.bosses.godwars.armadyl; @PluginEventHandler public class ArmadylFactionNPC extends NPC { public ArmadylFactionNPC(int id, Tile tile, boolean spawned) { super(id, tile, spawned); setIgnoreDocile(true); setCanAggroNPCs(true); } @Override public boolean canBeAttackedBy(Player play...
package com.rs.game.content.bosses.godwars.armadyl; @PluginEventHandler public class KreeArra extends NPC { private final GodWarMinion[] minions = new GodWarMinion[3]; public KreeArra(int id, Tile tile, boolean spawned) { super(id, tile, spawned); setIntelligentRouteFinder(true); setIgnoreDocile(true); se...
package com.rs.game.content.bosses.godwars.armadyl; public class KreeArraCombat extends CombatScript { @Override public Object[] getKeys() { return new Object[] { 6222 }; } @Override public int attack(NPC npc, Entity target) { if (!npc.isUnderCombat()) { npc.setNextAnimation(new Animation(6997)); del...
package com.rs.game.content.bosses.godwars.bandos; @PluginEventHandler public class BandosFactionNPC extends NPC { public BandosFactionNPC(int id, Tile tile, boolean spawned) { super(id, tile, spawned); setIgnoreDocile(true); setCanAggroNPCs(true); } @Override public boolean canAggroNPC(NPC npc) { retur...
package com.rs.game.content.bosses.godwars.bandos; @PluginEventHandler public class GeneralGraardor extends NPC { private final GodWarMinion[] minions = new GodWarMinion[3]; public GeneralGraardor(int id, Tile tile, boolean spawned) { super(id, tile, spawned); setForceFollowClose(true); setIntelligentRouteF...
package com.rs.game.content.bosses.godwars.bandos; public class GeneralGraardorCombat extends CombatScript { @Override public Object[] getKeys() { return new Object[] { 6260 }; } @Override public int attack(final NPC npc, final Entity target) { final NPCCombatDefinitions defs = npc.getCombatDefinitions(); ...
package com.rs.game.content.bosses.godwars.saradomin; @PluginEventHandler public class CommanderZilyana extends NPC { private final GodWarMinion[] minions = new GodWarMinion[3]; public CommanderZilyana(int id, Tile tile, boolean spawned) { super(id, tile, spawned); setIntelligentRouteFinder(true); setForceF...
package com.rs.game.content.bosses.godwars.saradomin; public class CommanderZilyanaCombat extends CombatScript { @Override public Object[] getKeys() { return new Object[] { 6247 }; } @Override public int attack(final NPC npc, final Entity target) { final NPCCombatDefinitions defs = npc.getCombatDefinitions...
package com.rs.game.content.bosses.godwars.saradomin; @PluginEventHandler public class SaradominFactionNPC extends NPC { public SaradominFactionNPC(int id, Tile tile, boolean spawned) { super(id, tile, spawned); setIgnoreDocile(true); setCanAggroNPCs(true); } @Override public boolean canAggroNPC(NPC npc) ...
package com.rs.game.content.bosses.godwars.zamorak; @PluginEventHandler public class KrilTstsaroth extends NPC { private final GodWarMinion[] minions = new GodWarMinion[3]; public KrilTstsaroth(int id, Tile tile, boolean spawned) { super(id, tile, spawned); setIntelligentRouteFinder(true); setIgnoreDocile(t...
package com.rs.game.content.bosses.godwars.zamorak; public class KrilTsutsaroth extends CombatScript { @Override public Object[] getKeys() { return new Object[] { 6203 }; } @Override public int attack(NPC npc, Entity target) { if (Utils.getRandomInclusive(4) == 0) switch (Utils.getRandomInclusive(8)) { ...
package com.rs.game.content.bosses.godwars.zamorak; @PluginEventHandler public class ZamorakFactionNPC extends NPC { public ZamorakFactionNPC(int id, Tile tile, boolean spawned) { super(id, tile, spawned); setIgnoreDocile(true); setCanAggroNPCs(true); } @Override public boolean canAggroNPC(NPC npc) { re...
package com.rs.game.content.bosses.godwars.zaros; public class AncientMageCombat extends CombatScript { @Override public Object[] getKeys() { return new Object[] { 13459 }; } @Override public int attack(NPC npc, Entity target) { final NPCCombatDefinitions defs = npc.getCombatDefinitions(); int spellType ...
package com.rs.game.content.bosses.godwars.zaros; @PluginEventHandler public final class Nex extends NPC { public enum Phase { SMOKE, SHADOW, BLOOD, ICE, ZAROS } private final NexArena arena; private boolean followTarget; private Phase phase; private int minionStage; private int attackCount = 0; ...
package com.rs.game.content.bosses.godwars.zaros; public class NexArena { private static final NexArena GLOBAL_INSTANCE = new NexArena(); public static NexArena getGlobalInstance() { return GLOBAL_INSTANCE; } private final List<Player> players = Collections.synchronizedList(new ArrayList<>()); public Nex n...
package com.rs.game.content.bosses.godwars.zaros; public class NexCombat extends CombatScript { @Override public Object[] getKeys() { return new Object[] { "Nex" }; } @Override public int attack(NPC npc, final Entity target) { if (!(npc instanceof Nex nex)) return notNexAttack(npc, target); if (nex.ge...
package com.rs.game.content.bosses.godwars.zaros; public class NexController extends Controller { private transient NexArena arena; public NexController(NexArena arena) { this.arena = arena; if (arena == null) this.arena = NexArena.getGlobalInstance(); } @Override public void start() { arena.addPlaye...
package com.rs.game.content.bosses.godwars.zaros; public class NexCutScene extends Cutscene { private final Tile dir; private final int selected; public NexCutScene(Tile dir, int selected) { this.dir = dir; this.selected = selected; } @Override public void construct(Player player) { int xExtra = 0; ...
package com.rs.game.content.bosses.godwars.zaros; public class NexMinion extends NPC { private final NexArena arena; public NexMinion(NexArena arena, int id, Tile tile) { super(id, tile, true); this.arena = arena; setCantFollowUnderCombat(true); setCapDamage(0); setIgnoreDocile(true); } public void b...
package com.rs.game.content.bosses.godwars.zaros; @PluginEventHandler public class ZarosFactionNPC extends NPC { private static final int CAP_BONUS = 200; private static final Bonus[][] BONUSES = { { Bonus.STAB_DEF, Bonus.SLASH_DEF, Bonus.CRUSH_DEF }, { Bonus.RANGE_DEF }, {}, { Bonus.MAGIC_DEF } }; public Zaro...
package com.rs.game.content.bosses.godwars.zaros.attack; public class BloodSacrifice implements NexAttack { @Override public int attack(Nex nex, Entity target) { if (!(target instanceof Player player)) return 0; nex.setNextForceTalk(new ForceTalk("I demand a blood sacrifice!")); nex.voiceEffect(3293, true...
package com.rs.game.content.bosses.godwars.zaros.attack; public class ContainThis implements NexAttack { @Override public int attack(Nex nex, Entity target) { nex.setNextForceTalk(new ForceTalk("Contain this!")); nex.voiceEffect(target, 3316, true); nex.setNextAnimation(new Animation(6984)); final Tile bas...
package com.rs.game.content.bosses.godwars.zaros.attack; public class Drag implements NexAttack { @Override public int attack(Nex nex, Entity target) { int distance = 0; Entity settedTarget = null; for (Entity t : nex.getPossibleTargets()) if (t instanceof Player) { int thisDistance = (int) Utils.getD...
package com.rs.game.content.bosses.godwars.zaros.attack; public class EmbraceDarkness implements NexAttack { @Override public int attack(Nex nex, Entity target) { nex.setNextForceTalk(new ForceTalk("Embrace darkness!")); nex.voiceEffect(target, 3322, true); nex.setNextAnimation(new Animation(6355)); nex.se...
package com.rs.game.content.bosses.godwars.zaros.attack; public class IcePrison implements NexAttack { @Override public int attack(Nex nex, Entity target) { nex.setNextForceTalk(new ForceTalk("Die now, in a prison of ice!")); nex.voiceEffect(target, 3308, true); nex.setNextAnimation(new Animation(6987)); W...
package com.rs.game.content.bosses.godwars.zaros.attack; public interface NexAttack { int attack(Nex nex, Entity target); }
package com.rs.game.content.bosses.godwars.zaros.attack; public class NoEscape implements NexAttack { public static Tile[] NO_ESCAPE_TELEPORTS = { Tile.of(2924, 5213, 0), //north Tile.of(2934, 5202, 0), //east, Tile.of(2924, 5192, 0), //south Tile.of(2913, 5202, 0), }; //west @Override public int att...
package com.rs.game.content.bosses.godwars.zaros.attack; public class ShadowTraps implements NexAttack { @Override public int attack(Nex nex, Entity target) { nex.setNextForceTalk(new ForceTalk("Fear the Shadow!")); nex.voiceEffect(target, 3314, true); nex.setNextAnimation(new Animation(6984)); nex.setNex...
package com.rs.game.content.bosses.godwars.zaros.attack; public class Siphon implements NexAttack { @Override public int attack(Nex nex, Entity target) { nex.killBloodReavers(); nex.setNextForceTalk(new ForceTalk("A siphon will solve this!")); nex.voiceEffect(target, 3317, true); nex.setNextAnimation(new A...
package com.rs.game.content.bosses.godwars.zaros.attack; public class Virus implements NexAttack { @Override public int attack(Nex nex, Entity target) { nex.setNextForceTalk(new ForceTalk("Let the virus flow through you.")); nex.voiceEffect(target, 3296, true); nex.setNextAnimation(new Animation(6987)); s...
package com.rs.game.content.bosses.kalphitequeen class KalphiteQueen(id: Int, tile: Tile, spawned: Boolean) : NPC(id, tile, spawned) { init { isIgnoreNPCClipping = true lureDelay = 0 isForceAgressive = true isIgnoreDocile = true } override fun sendDeath(source: Entity) { ...
package com.rs.game.content.bosses.kingblackdrag; @PluginEventHandler public class KingBlackDragon extends NPC { public KingBlackDragon(int id, Tile tile, boolean spawned) { super(id, tile, spawned); setLureDelay(3000); setIntelligentRouteFinder(true); setIgnoreDocile(true); } public static boolean atKBD...
package com.rs.game.content.bosses.kingblackdrag; public class KingBlackDragonCombat extends CombatScript { @Override public Object[] getKeys() { return new Object[] { 50 }; } @Override public int attack(final NPC npc, final Entity target) { final NPCCombatDefinitions defs = npc.getCombatDefinitions(); i...
package com.rs.game.content.bosses.nomad; public class FakeNomad extends NPC { private final Nomad nomad; public FakeNomad(Tile tile, Nomad nomad) { super(8529, tile, true); this.nomad = nomad; setForceMultiArea(true); } @Override public void handlePreHit(Hit hit) { nomad.destroyCopy(this); } }
package com.rs.game.content.bosses.nomad; public class FakeNomadCombat extends CombatScript { @Override public Object[] getKeys() { return new Object[] { 8529 }; } @Override public int attack(final NPC npc, final Entity target) { npc.setNextAnimation(new Animation(12697)); boolean hit = getMaxHit(npc, 5...
package com.rs.game.content.bosses.nomad; @PluginEventHandler public class FlameVortex extends NPC { private long explodeTime; public FlameVortex(Tile tile) { this(9441, tile, true); } public FlameVortex(int id, Tile tile, boolean spawned) { super(id, tile, spawned); explodeTime = System.currentTimeMilli...
package com.rs.game.content.bosses.nomad; @PluginEventHandler public class Nomad extends NPC { private int nextMove; private long nextMovePerform; private Tile throneTile; private ArrayList<NPC> copies; private boolean healed; private int notAttacked; private Player target; public Nomad(int id, Tile tile, ...
package com.rs.game.content.bosses.nomad; public class NomadCombat extends CombatScript { @Override public Object[] getKeys() { return new Object[] { 8528 }; } private void spawnFlameVortex(Tile tile) { if (!World.floorAndWallsFree(tile, 1)) return; new FlameVortex(tile); } @Override public int at...
package com.rs.game.content.bosses.pestqueen; /** * * @author Tyler * */ public class PestQueen extends NPC { public Attack currentAttack; public PestQueen(int id, Tile tile, int mapAreaNameHash, boolean canBeAttackFromOutOfArea) { super(id, tile); setHitpoints(20000); setCombatLevel(599); currentAtta...
package com.rs.game.content.bosses.pestqueen.attack; public interface Attack { /** * Process the attack. * * @param queen * The {@code PestQueen} instance. * @param target * The {@code Entity} instance. */ public void processAttack(PestQueen queen, Entity target); public Anima...
package com.rs.game.content.bosses.pestqueen.attack.impl; public class MagicAttack implements Attack { @Override public void processAttack(PestQueen queen, Entity target) { queen.setNextFaceEntity(target); queen.setNextAnimation(getAttackAnimation()); int hit = Utils.random(0, getMaxHit());// TODO make the c...
package com.rs.game.content.bosses.pestqueen.attack.impl; public class MeleeAttack implements Attack { @Override public void processAttack(PestQueen queen, Entity target) { queen.setNextFaceEntity(target); queen.setNextAnimation(getAttackAnimation()); int hit = Utils.random(0, getMaxHit());// TODO make the c...
package com.rs.game.content.bosses.qbd; @PluginEventHandler public final class QueenBlackDragonController extends Controller { public static final Tile OUTSIDE = Settings.getConfig().getPlayerRespawnTile(); private static final int[][][] PLATFORM_STEPS = { { { 88, 86 }, { 88, 87 }, { 88, 88 }, { 88, 89 }, { 88...
package com.rs.game.content.bosses.qbd.npcs; /** * Handles the Queen Black Dragon's change armour "attack". * * @author Emperor * */ public final class ChangeArmour implements QueenAttack { @Override public int attack(final QueenBlackDragon npc, Player victim) { npc.switchState(Utils.random(2) < 1 ? QueenSt...
package com.rs.game.content.bosses.qbd.npcs; public final class FireBreathAttack implements QueenAttack { private static final Animation ANIMATION = new Animation(16721); private static final SpotAnim GRAPHIC = new SpotAnim(3143); @Override public int attack(final QueenBlackDragon npc, final Player victim) { ...
package com.rs.game.content.bosses.qbd.npcs; /** * Represents the Queen Black Dragon's fire wall attack. * * @author Emperor * */ public final class FireWallAttack implements QueenAttack { /** * The wall graphic ids. */ private static final int[] WALL_GRAPHIC_IDS = { 3158, 3159, 3160 }; /** * The ani...