mirror of
https://github.com/2006-Scape/Parabot-Randoms.git
synced 2026-07-03 08:39:09 +00:00
[NAMING] Fixed Naming in BobsRandom and Jail classes.
This commit is contained in:
@@ -19,20 +19,20 @@ import java.util.ArrayList;
|
||||
*/
|
||||
public class BobsIsland implements Random {
|
||||
|
||||
private static final Tile CENTER = new Tile(2525,4777);
|
||||
private static final int PORTAL_ID = 8987;
|
||||
private static final Tile center = new Tile(2525,4777);
|
||||
private static final int portal_id = 8987;
|
||||
|
||||
public BobsIsland() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean activate() {
|
||||
return CENTER.distanceTo() < 25;
|
||||
return center.distanceTo() < 25;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
SceneObject[] portals = SceneObjects.getNearest(PORTAL_ID);
|
||||
SceneObject[] portals = SceneObjects.getNearest(portal_id);
|
||||
|
||||
for(final SceneObject portal : portals){
|
||||
if(portal != null){
|
||||
@@ -45,7 +45,7 @@ public class BobsIsland implements Random {
|
||||
}, 10000);
|
||||
Time.sleep(1000);
|
||||
|
||||
if(CENTER.distanceTo() > 24){
|
||||
if(center.distanceTo() > 24){
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,14 +16,14 @@ import org.rev317.min.api.wrappers.SceneObject;
|
||||
|
||||
public class Jail implements Random {
|
||||
private Npc jailer;
|
||||
private final int[] ROCKS = {2093, 2092};
|
||||
private final int[] PICK_AXES = {1266, 1268, 1270, 1272, 1274, 1276, 14605, 14608};
|
||||
private final int[] rocks = {2093, 2092};
|
||||
private final int[] pick_axes = {1266, 1268, 1270, 1272, 1274, 1276, 14605, 14608};
|
||||
|
||||
@Override
|
||||
public boolean activate() {
|
||||
try {
|
||||
if (jailer() != null) {
|
||||
this.jailer = jailer();
|
||||
if (getJailer() != null) {
|
||||
this.jailer = getJailer();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -36,10 +36,10 @@ public class Jail implements Random {
|
||||
public void execute() {
|
||||
try {
|
||||
|
||||
SceneObject rock = rock();
|
||||
SceneObject rock = getRock();
|
||||
|
||||
//Check if we got an Pickaxe
|
||||
if (Inventory.getCount(PICK_AXES) > 0) {
|
||||
if (Inventory.getCount(pick_axes) > 0) {
|
||||
|
||||
//Check if we can min the ores
|
||||
if (!Inventory.isFull()) {
|
||||
@@ -84,17 +84,17 @@ public class Jail implements Random {
|
||||
}
|
||||
}
|
||||
|
||||
private Npc jailer(){
|
||||
private Npc getJailer(){
|
||||
for(Npc jailer : Npcs.getNearest(201)){
|
||||
if(jailer != null){
|
||||
if(jailer != null && jailer.getDef() != null){
|
||||
return jailer;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private SceneObject rock(){
|
||||
for(SceneObject rock : SceneObjects.getNearest(ROCKS)){
|
||||
private SceneObject getRock(){
|
||||
for(SceneObject rock : SceneObjects.getNearest(rocks)){
|
||||
if(rock != null){
|
||||
return rock;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user