mirror of
https://github.com/2006-Scape/Parabot-Randoms.git
synced 2026-07-03 16:49:09 +00:00
[FIX] FIxed NPE in Mysterious Man and Sandwich Lady Solvers
This commit is contained in:
@@ -17,7 +17,7 @@ public class MysteriousOldMan implements Random {
|
||||
@Override
|
||||
public boolean activate() {
|
||||
for (Npc npc : Npcs.getNearest(410)) {
|
||||
if (npc != null && npc.getInteractingCharacter().equals(Players.getMyPlayer())) {
|
||||
if (npc != null && npc.getDef() != null && npc.getInteractingCharacter().equals(Players.getMyPlayer())) {
|
||||
man = npc;
|
||||
return true;
|
||||
}
|
||||
@@ -27,7 +27,7 @@ public class MysteriousOldMan implements Random {
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
if (man != null && man.getInteractingCharacter().equals(Players.getMyPlayer())) {
|
||||
if (man != null && man.getDef() != null && man.getInteractingCharacter().equals(Players.getMyPlayer())) {
|
||||
man.interact(0);
|
||||
Time.sleep(new SleepCondition() {
|
||||
@Override
|
||||
|
||||
@@ -17,7 +17,7 @@ public class SandwichLady implements Random {
|
||||
@Override
|
||||
public boolean activate() {
|
||||
for (Npc npc : Npcs.getNearest(3117)) {
|
||||
if (npc != null && npc.getInteractingCharacter().equals(Players.getMyPlayer())) {
|
||||
if (npc != null && npc.getDef() != null && npc.getInteractingCharacter().equals(Players.getMyPlayer())) {
|
||||
lady = npc;
|
||||
return true;
|
||||
}
|
||||
@@ -27,7 +27,7 @@ public class SandwichLady implements Random {
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
if (lady != null && lady.getInteractingCharacter().equals(Players.getMyPlayer())) {
|
||||
if (lady != null && lady.getDef() != null && lady.getInteractingCharacter().equals(Players.getMyPlayer())) {
|
||||
lady.interact(0);
|
||||
Time.sleep(new SleepCondition() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user