Package org.powerbot.game.api.wrappers.interactive

Examples of org.powerbot.game.api.wrappers.interactive.NPC


                }
                return false;
            }
        });

        NPC bestMonster = null;
        Monster bestMonsterValue = null;

        for (NPC npc : realNpcs) {
            if (npc.validate()) {
                final Monster tempMonster = Monster.getMonster(npc.getId());

                if (bestMonster == null || (nodeBlocking ? tempMonster.ordinal() < bestMonsterValue.ordinal() :
                        tempMonster.ordinal() > bestMonsterValue.ordinal()) ||
                        (tempMonster.ordinal() == bestMonsterValue.ordinal() &&
                                distanceTo(npc.getLocation()) < distanceTo(bestMonster.getLocation()))) {
                    bestMonster = npc;
                    bestMonsterValue = tempMonster;
                }
            }
        }
View Full Code Here


        }
    }

    @Override
    public void process() {
        final NPC floatingEss = Methods.getNearestReachableNPC(FLOATING_ESS_ID);

        if (floatingEss == null) {
            if (Tabs.getCurrent() == Tabs.INVENTORY && Game.getClientState() == 11) {
                if (failCheck > 5) {
                    error("Out of rune essence and no reachable floating rune essence!");
                } else {
                    Time.sleep(2000);
                    failCheck++;
                }
            }
        } else {
            failCheck = 0;
            Methods.interact(floatingEss, floatingEss.getLocation(), "Collect", "Floating essence");
        }
    }
View Full Code Here

        if (SudoRunespan.isNodeBlock() && runeEss != null && runeEss.getStackSize() > 200) {
            SudoRunespan.setNodeBlock(false);
        }

        final NPC monster = Methods.getBestReachableMonster(SudoRunespan.isNodeBlock());

        if (monster != null) {
            if (monster.getId() != SudoRunespan.getCurrentId() &&
                    (!SudoRunespan.isNodeBlock() || SudoRunespan.getCurrentId() == -1)) {
                SudoRunespan.setTarget(monster);
                SudoRunespan.setCurrentId(monster.getId());
                entity = monster;
                return true;
            } else {
                return false;
            }
View Full Code Here

TOP

Related Classes of org.powerbot.game.api.wrappers.interactive.NPC

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.