Question Need some logic

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

  1. 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. 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. 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...