Excellzone

Forum and disscussions since 2010


You are not connected. Please login or register

View previous topic View next topic Go down Message [Page 1 of 1]

#1
Excell

avatar
Head Administer
Head Administer
var a1 = Math.floor(Math.random()*4+1);
var
a2 = Math.floor(Math.random()*4+1);
var
a3 = Math.floor(Math.random()*4+1);
var
a4 = Math.floor(Math.random()*4+1);
var
a5 = Math.floor(Math.random()*4+1);
var
a6 = Math.floor(Math.random()*4+1);
var
a7 = Math.floor(Math.random()*4+1);
var
a8 = Math.floor(Math.random()*4+1);
var
a9 = Math.floor(Math.random()*4+1);

var
status = 0;
var
cost = Array(1,10, 10*10, 1000,10000,100000,1000000);
var
amount = 0;
var
lulz = 0;
var
win = 0;

function
start() {
status = -1;
action(1, 0, 0);
}

function
action(mode, type, selection) {
if (
mode == -1) {
cm.dispose();
} else {
if (
mode == 0) {
cm.sendOk("Oh.. byebye");
cm.dispose();
return;
}
if (
mode == 1)
status++;
else
status--;
if (
status == 0) {
cm.sendYesNo("Do you want to gamble some mesos?\r\nThe jackpot: #r10x your bet!!!#k");
} else if (
status == 1) {
cm.sendSimple("#b#L1#I want to do try the Slot Machine#l\r\n#L2#I want to do the Lucky Guess#l#k");
} else if (
status == 2) {
var
text = "How much do you want to gamble?";
for (var
i = 0; i < cost.length; i++) {
text += "\r\n#L" + i + "##b" + cost[i] + "#k mesos";
}
cm.sendSimple(text);
if (
selection == 2) status = 5;
} else if (
status == 3) {
amount = cost[selection];
cm.sendYesNo("Are you sure you want to gamble #b" + amount + "#k mesos?");
} else if (
status == 4) {
if (
cm.getChar().getMeso() < amount) {
cm.sendOk("I'm sorry, but you don't have enough mesos");
cm.dispose();
return;
}
cm.gainMeso(-amount);
var
text2 = "";
for (var
b = 0; b < 3; b++) {
for (var
c = 0; c < 3; c++) {
lulz++;
switch(
lulz) {
case
1:
text2 += " #i" + (3992001 + a1) + "# |";
break;
case
2:
text2 += " #i" + (3992001 + a2) + "# |";
break;
case
3:
text2 += " #i" + (3992001 + a3) + "#\r\n-------------------------\r\n";
break;
case
4:
text2 += " #i" + (3992001 + a4) + "# |";
break;
case
5:
text2 += " #i" + (3992001 + a5) + "# |";
break;
case
6:
text2 += " #i" + (3992001 + a6) + "#\r\n-------------------------\r\n";
break;
case
7:
text2 += " #i" + (3992001 + a7) + "# |";
break;
case
8:
text2 += " #i" + (3992001 + a8) + "# |";
break;
case
9:
text2 += " #i" + (3992001 + a9) + "#";
break;
default:
text2 += "error";
break;
}
}
}
if (((
a1 == a2) && (a1 == a3)) || ((a1 == a5) && (a1 == a9)) || ((a4 == a5) && (a4 == a6)) || ((a7 == a8) && (a7 == a9)) || ((a7 == a5) && (a7 == a3))) {
if (((
a4 == a5) && (a4 == a6))) {
text2 += "#rJackpot! Jackpot! JACKITYPOT!#k";
win = 2;
} else {
text2 += "\r\n\r\nWow, it seems like #ryou have won#k!";
win = 1;
}
} else {
text2 += "\r\n\r\nSorry, but you #bhaven't won anything#k..";
win = 0;
}
cm.sendNext(text2);
lulz = 0;
a1 = Math.floor(Math.random()*4+1);
a2 = Math.floor(Math.random()*4+1);
a3 = Math.floor(Math.random()*4+1);
a4 = Math.floor(Math.random()*4+1);
a5 = Math.floor(Math.random()*4+1);
a6 = Math.floor(Math.random()*4+1);
a7 = Math.floor(Math.random()*4+1);
a8 = Math.floor(Math.random()*4+1);
a9 = Math.floor(Math.random()*4+1);
} else if (
status == 5) {
if (
win == 0) {
cm.sendOk("Better luck next time..\r\nGoodbye and thanks for participating");
cm.dispose();
} else if (
win == 1) {
cm.gainMeso(amount * 3);
cm.sendOk("I just tripled your bet!\r\nThanks for participating, and come back any time!");
cm.dispose();
} else {
cm.gainMeso(amount * 10);
cm.sendOk("Wow, good job on winning the #rJackpot#k!\r\nI just have multiplied your bet with 10\r\ncome back any time!");
cm.dispose();
}
} else if (
status == 6) {
amount = cost[selection];
cm.sendNext("Ah the lucky guess, i will present you 10 bags\r\nYou will have to open one to see what you have won");
} else if (
status == 7) {
if (
cm.getChar().getMeso() < amount) {
cm.sendOk("I'm sorry, but you don't have enough mesos");
cm.dispose();
return;
}
cm.gainMeso(-amount);
var
text = "";
for (var
a = 0; a < 10; a++) {
text += "#L" + a + "##v2100016##l";
}
cm.sendSimple(text);
} else if (
status == 8) {
var
xyz = Math.floor(Math.random()*10);
if (
selection == xyz) {
cm.gainMeso(amount * 10);
cm.sendOk("Wow, good job on winning the #rJackpot#k!\r\nI just have multiplied your bet with 10\r\ncome back any time!");
} else {
cm.sendOk("Sorry but there was nothing in that sack\r\nBetter luck next time..\r\nGoodbye and thanks for participating");
}
cm.dispose();
}
}
}

View user profile http://excellzone.mrforum.net

View previous topic View next topic Back to top Message [Page 1 of 1]


Permissions in this forum:
You cannot reply to topics in this forum