// Credits to URMS from KongXiang
var status = 0;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if (status == 0) {
cm.sendSimple("Welcome to the Ultimate 24/7 Chicken Shop.\r\nHere are your options. \r\n#L1# I would like to exchange 1 #b#v4000252##k for 7 #b#v2049100##k.#l \r\n#L2# I would like to exchange 2 #b#v4000252##k for a #b#v1302106##k.#l \r\n#L3# I would like to exchange 3 #b#v4000252##k for a #b#v1462053##k.#l \r\n\#L4# I would like to exchange 3 #b#v4000252##k for a #b#v1402050##k.#l \r\n\#L5# I would like to exchange 3 #b#v4000252##k for a #b#v1472073##k.#l \r\n\#L6# I would like to exchange 4 #b#v4000252##k for a #b#v1372039##k.#l \r\n\#L7# I would like to exchange 4 #b#v4000252##k for a #b#v1372040##k.#l \r\n\#L8# I would like to exchange 4 #b#v4000252##k for a #b#v1372041##k.#l \r\n\#L9# I would like to exchange 4 #b#v4000252##k for a #b#v1372042##k.#l \r\n\#L10# I would like to exchange 4 #b#v4000252##k for a #b#v1022058##k.#l \r\n\#L11# I would like to exchange 4 #b#v4000252##k for a #b#v1022060##k.#l \r\n\#L12# I would like to exchange 4 #b#v4000252##k for a #b#v1122014##k.#l \r\n\#L13# I would like to exchange 4 #b#v4000252##k for a #b#v2044014##k.#l \r\n\#L14# I would like to exchange 7 #b#v4000252##k for 7 #b#v2049000##k.#l \r\n\#L15# I would like to exchange 7 #b#v4000252##k for 7 #b#v2049001##k.#l \r\n\#L16# I would like to exchange 7 #b#v4000252##k for 7 #b#v2049002##k.#l \r\n\#L17# I would like to exchange 7 #b#v4000252##k for 7 #b#v2049003##k.#l \r\n\#L18# I would like to exchange 7 #b#v4000252##k for 3 #b#v2070018##k.#l \r\n\#L19# I would like to exchange 10 #b#v4000252##k for a #b#v1002723##k.#l ");
} else if (status == 1) {
if (selection == 1) {
if (cm.haveItem(4000252, 1)) {
cm.gainItem(2049100, 7); // 7 Chaos Scroll 60%
cm.gainItem(4000252, -1);
cm.sendOk("Thank you for your #b#v4000252##k!");
} else {
cm.sendOk("Sorry you dont have enough #b#v4000252##k!");
}
cm.dispose();
} else if (selection == 2) {
if (cm.haveItem(4000252, 2)) {
cm.gainItem(1302106, 1); // Crystal Blade
cm.gainItem(4000252, -2);
cm.sendOk("Thank you for your #b#v4000252##k!");
} else {
cm.sendOk("Sorry you dont have enough #b#v4000252##k!");
}
cm.dispose();
} else if (selection == 3) {
if(cm.haveItem(4000252, 3)) {
cm.gainItem(1462053, 1); // Night Raven's Eye
cm.gainItem(4000252, -3);
cm.sendOk("Thank you for your #b#v4000252##k!");
} else {
cm.sendOk("Sorry you dont have enough #b#v4000252##k!");
}
cm.dispose();
} else if (selection == 4) {
if(cm.haveItem(4000252, 3)) {
cm.gainItem(1402050, 1); // Dawn Raven's Wing
cm.gainItem(4000252, -3);
cm.sendOk("Thank you for your #b#v4000252##k!");
} else {
cm.sendOk("Sorry you dont have enough #b#v4000252##k!");
}
cm.dispose();
} else if (selection == 5) {
if(cm.haveItem(4000252, 3)) {
cm.gainItem(1472073, 1); // Night Raven's Claw
cm.gainItem(4000252, -3);
cm.sendOk("Thank you for your #b#v4000252##k!");
} else {
cm.sendOk("Sorry you dont have enough #b#v4000252##k!");
}
cm.dispose();
} else if (selection == 6) {
if(cm.haveItem(4000252, 4)) {
cm.gainItem(1372039, 1); // Elemental Wand 5 - fire for level 130
cm.gainItem(4000252, -4);
cm.sendOk("Thank you for your #b#v4000252##k!");
} else {
cm.sendOk("Sorry you dont have enough #b#v4000252##k!");
}
cm.dispose();
} else if (selection == 7) {
if(cm.haveItem(4000252, 4)) {
cm.gainItem(1372040, 1); // Elemental Wand 6-poison for level 130
cm.gainItem(4000252, -4);
cm.sendOk("Thank you for your #b#v4000252##k!");
} else {
cm.sendOk("Sorry you dont have enough #b#v4000252##k!");
}
cm.dispose();
} else if (selection ==
{
if(cm.haveItem(4000252, 4)) {
cm.gainItem(1372041, 1); // Elemental Wand 7-ice for level 130
cm.gainItem(4000252, -4);
cm.sendOk("Thank you for your #b#v4000252##k!");
} else {
cm.sendOk("Sorry you dont have enough #b#v4000252##k!");
}
cm.dispose();
} else if (selection == 9) {
if(cm.haveItem(4000252, 4)) {
cm.gainItem(1372042, 1); // Elemental Wand 8-holy level 130
cm.gainItem(4000252, -4);
cm.sendOk("Thank you for your #b#v4000252##k!");
} else {
cm.sendOk("Sorry you dont have enough #b#v4000252##k!");
}
cm.dispose();
} else if (selection == 10) {
if(cm.haveItem(4000252, 4)) {
cm.gainItem(1022058, 1); // Brown Raccoon Mask
cm.gainItem(4000252, -4);
cm.sendOk("Thank you for your #b#v4000252##k!");
} else {
cm.sendOk("Sorry you dont have enough #b#v4000252##k!");
}
cm.dispose();
} else if (selection == 11) {
if(cm.haveItem(4000252, 4)) {
cm.gainItem(1022060, 1); // White raccoon mask
cm.gainItem(4000252, -4);
cm.sendOk("Thank you for your #b#v4000252##k!");
} else {
cm.sendOk("Sorry you dont have enough #b#v4000252##k!");
}
cm.dispose();
} else if (selection == 12) {
if(cm.haveItem(4000252, 4)) {
cm.gainItem(1122014, 1); // Silver Deputy Star
cm.gainItem(4000252, -4);
cm.sendOk("Thank you for your #b#v4000252##k!");
} else {
cm.sendOk("Sorry you dont have enough #b#v4000252##k!");
}
cm.dispose();
} else if (selection == 13) {
if(cm.haveItem(4000252, 7)) {
cm.gainItem(2044014, 7); // Scroll for Two-Handed Sword for Accuracy 10%
cm.gainItem(4000252, -7);
cm.sendOk("Thank you for your #b#v4000252##k!");
} else {
cm.sendOk("Sorry you dont have enough #b#v4000252##k!");
}
cm.dispose();
} else if (selection == 14) {
if(cm.haveItem(4000252, 7)) {
cm.gainItem(2049000, 7); // Clean Slate scrolls 1%
cm.gainItem(4000252, -7);
cm.sendOk("Thank you for your #b#v4000252##k!");
} else {
cm.sendOk("Sorry you dont have enough #b#v4000252##k!");
}
cm.dispose();
} else if (selection == 15) {
if(cm.haveItem(4000252, 7)) {
cm.gainItem(2049001, 7); // Clean Slate Scroll 3%
cm.gainItem(4000252, -7);
cm.sendOk("Thank you for your #b#v4000252##k!");
} else {
cm.sendOk("Sorry you dont have enough #b#v4000252##k!");
}
cm.dispose();
} else if (selection == 16) {
if(cm.haveItem(4000252, 7)) {
cm.gainItem(2049002, 7); // Clean Slate Scroll 5%
cm.gainItem(4000252, -7);
cm.sendOk("Thank you for your #b#v4000252##k!");
} else {
cm.sendOk("Sorry you dont have enough #b#v4000252##k!");
}
cm.dispose();
} else if (selection == 17) {
if(cm.haveItem(4000252, 7)) {
cm.gainItem(2049003, 7); // Clean Slate Scroll 20%
cm.gainItem(4000252, -7);
cm.sendOk("Thank you for your #b#v4000252##k!");
} else {
cm.sendOk("Sorry you dont have enough #b#v4000252##k!");
}
cm.dispose();
} else if (selection == 18) {
if(cm.haveItem(4000252, 7)) {
cm.gainItem(2070018, 3); // Balanced Fury stars
cm.gainItem(4000252, -7);
cm.sendOk("Thank you for your #b#v4000252##k!");
} else {
cm.sendOk("Sorry you dont have enough #b#v4000252##k!");
}
cm.dispose();
} else if (selection == 19) {
if(cm.haveItem(4000252, 10)) {
cm.gainItem(1002723, 1); // Rice Cake Hat
cm.gainItem(4000252, -10);
cm.sendOk("Thank you for your #b#v4000252##k!");
} else {
cm.sendOk("Sorry you dont have enough #b#v4000252##k!");
}
cm.dispose();
}
else{
cm.sendOk("All right. Come back later");
}
}
}
}