Just a simple template you can use if you want to remove the option of buying tickets for 1m meso. Hoping this might inspire some people to step their gms-like game up, and remove this option stemming back from when odinms didn't have their cash shop enabled. With some slight modifications you can use it for all parlors.
Code:/*VIP Hairstylist Template*//**gms-like by Cygnus*/ var malehair = Array(); var femalehair = Array(); var haircoupon = 5150001; var dyecoupon = 5151001; var npc = "Natalie" function start() { cm.sendSimple("I'm "+npc+", the head of this hair salon. If you have #b#t"+haircoupon+"##k or #b#t"+dyecoupon+"##k, allow me to take care of your hairdo. Please choose the one you want. \r\n#b#L0# Change hairstyle (VIP coupon)#l\r\n#L1# Dye your hair (VIP coupon)#l"); status = -1; } function action(mode,type,selection) { if (mode < 1) { cm.dispose(); return; } else status++; if (status == 0) { if (selection == 0) { hair = Array(); hairstyles = + (cm.getPlayer().getGender() == 0) ? malehair : femalehair; for (var i = 0; i < hairstyles.length; i++) { hair.push(hairstyles[i] + parseInt(cm.getPlayer().getHair()% 10)); } cm.sendStyle("I can totally change up your hairstyle and make it look so good. Why don't you change it up a bit? With #b#t"+haircoupon+"##k I'll change it for you. Choose the one to your liking.", hair); beauty = 1; } else if (selection == 1) { haircolor = Array(); var current = parseInt(cm.getPlayer().getHair()/10)*10; for (var i = 0; i < 8; i++) haircolor.push(current + i); cm.sendStyle("I can totally change your haircolor and make it look so good. Why don't you change it up a bit? With #b#t"+dyecoupon+"##k I'll change it for you. Choose the one to your liking.", haircolor); beauty = 2; } } else if (status == 1) { if (beauty == 1) { if (!cm.haveItem(haircoupon)) { cm.sendNext("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 { cm.gainItem(haircoupon, -1); cm.setHair(hair[selection]); cm.sendNext("Check it out!! What do you think? Even I think this one is a work of art! AHAHAHA. Please let me know when you want another haircut, because I'll make you look good each time!"); } } else if (beauty == 2) { if (!cm.haveItem(dyecoupon)) { cm.sendNext("Hmmm...it looks like you don't have our designated coupon...I'm afraid I can't dye your hair without it. I'm sorry."); } else { cm.gainItem(dyecoupon, -1); cm.setHair(haircolor[selection]); cm.sendNext("Check it out!! What do you think? Even I think this one is a work of art! AHAHAHA. Please let me know when you want to dye your hair again, because I'll make you look good each time!"); } } } }



Reply With Quote



