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!

NimaKIN Does Hair and Maxes Stats! some more..(All gender)

Status
Not open for further replies.
Newbie Spellweaver
Joined
Jun 15, 2008
Messages
99
Reaction score
0
NimaKIN - 9900001

This NPC Gives a list of things to change on character. The defaults and I replaced Skin with Max Stats. You can add it back. (I don't change my Skin color much...)


PHP:
var status = 0;
var beauty = 0;
var haircolor = Array();
var hair = Array(30000, 30010, 30020, 30030, 30040, 30050, 30060, 30100, 30110, 30120, 30130, 30140, 30150, 30160, 30170, 30180, 30190, 30200, 30210, 30220, 30230, 30240, 30250, 30260, 30270, 30280, 30290, 30300, 30310, 30320, 30330, 30340, 30350, 30360, 30370, 30400, 30410, 30420, 30430, 30440, 30450, 30460, 30470, 30480, 30490, 30510, 30520, 30530, 30540, 30550, 30560, 30570, 30580, 30590, 30600, 30610, 30620, 30630, 30640, 30650, 30660, 30700, 30710, 30720);
var hairnew = Array();
var face = Array(20000, 20001, 20002, 20003, 20004, 20005, 20006, 20007, 20008, 20009, 20010, 20011, 20012, 20013, 20014, 20016, 20017, 20018, 20019, 20020, 20021, 20022, 20023);
var facenew = Array();
var colors = Array();

function start() {
	status = -1;
	action(1, 0, 0);
}

function action(mode, type, selection) {
	if (mode == -1) {
		cm.dispose();
	} else {
		if (mode == 0 && status == 0) {
			cm.dispose();
			return;
		}
		if (mode == 1)
			status++;
		else
			status--;
		if (status == 0) {
			if(cm.getChar().isGM() == false) {
				cm.sendOk("You aren't a GM!");
				cm.dispose();
			} else {
				if(cm.getChar().getGender() == 0) {
					cm.sendSimple("Hey there! I could change the way you look! What would you like to change?\r\n#L0#Max AP#l\r\n#L1#Hair#l\r\n#L2#Hair Color#l\r\n#L3#Eye#l\r\n#L4#Eye Color#l");
				} else {
					cm.dispose();
				}
			}
		} 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();
		p.setStr(30000);
		p.setDex(30000);
		p.setInt(30000);
		p.setLuk(30000);
		p.setRemainingAp (totAp - 1);
		statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.STR, java.lang.Integer.valueOf(30000)));
		statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.DEX, java.lang.Integer.valueOf(30000)));
		statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.LUK, java.lang.Integer.valueOf(30000)));
		statup.add (new net.sf.odinms.tools.Pair(net.sf.odinms.client.MapleStat.INT, java.lang.Integer.valueOf(30000)));
		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 ("Ok, your stats have been changed. Have a lot of fun");
                cm.dispose();
	} else if (selection == 1) {
				beauty = 2;
				hairnew = Array();
				for(var i = 0; i < hair.length; i++) {
					//hairnew.push(hair[i] + parseInt(cm.getChar().getHair() % 10));
					if (hair[i] == 30100 || hair[i] == 30010){
						hairnew.push(hair[i]);
					} else {
						hairnew.push(hair[i] + parseInt(cm.getChar().getHair() % 10));
					}
				}
				cm.sendStyle("Pick one?", hairnew);
			} else if (selection == 2) {
				beauty = 3;
				haircolor = Array();
				//var current = parseInt(cm.getChar().getHair()/10)*10;
				//for(var i = 0; i < 8; i++) {
				//	haircolor.push(current + i);
				var current = parseInt(cm.getChar().getHair()/10)*10;
				if(current == 30100){ // check for bad combos. several for fantasy
						haircolor = Array(current , current + 1, current + 2, current + 3, current +4);
				} else if (current == 30010){ // zeta only allows black
						haircolor = Array(current);
				} else {
					for(var i = 0; i < 8; i++) {
						haircolor.push(current + i);
					}
				}
				cm.sendStyle("Pick one?", haircolor);
			} else if (selection == 3) {
				beauty = 4;
				facenew = Array();
				for(var i = 0; i < face.length; i++) {
					//facenew.push(face[i] + cm.getChar().getFace() % 1000 - (cm.getChar().getFace() % 100));
					if (face[i] == 20022 || face[i] == 20021){ // default to black for these since sapphire crashes
						facenew.push(face[i]);
					} else {
						facenew.push(face[i] + cm.getChar().getFace() % 1000 - (cm.getChar().getFace() % 100));
					}
				}
				cm.sendStyle("Pick one?", facenew);
			} else if (selection == 4) {
				beauty = 5;
				var current = cm.getChar().getFace() % 100 + 20000;
				colors = Array();
				//colors = Array(current , current + 100, current + 200, current + 300, current +400, current + 500, current + 600, current + 700);
				if(current == 20022 || current == 20021){ // check for bad combos. this one disables sapphire (5)
					colors = Array(current , current + 100, current + 200, current + 300, current +400, current + 600, current + 700);
				} else { // all colors
					colors = Array(current , current + 100, current + 200, current + 300, current +400, current + 500, current + 600, current + 700);
				}
				cm.sendStyle("Pick one?", colors);
			}
		}
		else if (status == 2){
			cm.dispose();
			if (beauty == 1){
				cm.setSkin(skin[selection]);
			}
			if (beauty == 2){
				cm.setHair(hairnew[selection]);
			}
			if (beauty == 3){
				cm.setHair(haircolor[selection]);
			}
			if (beauty == 4){
				cm.setFace(facenew[selection]);
			}
			if (beauty == 5){
				cm.setFace(colors[selection]);
			}
                        cm.dispose();
		}
	}
}

This was fixed bye someone in Support section. I do not remember his/her name. I will post when I look back some. They just helped me remove Female Check though.

I know this is pretty much useless script. But if you are testing Sera or something, this helps a lot. You don't have to go to the database to max AP.

PureLock - NimaKIN Does Hair and Maxes Stats! some more..(All gender) - RaGEZONE Forums


Edit: Mod change title please, and remove the 'some more..' part. Thanks
 
Banned
Banned
Joined
May 30, 2008
Messages
726
Reaction score
1
Re: [Release]NimaKIN Does Hair and Maxes Stats! some more..(All gender)

only works for GMs or both regular players too?
 
Newbie Spellweaver
Joined
Jun 15, 2008
Messages
99
Reaction score
0
Re: [Release]NimaKIN Does Hair and Maxes Stats! some more..(All gender)

only works for GMs or both regular players too?

It does a GM Check. If your not GM it says. 'Sorry your not GM'
ADDED: PICS
 
Status
Not open for further replies.
Back
Top