Advertisement
Guest User

gacha

a guest
Jul 24th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. var status = -1;
  2.  
  3. function action(mode, type, selection) {
  4. if (mode == 1) {
  5. status++;
  6. } else {
  7. status--;
  8. }
  9. if (status == 0) {
  10. if (cm.haveItem(5220000)) {
  11. cm.sendYesNo("You have some #bGachapon Tickets#k there.\r\nWould you like to try your luck?");
  12. } else {
  13. cm.sendOk("You don't have a single ticket with you. Please buy the ticket at the department store before coming back to me. Thank you.");
  14. cm.safeDispose();
  15. }
  16. } else if (status == 1) {
  17. var item;
  18. if (Math.floor(Math.random() * 300) == 0) {
  19. item = cm.gainGachaponItem(1102042, 1);
  20. } else {
  21. var itemList = new Array(5062003,5062003,5062003,5062003,5062003,5062003,5062003,5062003,5062003,5062003,5062003,5062003,5062003,5062003,5062003,2040317, 3010013, 2000005, 2022113, 2043201, 2044001, 2041038, 2041039, 2041036, 2041037, 2041040, 2041041, 2041026, 2041027, 2044600, 2043301, 2040308, 2040309, 2040304, 2040305, 2040810, 2040811, 2040812, 2040813, 2040814, 2040815, 2040008, 2040009, 2040010, 2040011, 2040012, 2040013, 2040510, 2040511, 2040508, 2040509, 2040518, 2040519, 2040520, 2040521, 2044401, 2040900, 2040902, 2040908, 2040909, 2044301, 2040406, 2040407,1302026, 1061054, 1061054, 1452003, 145003, 1382037, 1302063, 1041067, 1372008, 1432006, 1332053, 1432016, 1302021, 1002393, 1051009, 1082148, 1102082, 143015, 1061043, 1452005, 1051016, 1442012, 1372017, 1332000, 1050026, 1041062);
  22. item = cm.gainGachaponItem(itemList[Math.floor(Math.random() * itemList.length)], 1);
  23. }
  24.  
  25. if (item != -1) {
  26. cm.gainItem(5220000, -1);
  27. cm.sendOk("You have obtained #b#t" + item + "##k.");
  28. } else {
  29. cm.sendOk("Please check your item inventory and see if you have the ticket, or if the inventory is full.");
  30. }
  31. cm.safeDispose();
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement