[Add-On] Item Upgrader || @watk with @str / @dex / @int / @luk

Page 1 of 2 12 LastLast
Results 1 to 15 of 30
  1. #1
    Account Upgraded | Title Enabled! Sharky is offline
    True MemberRank
    Dec 2010 Join Date
    Ur Mom's Pants.Location
    927Posts

    [Add-On] Item Upgrader || @watk with @str / @dex / @int / @luk


    RaGEZONE Recommends

    RaGEZONE Recommends

    This is an updated version of the normal @str / @dex / @luk / @int commands for adding stats quickly. You can type @watk <amount>, and if your ap is 5x that amount, your current equipped weapon's weapon attack will be increased by the number, your character will be reloaded, so it will take effect, and you will get a nice little dropmessage saying your weapon has been upgraded by whatever weapon attack. If you have two equipped weapons (one regular, one nexon), the item id that is less will prevail and get the upgrade, so I suggest only having one weapon equipped when doing this.

    First, add this to MapleCharacter.java (if you don't already have it):
    PHP Code:
    public void reloadChar() {
    getClient().getSession().write(MaplePacketCreator.getCharInfo(this));
    getMap().removePlayer(this);
    getMap().addPlayer(this);

    Now this is the replacement @str / @dex / @luk / @int command, so put this in your Commands.java if your using Moople, and whatever your file for player commands is in other sources. If your using another source, use your head here, there will have to be some modifications.
    PHP Code:
    } else if (sub[0].equalsIgnoreCase("str") || sub[0].equalsIgnoreCase("int") || sub[0].equalsIgnoreCase("luk") || sub[0].equalsIgnoreCase("dex") || sub[0].equalsIgnoreCase("watk")) {
    int amount Integer.parseInt(sub[1]);
    boolean str sub[0].equalsIgnoreCase("str");
    boolean Int sub[0].equalsIgnoreCase("int");
    boolean luk sub[0].equalsIgnoreCase("luk");
    boolean dex sub[0].equalsIgnoreCase("dex");
    boolean watk sub[0].equalsIgnoreCase("watk");
    if (
    amount && amount <= chr.getRemainingAp() && amount <= 29996 || amount && amount >= -29996 && Math.abs(amount) + chr.getRemainingAp() <= 29996) {
    if (
    str && amount chr.getStr() <= 30000 && amount chr.getStr() >= 4) {
    chr.setStr(chr.getStr() + amount);
    chr.updateSingleStat(MapleStat.STRchr.getStr());
    chr.setRemainingAp(chr.getRemainingAp() - amount);
    chr.updateSingleStat(MapleStat.AVAILABLEAPchr.getRemainingAp());
    } else if (
    Int && amount chr.getInt() <= 30000 && amount chr.getInt() >= 4) {
    chr.setInt(chr.getInt() + amount);
    chr.updateSingleStat(MapleStat.INTchr.getInt());
    chr.setRemainingAp(chr.getRemainingAp() - amount);
    chr.updateSingleStat(MapleStat.AVAILABLEAPchr.getRemainingAp());
    } else if (
    luk && amount chr.getLuk() <= 30000 && amount chr.getLuk() >= 4) {
    chr.setLuk(chr.getLuk() + amount);
    chr.updateSingleStat(MapleStat.LUKchr.getLuk());
    chr.setRemainingAp(chr.getRemainingAp() - amount);
    chr.updateSingleStat(MapleStat.AVAILABLEAPchr.getRemainingAp());
    } else if (
    dex && amount chr.getDex() <= 30000 && amount chr.getDex() >= 4) {
    chr.setDex(chr.getDex() + amount);
    chr.updateSingleStat(MapleStat.DEXchr.getDex());
    chr.setRemainingAp(chr.getRemainingAp() - amount);
    chr.updateSingleStat(MapleStat.AVAILABLEAPchr.getRemainingAp());
    } else if (
    watk){
    int wepatk Integer.parseInt(sub[1]);
    int reqap wepatk 5itemid 0;
    for(
    IItem item chr.getInventory(MapleInventoryType.EQUIPPED)) {
    for(
    int i 13020001702251i++) {
    if(
    item.getItemId() == i){
    itemid i;
    break;
    }
    }
    }
    Equip eItem = (Equipchr.getInventory(MapleInventoryType.EQUIPPED).findById(itemid);
    if(
    chr.getRemainingAp() >= reqap){
    eItem.setWatk((short) (eItem.getWatk() + wepatk));
    chr.setRemainingAp(chr.getRemainingAp() - reqap);
    chr.reloadChar();
    chr.dropMessage("You have successfully added "wepatk +" weapon attack to your currently equipped weapon.");
    } else 
    chr.dropMessage("You need "reqap +" to add "wepatk +" to your equipped weapon.");
    }
    } else 
    chr.dropMessage("Please make sure the stat you are trying to raise is not over 32,767 or under 4.");

    And if you don't want to merge those commands, you can use this for an item upgrader or whatever, idc.
    PHP Code:
    } else if (sub[0].equals("upgradeweapon")){
    int wepatk Integer.parseInt(sub[1]);
    int reqap wepatk 5itemid 0;
    for(
    IItem item chr.getInventory(MapleInventoryType.EQUIPPED)) {
    for(
    int i 13020001702251i++) {
    if(
    item.getItemId() == i){
    itemid i;
    break;
    }
    }
    }
    Equip eItem = (Equipchr.getInventory(MapleInventoryType.EQUIPPED).findById(itemid);
    if(
    chr.getRemainingAp() >= reqap){
    eItem.setWatk((short) (eItem.getWatk() + wepatk));
    chr.setRemainingAp(chr.getRemainingAp() - reqap);
    chr.reloadChar();
    chr.dropMessage("You have successfully added "wepatk +" weapon attack to your currently equipped weapon.");
    } else 
    chr.dropMessage("You need "reqap +" to add "wepatk +" to your equipped weapon.");

    If you want to edit the ap requirement (5x the wep atk), modify the reqap variable.

    Feel free to post your comments, flames, more efficient ways of doing this, whatever you'd like. If your missing any methods or have a question, just post it here. Have fun.
    Last edited by Shawn; 06-08-11 at 03:43 AM.


  2. #2
    Account Inactive E1337Recon is offline
    InactiveRank
    Oct 2010 Join Date
    46Posts

    Re: [Add-On] Item Upgrader || @watk with @str / @dex / @int / @luk

    Looks promising. Keep up the good work!

  3. #3
    Alpha Member Soulfist is offline
    Alpha MaleRank
    Dec 2010 Join Date
    a hovelLocation
    1,835Posts

    Re: [Add-On] Item Upgrader || @watk with @str / @dex / @int / @luk

    Good Job Chris, we should have gone with one of my idea's though :'<

  4. #4
    Account Inactive HorrorChix89 is offline
    InactiveRank
    May 2010 Join Date
    ArkansasLocation
    1,279Posts

    Re: [Add-On] Item Upgrader || @watk with @str / @dex / @int / @luk

    Looks good to me. I like upgrading weapons and it seems players do as well. Thanks :)

  5. #5
    Account Upgraded | Title Enabled! AuroX is offline
    True MemberRank
    Sep 2008 Join Date
    1,435Posts

    Re: [Add-On] Item Upgrader || @watk with @str / @dex / @int / @luk

    This will ruin the economy =( sobbed

  6. #6
    Alpha Member Soulfist is offline
    Alpha MaleRank
    Dec 2010 Join Date
    a hovelLocation
    1,835Posts

    Re: [Add-On] Item Upgrader || @watk with @str / @dex / @int / @luk

    Quote Originally Posted by HorrorChix89 View Post
    Looks good to me. I like upgrading weapons and it seems players do as well. Thanks :)
    You just like every release dont you

  7. #7
    Account Upgraded | Title Enabled! Sharky is offline
    True MemberRank
    Dec 2010 Join Date
    Ur Mom's Pants.Location
    927Posts

    Re: [Add-On] Item Upgrader || @watk with @str / @dex / @int / @luk

    Quote Originally Posted by yenpooh View Post
    This will ruin the economy =( sobbed
    Well, it's meant for high-rate servers, which don't have much of an economy anyways. It could be modified for a server that actually has an economy imo XD

  8. #8
    Account Inactive HorrorChix89 is offline
    InactiveRank
    May 2010 Join Date
    ArkansasLocation
    1,279Posts

    Re: [Add-On] Item Upgrader || @watk with @str / @dex / @int / @luk

    Quote Originally Posted by Soulfist View Post
    You just like every release dont you
    Just for you i'll stop liking the releases that actually make sense to me and just troll on them. Would that make you happy sir?

  9. #9
    Alpha Member Soulfist is offline
    Alpha MaleRank
    Dec 2010 Join Date
    a hovelLocation
    1,835Posts

    Re: [Add-On] Item Upgrader || @watk with @str / @dex / @int / @luk

    I didn't mean clicking the "like" button. I meant you go around and look at every single release and praise it o-O.

  10. #10
    Account Upgraded | Title Enabled! Sharky is offline
    True MemberRank
    Dec 2010 Join Date
    Ur Mom's Pants.Location
    927Posts

    Re: [Add-On] Item Upgrader || @watk with @str / @dex / @int / @luk

    Let's stay on-topic here people. <-- Says this hypocrite.

  11. #11
    TranquilityStory JarrYD is offline
    True MemberRank
    Jan 2010 Join Date
    767Posts

    Re: [Add-On] Item Upgrader || @watk with @str / @dex / @int / @luk

    awesome. good job. i recon you should change it to @upgradestr etc.

  12. #12
    Member XiiaoBspZaii is offline
    MemberRank
    Nov 2009 Join Date
    Malaysia•Location
    80Posts

    Re: [Add-On] Item Upgrader || @watk with @str / @dex / @int / @luk

    Very nice. :)
    Thanks for release.

  13. #13
    Account Inactive iConfess is offline
    InactiveRank
    Dec 2009 Join Date
    110Posts

    Re: [Add-On] Item Upgrader || @watk with @str / @dex / @int / @luk

    good release
    Last edited by iConfess; 08-02-11 at 01:50 PM.

  14. #14
    Account Upgraded | Title Enabled! SeiZeD is offline
    True MemberRank
    Apr 2010 Join Date
    In my Fridge~Location
    271Posts

    Re: [Add-On] Item Upgrader || @watk with @str / @dex / @int / @luk

    Nice Release Man.

  15. #15
    Account Upgraded | Title Enabled! Sharky is offline
    True MemberRank
    Dec 2010 Join Date
    Ur Mom's Pants.Location
    927Posts

    Re: [Add-On] Item Upgrader || @watk with @str / @dex / @int / @luk

    Thanks guys! If anyone has something they want me to code and release, I'll think about it. Post it here.




Page 1 of 2 12 LastLast

Advertisement