Mob banish on touch + GMS-like cosmetics + Clear missing names

Fixed erroneous clean slate scroll block on equipments having certain properties.
Implemented a log for bought cash items from Cash Shop.
Implemented mob's player banish by touch (e. g. used by mobs from the Hypnotize quest).
Thoroughly revised stylist/surgeon NPCs, adding several missing GMS-like cosmetic contents.
Thoroughly revised String.wz names having missing item content throughout the WZ files.
Revised missing name info for several faces throughout the WZ files.
Solved a possible deadlock case related with a player vision's spawn object method.
Fixed an issue with "Movement allowed only within account" items being given as "Untradeable" by NPCs.

Happy Holidays and Great New Year everyone!!!
This commit is contained in:
ronancpl
2018-12-22 00:12:13 -02:00
parent a2b8f22e66
commit dc73cb00de
184 changed files with 12897 additions and 3647 deletions

View File

@@ -23,13 +23,25 @@
NPC Name: Big Headward
Map(s): Victoria Road : Henesys Hair Salon (100000104)
Description: Random haircut
GMS-like revised by Ronan. Contents found thanks to Mitsune (GamerBewbs), Waltzing, AyumiLove
*/
var status = 0;
var mhair = Array(30100, 30850, 30890);
var fhair = Array(31180, 31420, 31870, 31400, 31880, 31820, 31860, 31420, 31940, 34000, 31890);
var mhair_r = Array(30010, 30070, 30080, 30090, 30100, 30690, 30760, 33000);
var fhair_r = Array(31130, 31530, 31820, 31920, 31940, 34000, 34030);
var mhair_v = Array(30010, 30070, 30080, 30090, 30100, 30480, 30560, 30690, 30760, 30850, 30890, 30930, 30950);
var fhair_v = Array(31020, 31130, 31510, 31530, 31820, 31860, 31890, 31920, 31940, 31950, 34000);
var hairnew = Array();
function pushIfItemExists(array, itemid) {
if ((itemid = cm.getCosmeticItem(itemid)) != -1 && !cm.isCosmeticEquipped(itemid)) {
array.push(itemid);
}
}
function start() {
status = -1;
action(1, 0, 0);
@@ -50,29 +62,57 @@ function action(mode, type, selection) {
status--;
if (status == 0) {
cm.sendSimple("If you use this regular coupon, your hair may transform into a random new look...do you still want to do it using #b#t5150040##k, I will do it anyways for you. But don't forget, it will be random!\r\n\#L2#OK! (Uses #i5150040# #t5150040#)#l");
cm.sendSimple("Hi, I'm #p1012117#, the most charming and stylish stylist around. If you're looking for the best looking hairdos around, look no further!\r\n\#L0##i5150040##t5150040##l\r\n\#L1##i5150044##t5150044##l");
} else if (status == 1) {
cm.sendYesNo("If you use the EXP coupon your hair will change RANDOMLY with a chance to obtain a new experimental style that even you didn't think was possible. Are you going to use #b#t5150040##k and really change your hairstyle?");
}
else if (status == 2) {
if (cm.haveItem(5150040) == true){
if (selection == 0) {
beauty = 1;
cm.sendYesNo("If you use this REGULAR coupon, your hair may transform into a random new look...do you still want to do it using #b#t5150040##k, I will do it anyways for you. But don't forget, it will be random!");
} else {
beauty = 2;
hairnew = Array();
if (cm.getPlayer().getGender() == 0) {
for(var i = 0; i < mhair.length; i++) {
hairnew.push(mhair[i] + parseInt(cm.getPlayer().getHair() % 10));
for(var i = 0; i < mhair_v.length; i++) {
pushIfItemExists(hairnew, mhair_v[i] + parseInt(cm.getPlayer().getHair() % 10));
}
}
else {
for(var i = 0; i < fhair.length; i++) {
hairnew.push(fhair[i] + parseInt(cm.getPlayer().getHair() % 10));
for(var i = 0; i < fhair_v.length; i++) {
pushIfItemExists(hairnew, fhair_v[i] + parseInt(cm.getPlayer().getHair() % 10));
}
}
cm.gainItem(5150040, -1);
cm.setHair(hairnew[Math.floor(Math.random() * hairnew.length)]);
cm.sendOk("Enjoy your new and improved hairstyle!");
} else {
cm.sendOk("Hmmm...it looks like you don't have our designated coupon...I'm afraid I can't give you a haircut without it. I'm sorry...");
cm.sendStyle("Using the SPECIAL coupon you can choose the style your hair will become. Pick the style that best provides you delight...", hairnew);
}
} else if (status == 2) {
if (beauty == 1) {
if (cm.haveItem(5150040) == true){
hairnew = Array();
if (cm.getPlayer().getGender() == 0) {
for(var i = 0; i < mhair_r.length; i++) {
pushIfItemExists(hairnew, mhair_r[i] + parseInt(cm.getPlayer().getHair() % 10));
}
}
else {
for(var i = 0; i < fhair_r.length; i++) {
pushIfItemExists(hairnew, fhair_r[i] + parseInt(cm.getPlayer().getHair() % 10));
}
}
cm.gainItem(5150040, -1);
cm.setHair(hairnew[Math.floor(Math.random() * hairnew.length)]);
cm.sendOk("Enjoy your new and improved hairstyle!");
} else {
cm.sendOk("Hmmm...it looks like you don't have our designated coupon...I'm afraid I can't give you a haircut without it. I'm sorry...");
}
} else if (beauty == 2) {
if (cm.haveItem(5150044) == true){
cm.gainItem(5150044, -1);
cm.setHair(hairnew[selection]);
cm.sendOk("Enjoy your new and improved hairstyle!");
} else {
cm.sendOk("Hmmm...it looks like you don't have our designated coupon...I'm afraid I can't give you a haircut without it. I'm sorry...");
}
}
cm.dispose();