v83+ Player NPC

Status
Not open for further replies.
Joined
Apr 25, 2011
Messages
159
Reaction score
52
This is my first Release Please Comment, The Only thing i ask in return please dont flame. :*:
But hopefully it works in your servers, I Coded it so i take full credit
Code:
var status = 0;
var beauty = 0;
var facenew;
var colors;
var hairnew;
var haircolor;
var skin = Array(0, 1, 2, 3, 4, 9);
var mface = Array(20000, 20001, 20002, 20003, 20004, 20005, 20006, 20007, 20008, 20009, 20010, 20011, 20012, 20013, 20014, 20016, 20017, 20018, 20019, 20020, 20021, 20022, 20023, 20024, 20025, 20026);
var mhair = Array(30000, 30010, 30020, 30030, 30040, 30050, 30060, 30070, 30080, 30090, 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, 30670, 30680, 30690, 30700, 30710, 30720, 30730, 30740, 30750, 30760, 30770, 30780, 30790, 30800, 30810, 30820, 30840);
var fface = Array(21000, 21001, 21002, 21003, 21004, 21005, 21006, 21007, 21008, 21009, 21010, 21011, 21012, 21013, 21014, 21016, 21017, 21018, 21019, 21020, 21022, 21023, 21024, 21025);
var fhair = Array(31000, 31010, 31020, 31030, 31040, 31050, 31060, 31070, 31080, 31090, 31100, 31110, 31120, 31130, 31140, 31150, 31160, 31170, 31180, 31190, 31200, 31210, 31220, 31230, 31240, 31250, 31260, 31270, 31280, 31290, 31300, 31310, 31320, 31330, 31340, 31350, 31400, 31410, 31420, 31430, 31440, 31450, 31460, 31470, 31480, 31490, 31510, 31520, 31530, 31540, 31550, 31560, 31580, 31590, 31600, 31610, 31620, 31630, 31640, 31650, 31660, 31670, 31680, 31690, 31700, 31710, 31720, 31730, 31740, 31750, 31760, 31770, 31780, 31790, 31800, 31810);

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

function action(mode, type, selection) {
    if (status >= 0 && mode == 0) {
	cm.dispose();
	return;
    }
    if (mode == 1)
	status++;
    else
	status--;
    if (status == 0) {
	if (cm.getPlayerStat("GM") == 0) {
	    cm.sendOk("Sorry, but only Game Masters with a GM Level of 5 or more can use this.");
	    cm.dispose();
	} else {
	    cm.sendSimple("Hey there! I could change the way you look! What would you like to change?\r\n#L0##bSkin#k#l\r\n#L1##bHair#k#l\r\n#L2##bHair Color#k#l\r\n#L3##bFace#k#l\r\n#L4##bEye Color#k#l");
	}
    } else if (status == 1) {
	if (cm.getPlayerStat("GENDER") == 0) {
	    if (selection == 0) {
		beauty = 1;
		cm.sendStyle("Pick a skin color that you would like.", skin);
	    } else if (selection == 1) {
		beauty = 2;
		hairnew = Array();
		for (var i = 0; i < mhair.length; i++) {
		    if (mhair[i] == 30100 || mhair[i] == 30010) {
			hairnew.push(mhair[i]);
		    } else {
			hairnew.push(mhair[i] + parseInt(cm.getPlayerStat("HAIR") % 10));
		    }
		}
		cm.sendStyle("Pick a hairstyle that you would like.", hairnew);
	    } else if (selection == 2) {
		beauty = 3;
		haircolor = Array();
		var current = parseInt(cm.getPlayerStat("HAIR") / 10) * 10;
		if (current == 30100) {
		    haircolor = Array(current, current + 1, current + 2, current + 3, current + 4);
		} else if (current == 30010) {
		    haircolor = Array(current);
		} else {
		    for (var i = 0; i < 8; i++) {
			haircolor.push(current + i);
		    }
		}
		cm.sendStyle("Pick a hair color that you would like.", haircolor);
	    } else if (selection == 3) {
		beauty = 4;
		facenew = Array();
		for (var i = 0; i < mface.length; i++) {
		    if (mface[i] == 20021 || mface[i] == 20022) {
			facenew.push(mface[i]);
		    } else {
			facenew.push(mface[i] + cm.getPlayerStat("FACE") % 1000 - (cm.getPlayerStat("FACE") % 100));
		    }
		}
		cm.sendStyle("Pick a new face that you would like.", facenew);
	    } else if (selection == 4) {
		beauty = 5;
		var current = cm.getPlayerStat("FACE") % 100 + 20000;
		colors = Array();
		if (current == 20021 || current == 20022) {
		    colors = Array(current, current + 100, current + 200, current + 300, current + 400, current + 600, current + 700);
		} else {
		    colors = Array(current, current + 100, current + 200, current + 300, current + 400, current + 500, current + 600, current + 700, current + 800);
		}
		cm.sendStyle("Pick a eye color that you would like.", colors);
	    }
	} else {
	    if (selection == 0) {
		beauty = 1;
		cm.sendStyle("Pick a skin color that you would like.", skin);
	    } else if (selection == 1) {
		beauty = 2;
		hairnew = Array();
		for (var i = 0; i < fhair.length; i++) {
		    hairnew.push(fhair[i] + parseInt(cm.getPlayerStat("HAIR") % 10));
		}
		cm.sendStyle("Pick a hairstyle that you would like.", hairnew);
	    } else if (selection == 2) {
		beauty = 3;
		haircolor = Array();
		var current = parseInt(cm.getPlayerStat("HAIR") / 10) * 10;
		for (var i = 0; i < 8; i++) {
		    haircolor.push(current + i);
		}
		cm.sendStyle("Pick a hair color that you would like.", haircolor);
	    } else if (selection == 3) {
		beauty = 4;
		facenew = Array();
		for (var i = 0; i < fface.length; i++) {
		    facenew.push(fface[i] + cm.getPlayerStat("FACE") % 1000 - (cm.getPlayerStat("FACE") % 100));
		}
		cm.sendStyle("Pick new eyes that you would like.", facenew);
	    } else if (selection == 4) {
		beauty = 5;
		var current = cm.getPlayerStat("FACE") % 100 + 21000;
		colors = Array();
		colors = Array(current, current + 100, current + 200, current + 300, current + 400, current + 500, current + 600, current + 700, current + 800);
		cm.sendStyle("Pick a eye color that you would like.", colors);
	    }
	}
    } else if (status == 2) {
	if (beauty == 1) {
	    cm.setSkin(skin[selection]);
	} else if (beauty == 2) {
	    cm.setHair(hairnew[selection]);
	} else if (beauty == 3) {
	    cm.setHair(haircolor[selection]);
	} else if (beauty == 4) {
	    cm.setFace(facenew[selection]);
	} else if (beauty == 5) {
	    cm.setFace(colors[selection]);
	}
	cm.dispose();
    }
}
Enjoy :rolleyes:
 
Lol I used to have the same question.

Press PrintScreen and go into paint and paste.
If laptop hold down the FN key and press PRTSC (PrintScreen)
.
Ontopic: This is basically kin/nimakin but goodjob! Since I wouldn't be able to make this myself what right do I have to judge...
 
Lol I used to have the same question.

Press PrintScreen and go into paint and paste.
If laptop hold down the FN key and press PRTSC (PrintScreen)
.
Ontopic: This is basically kin/nimakin but goodjob! Since I wouldn't be able to make this myself what right do I have to judge...

Thx :thumbup: Im going to post pics ina few minutes need to reset laptop
 
You know, in Maple.. you just need to press "Scroll" to get a picture.

Also, this NPC is not 100% yours, it's NimaKIN, even the variable names are the same "beauty", also the way to retrieve the hairs... it's not your work at all, the only difference is the "cm.getPlayerStat("GENDER")" and "cm.getPlayerStat("GM")". So yeah. . .
 
You know, in Maple.. you just need to press "Scroll" to get a picture.

Also, this NPC is not 100% yours, it's NimaKIN, even the variable names are the same "beauty", also the way to retrieve the hairs... it's not your work at all, the only difference is the "cm.getPlayerStat("GENDER")" and "cm.getPlayerStat("GM")". So yeah. . .

ok than its somewhat a creation than? like a Rev
 
Status
Not open for further replies.
Back