Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -1,59 +1,59 @@
|
||||
package core.game.node.entity.npc.other;
|
||||
|
||||
import core.game.node.entity.combat.DeathTask;
|
||||
import core.game.node.entity.npc.AbstractNPC;
|
||||
import core.game.world.map.Location;
|
||||
import core.plugin.Initializable;
|
||||
import core.tools.RandomFunction;
|
||||
|
||||
/**
|
||||
* Handles the sheep npc's.
|
||||
* @author 'Vexia
|
||||
*/
|
||||
@Initializable
|
||||
public class SheepNPC extends AbstractNPC {
|
||||
|
||||
/**
|
||||
* The NPC ids of NPCs using this plugin.
|
||||
*/
|
||||
private static final int[] ID = { 42, 43, 1271, 1272, 1529, 1762, 1763, 1764, 1765, 2311, 2377, 2378, 2379, 2380, 3310, 3311, 3579, 5148, 5149, 5150, 5151, 5152, 5153, 5154, 5155, 5156, 5157, 5158, 5159, 5160, 5161, 5162, 5163, 5164, 5165, 5172, 5173 };
|
||||
|
||||
/**
|
||||
* Constructs a new {@code AlKharidWarriorPlugin} {@code Object}.
|
||||
*/
|
||||
public SheepNPC() {
|
||||
super(0, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new {@code AlKharidWarriorPlugin} {@code Object}.
|
||||
* @param id The NPC id.
|
||||
* @param location The location.
|
||||
*/
|
||||
private SheepNPC(int id, Location location) {
|
||||
super(id, location);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractNPC construct(int id, Location location, Object... objects) {
|
||||
return new SheepNPC(id, location);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
if (getProperties().getCombatPulse().isAttacking() || DeathTask.isDead(this)) {
|
||||
super.tick();
|
||||
return;
|
||||
}
|
||||
if (RandomFunction.random(35) == 5) {
|
||||
sendChat("Baa!");
|
||||
}
|
||||
super.tick();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getIds() {
|
||||
return ID;
|
||||
}
|
||||
|
||||
}
|
||||
package core.game.node.entity.npc.other;
|
||||
|
||||
import core.game.node.entity.combat.DeathTask;
|
||||
import core.game.node.entity.npc.AbstractNPC;
|
||||
import core.game.world.map.Location;
|
||||
import core.plugin.Initializable;
|
||||
import core.tools.RandomFunction;
|
||||
|
||||
/**
|
||||
* Handles the sheep npc's.
|
||||
* @author 'Vexia
|
||||
*/
|
||||
@Initializable
|
||||
public class SheepNPC extends AbstractNPC {
|
||||
|
||||
/**
|
||||
* The NPC ids of NPCs using this plugin.
|
||||
*/
|
||||
private static final int[] ID = { 42, 43, 1271, 1272, 1529, 1762, 1763, 1764, 1765, 2377, 2378, 2379, 2380, 3310, 3311, 3579, 5148, 5149, 5150, 5151, 5152, 5153, 5154, 5155, 5156, 5157, 5158, 5159, 5160, 5161, 5162, 5163, 5164, 5165, 5172, 5173 };
|
||||
|
||||
/**
|
||||
* Constructs a new {@code AlKharidWarriorPlugin} {@code Object}.
|
||||
*/
|
||||
public SheepNPC() {
|
||||
super(0, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new {@code AlKharidWarriorPlugin} {@code Object}.
|
||||
* @param id The NPC id.
|
||||
* @param location The location.
|
||||
*/
|
||||
private SheepNPC(int id, Location location) {
|
||||
super(id, location);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractNPC construct(int id, Location location, Object... objects) {
|
||||
return new SheepNPC(id, location);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
if (getProperties().getCombatPulse().isAttacking() || DeathTask.isDead(this)) {
|
||||
super.tick();
|
||||
return;
|
||||
}
|
||||
if (RandomFunction.random(35) == 5) {
|
||||
sendChat("Baa!");
|
||||
}
|
||||
super.tick();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getIds() {
|
||||
return ID;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -113,10 +113,10 @@ public final class SlayerManager {
|
||||
flags.setCompletedTasks(flags.getCompletedTasks() + 1);
|
||||
if ((flags.getCompletedTasks() > 4 || flags.canEarnPoints() ) && flags.getMaster() != Master.TURAEL && flags.getPoints() < 64000) {
|
||||
int points = flags.getMaster().getTaskPoints()[0];
|
||||
if (flags.getTaskStreak() % 10 == 0) {
|
||||
points = flags.getMaster().getTaskPoints()[1];
|
||||
} else if (flags.getTaskStreak() % 50 == 0) {
|
||||
if (flags.getTaskStreak() % 50 == 0) {
|
||||
points = flags.getMaster().getTaskPoints()[2];
|
||||
} else if (flags.getTaskStreak() % 10 == 0) {
|
||||
points = flags.getMaster().getTaskPoints()[1];
|
||||
}
|
||||
flags.incrementPoints(points);
|
||||
if (flags.getPoints() > 64000) {
|
||||
|
||||
Reference in New Issue
Block a user