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