mirror of
https://github.com/2006-Scape/Parabot-Randoms.git
synced 2026-07-04 08:39:24 +00:00
[NAMING] Used Correct Naming Convention and Renamed get Methods.
This commit is contained in:
@@ -13,11 +13,11 @@ import org.rev317.min.api.wrappers.Npc;
|
||||
public class MysteriousOldMan implements Random {
|
||||
|
||||
private Npc man;
|
||||
private final int ID = 410;
|
||||
private final int id = 410;
|
||||
|
||||
@Override
|
||||
public boolean activate() {
|
||||
this.man = man();
|
||||
this.man = getMan();
|
||||
return man != null;
|
||||
}
|
||||
|
||||
@@ -28,14 +28,14 @@ public class MysteriousOldMan implements Random {
|
||||
Time.sleep(new SleepCondition() {
|
||||
@Override
|
||||
public boolean isValid() {
|
||||
return man == null || !man.getInteractingCharacter().equals(Players.getMyPlayer());
|
||||
return man.distanceTo() < 2 || !man.getInteractingCharacter().equals(Players.getMyPlayer());
|
||||
}
|
||||
}, 1500);
|
||||
}
|
||||
}
|
||||
|
||||
private Npc man() {
|
||||
for (Npc man : Npcs.getNearest(ID)) {
|
||||
private Npc getMan() {
|
||||
for (Npc man : Npcs.getNearest(id)) {
|
||||
if (man != null && man.getDef() != null && man.getInteractingCharacter().equals(Players.getMyPlayer())) {
|
||||
return man;
|
||||
}
|
||||
|
||||
@@ -13,11 +13,11 @@ import org.rev317.min.api.wrappers.Npc;
|
||||
public class SandwichLady implements Random {
|
||||
|
||||
private Npc lady;
|
||||
private final int ID = 3117;
|
||||
private final int id = 3117;
|
||||
|
||||
@Override
|
||||
public boolean activate() {
|
||||
this.lady = lady();
|
||||
this.lady = getLady();
|
||||
return this.lady != null;
|
||||
}
|
||||
|
||||
@@ -28,14 +28,14 @@ public class SandwichLady implements Random {
|
||||
Time.sleep(new SleepCondition() {
|
||||
@Override
|
||||
public boolean isValid() {
|
||||
return lady == null || !lady.getInteractingCharacter().equals(Players.getMyPlayer());
|
||||
return lady.distanceTo() < 2 || !lady.getInteractingCharacter().equals(Players.getMyPlayer());
|
||||
}
|
||||
}, 1500);
|
||||
}
|
||||
}
|
||||
|
||||
private Npc lady() {
|
||||
for (Npc lady : Npcs.getNearest(ID)) {
|
||||
private Npc getLady() {
|
||||
for (Npc lady : Npcs.getNearest(id)) {
|
||||
if (lady != null && lady.getDef() != null && lady.getInteractingCharacter().equals(Players.getMyPlayer())) {
|
||||
return lady;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user