Reformat and clean up npc scripts
This commit is contained in:
@@ -43,13 +43,15 @@ function start() {
|
||||
}
|
||||
|
||||
function action(mode, type, selection) {
|
||||
if (mode < 1) // disposing issue with stylishs found thanks to Vcoc
|
||||
if (mode < 1) // disposing issue with stylishs found thanks to Vcoc
|
||||
{
|
||||
cm.dispose();
|
||||
else {
|
||||
if (mode == 1)
|
||||
} else {
|
||||
if (mode == 1) {
|
||||
status++;
|
||||
else
|
||||
} else {
|
||||
status--;
|
||||
}
|
||||
if (status == 0) {
|
||||
cm.sendSimple("Let's see...I can totally transform your face into something new. Don't you want to try it? For #b#t5152038##k, you can get the face of your liking. Take your time in choosing the face of your preference...\r\n\#L2#Let me get my dream face! (Uses #i5152038# #t5152038#)#l");
|
||||
} else if (status == 1) {
|
||||
@@ -58,24 +60,24 @@ function action(mode, type, selection) {
|
||||
cm.dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
facenew = Array();
|
||||
if (cm.getPlayer().getGender() == 0) {
|
||||
for(var i = 0; i < mface_v.length; i++)
|
||||
pushIfItemExists(facenew, mface_v[i] + cm.getPlayer().getFace()% 1000 - (cm.getPlayer().getFace()% 100));
|
||||
for (var i = 0; i < mface_v.length; i++) {
|
||||
pushIfItemExists(facenew, mface_v[i] + cm.getPlayer().getFace() % 1000 - (cm.getPlayer().getFace() % 100));
|
||||
}
|
||||
}
|
||||
if (cm.getPlayer().getGender() == 1) {
|
||||
for(var i = 0; i < fface_v.length; i++) {
|
||||
pushIfItemExists(facenew, fface_v[i] + cm.getPlayer().getFace()% 1000 - (cm.getPlayer().getFace()% 100));
|
||||
for (var i = 0; i < fface_v.length; i++) {
|
||||
pushIfItemExists(facenew, fface_v[i] + cm.getPlayer().getFace() % 1000 - (cm.getPlayer().getFace() % 100));
|
||||
}
|
||||
}
|
||||
cm.sendStyle("Let's see... I can totally transform your face into something new. Don't you want to try it? For #b#t5152038##k, you can get the face of your liking. Take your time in choosing the face of your preference...", facenew);
|
||||
}
|
||||
else if (status == 2){
|
||||
} else if (status == 2) {
|
||||
cm.gainItem(5152038, -1);
|
||||
cm.setFace(facenew[selection]);
|
||||
cm.sendOk("Enjoy your new and improved face!");
|
||||
|
||||
|
||||
cm.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user