Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //By: Devie
- //Function: Box -> Meso/Meso -> Box trader
- var status = 0;
- var box = 4001232;
- var meso = 2000000000;
- function start() {
- cm.sendNext("Hey, I heard you wanted to trade mesos for boxes?");
- }
- function action(mode, type, selection) {
- status++;
- if (mode != 1) {
- cm.dispose();
- return;
- }
- if (status == 1) {
- cm.sendSimple("#dBoxes cost #b2bil mesos#d each. <3 \r\n #L0##bTrade #v5200002# for #rMesos#b.#l \r\n #L1##rTrade #v4001232# for #rMesos#b.#l");
- } else if (status == 2) {
- if (selection == 0) {
- if (cm.getMeso() > 1999999999) {
- cm.sendNext("Here you go");
- cm.gainMeso(-meso);
- cm.gainItem(box, 1);
- } else {
- cm.sendNext("Sorry, you don't have enough mesos");
- }
- } else if (selection == 1) {
- if (cm.haveItem(4001126, 1)) {
- cm.sendNext("Here are your mesos");
- cm.gainItem(box, -1);
- cm.gainMeso(meso);
- } else {
- cm.sendNext("You don't have any Boxes!");
- }
- }
- } else if (status == 3) {
- cm.sendOk("See you next time!");
- cm.dispose();
- } else {
- cm.dispose();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement