Guest User

Untitled

a guest
Dec 13th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. /*
  2. Name: Gachapon1
  3. Place: Henesys
  4. */
  5.  
  6. var status = -1;
  7.  
  8. function action(mode, type, selection) {
  9. if (mode == 1) {
  10. status++;
  11. } else {
  12. status--;
  13. }
  14. if (status == 0) {
  15. if (cm.haveItem(5220000)) {
  16. cm.sendYesNo("You have some #bGachapon Tickets#k there.\r\nWould you like to try your luck?");
  17. } else {
  18. 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.");
  19. cm.safeDispose();
  20. }
  21. } else if (status == 1) {
  22. var item;
  23. if (Math.floor(Math.random() * 300) == 0) {
  24. var rareList = new Array(3010177, 3010184, 3010321, 3010364, 3010030, 3010424, 3010032, 3010033);
  25.  
  26. item = cm.gainGachaponItem(rareList[Math.floor(Math.random() * rareList.length)], 1);
  27. } else {
  28. var itemList = new Array(3010145, 3010149, 3010307, 3010298, 3010256, 3010164, 3010167, 3010173, 3010364, 3010318, 3012015, 3013002,
  29. 3010234, 3010235, 3010236, 3010175, 3010172, 3010142, 3010140, 3010126, 3010108, 3010085, 3010077, 3010068, 3010071, 3010053, 3010041, 3010036, 3010007,
  30. 3010008, 3010009, 3010004, 3010010, 3010017, 3010016, 3010044, 3010049, 3010063);
  31.  
  32. item = cm.gainGachaponItem(itemList[Math.floor(Math.random() * itemList.length)], 1);
  33. }
  34.  
  35. if (item != -1) {
  36. cm.gainItem(5220000, -1);
  37. cm.sendOk("You have obtained #b#t" + item + "##k.");
  38. } else {
  39. cm.sendOk("Please check your item inventory and see if you have the ticket, or if the inventory is full.");
  40. }
  41. cm.safeDispose();
  42. }
  43. }
Add Comment
Please, Sign In to add comment