- Joined
- Oct 2, 2012
- Messages
- 82
- Reaction score
- 0
Honestly, i'm not sure why this happens but everytime i click on the npc and i go to select where it says 15 Sleepy Dream for a cygnus weapon, and when i select a cygnus weapon, it doesn't do anything, even though i wrote the code for if selection == 7 etc.
Here's the NPC:
Here's the NPC:
PHP:
importPackage(Packages.server);
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){
cm.dispose();
return;
} else {
if (mode == 1)
status++;
else
status--;
if (status == 0) {
cm.sendSimple("#e#bWelcome to the #kSleepy Dream NPC #bHere you can exchange your Sleepy Dreams for rewards." +
"\r\n#L0##b 10 Sleepy Dream for 3 Dragon Spirit." +
"\r\n#L1##b 15 Sleepy Dream for Cygnas Weapons." +
"\r\n#L2##b 35 Sleepy Dream for Spectrum Goggles +1000 All Stat and +1000 Watk/Matk." +
"\r\n#L3##b 25 Sleepy Dream for 10,000NX and 5 JQ Point." +
"\r\n#L4##b 40 Sleepy Dream for Clear/Transparent Chair." +
"\r\n#L5##b 50 Sleepy Dream for 25 Gachapon Stamp." +
"\r\n#L6##b 60 Sleepy Dream for 1 Rare NX Item of your choice." );
}else if (selection == 0) {
if (cm.haveItem(4001063, 10)) {
cm.gainItem(4001063, -10);
cm.gainItem(4000244, 3);
cm.sendOk("Here are your 3 Dragon Spirit #i4000244");
} else {
cm.sendOk("You don't have enough Sleepy Dreams.") }
cm.dispose();
}else if (selection == 1) {
if (cm.haveItem(4001063, 15)) {
cm.sendSimple("\r\n#L7##b Guardian Of Irina: #i1702256\r\n" +
"\r\n#L8##b Guardian Of Mihail: #i1702257\r\n" +
"\r\n#L9##b Guardian Of Oz: #i1702258\r\n" +
"\r\n#L10##b Guardian Of Hawkeye: #i1702259\r\n" +
"\r\n#L11##b Guardian Of Ickart: #i1702260\r\n" );
} else {
cm.sendOk("You don't have enough Sleepy Dreams.") }
cm.dispose();
}else if (selection == 7) {
if (cm.haveItem(4001063, 15)) {
cm.gainItem(4001063, -15);
cm.gainItem(1702256, 1);
cm.sendOk("Here is your Guardian Of Irina: #i1702256");
} else {
cm.sendOk("You don't have enough Sleepy Dreams.") }
cm.dispose();
}else if (selection == 8) {
if (cm.haveItem(4001063, 15)) {
cm.gainItem(4001063, -15);
cm.gainItem(1702257, 1);
cm.sendOk("Here is your Guardian Of Mihail: #i1702257");
} else {
cm.sendOk("You don't have enough Sleepy Dreams.") }
cm.dispose();
}else if (selection == 9) {
if (cm.haveItem(4001063, 15)) {
cm.gainItem(4001063, -15);
cm.gainItem(1702258, 1);
cm.sendOk("Here is your Guardian Of Oz: #i1702258");
} else {
cm.sendOk("You don't have enough Sleepy Dreams.") }
cm.dispose();
}else if (selection == 10) {
if (cm.haveItem(4001063, 15)) {
cm.gainItem(4001063, -15);
cm.gainItem(1702259, 1);
cm.sendOk("Here is your Guardian Of Hawkeye: #i1702259");
} else {
cm.sendOk("You don't have enough Sleepy Dreams.") }
cm.dispose();
}else if (selection == 11) {
if (cm.haveItem(4001063, 15)) {
cm.gainItem(4001063, -15);
cm.gainItem(1702260, 1);
cm.sendOk("Here is your Guardian Of Ickart: #i1702260");
} else {
cm.sendOk("You don't have enough Sleepy Dreams.") }
cm.dispose();
}
}
}

