Thread: bank opening problem 614

Results 1 to 5 of 5
  1. #1 bank opening problem 614 
    Member
    Join Date
    Jan 2010
    Posts
    80
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Ok im really confused about how to do this....
    i have added mutiple bank booths but i need them to open i have got one to open but i have tryed like 20 diffrent ways to get the other to open aswell but cant ? i can only get one to open. how do i add another so that it will also open ??
    Here is my code.

    package dragonkk.rs2rsps.scripts.objects;

    import dragonkk.rs2rsps.Server;
    import dragonkk.rs2rsps.events.Task;
    import dragonkk.rs2rsps.model.player.Player;
    import dragonkk.rs2rsps.scripts.objectScript;

    public class o11402 extends objectScript {

    @Override
    public void examine(Player p) {

    }

    @Override
    public void option1(final Player p, final int coordX, final int coordY, final int height) {
    if(p.getWalk().getWalkDir() != -1 || p.getWalk().getRunDir() != -1)
    return;
    if(p.getLocation().getX() == 2100) {
    p.getBank().openBank();
    } else if(p.getLocation().getX() == 3920) {
    p.getBank().openBank();
    }

    }
    @Override
    public void option2(Player p, int coordX, int coordY, int height) {
    // TODO Auto-generated method stub
    }
    }
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Aug 2010
    Posts
    640
    Thanks given
    73
    Thanks received
    47
    Rep Power
    54
    Just edit these to your other banks locations

    Code:
    if(p.getLocation().getX() == 2100) {
    p.getBank().openBank();
    } else if(p.getLocation().getX() == 3920) {
    p.getBank().openBank();
    Reply With Quote  
     

  3. #3  
    Registered Member 'Conner's Avatar
    Join Date
    Aug 2010
    Posts
    578
    Thanks given
    74
    Thanks received
    19
    Rep Power
    22
    Why don't you just add player.OpenBank() to the Object Handler with

    case bankobjectid:
    player.OpenBank();
    break;

    Quote Originally Posted by 'QuestCrew View Post
    Whats a lobby server?
    Reply With Quote  
     

  4. #4  
    Member
    Join Date
    Jan 2010
    Posts
    80
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Ok new problem ive managed to add both banks but when i stand infront of one it wont open but then if i move to infront of other bank and click first bank it works and so does 2nd bank but not when i stand infront of first bank ??
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Aug 2010
    Posts
    640
    Thanks given
    73
    Thanks received
    47
    Rep Power
    54
    Quote Originally Posted by nick2010 View Post
    Ok new problem ive managed to add both banks but when i stand infront of one it wont open but then if i move to infront of other bank and click first bank it works and so does 2nd bank but not when i stand infront of first bank ??
    Just edit the coords.
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •