Advertisement
Guest User

Untitled

a guest
May 28th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. //By: Devie
  2. //Function: Box -> Meso/Meso -> Box trader
  3.  
  4. var status = 0;
  5. var box = 4001232;
  6. var meso = 2000000000;
  7.  
  8. function start() {
  9. cm.sendNext("Hey, I heard you wanted to trade mesos for boxes?");
  10. }
  11.  
  12. function action(mode, type, selection) {
  13. status++;
  14. if (mode != 1) {
  15. cm.dispose();
  16. return;
  17. }
  18. if (status == 1) {
  19. 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");
  20. } else if (status == 2) {
  21. if (selection == 0) {
  22. if (cm.getMeso() > 1999999999) {
  23. cm.sendNext("Here you go");
  24. cm.gainMeso(-meso);
  25. cm.gainItem(box, 1);
  26. } else {
  27. cm.sendNext("Sorry, you don't have enough mesos");
  28. }
  29. } else if (selection == 1) {
  30. if (cm.haveItem(4001126, 1)) {
  31. cm.sendNext("Here are your mesos");
  32. cm.gainItem(box, -1);
  33. cm.gainMeso(meso);
  34. } else {
  35. cm.sendNext("You don't have any Boxes!");
  36. }
  37. }
  38. } else if (status == 3) {
  39. cm.sendOk("See you next time!");
  40. cm.dispose();
  41. } else {
  42. cm.dispose();
  43. }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement