Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Stat reset by Choose

Initiate Mage
Joined
Apr 12, 2008
Messages
9
Reaction score
0
It's should work.. U need to choose what u want to reset, Str, Dex, Int or Luk. Here it is :

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");
 }
}

P.S. Please put your opinion for thet even if u don't gonna use thet =)


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(); }
			}
		}
	}
}
 
Initiate Mage
Joined
Apr 12, 2008
Messages
9
Reaction score
0
Re: [Release]Stat reset by Choose

really ? can i have the link ?
 
Banned
Banned
Joined
Aug 21, 2008
Messages
83
Reaction score
0
Re: [Release]Stat reset by Choose

i dont have the link but
Code:
/*

Multi-purpose:
AP adding NPC
AP reset NPC

Made by 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\r\n#L5#Add all to STR#l\r\n#L6#Add all to DEX#l\r\n#L7#Add all to INT#l\r\n#L8#Add all to LUK");
		} 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 ("Please add your AP accordingly before you 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 ("Please add your AP accordingly before you 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 ("Please add your AP accordingly before you 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 ("Please add your AP accordingly before you reset.");
					cm.dispose(); }
				}
			else if (selection == 5) {
				var statup = new java.util.ArrayList();
				var p = cm.c.getPlayer();
				var newStr = p.getRemainingAp() + p.getStr();
				if (newStr < 30000) {
				p.setStr(newStr);
				p.setRemainingAp (0);
				statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.STR, java.lang.Integer.valueOf(p.getStr())));
				statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.AVAILABLEAP, java.lang.Integer.valueOf(0)));
		
				p.getClient().getSession().write (net.sf.odinms.tools.MaplePacketCreator.updatePlayerStats(statup));
				cm.sendOk ("Okay. Your stats have been added!");
				cm.dispose();
				} else if (newStr >= 30000) {
					p.setStr(29999);
					p.setRemainingAp (newStr - 29999);
					statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.STR, java.lang.Integer.valueOf(p.getStr())));
					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 added!");
					cm.dispose(); }
				}
			else if (selection == 6) {
				var statup = new java.util.ArrayList();
				var p = cm.c.getPlayer();
				var newDex = p.getRemainingAp() + p.getDex();
				if (newDex < 30000) {
				p.setDex(newDex);
				p.setRemainingAp (0);
				statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.DEX, java.lang.Integer.valueOf(p.getDex())));
				statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.AVAILABLEAP, java.lang.Integer.valueOf(0)));
		
				p.getClient().getSession().write (net.sf.odinms.tools.MaplePacketCreator.updatePlayerStats(statup));
				cm.sendOk ("Okay. Your stats have been added!");
				cm.dispose();
				} else if (newDex >= 30000) {
					p.setDex(29999);
					p.setRemainingAp (newDex - 29999);
					statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.DEX, java.lang.Integer.valueOf(p.getDex())));
					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 added!");
					cm.dispose(); }
				}
			else if (selection == 7) {
				var statup = new java.util.ArrayList();
				var p = cm.c.getPlayer();
				var newInt = p.getRemainingAp() + p.getInt();
				if (newInt < 30000) {
				p.setInt(newInt);
				p.setRemainingAp (0);
				statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.INT, java.lang.Integer.valueOf(p.getInt())));
				statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.AVAILABLEAP, java.lang.Integer.valueOf(0)));
		
				p.getClient().getSession().write (net.sf.odinms.tools.MaplePacketCreator.updatePlayerStats(statup));
				cm.sendOk ("Okay. Your stats have been added!");
				cm.dispose();
				} else if (newInt >= 30000) {
					p.setInt(29999);
					p.setRemainingAp (newInt - 29999);
					statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.INT, java.lang.Integer.valueOf(p.getInt())));
					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 added!");
					cm.dispose(); }
				}
			else if (selection == 8) {
				var statup = new java.util.ArrayList();
				var p = cm.c.getPlayer();
				var newLuk = p.getRemainingAp() + p.getLuk();
				if (newLuk < 30000) {
				p.setLuk(newLuk);
				p.setRemainingAp (0);
				statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.LUK, java.lang.Integer.valueOf(p.getLuk())));
				statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.AVAILABLEAP, java.lang.Integer.valueOf(0)));
		
				p.getClient().getSession().write (net.sf.odinms.tools.MaplePacketCreator.updatePlayerStats(statup));
				cm.sendOk ("Okay. Your stats have been added!");
				cm.dispose();
				} else if (newLuk >= 30000) {
					p.setLuk(29999);
					p.setRemainingAp (newLuk - 29999);
					statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.LUK, java.lang.Integer.valueOf(p.getLuk())));
					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 added!");
					cm.dispose(); }
				}
			}
		}
	}
 
Legendary Battlemage
Member
Joined
Dec 7, 2007
Messages
622
Reaction score
11
Re: [Release]Stat reset by Choose

Yea This is Old I have it on my server already
 
Initiate Mage
Joined
May 18, 2008
Messages
70
Reaction score
0
Re: [Release]Stat reset by Choose

Thanks, i was looking for one.
 
Initiate Mage
Joined
Aug 8, 2008
Messages
6
Reaction score
0
Re: [Release]Stat reset by Choose

yeah, but some people are lazy to use search button or your best friend google lol ;]
 
Isenheart .
Member
Joined
Jul 26, 2008
Messages
476
Reaction score
0
Re: [Release]Stat reset by Choose

I'm starting to wonder, what does people think with, seriously.. it can't be the brain, or can it?
 
Initiate Mage
Joined
Apr 12, 2008
Messages
9
Reaction score
0
Re: [Release]Stat reset by Choose

I use the serch bottum and don't found.. i serch for : ap reset npc and serch until page 6, i didn't found so i made one..
 
Experienced Elementalist
Joined
Jul 18, 2008
Messages
232
Reaction score
0
Re: [Release]Stat reset by Choose

well den use
win
 
Custom Title Activated
Member
Joined
Apr 5, 2008
Messages
1,025
Reaction score
5
Re: [Release]Stat reset by Choose

nice stat resetter :)
 
Back
Top