@chunkarama ME! huehue :D
Printable View
@chunkarama ME! huehue :D
Thank you for doing this. I wish more Maple developers would pay attention to flexibility and ease-of-use in their code design.
Some improvements to this; Add a check to status == 3
And matter of opinion, but adding a message if the user selects no in status == 2Code:if (cm.canHold(ITEMS[STORAGE1][STORAGE2][0])) {
cm.getPlayer().gainEventPoints(-ITEMS[STORAGE1][STORAGE2][1]);
cm.gainItem(ITEMS[STORAGE1][STORAGE2][0], 1);
cm.sendOk("Enjoy your #i"+ITEMS[STORAGE1][STORAGE2][0]+"# #t"+ITEMS[STORAGE1][STORAGE2][0]+"##k!");
} else {
cm.sendOk("It seems you don't have enough room in your inventory for #t"+ITEMS[STORAGE1][STORAGE2][0]+"#k.");
}
Also, making it a three-dimensional array allowing quantities as well would've been nice, but this is a great foundation~Code:if (status == 2 && mode == 0) {
cm.sendOk("Something");
cm.dispose();
}
Good job :)
Make sure it doesn't conflict with the ability to run code. Now I know there shouldn't be performance issues with your code if in the event it was given bigger values (maybe the ternary would be really annoying to write, which in that case you would use an array instead), but shorter code doesn't always equal efficient code.
sorry, i dont really get what you meant by 'add a check to status == 3'
also, about the quantities, i made this script with the idea of selling equips, a friend requested it. So i didnt really think of the quantities, but its a nice idea, i might add it if somebody needs it
I will say, despite the fact that I highly doubt you are who your name (I guess indirectly?) implies you're taking the reputation of...
Your scripting is extremely identical.
But, regardless, good release. This should help those less fortunate. (I know, I'm really late on this)
Thank you for this. :love: