Someone help me fix this?
PHP Code:
//4280002 - Premium Gold Box (Worth 1,000 4001217)
//4001217 - Heart Mark (Main Trade Exchange)
function start() {
if (cm.haveItem(4280002) >= 1)
cm.sendSimple("Wow you found a Premium Gold Box #v4280002#!\r\nWould you like to trade it for 1,000 #v4001217# ?\r\n\r\n#L0##gYes!#k #l\r\n#L1##rNO!#k #l");
}
function action(mode, type, selection) {
cm.dispose();
if (selection == 0) {
if (cm.haveItem(4280002, 1))
cm.gainItem(4280002, -1);
cm.gainItem(40001217, 1000);
cm.sendOk("Enjoy your 1,000 #v40001217#");
cm.dispose();
}
if (selection == 1) {
cm.sendOk("Alright, Come back when you wanna trade!");
cm.dispose();
}
}
Can someone Tell my why MoopleDEV's saying "checkSpace error" and crashing maple?
Well, since its been over 2 hours, while i wait for someone to kindly help me, ill be Toying around with this untill i figure something out..
Re: Someone help me fix this?
PHP Code:
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) {
if (cm.haveItem(4280002, 1)) {
cm.sendSimple("Wow you found a Premium Gold Box #v4280002#!\r\nWould you like to trade it for 1,000 #v4001217# ?\r\n\r\n#L0##gYes!#k\r\n#L1##rNO!");
} else {
cm.sendOk("You dont have a Premium Gold Box");
cm.dispose();
}
} else if (selection == 0) {
cm.gainItem(4280002, -1);
cm.gainItem(40001217, 1000);
cm.sendOk("Enjoy your 1,000 #v40001217#");
cm.dispose();
}
if (selection == 1) {
cm.sendOk("Alright, Come back when you wanna trade!");
cm.dispose();
}
}
}
Re: Someone help me fix this?
PHP Code:
function start() {
cm.sendSimple("Wow you found a Premium Gold Box #v4280002#!\r\nWould you like to trade it for 1,000 #v4001217# ?\r\n\r\n#L0##gYes!#k\r\n#L1##rNO!\r\n");
}
function action(mode, type, selection) {
if (selection == 0) {
if (cm.haveItem(4280002, 1)) {
cm.gainItem(4280002, -1);
cm.gainItem(40001217, 1000);
cm.sendOk("Enjoy your 1,000 #v40001217#");
} else
cm.sendOk("Alright, come back when you want to trade!");
}
cm.dispose();
}
Not tested :D
Re: Someone help me fix this?
its suppose to be this i believe o.o
PHP Code:
function start() {
cm.sendSimple("Wow you found a Premium Gold Box #v4280002#!\r\nWould you like to trade it for 1,000 #v4001217# ?\r\n\r\n#L0##gYes!#k\r\n#L1##rNO!\r\n");
}
function action(mode, type, selection) {
if (selection == 0) {
if (cm.haveItem(4280002, 1)) {
cm.gainItem(4280002, -1);
cm.gainItem(40001217, 1000);
cm.sendOk("Enjoy your 1,000 #v40001217#");
} else {
cm.sendOk("Alright, come back when you want to trade!");
}
cm.dispose();
}
}
Re: Someone help me fix this?
Quote:
Originally Posted by
TiredGuy
its suppose to be this i believe o.o
PHP Code:
function start() {
cm.sendSimple("Wow you found a Premium Gold Box #v4280002#!\r\nWould you like to trade it for 1,000 #v4001217# ?\r\n\r\n#L0##gYes!#k\r\n#L1##rNO!\r\n");
}
function action(mode, type, selection) {
if (selection == 0) {
if (cm.haveItem(4280002, 1)) {
cm.gainItem(4280002, -1);
cm.gainItem(40001217, 1000);
cm.sendOk("Enjoy your 1,000 #v40001217#");
} else {
cm.sendOk("Alright, come back when you want to trade!");
}
cm.dispose();
}
}
If you do } else with a if else statement, you don't require a bracket after else.