1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Question Need some logic

Discussion in 'Developer Support' started by greyb3ast, Sep 4, 2015.

  1. greyb3ast

    Joined:
    Aug 7, 2015
    Messages:
    28
    Likes Received:
    3
    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()) );
    ;}
    }
    }
    }
     
  2. Defeat3d

    Defeat3d Primate

    Joined:
    Oct 30, 2014
    Messages:
    3,072
    Likes Received:
    1,894
    Pretty sure you don't need the logic for opening the lodestone interfaces etc.

    Code (Text):
    1.         final Area.Rectangular bankArea = new Area.Rectangular(null, null);
    2.         final Player local = Players.getLocal();
    3.         if (local != null && Inventory.isFull() && !bankArea.contains(local) && Lodestone.KARAMJA.teleport()) {
    4.             Execution.delayUntil(() -> local.getAnimationId() == -1, 3000);
    5.         }
    Should work just fine.
     
  3. greyb3ast

    Joined:
    Aug 7, 2015
    Messages:
    28
    Likes Received:
    3
    I am probbably doing something wrong :( it still keeps teleporting(instead of walking) no matter if i am at bank or not
    Code (Text):
    1.  
    2. public void onLoop() {
    3.  
    4.  
    5. 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()) {
    6. Execution.delayUntil(() -> local.getAnimationId() == -1, 3000);}
    7.  
    8. 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));
    9. path.step(true);}
    10.  
     
    #3 greyb3ast, Sep 4, 2015
    Last edited: Sep 5, 2015

Share This Page

Loading...