Add Avery (1043002) & Ivy (1043003) Hair/Face NPC scripts
This commit is contained in:
266
scripts/npc/1043002.js
Normal file
266
scripts/npc/1043002.js
Normal file
@@ -0,0 +1,266 @@
|
|||||||
|
var status = 0;
|
||||||
|
var service = -1; // 0 = hairstyle change, 1 = hair color change
|
||||||
|
var hairPrice = 1000000;
|
||||||
|
var hairColorPrice = 50000;
|
||||||
|
|
||||||
|
/* ── HAIRSTYLE ───────────────────────────────────────────────── */
|
||||||
|
var selectedCategory = -1;
|
||||||
|
var hairnew = Array();
|
||||||
|
|
||||||
|
/*
|
||||||
|
HAIR CATEGORIES
|
||||||
|
Classic I (30xxx): original male hairs — 91 hairs
|
||||||
|
Classic II (31xxx): original female hairs — 92 hairs
|
||||||
|
Royal I (32xxx): mid-era hairs — 27 hairs
|
||||||
|
Royal II (33xxx): mid-era hairs — 76 hairs
|
||||||
|
Royal III (34xxx): mid-era hairs — 86 hairs
|
||||||
|
Modern I (36xxx / 37xxx): newer hairs — 126 hairs
|
||||||
|
Modern II (38xxx / 39xxx): newer hairs — 91 hairs
|
||||||
|
Modern III (40xxx / 41xxx / 42xxx): newest hairs — 91 hairs
|
||||||
|
|
||||||
|
Only base (black) IDs are stored here (units digit = 0).
|
||||||
|
Each hair has 8 color variants (units digit 0–7).
|
||||||
|
*/
|
||||||
|
|
||||||
|
var classic1Hairs = Array(
|
||||||
|
30000, 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, 30380, 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, 30830, 30840, 30850,
|
||||||
|
30860, 30870, 30880, 30890, 30900, 30910, 30920, 30930,
|
||||||
|
30940, 30950, 30990
|
||||||
|
);
|
||||||
|
|
||||||
|
var classic2Hairs = 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, 31360, 31400, 31410, 31420,
|
||||||
|
31430, 31440, 31450, 31460, 31470, 31480, 31490, 31510,
|
||||||
|
31520, 31530, 31540, 31550, 31560, 31570, 31580, 31590,
|
||||||
|
31600, 31610, 31620, 31630, 31640, 31650, 31660, 31670,
|
||||||
|
31680, 31690, 31700, 31710, 31720, 31730, 31740, 31750,
|
||||||
|
31760, 31770, 31780, 31790, 31800, 31810, 31820, 31830,
|
||||||
|
31840, 31850, 31860, 31870, 31880, 31890, 31910, 31920,
|
||||||
|
31930, 31940, 31950, 31990
|
||||||
|
);
|
||||||
|
|
||||||
|
var royal1Hairs = Array(
|
||||||
|
32050, 32160, 32310, 32320, 32330, 32340, 32350,
|
||||||
|
32360, 32370, 32380, 32390, 32400, 32410, 32420, 32430,
|
||||||
|
32440, 32450, 32460, 32470, 32480, 32490, 32500, 32520,
|
||||||
|
32530, 32540, 32550
|
||||||
|
);
|
||||||
|
|
||||||
|
var royal2Hairs = Array(
|
||||||
|
33000, 33030, 33040, 33050, 33060, 33070, 33080, 33090,
|
||||||
|
33100, 33110, 33120, 33130, 33150, 33160, 33170, 33180,
|
||||||
|
33190, 33210, 33220, 33240, 33250, 33260, 33270, 33280,
|
||||||
|
33290, 33310, 33330, 33350, 33360, 33370, 33380, 33390,
|
||||||
|
33400, 33410, 33430, 33440, 33450, 33460, 33470, 33480,
|
||||||
|
33500, 33510, 33520, 33530, 33540, 33550, 33580, 33590,
|
||||||
|
33600, 33610, 33620, 33630, 33640, 33660, 33670, 33680,
|
||||||
|
33690, 33700, 33710, 33720, 33730, 33740, 33750, 33760,
|
||||||
|
33770, 33780, 33790, 33800, 33810, 33820, 33830, 33930,
|
||||||
|
33940, 33950, 33960, 33990
|
||||||
|
);
|
||||||
|
|
||||||
|
var royal3Hairs = Array(
|
||||||
|
34000, 34010, 34020, 34030, 34040, 34050, 34060, 34070,
|
||||||
|
34080, 34090, 34100, 34110, 34120, 34130, 34140, 34150,
|
||||||
|
34160, 34170, 34180, 34190, 34210, 34220, 34230, 34240,
|
||||||
|
34250, 34260, 34270, 34310, 34320, 34330, 34340, 34350,
|
||||||
|
34360, 34370, 34380, 34400, 34410, 34420, 34430, 34440,
|
||||||
|
34450, 34470, 34480, 34490, 34510, 34540, 34560, 34580,
|
||||||
|
34590, 34600, 34610, 34620, 34630, 34640, 34650, 34660,
|
||||||
|
34670, 34680, 34690, 34700, 34710, 34720, 34730, 34740,
|
||||||
|
34750, 34760, 34770, 34780, 34790, 34800, 34810, 34820,
|
||||||
|
34830, 34840, 34850, 34860, 34870, 34880, 34890, 34900,
|
||||||
|
34910, 34940, 34950, 34960, 34970, 34980
|
||||||
|
);
|
||||||
|
|
||||||
|
var modern1Hairs = Array(
|
||||||
|
36010, 36020, 36030, 36040, 36050, 36060, 36070, 36080,
|
||||||
|
36090, 36100, 36110, 36130, 36140, 36150, 36160, 36170,
|
||||||
|
36180, 36190, 36200, 36210, 36220, 36230, 36240, 36250,
|
||||||
|
36260, 36270, 36280, 36330, 36340, 36350, 36380, 36390,
|
||||||
|
36400, 36410, 36420, 36460, 36470, 36480, 36490, 36500,
|
||||||
|
36510, 36520, 36530, 36600, 36610, 37000, 37010, 37020,
|
||||||
|
37030, 37040, 37060, 37070, 37080, 37090, 37100, 37110,
|
||||||
|
37120, 37130, 37140, 37150, 37160, 37170, 37200, 37210,
|
||||||
|
37220, 37230, 37240, 37250, 37260, 37270, 37300, 37310,
|
||||||
|
37320, 37330, 37340, 37350, 37370, 37380, 37400, 37450,
|
||||||
|
37460, 37470, 37490, 37500, 37510, 37520, 37530, 37590,
|
||||||
|
37600, 37610, 37620, 37630, 37640, 37650, 37660, 37670,
|
||||||
|
37680, 37690, 37700, 37710, 37720, 37730, 37740, 37750,
|
||||||
|
37760, 37770, 37780, 37790, 37800, 37810, 37820, 37830,
|
||||||
|
37840, 37850, 37860, 37880, 37900, 37910, 37920, 37930,
|
||||||
|
37940, 37950, 37960, 37970, 37980, 37990
|
||||||
|
);
|
||||||
|
|
||||||
|
var modern2Hairs = Array(
|
||||||
|
38000, 38010, 38020, 38030, 38040, 38050, 38060, 38070,
|
||||||
|
38080, 38090, 38100, 38110, 38120, 38130, 38140, 38150,
|
||||||
|
38160, 38180, 38240, 38250, 38260, 38270, 38280, 38290,
|
||||||
|
38300, 38310, 38320, 38330, 38350, 38390, 38400, 38410,
|
||||||
|
38420, 38430, 38440, 38450, 38460, 38470, 38480, 38490,
|
||||||
|
38500, 38510, 38520, 38540, 38560, 38570, 38580, 38590,
|
||||||
|
38600, 38610, 38620, 38630, 38640, 38650, 38660, 38670,
|
||||||
|
38680, 38690, 38700, 38710, 38730, 38740, 38750, 38760,
|
||||||
|
38770, 38790, 38800, 38810, 38820, 38840, 38860, 38880,
|
||||||
|
38890, 38900, 38910, 38930, 38940, 39040, 39050, 39060,
|
||||||
|
39070, 39080, 39090, 39190, 39200, 39210, 39220, 39230,
|
||||||
|
39240, 39250, 39260
|
||||||
|
);
|
||||||
|
|
||||||
|
var modern3Hairs = Array(
|
||||||
|
40000, 40010, 40020, 40030, 40040, 40050, 40060, 40070,
|
||||||
|
40080, 40090, 40100, 40110, 40120, 40250, 40260, 40270,
|
||||||
|
40280, 40290, 40300, 40310, 40320, 40330, 40350, 40360,
|
||||||
|
40370, 40390, 40400, 40410, 40420, 40440, 40450, 40460,
|
||||||
|
40480, 40490, 40520, 40530, 40540, 40550, 40560, 41060,
|
||||||
|
41070, 41080, 41090, 41100, 41110, 41120, 41150, 41160,
|
||||||
|
41170, 41180, 41190, 41200, 41220, 41340, 41350, 41360,
|
||||||
|
41370, 41380, 41390, 41400, 41410, 41420, 41440, 41460,
|
||||||
|
41470, 41480, 41490, 41510, 41520, 41530, 41560, 41570,
|
||||||
|
41580, 41610, 41620, 41630, 41640, 41650, 41660, 41670,
|
||||||
|
41680, 41690, 41700, 41710, 42060, 42070, 42080, 42090,
|
||||||
|
42100, 42110, 42120
|
||||||
|
);
|
||||||
|
|
||||||
|
var hairCategories = [
|
||||||
|
classic1Hairs,
|
||||||
|
classic2Hairs,
|
||||||
|
royal1Hairs,
|
||||||
|
royal2Hairs,
|
||||||
|
royal3Hairs,
|
||||||
|
modern1Hairs,
|
||||||
|
modern2Hairs,
|
||||||
|
modern3Hairs
|
||||||
|
];
|
||||||
|
|
||||||
|
var categoryNames = [
|
||||||
|
"Classic I",
|
||||||
|
"Classic II",
|
||||||
|
"Royal I",
|
||||||
|
"Royal II",
|
||||||
|
"Royal III",
|
||||||
|
"Modern I",
|
||||||
|
"Modern II",
|
||||||
|
"Modern III"
|
||||||
|
];
|
||||||
|
|
||||||
|
/* ── HAIR COLOR ──────────────────────────────────────────────── */
|
||||||
|
var hairColors = Array();
|
||||||
|
|
||||||
|
// Returns the base (black) hair ID by zeroing the units digit.
|
||||||
|
// e.g. 37143 -> 37140, works for any hair ID range.
|
||||||
|
function getBaseHair() {
|
||||||
|
var hair = cm.getPlayer().getHair();
|
||||||
|
return Math.floor(hair / 10) * 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
function buildHairColors() {
|
||||||
|
var base = getBaseHair();
|
||||||
|
hairColors = Array();
|
||||||
|
for (var i = 0; i < 8; i++) {
|
||||||
|
hairColors.push(base + i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ── ENTRY POINT ─────────────────────────────────────────────── */
|
||||||
|
function start() {
|
||||||
|
status = -1;
|
||||||
|
action(1, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ── MAIN FLOW ───────────────────────────────────────────────── */
|
||||||
|
function action(mode, type, selection) {
|
||||||
|
|
||||||
|
if (mode < 1) {
|
||||||
|
cm.dispose();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
status++;
|
||||||
|
|
||||||
|
/* ── STATUS 0: top-level menu ── */
|
||||||
|
if (status == 0) {
|
||||||
|
|
||||||
|
cm.sendSimple(
|
||||||
|
"Hello~ I'm Avery, Sweetgum's hair prince. " +
|
||||||
|
"What can I help you with today?\r\n\r\n" +
|
||||||
|
"#L0#New Hairstyle (#b" + hairPrice + " Mesos#k)#l\r\n" +
|
||||||
|
"#L1#Change Hair Color (#b" + hairColorPrice + " Mesos#k)#l"
|
||||||
|
);
|
||||||
|
|
||||||
|
/* ── STATUS 1: branch on chosen service ── */
|
||||||
|
} else if (status == 1) {
|
||||||
|
|
||||||
|
service = selection;
|
||||||
|
|
||||||
|
if (service == 0) {
|
||||||
|
// Hairstyle — show category menu
|
||||||
|
var text = "Select a hair category:\r\n\r\n";
|
||||||
|
for (var i = 0; i < categoryNames.length; i++) {
|
||||||
|
text += "#L" + i + "#" + categoryNames[i] + "#l\r\n";
|
||||||
|
}
|
||||||
|
cm.sendSimple(text);
|
||||||
|
|
||||||
|
} else if (service == 1) {
|
||||||
|
// Hair color — show the 8 color variants for the player's current hair
|
||||||
|
buildHairColors();
|
||||||
|
cm.sendStyle(
|
||||||
|
"Please choose the hair color you'd like~ (#b" + hairColorPrice + " Mesos#k)",
|
||||||
|
hairColors
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ── STATUS 2 ── */
|
||||||
|
} else if (status == 2) {
|
||||||
|
|
||||||
|
if (service == 0) {
|
||||||
|
// Hairstyle — player picked a category, now show hair styles
|
||||||
|
selectedCategory = selection;
|
||||||
|
hairnew = Array();
|
||||||
|
var selectedArray = hairCategories[selectedCategory];
|
||||||
|
for (var i = 0; i < selectedArray.length; i++) {
|
||||||
|
hairnew.push(selectedArray[i]);
|
||||||
|
}
|
||||||
|
cm.sendStyle("Please choose the hairstyle you'd like~", hairnew);
|
||||||
|
|
||||||
|
} else if (service == 1) {
|
||||||
|
// Hair color — player picked a color, apply it
|
||||||
|
if (cm.getMeso() < hairColorPrice) {
|
||||||
|
cm.sendOk("You need " + hairColorPrice + " mesos to change your hair color.");
|
||||||
|
cm.dispose();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
cm.gainMeso(-hairColorPrice);
|
||||||
|
cm.setHair(hairColors[selection]);
|
||||||
|
cm.sendOk("Enjoy your new hair color~");
|
||||||
|
cm.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ── STATUS 3: hairstyle only — player picked a style, apply it ── */
|
||||||
|
} else if (status == 3) {
|
||||||
|
|
||||||
|
if (cm.getMeso() < hairPrice) {
|
||||||
|
cm.sendOk("You need " + hairPrice + " mesos to receive a new hairstyle.");
|
||||||
|
cm.dispose();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
cm.gainMeso(-hairPrice);
|
||||||
|
cm.setHair(hairnew[selection]);
|
||||||
|
cm.sendOk("Enjoy your new and improved hairstyle! You will need to re-purchase your color after changing hairs~");
|
||||||
|
cm.dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
189
scripts/npc/1043003.js
Normal file
189
scripts/npc/1043003.js
Normal file
@@ -0,0 +1,189 @@
|
|||||||
|
var status = 0;
|
||||||
|
var service = -1; // 0 = plastic surgery (face), 1 = eye color change
|
||||||
|
var facePrice = 1000000;
|
||||||
|
var eyePrice = 50000;
|
||||||
|
|
||||||
|
/* ── PLASTIC SURGERY ─────────────────────────────────────────── */
|
||||||
|
var selectedCategory = -1;
|
||||||
|
var facenew = Array();
|
||||||
|
|
||||||
|
/*
|
||||||
|
FACE CATEGORIES
|
||||||
|
classic (20xxx / 21xxx): original MapleStory male & female faces — 163 faces
|
||||||
|
royal (23xxx / 24xxx): newer cash-shop faces — 131 faces
|
||||||
|
modern (25xxx / 26xxx): most recent additions — 25 faces
|
||||||
|
|
||||||
|
Only base (black) IDs are stored here. Players keep their chosen
|
||||||
|
base face; color can be changed separately via the eye color option.
|
||||||
|
*/
|
||||||
|
|
||||||
|
var classicFaces = Array(
|
||||||
|
20000, 20001, 20002, 20003, 20004, 20005, 20006, 20007,
|
||||||
|
20008, 20009, 20010, 20011, 20012, 20013, 20014, 20015,
|
||||||
|
20016, 20017, 20018, 20019, 20020, 20021, 20022, 20023,
|
||||||
|
20024, 20025, 20026, 20027, 20028, 20029, 20030, 20031,
|
||||||
|
20032, 20035, 20036, 20037, 20038, 20040, 20043, 20044,
|
||||||
|
20045, 20046, 20047, 20048, 20049, 20050, 20052, 20053,
|
||||||
|
20054, 20055, 20056, 20057, 20058, 20059, 20060, 20061,
|
||||||
|
20062, 20063, 20064, 20065, 20066, 20067, 20068, 20069,
|
||||||
|
20070, 20073, 20074, 20075, 20076, 20077, 20078, 20080,
|
||||||
|
20081, 20082, 20083, 20084, 20085, 20086, 20087, 20088,
|
||||||
|
20091, 20092, 20093, 21000, 21001, 21002, 21003, 21004,
|
||||||
|
21005, 21006, 21007, 21008, 21009, 21010, 21011, 21012,
|
||||||
|
21013, 21014, 21015, 21016, 21017, 21018, 21019, 21020,
|
||||||
|
21021, 21022, 21023, 21024, 21025, 21026, 21027, 21028,
|
||||||
|
21029, 21030, 21031, 21033, 21034, 21035, 21036, 21037,
|
||||||
|
21038, 21041, 21042, 21043, 21044, 21045, 21046, 21047,
|
||||||
|
21048, 21049, 21052, 21053, 21054, 21055, 21056, 21057,
|
||||||
|
21058, 21059, 21060, 21061, 21062, 21063, 21064, 21065,
|
||||||
|
21068, 21069, 21070, 21071, 21072, 21073, 21074, 21075,
|
||||||
|
21076, 21077, 21078, 21080, 21081, 21082, 21083, 21084,
|
||||||
|
21085, 21087, 21088
|
||||||
|
);
|
||||||
|
|
||||||
|
var royalFaces = Array(
|
||||||
|
23006, 23008,
|
||||||
|
23009, 23010, 23011, 23012, 23013, 23014, 23016, 23017,
|
||||||
|
23019, 23020, 23023, 23024, 23025, 23028, 23029, 23030,
|
||||||
|
23031, 23032, 23033, 23034, 23035, 23038, 23039, 23040,
|
||||||
|
23041, 23042, 23043, 23053, 23055, 23056, 23057, 23059,
|
||||||
|
23060, 23061, 23065, 23066, 23068, 23069, 23070, 23072,
|
||||||
|
23073, 23074, 23075, 23076, 23079, 23081, 23084, 23085,
|
||||||
|
23086, 23087, 23088, 23089, 23090, 23092, 23094, 23095,
|
||||||
|
23096, 23097, 24001, 24002, 24003, 24004, 24005, 24006,
|
||||||
|
24007, 24008, 24009, 24010, 24011, 24012, 24015, 24016,
|
||||||
|
24018, 24019, 24020, 24022, 24024, 24025, 24026, 24027,
|
||||||
|
24028, 24029, 24031, 24032, 24035, 24036, 24037, 24038,
|
||||||
|
24039, 24040, 24041, 24050, 24052, 24053, 24054, 24055,
|
||||||
|
24057, 24058, 24060, 24063, 24064, 24067, 24068, 24069,
|
||||||
|
24071, 24072, 24073, 24074, 24075, 24077, 24078, 24079,
|
||||||
|
24082, 24083, 24084, 24085, 24087, 24090, 24091, 24092,
|
||||||
|
24093, 24094, 24095
|
||||||
|
);
|
||||||
|
|
||||||
|
var modernFaces = Array(
|
||||||
|
25001, 25003, 25006, 25007, 25009, 25010, 25011, 25012,
|
||||||
|
25013, 26000, 26001, 26002, 26003, 26004, 26005, 26006,
|
||||||
|
26007, 26009, 26010, 26011, 26012, 26013, 26014, 26015,
|
||||||
|
26016
|
||||||
|
);
|
||||||
|
|
||||||
|
var faceCategories = [
|
||||||
|
classicFaces,
|
||||||
|
royalFaces,
|
||||||
|
modernFaces
|
||||||
|
];
|
||||||
|
|
||||||
|
var categoryNames = [
|
||||||
|
"Old",
|
||||||
|
"New",
|
||||||
|
"Newest"
|
||||||
|
];
|
||||||
|
|
||||||
|
/* ── EYE COLOR ───────────────────────────────────────────────── */
|
||||||
|
var eyeColors = Array();
|
||||||
|
|
||||||
|
// Returns the base (black) face ID by zeroing the hundreds digit.
|
||||||
|
// e.g. 23486 → 23086, works for any face ID range.
|
||||||
|
function getBaseFace() {
|
||||||
|
var face = cm.getPlayer().getFace();
|
||||||
|
return Math.floor(face / 1000) * 1000 + (face % 100);
|
||||||
|
}
|
||||||
|
|
||||||
|
function buildEyeColors() {
|
||||||
|
var base = getBaseFace();
|
||||||
|
eyeColors = Array();
|
||||||
|
for (var i = 0; i < 9; i++) {
|
||||||
|
eyeColors.push(base + 100 * i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ── ENTRY POINT ─────────────────────────────────────────────── */
|
||||||
|
function start() {
|
||||||
|
status = -1;
|
||||||
|
action(1, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ── MAIN FLOW ───────────────────────────────────────────────── */
|
||||||
|
function action(mode, type, selection) {
|
||||||
|
|
||||||
|
if (mode < 1) {
|
||||||
|
cm.dispose();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
status++;
|
||||||
|
|
||||||
|
/* ── STATUS 0: top-level menu ── */
|
||||||
|
if (status == 0) {
|
||||||
|
|
||||||
|
cm.sendSimple(
|
||||||
|
"Hello~ I'm Ivy, Sweetgum's face princess. " +
|
||||||
|
"What can I help you with today?\r\n\r\n" +
|
||||||
|
"#L0#Change Face (#b" + facePrice + " Mesos#k)#l\r\n" +
|
||||||
|
"#L1#Change Eye Color (#b" + eyePrice + " Mesos#k)#l"
|
||||||
|
);
|
||||||
|
|
||||||
|
/* ── STATUS 1: branch on chosen service ── */
|
||||||
|
} else if (status == 1) {
|
||||||
|
|
||||||
|
service = selection;
|
||||||
|
|
||||||
|
if (service == 0) {
|
||||||
|
// Plastic surgery — show face category menu
|
||||||
|
var text = "Select a face category:\r\n\r\n";
|
||||||
|
for (var i = 0; i < categoryNames.length; i++) {
|
||||||
|
text += "#L" + i + "#" + categoryNames[i] + "#l\r\n";
|
||||||
|
}
|
||||||
|
cm.sendSimple(text);
|
||||||
|
|
||||||
|
} else if (service == 1) {
|
||||||
|
// Eye color — show the 9 color variants for the player's current face
|
||||||
|
buildEyeColors();
|
||||||
|
cm.sendStyle(
|
||||||
|
"Please choose the eye color you'd like~ (#b" + eyePrice + " Mesos#k)",
|
||||||
|
eyeColors
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ── STATUS 2 ── */
|
||||||
|
} else if (status == 2) {
|
||||||
|
|
||||||
|
if (service == 0) {
|
||||||
|
// Plastic surgery — player picked a category, now show face styles
|
||||||
|
selectedCategory = selection;
|
||||||
|
facenew = Array();
|
||||||
|
var selectedArray = faceCategories[selectedCategory];
|
||||||
|
for (var i = 0; i < selectedArray.length; i++) {
|
||||||
|
facenew.push(selectedArray[i]);
|
||||||
|
}
|
||||||
|
cm.sendStyle("Please choose the face you'd like~", facenew);
|
||||||
|
|
||||||
|
} else if (service == 1) {
|
||||||
|
// Eye color — player picked a color, apply it
|
||||||
|
if (cm.getMeso() < eyePrice) {
|
||||||
|
cm.sendOk("You need " + eyePrice + " mesos to change your eye color.");
|
||||||
|
cm.dispose();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
cm.gainMeso(-eyePrice);
|
||||||
|
cm.setFace(eyeColors[selection]);
|
||||||
|
cm.sendOk("Enjoy your new eye color~");
|
||||||
|
cm.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ── STATUS 3: plastic surgery only — player picked a face, apply it ── */
|
||||||
|
} else if (status == 3) {
|
||||||
|
|
||||||
|
if (cm.getMeso() < facePrice) {
|
||||||
|
cm.sendOk("You need " + facePrice + " mesos to change your face.");
|
||||||
|
cm.dispose();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
cm.gainMeso(-facePrice);
|
||||||
|
cm.setFace(facenew[selection]);
|
||||||
|
cm.sendOk("Enjoy your new and improved look! You will need to re-purchase your eye color after changing faces~");
|
||||||
|
cm.dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user