Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Question Need some logic

Joined
Aug 7, 2015
Messages
28
I try to make that it would teleport only when inventory is full and he is at bank area i have area in my code but it teleports me no matter where i am.
if (Inventory.isFull() && !bankArea.contains(Players.getLocal())) {
if (!Lodestone.isInterfaceOpen()) {
if (Lodestone.openInterface()) {
Execution.delayUntil(Lodestone::isInterfaceOpen, 1200, 1600); if (Lodestone.KARAMJA.teleport()) {
Execution.delayUntil(() ->
!bankArea.contains(Players.getLocal()) );
;}
}
}
}
 
Conelander
Joined
Oct 30, 2014
Messages
3,610
Pretty sure you don't need the logic for opening the lodestone interfaces etc.

Code:
        final Area.Rectangular bankArea = new Area.Rectangular(null, null);
        final Player local = Players.getLocal();
        if (local != null && Inventory.isFull() && !bankArea.contains(local) && Lodestone.KARAMJA.teleport()) {
            Execution.delayUntil(() -> local.getAnimationId() == -1, 3000);
        }

Should work just fine.
 
Joined
Aug 7, 2015
Messages
28
Pretty sure you don't need the logic for opening the lodestone interfaces etc.

Code:
        final Area.Rectangular bankArea = new Area.Rectangular(null, null);
        final Player local = Players.getLocal();
        if (local != null && Inventory.isFull() && !bankArea.contains(local) && Lodestone.KARAMJA.teleport()) {
            Execution.delayUntil(() -> local.getAnimationId() == -1, 3000);
        }

Should work just fine.
I am probbably doing something wrong :( it still keeps teleporting(instead of walking) no matter if i am at bank or not
Code:
public void onLoop() {


final Area.Polygonal bankArea = new Area.Polygonal(new Coordinate(2888, 3534, 0), new Coordinate(2891, 3534, 0), new Coordinate(2886, 3538, 0), new Coordinate(2886, 3536, 0)); final Player local = Players.getLocal(); if (local != null && Inventory.isFull() && !bankArea.contains(local) && Lodestone.KARAMJA.teleport()) {
Execution.delayUntil(() -> local.getAnimationId() == -1, 3000);}

PredefinedPath path = PredefinedPath.create(new Coordinate(2761, 3147, 0),  new Coordinate(2852, 3028, 0), new Coordinate(2857, 3028, 0), new Coordinate(2862, 3027, 0), new Coordinate(2868, 3027, 0), new Coordinate(2871, 3023, 0));
path.step(true);}
 
Last edited:
Top