It's should work.. U need to choose what u want to reset, Str, Dex, Int or Luk. Here it is :
P.S. Please put your opinion for thet even if u don't gonna use thet =)Code:// Costum stat reset made by Adi Shochat var wui = 0; function start() { cm.sendOk ("Hello and welcome~! Do you want to reset:\r\n#L1#Str#l\r\n\#L2#Dex#l\r\n\#L3#Int#l\r\n\#L4#Luk#l\r\n\#L5#All#l"); } function action(mode, type, selection) { } else if (status == 1) { if (selection == 1) { wui = 1; var statup = new java.util.ArrayList(); var p = cm.c.getPlayer(); var totAp = p.getRemainingAp() + p.getStr(); p.setStr(4); statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.STR, java.lang.Integer.valueOf(4))); statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.AVAILABLEAP, java.lang.Integer.valueOf(p.getRemainingAp()))); } cm.dispose(); } if (selection == 2) { wui = 1; var statup = new java.util.ArrayList(); var p = cm.c.getPlayer(); var totAp = p.getRemainingAp() + p.getDex(); p.setDex(4); statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.DEX, java.lang.Integer.valueOf(4))); statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.AVAILABLEAP, java.lang.Integer.valueOf(p.getRemainingAp()))); } if (selection == 3) { wui = 1; var statup = new java.util.ArrayList(); var p = cm.c.getPlayer(); var totAp = p.getRemainingAp() + p.getInt(); p.setInt(4); statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.INT, java.lang.Integer.valueOf(4))); statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.AVAILABLEAP, java.lang.Integer.valueOf(p.getRemainingAp()))); } if (selection == 4) { wui = 1; var statup = new java.util.ArrayList(); var p = cm.c.getPlayer(); var totAp = p.getRemainingAp() + p.getLuk(); p.setLuk(4); statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.LUK, java.lang.Integer.valueOf(4))); statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.AVAILABLEAP, java.lang.Integer.valueOf(p.getRemainingAp()))); } if (selection == 5) { wui = 1; var statup = new java.util.ArrayList(); var p = cm.c.getPlayer(); var totAp = p.getRemainingAp() + p.getStr() + p.getDex() + p.getInt() + p.getLuk(); p.setStr(4); p.setDex(4); p.setInt(4); p.setLuk(4); statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.STR, java.lang.Integer.valueOf(4))); statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.DEX, java.lang.Integer.valueOf(4))); statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.LUK, java.lang.Integer.valueOf(4))); statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.INT, java.lang.Integer.valueOf(4))); statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.AVAILABLEAP, java.lang.Integer.valueOf(p.getRemainingAp()))); p.getClient().getSession().write (net.sf.odinms.tools.MaplePacketCreator.updatePlayerStats(statup)); cm.sendOk ("Done"); } }
Here is the almost same, just i used the other guy code abit :
Code:/* AP Reset by Choose By Adi Shochat and Kedano =) */ var status = 0; var wui = 0; function start() { status = -1; action(1, 0, 0); } function action(mode, type, selection) { if (mode == -1) { cm.dispose(); } else { if (status >= 0 && mode == 0) { cm.dispose(); return; } if (mode == 1) status++; else status--; if (status == 0) { cm.sendSimple ("Hi. Would you like to resets your stats? \b\r\n#L0#Reset All#l\r\n#L1#Reset STR#l\r\n#L2#Reset DEX#l\r\n#L3#Reset INT#l\r\n#L4#Reset LUK#l"); } else if (status == 1) { if (selection == 0) { var statup = new java.util.ArrayList(); var p = cm.c.getPlayer(); var totAp = p.getRemainingAp() + p.getStr() + p.getDex() + p.getInt() + p.getLuk(); if (totAp < 30016) { p.setStr(4); p.setDex(4); p.setInt(4); p.setLuk(4); p.setRemainingAp (totAp - 16); statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.STR, java.lang.Integer.valueOf(4))); statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.DEX, java.lang.Integer.valueOf(4))); statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.LUK, java.lang.Integer.valueOf(4))); statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.INT, java.lang.Integer.valueOf(4))); statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.AVAILABLEAP, java.lang.Integer.valueOf(p.getRemainingAp()))); p.getClient().getSession().write (net.sf.odinms.tools.MaplePacketCreator.updatePlayerStats(statup)); cm.sendOk ("Okay. Your stats have been reset!"); cm.dispose(); } else if (totAp >= 30016) { cm.sendOk ("Your total AP is more than 30000. Please reset seperately."); cm.dispose(); } } else if (selection == 1) { var statup = new java.util.ArrayList(); var p = cm.c.getPlayer(); var totAp = p.getRemainingAp() + p.getStr(); if (totAp < 30004) { p.setStr(4); p.setRemainingAp (totAp - 4); statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.STR, java.lang.Integer.valueOf(4))); statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.AVAILABLEAP, java.lang.Integer.valueOf(p.getRemainingAp()))); p.getClient().getSession().write (net.sf.odinms.tools.MaplePacketCreator.updatePlayerStats(statup)); cm.sendOk ("Okay. Your stats have been reset!"); cm.dispose(); } else if (totAp >= 30004) { cm.sendOk ("#bPut AP before u reset him !#k -_- u had nothing to reset"); cm.dispose(); } } else if (selection == 2) { var statup = new java.util.ArrayList(); var p = cm.c.getPlayer(); var totAp = p.getRemainingAp() + p.getDex(); if (totAp < 30004) { p.setDex(4); p.setRemainingAp (totAp - 4); statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.DEX, java.lang.Integer.valueOf(4))); statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.AVAILABLEAP, java.lang.Integer.valueOf(p.getRemainingAp()))); p.getClient().getSession().write (net.sf.odinms.tools.MaplePacketCreator.updatePlayerStats(statup)); cm.sendOk ("Okay. Your stats have been reset!"); cm.dispose(); } else if (totAp >= 30004) { cm.sendOk ("#bPut AP before u reset him !#k -_- u had nothing to reset"); cm.dispose(); } } else if (selection == 3) { var statup = new java.util.ArrayList(); var p = cm.c.getPlayer(); var totAp = p.getRemainingAp() + p.getInt(); if (totAp < 30004) { p.setInt(4); p.setRemainingAp (totAp - 4); statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.INT, java.lang.Integer.valueOf(4))); statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.AVAILABLEAP, java.lang.Integer.valueOf(p.getRemainingAp()))); p.getClient().getSession().write (net.sf.odinms.tools.MaplePacketCreator.updatePlayerStats(statup)); cm.sendOk ("Okay. Your stats have been reset!"); cm.dispose(); } else if (totAp >= 30004) { cm.sendOk ("#bPut AP before u reset him !#k -_- u had nothing to reset"); cm.dispose(); } } else if (selection == 4) { var statup = new java.util.ArrayList(); var p = cm.c.getPlayer(); var totAp = p.getRemainingAp() + p.getLuk(); if (totAp < 30004) { p.setLuk(4); p.setRemainingAp (totAp - 4); statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.LUK, java.lang.Integer.valueOf(4))); statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.AVAILABLEAP, java.lang.Integer.valueOf(p.getRemainingAp()))); p.getClient().getSession().write (net.sf.odinms.tools.MaplePacketCreator.updatePlayerStats(statup)); cm.sendOk ("Okay. Your stats have been reset!"); cm.dispose(); } else if (totAp >= 30004) { cm.sendOk ("#bPut AP before u reset him !#k -_- u had nothing to reset"); cm.dispose(); } } } } }


Reply With Quote

