Reformat and clean up npc scripts

This commit is contained in:
P0nk
2021-09-09 23:35:02 +02:00
parent 0c1545f81d
commit d893309b4f
665 changed files with 19932 additions and 19046 deletions

View File

@@ -46,24 +46,25 @@ function action(mode, type, selection) {
if (mode < 1) { // disposing issue with stylishs found thanks to Vcoc
cm.dispose();
} else {
if (mode == 1)
if (mode == 1) {
status++;
else
} else {
status--;
}
if (status == 0) {
cm.sendSimple("Well, I'm bored, so I'll help out the doctor. For a #b#t5152006##k, I will change the way you look. But don't forget, it will be random!\r\n#L2#Plastic Surgery: #i5152006##t5152006##l");
} else if (status == 1) {
if (selection == 2) {
facenew = Array();
if (cm.getPlayer().getGender() == 0) {
for(var i = 0; i < mface_r.length; i++) {
for (var i = 0; i < mface_r.length; i++) {
pushIfItemExists(facenew, mface_r[i] + cm.getPlayer().getFace()
% 1000 - (cm.getPlayer().getFace()
% 100));
}
}
if (cm.getPlayer().getGender() == 1) {
for(var i = 0; i < fface_r.length; i++) {
for (var i = 0; i < fface_r.length; i++) {
pushIfItemExists(facenew, fface_r[i] + cm.getPlayer().getFace()
% 1000 - (cm.getPlayer().getFace()
% 100));
@@ -71,10 +72,9 @@ function action(mode, type, selection) {
}
cm.sendYesNo("If you use the regular coupon, your face may transform into a random new look...do you still want to do it using #b#t5152006##k?");
}
}
else if (status == 2){
} else if (status == 2) {
cm.dispose();
if (cm.haveItem(5152006) == true){
if (cm.haveItem(5152006) == true) {
cm.gainItem(5152006, -1);
cm.setFace(facenew[Math.floor(Math.random() * facenew.length)]);
cm.sendOk("Enjoy your new and improved face!");