Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Name: Gachapon1
- Place: Henesys
- */
- var status = -1;
- function action(mode, type, selection) {
- if (mode == 1) {
- status++;
- } else {
- status--;
- }
- if (status == 0) {
- if (cm.haveItem(5220000)) {
- cm.sendYesNo("You have some #bGachapon Tickets#k there.\r\nWould you like to try your luck?");
- } else {
- 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.");
- cm.safeDispose();
- }
- } else if (status == 1) {
- var item;
- if (Math.floor(Math.random() * 300) == 0) {
- var rareList = new Array(3010177, 3010184, 3010321, 3010364, 3010030, 3010424, 3010032, 3010033);
- item = cm.gainGachaponItem(rareList[Math.floor(Math.random() * rareList.length)], 1);
- } else {
- var itemList = new Array(3010145, 3010149, 3010307, 3010298, 3010256, 3010164, 3010167, 3010173, 3010364, 3010318, 3012015, 3013002,
- 3010234, 3010235, 3010236, 3010175, 3010172, 3010142, 3010140, 3010126, 3010108, 3010085, 3010077, 3010068, 3010071, 3010053, 3010041, 3010036, 3010007,
- 3010008, 3010009, 3010004, 3010010, 3010017, 3010016, 3010044, 3010049, 3010063);
- item = cm.gainGachaponItem(itemList[Math.floor(Math.random() * itemList.length)], 1);
- }
- if (item != -1) {
- cm.gainItem(5220000, -1);
- cm.sendOk("You have obtained #b#t" + item + "##k.");
- } else {
- cm.sendOk("Please check your item inventory and see if you have the ticket, or if the inventory is full.");
- }
- cm.safeDispose();
- }
- }
Add Comment
Please, Sign In to add comment