Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var time = [timeless, ids, in, here];
- var timeReq = ; // amount of points needed for timeless equips
- var scrll = [scroll, ids, in, here];
- var randReq = ; // amount of points needed for random scroll
- var choiceReq = [amounts, for, each, choice, scroll, here];
- var rand = Math.floor(Math.random()*scrll.length);
- var rareItems = [rare, ids, in, here];
- var rareReq = [amounts, for, each, rare, item, here];
- var c;
- var openTalk = "What do you want me to say?"; // opening dialog
- var talkToMe = "Make your choice below.\r\n\r\n";
- status = 0;
- function start(){
- cm.sendSimple(openTalk+"\r\n\r\n#L0#Timeless Equips#l\r\n#L1#Choose a scroll#l\r\n#L2#Random Scroll#l");
- }
- function action(m,t,s){
- if (m != 1){
- if (m == 0){
- cm.sendOk("Alright, come back later.");
- } cm.dispose();
- return;
- }else{
- if (s == 0){
- timeless(m,t,s);
- }else if (s == 1){
- scrolls(m,t,s);
- }else{
- rare(m,t,s);
- }
- }
- }
- function timeless(m,t,s){
- status++;
- if (status == 1){
- for (var i = 0; i < time.length; i++)
- cm.sendSimple(talkToMe+"#L"+i+"##v"+time[i]+"##l\r\n");
- }else if (status == 2){
- if (cm.getVotePoints() >= timeReq){
- cm.gainItem(time[s],1);
- cm.gainVotePoints(-timeReq);
- }else{
- cm.sendOk("Not enough points.");
- } cm.dispose();
- }
- }
- function scrolls(m,t,s){
- status++;
- if (status == 1){
- cm.sendSimple("Which do you want to choose? \r\n\r\n #L0#Random scroll for "+randReq+" Points \r\n #L1#Choose a scroll (Price varies)");
- }else if (status == 2){
- c = s;
- if (c == 0){
- if (cm.getVotePoints() >= randReq){
- cm.gainItem(scrll[rand],1);
- }else{
- cm.sendOk("Not enough points.");
- } cm.dispose();
- }else if (c == 1){
- for (var i = 0; i < scrll.length; i++)
- cm.sendSimple(talkToMe+"#L"+i+"##v"+scrll[i]+"# for "+choiceReq[i]+" Points#l\r\n");
- }
- }else if (status == 3){
- if (cm.getVotePoints() >= choiceReq[s]){
- cm.gainItem(scroll[s],1);
- cm.gainVotePoints(-choiceReq[s]);
- }else{
- cm.sendOk("Not enough points.");
- } cm.dispose();
- }
- }
- function rare(m,t,s){
- status++;
- if (status == 1){
- for (var i = 0; i < rareItems.length; i++)
- cm.sendSimple(talkToMe+"#L"+i+"##v"+rareItems[i]+"##l\r\n");
- }else if (status == 2){
- if (cm.getVotePoints() >= rareReq[s]){
- cm.gainItem(rareItems[s],1);
- cm.gainVotePoints(-rareReq[s]);
- }else{
- cm.sendOk("Not enough points.");
- } cm.dispose();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement