[Tut] BankPin System!

Results 1 to 10 of 10
  1. #1
    Member Ahrims is offline
    MemberRank
    Sep 2007 Join Date
    United Kingdom<3Location
    52Posts

    [Tut] BankPin System!

    Purpose : To add a working BankPin system , Reenscape way , fixed by me.

    Difficulty : Adding ints booleans statements and methods seems to be hard for some people.

    Server Base : ReenScape ,LegendzPK ( My first pking source )

    Credits : 99% Creator of ReenScape , 1% Me for fixing System and validation.

    Step 1:Go into Player.java and under "public abstract class Player" add these ints :
    Code:
      public int correctPin = 0;
      public int bankSet = 0;
    Step 2: Save and close player.java and go into your client.java and under
    "public class client implements runnable {"
    add these ints booleans statements methods.
    Code:
    public void BankSystem(String Message) {
        outStream.createFrame(218);
        outStream.writeWordBigEndianA(1);
        BankSystem(Message);
        outStream.createFrame(218);
        outStream.writeWordBigEndianA(-1);
        updateRequired = true;
        appearanceUpdateRequired = true;
      }
      public int doubler = 1;
      public int bankPin = 0;
      public boolean setpin = false;
      public boolean bankCorrect = false;
      public boolean changeMode = false;
    
      public void VerifyPin() {
        boolean chck = changeMode;
        closeInterface();
        if(chck == false) {
          if(bankPin == correctPin) {
            bankCorrect = true;
            BankSystem("You have correctly entered you PIN.");
            Print.ln("[Valid]"+playerName+" entered a valid pin");
            openUpBank();
          } else {
            BankSystem("Invalid PIN.");
            Print.ln("[Error]"+playerName+" entered a invalid pin");
          }
        } else {
          correctPin = bankPin;
          BankSystem("Bank PIN set!");
          bankSet = 1;
          bankCorrect = true;
        }
      }
    
      public void setpin() {
      BankSystem("Bank PIN set!");
      changeMode = true;
          bankSet = 1;
          }
          
      public void bankInterfaces(int callid) {
        switch(callid) {
          case 58074:
            bankPin = 0;
            doubler = 1;
            LegendS("Cancelled.");
            closeInterface();
            break;
          case 58025:
            addNumber(1);
            break;
          case 58026:
            addNumber(2);
            break;
          case 58027:
            addNumber(3);
            break;
          case 58028:
            addNumber(4);
            break;
          case 58029:
            addNumber(5);
            break;
          case 58030:
            addNumber(6);
            break;
          case 58031:
            addNumber(7);
            break;
          case 58032:
            addNumber(8);
            break;
          case 58033:
            addNumber(9);
            break;
          case 58034:
            addNumber(0);
            break;
        }
      }
    
      public void initBankPIN() {
        BankTextInfo();
        VerifyPin();
        if(setpin == false) {
        setpin();
        setpin = true;
        if(changeMode == true) {
          sendFrame126("@whi@Please enter your Bank Pin:", 14920);
        }
        doubler = 1;
        bankPin = 0;
        showInterface(7424);
      }
      }
      public void BankTextInfo() {
        sendFrame126("@whi@                    Bank of Project Legend X", 14923);
        sendFrame126("@whi@Please enter your PIN using the buttons below.", 14920);
    
        if(pinenter == 0) sendFrame126("@whi@First click the FIRST digit", 15313); // First entry
    
        sendFrame126("@whi@1", 14883);
        sendFrame126("@whi@2", 14884);
        sendFrame126("@whi@3", 14885);
        sendFrame126("@whi@4", 14886);
        sendFrame126("@whi@5", 14887);
        sendFrame126("@whi@6", 14888);
        sendFrame126("@whi@7", 14889);
        sendFrame126("@whi@8", 14890);
        sendFrame126("@whi@9", 14891);
        sendFrame126("@whi@0", 14892);
        sendFrame126("@whi@I don't know it.", 14921);
        sendFrame126("@whi@Exit", 14922);
      }
      public int pinenter = 0;
      public void addNumber(int Number) {
        int temp1 = Number * doubler;
    
        if(pinenter == 0) sendFrame126("@whi@First click the FIRST digit", 15313); // First entry
        if(pinenter == 1) sendFrame126("@whi@Now click the SECOND digit", 15313); // Second entry
        if(pinenter == 2) sendFrame126("@whi@Now click the THIRD digit", 15313); // Third entry
        if(pinenter == 3) sendFrame126("@whi@Now click the FOURTH digit", 15313); // Fourth entry
        if(pinenter == 4) sendFrame126("@whi@Now click the FIFTH digit", 15313); // Fourth entry
        pinenter++;
    
        bankPin += temp1;
        doubler = doubler * 10;
        if(doubler == 10000) {
          doubler = 1;
          VerifyPin();
        }
      }
    Now this is an important step. I will explain it as simple as possible for those that are to retarted to understand basic english.
    Every bank booth in your server has an ID , this ID will be a case in method first object click and second object click , for example , a bank booths ID is 5 then the case number in method first object click would be case 5:
    Now , inside each case of a bankbooth , you will see openUpBank();
    replace that with : initBankPIN(); in both cases in first object and second object click.
    When you have done that. Save , compile and run your server , and now when you click on a bank booth , you need to set and enter a PIN!


    Ahrims


  2. #2
    The light can't stop me. Steven is offline
    MemberRank
    May 2007 Join Date
    United KingdomLocation
    1,531Posts

    Re: BankPin System!

    W I C K E D mate!!

  3. #3
    Enthusiast Freestyle-Retro is offline
    MemberRank
    Mar 2007 Join Date
    UranusLocation
    43Posts

    Re: BankPin System!

    very nice i will try it out later today

  4. #4
    Account Upgraded | Title Enabled! :.:.:JaMeS:.:.: is offline
    MemberRank
    Jul 2007 Join Date
    Watching you...Location
    252Posts

    Re: BankPin System!

    neet i'll try as i come back from holiday.

  5. #5
    Apprentice DontThink is offline
    MemberRank
    Oct 2007 Join Date
    WA, AustraliaLocation
    22Posts

    Re: BankPin System!

    Nice, does this work for different servers? Not only ReenScape?

  6. #6
    Proficient Member dragon ki228 is offline
    MemberRank
    Jun 2006 Join Date
    uuuhm What does it mather ??Location
    168Posts

    Re: [Tut] BankPin System!

    Good tut mate i tryd it on my server but doesn't work on it ;) but thats not your foult and mine two :P cous i entered everything on the right place :P good tut dude :)

  7. #7
    Novice shoobidooo is offline
    MemberRank
    Jun 2009 Join Date
    3Posts

    Re: [Tut] BankPin System!

    i like this very much, but you could do a bit better on your grammararar. (sorry about the typo but i am a chicken and i can tell that you are aswell) ((i hope you do not take any offence to that past bracet)) (((or are you a lepricorn with a 20 leaf clover.))) ((((sorry about the typo again.)))) (((((i will go now))))) ((((((good luck with your grammar lessons))))))

  8. #8
    Novice shoobidooo is offline
    MemberRank
    Jun 2009 Join Date
    3Posts

    Re: [Tut] BankPin System!

    this is a very slow reply for a wuick one (sorry about the typo again)

  9. #9
    Novice shoobidooo is offline
    MemberRank
    Jun 2009 Join Date
    3Posts

    Re: BankPin System!

    r u emo?..

  10. #10
    Banned heyhowareya is offline
    BannedRank
    Sep 2009 Join Date
    290Posts

    Re: [Tut] BankPin System!

    lol this is leached from rune-server too



Advertisement