11 Posts
Posts
0
Warning level
0
Likes
0
Dislikes
Joined: 2022-04-24
Quote from Adam on April 24, 2022, 3:35 pmAs the title suggest, these aren't 100% perfect, but they are functional and hopefully someone can use and better themProtean Bars
Code:package com.rs.game.player.actions.protean; import com.rs.game.Animation; import com.rs.game.item.Item; import com.rs.game.player.Player; import com.rs.game.player.Skills; /* * author @Quantum */ public class ProteanBarSmithing { public static final Animation SMITHING_ANIMATION = new Animation(898); public static final int PROTEAN_BAR = 31350; public static final int PROTEAN_POWERUP = 41052; /** * smelts the item */ private static void smelt(Player player) { player.setNextAnimation(SMITHING_ANIMATION); addXP(player); player.getInventory().deleteItem(new Item(PROTEAN_BAR)); } public static boolean canSmelt(Player player, int itemId) { int proteanBar = player.getInventory().getAmountOf(ProteanBarSmithing.PROTEAN_BAR); if (proteanBar == 0) { player.getPackets().sendGameMessage("You've ran out of protean bars to work with.", true); return false; } smelt(player); return true; } public static void addXP(Player player) { int level = player.getSkills().getLevel(Skills.SMITHING); double exp; if(level <= 10) { exp = 45; } else if (level > 10 && level <= 20) { exp = 65; } else if (level > 20 && level <= 30) { exp = 80; } else if (level > 30 && level <= 40) { exp = 92; } else if (level > 40 && level <= 50) { exp = 106; } else if (level > 50 && level <= 60) { exp = 118; } else if (level > 60 && level <= 70) { exp = 131; } else if (level > 70 && level <= 80) { exp = 148; } else if (level > 80 && level <= 90) { exp = 162; } else if (level >90 ) { exp = 179; } else { exp = 45; } if(player.getInventory().containsItem(PROTEAN_POWERUP, 1)) { player.getInventory().deleteItem(PROTEAN_POWERUP, 1); exp = exp * 1.3; } player.getSkills().addXp(Skills.SMITHING, exp); return; } }
Protean Hides
Code:package com.rs.game.player.actions.protean; import com.rs.game.Animation; import com.rs.game.item.Item; import com.rs.game.player.Player; import com.rs.game.player.Skills; /* * author @Quantum */ public class ProteanHideCrafting { public static final Animation CRAFT_ANIMATION = new Animation(25594); public static final int PROTEAN_HIDE = 33740; public static final int PROTEAN_POWERUP = 41052; /** * smelts the item */ private static void craft(Player player) { player.setNextAnimation(CRAFT_ANIMATION); addXP(player); player.getInventory().deleteItem(new Item(PROTEAN_HIDE)); } public static boolean canCraft(Player player, int itemId) { int proteanHide = player.getInventory().getAmountOf(ProteanHideCrafting.PROTEAN_HIDE); if (proteanHide == 0) { player.getPackets().sendGameMessage("You've ran out of protean hides to work with.", true); return false; } craft(player); return true; } public static void addXP(Player player) { int level = player.getSkills().getLevel(Skills.CRAFTING); double exp; if(level <= 10) { exp = 45; } else if (level > 10 && level <= 20) { exp = 65; } else if (level > 20 && level <= 30) { exp = 80; } else if (level > 30 && level <= 40) { exp = 92; } else if (level > 40 && level <= 50) { exp = 106; } else if (level > 50 && level <= 60) { exp = 118; } else if (level > 60 && level <= 70) { exp = 131; } else if (level > 70 && level <= 80) { exp = 148; } else if (level > 80 && level <= 90) { exp = 162; } else if (level > 90 ) { exp = 179; } else { exp = 45; } if(player.getInventory().containsItem(PROTEAN_POWERUP, 1)) { player.getInventory().deleteItem(PROTEAN_POWERUP, 1); exp = exp * 1.3; } player.getSkills().addXp(Skills.CRAFTING, exp); return; } }
Protean Traps
Code:package com.rs.game.player.actions.protean; import java.util.List; import com.rs.game.Animation; import com.rs.game.World; import com.rs.game.WorldObject; import com.rs.game.WorldTile; import com.rs.game.item.Item; import com.rs.game.player.Player; import com.rs.game.player.Skills; import com.rs.game.player.actions.Action; import com.rs.game.player.content.OwnedObjectManager; import com.rs.game.tasks.WorldTask; import com.rs.game.tasks.WorldTasksManager; public class ProteanHunter extends Action { private static final int[][] TILES = new int[][] { { 0, 1 }, { 1, 0 }, { 0, -1 }, { -1, 0 }, { 1, 1 }, { 1, -1 }, { -1, -1 }, { -1, 1 }, { 0, 0 } }; public ProteanHunter(int amount) { this.amount = amount; } private int amount; private boolean auto; @Override public boolean process(Player player) { if (amount == 0) return false; return true; } private WorldTile getTile(Player player) { List<WorldObject> objects = World.getRegion(player.getRegionId()).getSpawnedObjects(); x: for (int i = 0; i < TILES.length; i++) { if (World.isTileFree(player.getPlane(), player.getX() + TILES[i][0], player.getY() + TILES[i][1], 1)) { if (objects != null) { for (WorldObject object : objects) { if (object.getX() == player.getX() + TILES[i][0] && object.getY() == player.getY() + TILES[i][1] && object.getPlane() == player.getPlane()) continue x; } } return new WorldTile(player.getX() + TILES[i][0], player.getY() + TILES[i][1], player.getPlane()); } } return null; } @Override public int processWithDelay(Player player) { int trapsAmount = OwnedObjectManager.getObjectsforValue(player, 93381); int maxAmount = (player.getSkills().getLevelForXp(Skills.HUNTER) / 20) + (player.getPerkManager().huntsman ? 2 : 0); if (trapsAmount > maxAmount) { if (!auto) { player.getPackets().sendGameMessage("You cannot place more than " + maxAmount + " traps at once."); return -1; } else return 1; } WorldTile tile = getTile(player); if (tile == null) return 1; player.setNextFaceWorldTile(tile); player.setNextAnimation(new Animation(5208)); player.getInventory().deleteItem(new Item(32337, 1)); player.lock(3); player.getPackets().sendGameMessage("You begin setting up the trap.", true); setActionDelay(player, 4); WorldTasksManager.schedule(new WorldTask() { @Override public void run() { OwnedObjectManager.addOwnedObjectManager(player, new WorldObject[] { new WorldObject(93381, 10, 0, tile.getX(), tile.getY(), tile.getPlane()) }, new long[] { 300000 }); amount--; } }, 3); return 1; } @Override public boolean start(Player player) { auto = amount > 1; return true; } @Override public void stop(Player player) {} }
Protean Log Burning
Code:package com.rs.game.player.actions.protean; import com.rs.Settings; import com.rs.game.Animation; import com.rs.game.Region; import com.rs.game.World; import com.rs.game.WorldObject; import com.rs.game.WorldTile; import com.rs.game.activites.duel.DuelArena; import com.rs.game.activites.duel.DuelControler; import com.rs.game.item.Item; import com.rs.game.npc.others.randoms.FireSpirit; import com.rs.game.player.Player; import com.rs.game.player.Skills; import com.rs.game.player.actions.firemaking.Bonfire; import com.rs.game.player.actions.firemaking.Bonfire.Log; import com.rs.utils.Utils; /* * author @Quantum */ public class ProteanLogBurning { public static final Animation FIREMAKING_ANIM = new Animation(26267); public static final Animation FIREADDING_ANIM = new Animation(16703); public static final int PROTEAN_LOG = 34528; public static final int PROTEAN_POWERUP = 41052; /** * smelts the item */ private static void burn(Player player) { final WorldTile tile = new WorldTile(player); if (!player.addWalkSteps(player.getX() - 1, player.getY(), 1)) if (!player.addWalkSteps(player.getX() + 1, player.getY(), 1)) if (!player.addWalkSteps(player.getX(), player.getY() + 1, 1)) player.addWalkSteps(player.getX(), player.getY() - 1, 1); player.setNextAnimation(FIREMAKING_ANIM); player.getAchManager().addKeyAmount("firemaking", 1); player.getInventory().deleteItem(new Item(PROTEAN_LOG)); World.spawnTempGroundObject( new WorldObject(70766, 10, 0, tile.getX(), tile.getY(), tile.getPlane()), 592, 2000, true); player.setNextFaceWorldTile(tile); addXP(player); process(player); player.getTemporaryAttributtes().put("Fire", Utils.currentTimeMillis() + 1800); } private static void add(Player player, WorldObject object) { Log protean = Log.PROTEAN; player.getActionManager().setAction(new Bonfire(protean, object)); player.setNextAnimation(FIREADDING_ANIM); addXP(player); process(player); player.getInventory().deleteItem(new Item(PROTEAN_LOG)); } public static boolean canBurn(Player player, int itemId) { int proteanLog = player.getInventory().getAmountOf(PROTEAN_LOG); if(!checkAll(player)) { return false; } if (proteanLog == 0) { player.getPackets().sendGameMessage("You've ran out of protean logs to work with.", true); return false; } burn(player); return true; } public static boolean canAdd(Player player, int itemId, WorldObject fire) { int proteanLog = player.getInventory().getAmountOf(PROTEAN_LOG); if(!checkAdd(player)) { return false; } if (proteanLog == 0) { player.getPackets().sendGameMessage("You've ran out of protean logs to work with.", true); return false; } add(player, fire); return true; } public static void addXP(Player player) { int level = player.getSkills().getLevel(Skills.FIREMAKING); double exp; if(level <= 10) { exp = 45; } else if (level > 10 && level <= 20) { exp = 65; } else if (level > 20 && level <= 30) { exp = 80; } else if (level > 30 && level <= 40) { exp = 92; } else if (level > 40 && level <= 50) { exp = 106; } else if (level > 50 && level <= 60) { exp = 118; } else if (level > 60 && level <= 70) { exp = 131; } else if (level > 70 && level <= 80) { exp = 148; } else if (level > 80 && level <= 90) { exp = 162; } else if (level >90 ) { exp = 179; } else { exp = 45; } if(player.getInventory().containsItem(PROTEAN_POWERUP, 1)) { player.getInventory().deleteItem(PROTEAN_POWERUP, 1); exp = exp * 1.3; } player.getSkills().addXp(Skills.FIREMAKING, exp); return; } public static boolean process(Player player) { if (Utils.random(350) == 0) { new FireSpirit(player, player); player.sendMessage("<col=ff0000>A fire spirit emerges from the bonfire."); } return true; } public static boolean checkAll(Player player) { if (player.getInterfaceManager().containsScreenInter() || player.getInterfaceManager().containsInventoryInter()) { player.sendMessage("Please finish what you're doing before doing this action."); return false; } if (!player.getInventory().containsItemToolBelt(590) && !player.getInventory().containsItemToolBelt(17678)) { player.sendMessage("You do not have the required items to light this."); return false; } if (!World.canMoveNPC(player.getPlane(), player.getX(), player.getY(), 1) // cliped || World.getObjectWithSlot(player, Region.OBJECT_SLOT_FLOOR) != null // fix || player.getControlerManager().getControler() instanceof DuelArena || player.getControlerManager().getControler() instanceof DuelControler || player.getRegionId() == Settings.MARKET_REGION_ID || player.getRegionId() == 9770 || player.getRegionId() == 9265) { player.sendMessage("You can't light a fire here; find a different area."); return false; } return true; } public static boolean checkAdd(Player player) { if (player.getInterfaceManager().containsScreenInter() || player.getInterfaceManager().containsInventoryInter()) { player.sendMessage("Please finish what you're doing before doing this action."); return false; } return true; } }
Protean Log Fletching
Code:package com.rs.game.player.actions.protean; import com.rs.game.Animation; import com.rs.game.item.Item; import com.rs.game.player.Player; import com.rs.game.player.Skills; /* * author @Quantum */ public class ProteanLogFletching { public static final Animation FLETCHING_ANIM = new Animation(26267); public static final int PROTEAN_LOG = 34528; public static final int PROTEAN_POWERUP = 41052; /** * smelts the item */ private static void fletch(Player player) { player.setNextAnimation(FLETCHING_ANIM); addXP(player); player.getInventory().deleteItem(new Item(PROTEAN_LOG)); } public static boolean canfletch(Player player, int itemId) { int proteanLog = player.getInventory().getAmountOf(PROTEAN_LOG); if (proteanLog == 0) { player.getPackets().sendGameMessage("You've ran out of protean logs to work with.", true); return false; } fletch(player); return true; } public static void addXP(Player player) { int level = player.getSkills().getLevel(Skills.FLETCHING); double exp; if(level <= 10) { exp = 45; } else if (level > 10 && level <= 20) { exp = 65; } else if (level > 20 && level <= 30) { exp = 80; } else if (level > 30 && level <= 40) { exp = 92; } else if (level > 40 && level <= 50) { exp = 106; } else if (level > 50 && level <= 60) { exp = 118; } else if (level > 60 && level <= 70) { exp = 131; } else if (level > 70 && level <= 80) { exp = 148; } else if (level > 80 && level <= 90) { exp = 162; } else if (level >90 ) { exp = 179; } else { exp = 45; } if(player.getInventory().containsItem(PROTEAN_POWERUP, 1)) { player.getInventory().deleteItem(PROTEAN_POWERUP, 1); exp = exp * 1.3; } player.getSkills().addXp(Skills.FLETCHING, exp); return; } }
Protean Memory
Code:package com.rs.game.player.actions.protean; import com.rs.game.Animation; import com.rs.game.item.Item; import com.rs.game.player.Player; import com.rs.game.player.Skills; /* * author @Quantum */ public class ProteanMemoryRelease { public static final Animation DIV_ANIMATION = new Animation(21225); public static final int PROTEAN_MEMORY = 37363; public static final int PROTEAN_POWERUP = 41052; /** * smelts the item */ private static void release(Player player) { player.setNextAnimation(DIV_ANIMATION); player.getInventory().deleteItem(new Item(PROTEAN_MEMORY)); addXP(player); } public static boolean canRelease(Player player, int itemId) { int proteanMemory = player.getInventory().getAmountOf(ProteanMemoryRelease.PROTEAN_MEMORY); if (proteanMemory == 0) { player.getPackets().sendGameMessage("You've ran out of protean memories to work with.", true); return false; } release(player); return true; } public static void addXP(Player player) { int level = player.getSkills().getLevel(Skills.DIVINATION); double exp; if(level <= 10) { exp = 45; } else if (level > 10 && level <= 20) { exp = 65; } else if (level > 20 && level <= 30) { exp = 80; } else if (level > 30 && level <= 40) { exp = 92; } else if (level > 40 && level <= 50) { exp = 106; } else if (level > 50 && level <= 60) { exp = 118; } else if (level > 60 && level <= 70) { exp = 131; } else if (level > 70 && level <= 80) { exp = 148; } else if (level > 80 && level <= 90) { exp = 162; } else if (level > 90 ) { exp = 179; } else { exp = 45; } if(player.getInventory().containsItem(PROTEAN_POWERUP, 1)) { player.getInventory().deleteItem(PROTEAN_POWERUP, 1); exp = exp * 1.3; } player.getSkills().addXp(Skills.DIVINATION, exp); return; } }
Protean Planks
Code:package com.rs.game.player.actions.protean; import com.rs.game.Animation; import com.rs.game.item.Item; import com.rs.game.player.Player; import com.rs.game.player.Skills; /* * author @Quantum */ public class ProteanPlankBuilding { public static final Animation BUILD_ANIMATION = new Animation(3683); public static final int PROTEAN_PLANK = 30037; public static final int PROTEAN_POWERUP = 41052; /** * smelts the item */ private static void build(Player player) { player.setNextAnimation(BUILD_ANIMATION); addXP(player); player.getInventory().deleteItem(new Item(PROTEAN_PLANK)); } public static boolean canBuild(Player player, int itemId) { int proteanPlank = player.getInventory().getAmountOf(ProteanPlankBuilding.PROTEAN_PLANK); if (proteanPlank == 0) { player.getPackets().sendGameMessage("You've ran out of protean planks to work with.", true); return false; } build(player); return true; } public static void addXP(Player player) { int level = player.getSkills().getLevel(Skills.CONSTRUCTION); double exp; if(level <= 10) { exp = 45; } else if (level > 10 && level <= 20) { exp = 65; } else if (level > 20 && level <= 30) { exp = 80; } else if (level > 30 && level <= 40) { exp = 92; } else if (level > 40 && level <= 50) { exp = 106; } else if (level > 50 && level <= 60) { exp = 118; } else if (level > 60 && level <= 70) { exp = 131; } else if (level > 70 && level <= 80) { exp = 148; } else if (level > 80 && level <= 90) { exp = 162; } else if (level >90 ) { exp = 179; } else { exp = 45; } if(player.getInventory().containsItem(PROTEAN_POWERUP, 1)) { player.getInventory().deleteItem(PROTEAN_POWERUP, 1); exp = exp * 1.3; } player.getSkills().addXp(Skills.CONSTRUCTION, exp); return; } }
In a Quantum World, nothing is real. We are one, and one is all. Live in the Quantum World.
As the title suggest, these aren't 100% perfect, but they are functional and hopefully someone can use and better themProtean Bars
Code:package com.rs.game.player.actions.protean; import com.rs.game.Animation; import com.rs.game.item.Item; import com.rs.game.player.Player; import com.rs.game.player.Skills; /* * author @Quantum */ public class ProteanBarSmithing { public static final Animation SMITHING_ANIMATION = new Animation(898); public static final int PROTEAN_BAR = 31350; public static final int PROTEAN_POWERUP = 41052; /** * smelts the item */ private static void smelt(Player player) { player.setNextAnimation(SMITHING_ANIMATION); addXP(player); player.getInventory().deleteItem(new Item(PROTEAN_BAR)); } public static boolean canSmelt(Player player, int itemId) { int proteanBar = player.getInventory().getAmountOf(ProteanBarSmithing.PROTEAN_BAR); if (proteanBar == 0) { player.getPackets().sendGameMessage("You've ran out of protean bars to work with.", true); return false; } smelt(player); return true; } public static void addXP(Player player) { int level = player.getSkills().getLevel(Skills.SMITHING); double exp; if(level <= 10) { exp = 45; } else if (level > 10 && level <= 20) { exp = 65; } else if (level > 20 && level <= 30) { exp = 80; } else if (level > 30 && level <= 40) { exp = 92; } else if (level > 40 && level <= 50) { exp = 106; } else if (level > 50 && level <= 60) { exp = 118; } else if (level > 60 && level <= 70) { exp = 131; } else if (level > 70 && level <= 80) { exp = 148; } else if (level > 80 && level <= 90) { exp = 162; } else if (level >90 ) { exp = 179; } else { exp = 45; } if(player.getInventory().containsItem(PROTEAN_POWERUP, 1)) { player.getInventory().deleteItem(PROTEAN_POWERUP, 1); exp = exp * 1.3; } player.getSkills().addXp(Skills.SMITHING, exp); return; } }
Protean Hides
Code:package com.rs.game.player.actions.protean; import com.rs.game.Animation; import com.rs.game.item.Item; import com.rs.game.player.Player; import com.rs.game.player.Skills; /* * author @Quantum */ public class ProteanHideCrafting { public static final Animation CRAFT_ANIMATION = new Animation(25594); public static final int PROTEAN_HIDE = 33740; public static final int PROTEAN_POWERUP = 41052; /** * smelts the item */ private static void craft(Player player) { player.setNextAnimation(CRAFT_ANIMATION); addXP(player); player.getInventory().deleteItem(new Item(PROTEAN_HIDE)); } public static boolean canCraft(Player player, int itemId) { int proteanHide = player.getInventory().getAmountOf(ProteanHideCrafting.PROTEAN_HIDE); if (proteanHide == 0) { player.getPackets().sendGameMessage("You've ran out of protean hides to work with.", true); return false; } craft(player); return true; } public static void addXP(Player player) { int level = player.getSkills().getLevel(Skills.CRAFTING); double exp; if(level <= 10) { exp = 45; } else if (level > 10 && level <= 20) { exp = 65; } else if (level > 20 && level <= 30) { exp = 80; } else if (level > 30 && level <= 40) { exp = 92; } else if (level > 40 && level <= 50) { exp = 106; } else if (level > 50 && level <= 60) { exp = 118; } else if (level > 60 && level <= 70) { exp = 131; } else if (level > 70 && level <= 80) { exp = 148; } else if (level > 80 && level <= 90) { exp = 162; } else if (level > 90 ) { exp = 179; } else { exp = 45; } if(player.getInventory().containsItem(PROTEAN_POWERUP, 1)) { player.getInventory().deleteItem(PROTEAN_POWERUP, 1); exp = exp * 1.3; } player.getSkills().addXp(Skills.CRAFTING, exp); return; } }
Protean Traps
Code:package com.rs.game.player.actions.protean; import java.util.List; import com.rs.game.Animation; import com.rs.game.World; import com.rs.game.WorldObject; import com.rs.game.WorldTile; import com.rs.game.item.Item; import com.rs.game.player.Player; import com.rs.game.player.Skills; import com.rs.game.player.actions.Action; import com.rs.game.player.content.OwnedObjectManager; import com.rs.game.tasks.WorldTask; import com.rs.game.tasks.WorldTasksManager; public class ProteanHunter extends Action { private static final int[][] TILES = new int[][] { { 0, 1 }, { 1, 0 }, { 0, -1 }, { -1, 0 }, { 1, 1 }, { 1, -1 }, { -1, -1 }, { -1, 1 }, { 0, 0 } }; public ProteanHunter(int amount) { this.amount = amount; } private int amount; private boolean auto; @Override public boolean process(Player player) { if (amount == 0) return false; return true; } private WorldTile getTile(Player player) { List<WorldObject> objects = World.getRegion(player.getRegionId()).getSpawnedObjects(); x: for (int i = 0; i < TILES.length; i++) { if (World.isTileFree(player.getPlane(), player.getX() + TILES[i][0], player.getY() + TILES[i][1], 1)) { if (objects != null) { for (WorldObject object : objects) { if (object.getX() == player.getX() + TILES[i][0] && object.getY() == player.getY() + TILES[i][1] && object.getPlane() == player.getPlane()) continue x; } } return new WorldTile(player.getX() + TILES[i][0], player.getY() + TILES[i][1], player.getPlane()); } } return null; } @Override public int processWithDelay(Player player) { int trapsAmount = OwnedObjectManager.getObjectsforValue(player, 93381); int maxAmount = (player.getSkills().getLevelForXp(Skills.HUNTER) / 20) + (player.getPerkManager().huntsman ? 2 : 0); if (trapsAmount > maxAmount) { if (!auto) { player.getPackets().sendGameMessage("You cannot place more than " + maxAmount + " traps at once."); return -1; } else return 1; } WorldTile tile = getTile(player); if (tile == null) return 1; player.setNextFaceWorldTile(tile); player.setNextAnimation(new Animation(5208)); player.getInventory().deleteItem(new Item(32337, 1)); player.lock(3); player.getPackets().sendGameMessage("You begin setting up the trap.", true); setActionDelay(player, 4); WorldTasksManager.schedule(new WorldTask() { @Override public void run() { OwnedObjectManager.addOwnedObjectManager(player, new WorldObject[] { new WorldObject(93381, 10, 0, tile.getX(), tile.getY(), tile.getPlane()) }, new long[] { 300000 }); amount--; } }, 3); return 1; } @Override public boolean start(Player player) { auto = amount > 1; return true; } @Override public void stop(Player player) {} }
Protean Log Burning
Code:package com.rs.game.player.actions.protean; import com.rs.Settings; import com.rs.game.Animation; import com.rs.game.Region; import com.rs.game.World; import com.rs.game.WorldObject; import com.rs.game.WorldTile; import com.rs.game.activites.duel.DuelArena; import com.rs.game.activites.duel.DuelControler; import com.rs.game.item.Item; import com.rs.game.npc.others.randoms.FireSpirit; import com.rs.game.player.Player; import com.rs.game.player.Skills; import com.rs.game.player.actions.firemaking.Bonfire; import com.rs.game.player.actions.firemaking.Bonfire.Log; import com.rs.utils.Utils; /* * author @Quantum */ public class ProteanLogBurning { public static final Animation FIREMAKING_ANIM = new Animation(26267); public static final Animation FIREADDING_ANIM = new Animation(16703); public static final int PROTEAN_LOG = 34528; public static final int PROTEAN_POWERUP = 41052; /** * smelts the item */ private static void burn(Player player) { final WorldTile tile = new WorldTile(player); if (!player.addWalkSteps(player.getX() - 1, player.getY(), 1)) if (!player.addWalkSteps(player.getX() + 1, player.getY(), 1)) if (!player.addWalkSteps(player.getX(), player.getY() + 1, 1)) player.addWalkSteps(player.getX(), player.getY() - 1, 1); player.setNextAnimation(FIREMAKING_ANIM); player.getAchManager().addKeyAmount("firemaking", 1); player.getInventory().deleteItem(new Item(PROTEAN_LOG)); World.spawnTempGroundObject( new WorldObject(70766, 10, 0, tile.getX(), tile.getY(), tile.getPlane()), 592, 2000, true); player.setNextFaceWorldTile(tile); addXP(player); process(player); player.getTemporaryAttributtes().put("Fire", Utils.currentTimeMillis() + 1800); } private static void add(Player player, WorldObject object) { Log protean = Log.PROTEAN; player.getActionManager().setAction(new Bonfire(protean, object)); player.setNextAnimation(FIREADDING_ANIM); addXP(player); process(player); player.getInventory().deleteItem(new Item(PROTEAN_LOG)); } public static boolean canBurn(Player player, int itemId) { int proteanLog = player.getInventory().getAmountOf(PROTEAN_LOG); if(!checkAll(player)) { return false; } if (proteanLog == 0) { player.getPackets().sendGameMessage("You've ran out of protean logs to work with.", true); return false; } burn(player); return true; } public static boolean canAdd(Player player, int itemId, WorldObject fire) { int proteanLog = player.getInventory().getAmountOf(PROTEAN_LOG); if(!checkAdd(player)) { return false; } if (proteanLog == 0) { player.getPackets().sendGameMessage("You've ran out of protean logs to work with.", true); return false; } add(player, fire); return true; } public static void addXP(Player player) { int level = player.getSkills().getLevel(Skills.FIREMAKING); double exp; if(level <= 10) { exp = 45; } else if (level > 10 && level <= 20) { exp = 65; } else if (level > 20 && level <= 30) { exp = 80; } else if (level > 30 && level <= 40) { exp = 92; } else if (level > 40 && level <= 50) { exp = 106; } else if (level > 50 && level <= 60) { exp = 118; } else if (level > 60 && level <= 70) { exp = 131; } else if (level > 70 && level <= 80) { exp = 148; } else if (level > 80 && level <= 90) { exp = 162; } else if (level >90 ) { exp = 179; } else { exp = 45; } if(player.getInventory().containsItem(PROTEAN_POWERUP, 1)) { player.getInventory().deleteItem(PROTEAN_POWERUP, 1); exp = exp * 1.3; } player.getSkills().addXp(Skills.FIREMAKING, exp); return; } public static boolean process(Player player) { if (Utils.random(350) == 0) { new FireSpirit(player, player); player.sendMessage("<col=ff0000>A fire spirit emerges from the bonfire."); } return true; } public static boolean checkAll(Player player) { if (player.getInterfaceManager().containsScreenInter() || player.getInterfaceManager().containsInventoryInter()) { player.sendMessage("Please finish what you're doing before doing this action."); return false; } if (!player.getInventory().containsItemToolBelt(590) && !player.getInventory().containsItemToolBelt(17678)) { player.sendMessage("You do not have the required items to light this."); return false; } if (!World.canMoveNPC(player.getPlane(), player.getX(), player.getY(), 1) // cliped || World.getObjectWithSlot(player, Region.OBJECT_SLOT_FLOOR) != null // fix || player.getControlerManager().getControler() instanceof DuelArena || player.getControlerManager().getControler() instanceof DuelControler || player.getRegionId() == Settings.MARKET_REGION_ID || player.getRegionId() == 9770 || player.getRegionId() == 9265) { player.sendMessage("You can't light a fire here; find a different area."); return false; } return true; } public static boolean checkAdd(Player player) { if (player.getInterfaceManager().containsScreenInter() || player.getInterfaceManager().containsInventoryInter()) { player.sendMessage("Please finish what you're doing before doing this action."); return false; } return true; } }
Protean Log Fletching
Code:package com.rs.game.player.actions.protean; import com.rs.game.Animation; import com.rs.game.item.Item; import com.rs.game.player.Player; import com.rs.game.player.Skills; /* * author @Quantum */ public class ProteanLogFletching { public static final Animation FLETCHING_ANIM = new Animation(26267); public static final int PROTEAN_LOG = 34528; public static final int PROTEAN_POWERUP = 41052; /** * smelts the item */ private static void fletch(Player player) { player.setNextAnimation(FLETCHING_ANIM); addXP(player); player.getInventory().deleteItem(new Item(PROTEAN_LOG)); } public static boolean canfletch(Player player, int itemId) { int proteanLog = player.getInventory().getAmountOf(PROTEAN_LOG); if (proteanLog == 0) { player.getPackets().sendGameMessage("You've ran out of protean logs to work with.", true); return false; } fletch(player); return true; } public static void addXP(Player player) { int level = player.getSkills().getLevel(Skills.FLETCHING); double exp; if(level <= 10) { exp = 45; } else if (level > 10 && level <= 20) { exp = 65; } else if (level > 20 && level <= 30) { exp = 80; } else if (level > 30 && level <= 40) { exp = 92; } else if (level > 40 && level <= 50) { exp = 106; } else if (level > 50 && level <= 60) { exp = 118; } else if (level > 60 && level <= 70) { exp = 131; } else if (level > 70 && level <= 80) { exp = 148; } else if (level > 80 && level <= 90) { exp = 162; } else if (level >90 ) { exp = 179; } else { exp = 45; } if(player.getInventory().containsItem(PROTEAN_POWERUP, 1)) { player.getInventory().deleteItem(PROTEAN_POWERUP, 1); exp = exp * 1.3; } player.getSkills().addXp(Skills.FLETCHING, exp); return; } }
Protean Memory
Code:package com.rs.game.player.actions.protean; import com.rs.game.Animation; import com.rs.game.item.Item; import com.rs.game.player.Player; import com.rs.game.player.Skills; /* * author @Quantum */ public class ProteanMemoryRelease { public static final Animation DIV_ANIMATION = new Animation(21225); public static final int PROTEAN_MEMORY = 37363; public static final int PROTEAN_POWERUP = 41052; /** * smelts the item */ private static void release(Player player) { player.setNextAnimation(DIV_ANIMATION); player.getInventory().deleteItem(new Item(PROTEAN_MEMORY)); addXP(player); } public static boolean canRelease(Player player, int itemId) { int proteanMemory = player.getInventory().getAmountOf(ProteanMemoryRelease.PROTEAN_MEMORY); if (proteanMemory == 0) { player.getPackets().sendGameMessage("You've ran out of protean memories to work with.", true); return false; } release(player); return true; } public static void addXP(Player player) { int level = player.getSkills().getLevel(Skills.DIVINATION); double exp; if(level <= 10) { exp = 45; } else if (level > 10 && level <= 20) { exp = 65; } else if (level > 20 && level <= 30) { exp = 80; } else if (level > 30 && level <= 40) { exp = 92; } else if (level > 40 && level <= 50) { exp = 106; } else if (level > 50 && level <= 60) { exp = 118; } else if (level > 60 && level <= 70) { exp = 131; } else if (level > 70 && level <= 80) { exp = 148; } else if (level > 80 && level <= 90) { exp = 162; } else if (level > 90 ) { exp = 179; } else { exp = 45; } if(player.getInventory().containsItem(PROTEAN_POWERUP, 1)) { player.getInventory().deleteItem(PROTEAN_POWERUP, 1); exp = exp * 1.3; } player.getSkills().addXp(Skills.DIVINATION, exp); return; } }
Protean Planks
Code:package com.rs.game.player.actions.protean; import com.rs.game.Animation; import com.rs.game.item.Item; import com.rs.game.player.Player; import com.rs.game.player.Skills; /* * author @Quantum */ public class ProteanPlankBuilding { public static final Animation BUILD_ANIMATION = new Animation(3683); public static final int PROTEAN_PLANK = 30037; public static final int PROTEAN_POWERUP = 41052; /** * smelts the item */ private static void build(Player player) { player.setNextAnimation(BUILD_ANIMATION); addXP(player); player.getInventory().deleteItem(new Item(PROTEAN_PLANK)); } public static boolean canBuild(Player player, int itemId) { int proteanPlank = player.getInventory().getAmountOf(ProteanPlankBuilding.PROTEAN_PLANK); if (proteanPlank == 0) { player.getPackets().sendGameMessage("You've ran out of protean planks to work with.", true); return false; } build(player); return true; } public static void addXP(Player player) { int level = player.getSkills().getLevel(Skills.CONSTRUCTION); double exp; if(level <= 10) { exp = 45; } else if (level > 10 && level <= 20) { exp = 65; } else if (level > 20 && level <= 30) { exp = 80; } else if (level > 30 && level <= 40) { exp = 92; } else if (level > 40 && level <= 50) { exp = 106; } else if (level > 50 && level <= 60) { exp = 118; } else if (level > 60 && level <= 70) { exp = 131; } else if (level > 70 && level <= 80) { exp = 148; } else if (level > 80 && level <= 90) { exp = 162; } else if (level >90 ) { exp = 179; } else { exp = 45; } if(player.getInventory().containsItem(PROTEAN_POWERUP, 1)) { player.getInventory().deleteItem(PROTEAN_POWERUP, 1); exp = exp * 1.3; } player.getSkills().addXp(Skills.CONSTRUCTION, exp); return; } }
In a Quantum World, nothing is real. We are one, and one is all. Live in the Quantum World.