- Joined
- Jul 30, 2008
- Messages
- 16
- Reaction score
- 0
Here is the edited one, thanks to those guy that encourage me. The reason i release it because there is alot of people using repack and dont have @exp command. The formatting of the java script is like this without indent and outdent is that it is hard to set here.
* Changes- Remove the add level and add ap, it set exp to 0 when it is negative.
* Any Kind soul can teach me how to format the script nicely here, as i paste from my netbean it look ok but here all the formating change.
The code do work for goodness say for those saying what syntax error. I do make the mistake of forgeting 2 semicolon.
Hi all, this may be a bit outdated release for some of you,
but someone may need this especially those using repack
that dont have the @exp command.
This npc script that let u reset stats as well as fix negative exp
(Check if exp is negative, if negative set to 0). Prompt you
dont have negative exp if that person is trying to fix negative exp.
Feel free to edit this. This is my first npc script that i have done.
This actually my 2101.js for heena and place her in my fm. You
can copy the whole code and put in other npc that you like.
* Changes- Remove the add level and add ap, it set exp to 0 when it is negative.
* Any Kind soul can teach me how to format the script nicely here, as i paste from my netbean it look ok but here all the formating change.
The code do work for goodness say for those saying what syntax error. I do make the mistake of forgeting 2 semicolon.
Hi all, this may be a bit outdated release for some of you,
but someone may need this especially those using repack
that dont have the @exp command.
This npc script that let u reset stats as well as fix negative exp
(Check if exp is negative, if negative set to 0). Prompt you
dont have negative exp if that person is trying to fix negative exp.
Feel free to edit this. This is my first npc script that i have done.
This actually my 2101.js for heena and place her in my fm. You
can copy the whole code and put in other npc that you like.
Code:
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <[email protected]>
Matthias Butz <[email protected]>
Jan Christian Meyer <[email protected]>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation. You may not use, modify
or distribute this program under any other version of the
GNU Affero General Public License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
======>Heena npcid 2001<======
*/
function start() {
cm.sendSimple ("\r\n#L0#Reset your Stats!#l\r\n#L1#Fix your negative EXP!");
}
function action(mode, type, selection) {
cm.dispose();
if (selection == 0) {
var p = cm.c.getPlayer();
var statup = new java.util.ArrayList();
var totAp = p.getRemainingAp() + p.getStr() + p.getDex() + p.getInt() + p.getLuk();
p.setStr(4);
p.setDex(4);
p.setInt(4);
p.setLuk(4);
p.setRemainingAp (totAp);
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())));
statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.EXP, java.lang.Integer.valueOf(0)));
p.getClient().getSession().write (net.sf.odinms.tools.MaplePacketCreator.updatePlayerStats(statup));
cm.dispose;
} else if (selection == 1) {
var p = cm.c.getPlayer();
var exp = p.getExp();
if( exp < 0) {
var statup = new java.util.ArrayList();
statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.EXP, java.lang.Integer.valueOf(0)));
p.getClient().getSession().write (net.sf.odinms.tools.MaplePacketCreator.updatePlayerStats(statup));
cm.dispose();
}else{
cm.sendOk("You Dont have negative exp");
cm.dispose();
}
}else{
cm.dispose();
}
}
Last edited: