Originally Posted by
Alienware
Find the preach emote id (not sure if it has a gfx aswell?), make a force talk code and put it in InventoryOptionsHandler under handleItemOption2.
ok going to use a gfk but what is the method to adding it into the statment?
Code:
if (itemId = 22422) {
player.setNextForceTalk(new ForceTalk("Good order and discipline in any army are to be depended upon more thatn courage alone!"));
}
Also when I click preach nothing happens. If I wielding it, it just removes the book.
I put it right here
Code:
public static void handleItemOption2(final Player player, final int slotId,
final int itemId, Item item) {
if (Firemaking.isFiremaking(player, itemId))
return;
if (itemId >= 5509 && itemId <= 5514) {
int pouch = -1;
if (itemId == 5509)
pouch = 0;
if (itemId == 5510)
pouch = 1;
if (itemId == 5512)
pouch = 2;
if (itemId == 5514)
pouch = 3;
Runecrafting.emptyPouch(player, pouch);
player.stopAll(false);
} else if (itemId >= 15086 && itemId <= 15100) {
Dicing.handleRoll(player, itemId, true);
return;
} else {
if (player.isEquipDisabled())
return;
long passedTime = Utils.currentTimeMillis()
- WorldThread.LAST_CYCLE_CTM;
WorldTasksManager.schedule(new WorldTask() {
@Override
public void run() {
List<Integer> slots = player.getSwitchItemCache();
int[] slot = new int[slots.size()];
for (int i = 0; i < slot.length; i++)
slot[i] = slots.get(i);
player.getSwitchItemCache().clear();
ButtonHandler.sendWear(player, slot);
player.stopAll(false, true, false);
}
}, passedTime >= 600 ? 0 : passedTime > 330 ? 1 : 0);
if (player.getSwitchItemCache().contains(slotId))
return;
player.getSwitchItemCache().add(slotId);
}
}
public static void dig(final Player player) {
player.resetWalkSteps();
player.setNextAnimation(new Animation(830));
player.lock();
WorldTasksManager.schedule(new WorldTask() {
@Override
public void run() {
player.unlock();
if (Barrows.digIntoGrave(player))
return;
if(player.getX() == 3005 && player.getY() == 3376
|| player.getX() == 2999 && player.getY() == 3375
|| player.getX() == 2996 && player.getY() == 3377
|| player.getX() == 2989 && player.getY() == 3378
|| player.getX() == 2987 && player.getY() == 3387
|| player.getX() == 2984 && player.getY() == 3387) {
//mole
player.setNextWorldTile(new WorldTile(1752, 5137, 0));
player.getPackets().sendGameMessage("You seem to have dropped down into a network of mole tunnels.");
return;
}
player.getPackets().sendGameMessage("You find nothing.");
}
});
}
public static void handleItemOption1(Player player, final int slotId,
final int itemId, Item item) {
long time = Utils.currentTimeMillis();
if (player.getLockDelay() >= time
|| player.getEmotesManager().getNextEmoteEnd() >= time)
return;
player.stopAll(false);
if (Foods.eat(player, item, slotId))
return;
if (itemId >= 15086 && itemId <= 15100) {
Dicing.handleRoll(player, itemId, true);
return;
}
if (itemId == 9083) {
player.sm("Teleportation with the holy symbol has been activated.");
Entrance.MissionTeleport(player, 3040, 3202, 0);
player.sm("Hmm... Wierd item isn't it? I Should speak with Klarense now.");
}
if (itemId == 22422) {
player.setNextForceTalk(new ForceTalk("Good order and discipline in any army are to be depended upon more thatn courage alone!"));
}
Is it not the correct spot?