Correct capacityCost()

Page 1 of 3 123 LastLast
Results 1 to 15 of 35
  1. #1
    Account Upgraded | Title Enabled! flav is offline
    MemberRank
    Jul 2008 Join Date
    655Posts

    Correct capacityCost()

    Please let me know if the prices aren't correct.

    MapleCharacter.java
    capacityCost()
    Code:
    public int capacityCost() {
            int cost = 500000;
    
            if (getGuild().getCapacity() == 15) {
                cost = 1500000;
            } else if (getGuild().getCapacity() == 20) {
                cost = 2500000;
            } else if (getGuild().getCapacity() == 25) {
                cost = 3500000;
            } else if (getGuild().getCapacity() == 30) {
                cost = 7500000;
            } else if (getGuild().getCapacity() == 35) {
                cost = 12500000;
            } else if (getGuild().getCapacity() == 40) {
                cost = 17500000;
            } else if (getGuild().getCapacity() == 45) {
                cost = 22500000;
            } else if (getGuild().getCapacity() == 50) {
                cost = 27500000;
            } else if (getGuild().getCapacity() == 55) {
                cost = 32500000;
            } else if (getGuild().getCapacity() == 60) {
                cost = 37500000;
            } else if (getGuild().getCapacity() == 65) {
                cost = 42500000;
            } else if (getGuild().getCapacity() == 70) {
                cost = 47500000;
            } else if (getGuild().getCapacity() == 75) {
                cost = 52500000;
            } else if (getGuild().getCapacity() == 80) {
                cost = 57500000;
            } else if (getGuild().getCapacity() == 85) {
                cost = 62500000;
            } else if (getGuild().getCapacity() == 90) {
                cost = 67500000;
            } else if (getGuild().getCapacity() == 95) {
                cost = 72500000;
            }
    
            return cost;
    }
    increaseGuildCapacity()
    Code:
    public void increaseGuildCapacity() {
            if (this.getMeso() < capacityCost()) {
                client.getSession().write(MaplePacketCreator.serverNotice(1, "You do not have enough mesos."));
                return;
            }
    
            if (this.guildid <= 0) {
                log.info(this.name + " is trying to increase guild capacity without being in the guild.");
                return;
            }
    
            try {
                client.getChannelServer().getWorldInterface().increaseGuildCapacity(this.guildid);
            } catch (RemoteException e) {
                client.getChannelServer().reconnectWorld();
                log.error("Error while increasing capacity.", e);
                return;
            }
    
            this.gainMeso(-capacityCost(), true, false, true);
        }
    getGuild()
    Code:
    public MapleGuild getGuild() {
            try {
                return getClient().getChannelServer().getWorldInterface().getGuild(getGuildId(), null);
            } catch (RemoteException ex) {
                client.getChannelServer().reconnectWorld();
            }
            return null;
        }


  2. #2
    Alpha Member watzmename is offline
    MemberRank
    Aug 2008 Join Date
    2,835Posts

    Re: Correct capacityCost()

    Isn't it just entirely free now to increase guild cap in gMS?

  3. #3
    Account Upgraded | Title Enabled! ItzMe is offline
    MemberRank
    Apr 2009 Join Date
    413Posts

    Re: Correct capacityCost()

    Quote Originally Posted by watzmename View Post
    Isn't it just entirely free now to increase guild cap in gMS?
    Nope it isnt lol
    btw nice release

  4. #4
    Alpha Member watzmename is offline
    MemberRank
    Aug 2008 Join Date
    2,835Posts

    Re: Correct capacityCost()

    Really? Basil lied to me.

  5. #5
    Account Upgraded | Title Enabled! flav is offline
    MemberRank
    Jul 2008 Join Date
    655Posts

    Re: Correct capacityCost()

    Quote Originally Posted by watzmename View Post
    Isn't it just entirely free now to increase guild cap in gMS?
    I don't think so, I know that you had to pay these prices in v62 and I am sure that you still have to pay for increasing in v66.

  6. #6
    Account Upgraded | Title Enabled! ItzMe is offline
    MemberRank
    Apr 2009 Join Date
    413Posts

    Re: Correct capacityCost()

    Quote Originally Posted by flav View Post
    I don't think so, I know that you had to pay these prices in v62 and I am sure that you still have to pay for increasing in v66.
    Yup
    i dont think they will make it for free lol

  7. #7
    Account Upgraded | Title Enabled! ProGamerForLife is offline
    MemberRank
    Sep 2008 Join Date
    iTouchMsLocation
    1,195Posts

    Re: Correct capacityCost()

    Quote Originally Posted by watzmename View Post
    Really? Basil lied to me.
    they made it like 5k an increase
    but that was cause nexon is a bunch of nubs that forgot to correct that.
    but now its fixed so
    Meh.

  8. #8
    Account Upgraded | Title Enabled! desert123100 is offline
    MemberRank
    Aug 2008 Join Date
    In a boxLocation
    837Posts

    Re: Correct capacityCost()

    It WAS free for a while, I guess nexon messed up? But they fixed it.

  9. #9
    Account Upgraded | Title Enabled! PinkGatsby is offline
    MemberRank
    Mar 2009 Join Date
    AmericaLocation
    434Posts

    Re: Correct capacityCost()

    - Not everything has to go into MapleCharacter.
    - Use a switch statement

    Other than that good job.

  10. #10
    Account Upgraded | Title Enabled! OreansSucks is offline
    MemberRank
    Mar 2009 Join Date
    276Posts

    Re: Correct capacityCost()

    PHP Code:
    public int capacityCost() {
            
    int cost 500000;
             if (
    getGuild().getCapacity() == 15)  cost 1500000;
             else if (
    getGuild().getCapacity() == 20cost 2500000;
             else if (
    getGuild().getCapacity() == 25cost 3500000;
             else if (
    getGuild().getCapacity() == 30cost 7500000;
             else if (
    getGuild().getCapaciy() > 30cost 7500000+1000000*(35-getGuild().getCapacity());
             return 
    cost
    i win?

  11. #11
    Account Upgraded | Title Enabled! steerclear is offline
    MemberRank
    Apr 2009 Join Date
    Upstate, NYLocation
    488Posts

    Re: Correct capacityCost()

    Quote Originally Posted by OreansSucks View Post
    PHP Code:
    public int capacityCost() {
            
    int cost 500000;
             if (
    getGuild().getCapacity() == 15)  cost 1500000;
             else if (
    getGuild().getCapacity() == 20cost 2500000;
             else if (
    getGuild().getCapacity() == 25cost 3500000;
             else if (
    getGuild().getCapacity() == 30cost 7500000;
             else if (
    getGuild().getCapaciy() > 30cost 7500000+1000000*(35-getGuild().getCapacity());
             return 
    cost
    i win?
    Wow nice.. So short rofl

  12. #12
    Account Upgraded | Title Enabled! flav is offline
    MemberRank
    Jul 2008 Join Date
    655Posts

    Re: Correct capacityCost()

    Quote Originally Posted by PinkGatsby View Post
    - Not everything has to go into MapleCharacter.
    - Use a switch statement

    Other than that good job.
    I know but capacityCost() was already in there, why should I change it?

    Quote Originally Posted by OreansSucks View Post
    PHP Code:
    public int capacityCost() {
            
    int cost 500000;
             if (
    getGuild().getCapacity() == 15)  cost 1500000;
             else if (
    getGuild().getCapacity() == 20cost 2500000;
             else if (
    getGuild().getCapacity() == 25cost 3500000;
             else if (
    getGuild().getCapacity() == 30cost 7500000;
             else if (
    getGuild().getCapaciy() > 30cost 7500000+1000000*(35-getGuild().getCapacity());
             return 
    cost
    i win?
    Guess so...

  13. #13
    Account Upgraded | Title Enabled! CharlieBoy is offline
    MemberRank
    Mar 2009 Join Date
    SwedenLocation
    471Posts

    Re: Correct capacityCost()

    Quote Originally Posted by OreansSucks View Post
    PHP Code:
    public int capacityCost() {
            
    int cost 500000;
             if (
    getGuild().getCapacity() == 15)  cost 1500000;
             else if (
    getGuild().getCapacity() == 20cost 2500000;
             else if (
    getGuild().getCapacity() == 25cost 3500000;
             else if (
    getGuild().getCapacity() == 30cost 7500000;
             else if (
    getGuild().getCapaciy() > 30cost 7500000+1000000*(35-getGuild().getCapacity());
             return 
    cost
    i win?
    Lol nice :D very shoort =p
    ya you win.. <.< Good realese thought.

  14. #14
    Member MurasakiKyouki is offline
    MemberRank
    Jan 2009 Join Date
    66Posts

    Re: Correct capacityCost()

    Quote Originally Posted by OreansSucks View Post
    PHP Code:
    public int capacityCost() {
            
    int cost 500000;
             if (
    getGuild().getCapacity() == 15)  cost 1500000;
             else if (
    getGuild().getCapacity() == 20cost 2500000;
             else if (
    getGuild().getCapacity() == 25cost 3500000;
             else if (
    getGuild().getCapacity() == 30cost 7500000;
             else if (
    getGuild().getCapaciy() > 30cost 7500000+1000000*(35-getGuild().getCapacity());
             return 
    cost
    i win?
    No, you forgot to close the method.

  15. #15
    Account Upgraded | Title Enabled! flav is offline
    MemberRank
    Jul 2008 Join Date
    655Posts

    Re: Correct capacityCost()

    True...
    Code:
    public int capacityCost() {
            int cost = 500000;
             if (getGuild().getCapacity() == 15)  cost = 1500000;
             else if (getGuild().getCapacity() == 20) cost = 2500000;
             else if (getGuild().getCapacity() == 25) cost = 3500000;
             else if (getGuild().getCapacity() == 30) cost = 7500000;
             else if (getGuild().getCapaciy() > 30) cost = 7500000+1000000*(35-getGuild().getCapacity());
             return cost;
    }
    Winner!



Page 1 of 3 123 LastLast

Advertisement