Jump to content
  • 0
Sign in to follow this  
khenma

how to fix this lottery?

Question

why is the winning ticket id

 

doesnt match to my own ticket .... despite that the winning number is the same with my own ticket number?

 

ex. 

winning number : [2] [5]  Ticket ID 999999

my ticket: [2] [5] Ticket ID 444444

 

Suppose to be Win,, but when i claim the prize, invalid ticket number?

 

here is the script:

 

try this

 

//===== Hercules Script ======================================//= Lottery//===== By: ==================================================//= acky//===== Current Version: =====================================//= 1.2.1a//===== Description: =========================================//= Daily lottery draw//===== Additional Comments: =================================//= Numbers drawn daily (Time is configured line 29)//= *Added GM-Riggability//= *Ability to renew ticket//= *Improved interface//= *Fixed minor bug where first load didn't work.//= 1.2.1a fix due to new script engine//============================================================-	script	lotterygenerator1	-1,{OnInit:	set $L_TicketPrice1,5000; // TICKET COST	set $L_Prize_Money1,50000000; // JACKPOT AMOUNT	set $L_Prize_Money_Small,1000000; // SECONDARY PRIZE	if ($LID == 0) goto L_GenID1;	end;	//Modify for own timeOnClock0000:OnClock0100:OnClock0200:OnClock0300:OnClock0400:OnClock0500:OnClock0600:OnClock0700:OnClock0800:OnClock0900:OnClock1000:OnClock1100:OnClock1200:OnClock1300:OnClock1400:OnClock1500:OnClock1600:OnClock1700:OnClock1800:OnClock1900:OnClock2000:OnClock2100:OnClock2200:OnClock2300:	// CHECKS IF LOTTERY IS RIGGED	if ($L_Rigged1 == 1) goto L_Rigged_Draw1;	// GENERATES RANDOM NUMBERS 1-5Pick11:	set $LW7,rand (1,5);Pick21:	set $LW8,rand (1,5);	if ($LW8 == $LW1) goto Pick21;	// BROADCASTS DRAWL_Broadcast1:	announce "Lottery: Welcome to today's EZ2 lotto draw!",8;	announce "The numbers are as follows: [" + $LW7 + "] [" + $LW8 + "]",8;	announce "Congratulations to the winners of today's EZ2 lotto draw!",8;	// GENERATES DRAW ID CODEL_GenID1:	set $LID2,$LID;	// SETS TOMORROW'S ID NUMBER	set $LID,rand (1000000,9999999);	end;	// SETS DRAW TO RIGGED NUMBERSL_Rigged_Draw1:	set $LW7,$LR7;	set $LW8,$LR8;	set $L_Rigged1,0;	goto L_Broadcast1;}prontera,147,173,5	script	Lotto EZ2	1_F_ORIENT_02,{L_Begin1:	mes "[Lottery]";	mes "Winning Lotto Numbers ("+$LID2+"):";	mes "^0000FF[" + $LW7 + "] [" + $LW8 + "]^000000";	if ($LID > 1000000) mes "Your Ticket ("+#LID+"):";	if ($LID > 1000000) mes "^FF0000[" + #LW7 + "] [" + #LW8 + "]^000000";	mes "Next Draw-ID: ^FF0000" + $LID + "^000000.";	next;	if (getgmlevel() > 90) goto L_GM1;	menu "Claim Prize",L_Claim1,"Buy New Ticket",L_Buy1,"Cancel",L_Cancel1;// PURCHASE TICKETL_Buy1:	if (#LID == $LID && #L1 != 0) goto L_DoubleTicket1;	mes "[Lottery]";	mes "Tickets cost ^0000FF" + $L_TicketPrice1 + "z^000000.";	mes "The Jackpot is ^FF0000" + $L_Prize_Money1 + "z^000000.";	next;	menu "Buy Ticket",-,"Cancel",L_Cancel1;	if (Zeny < $L_TicketPrice1) goto L_NoZeny1;	Zeny -= $L_TicketPrice1;	mes "[Lottery]";	mes "Would you like your numbers hand picked or computer generated?";	next;	menu "Lucky Pick",L_ComputerGen1,"Hand Picked",L_HandPick1,"Renew Ticket",L_Renew1;// RENEW LAST TICKETL_Renew1:	if ($LID < 1000000) goto L_Invalid1;	set #LID,$LID;	goto L_Confirm21;L_ComputerGen1:// SELECTS RANDOM NUMBERS	set @L7,0;	set @L8,0;Pick11:	set @L7,rand (1,5);Pick21:	set @L8,rand (1,5);	if (@L8 == @L1) goto Pick21;	mes "[Lottery]";	mes "The computer has selected the following numbers:";	mes "^0000FF" + @L7 + " " + @L8 + "^000000";	next;	menu "Confirm",L_Confirm1,"Re-Generate",L_ComputerGen1;// HAND PICK LOTTERY NUMBERSL_HandPick1:	mes "[Lottery]";	mes "Please pick your numbers (1-5):";	set @L7,0;	set @L8,0;Input11:	input @L7;	if (@L7 < 1 || @L7 > 5) goto Input11;	mes @L7;Input21:	input @L8;	if (@L8 < 1 || @L8 > 5) goto Input21;	if (@L8 == @L7) goto Input21;	mes @L8;	next;	mes "[Lottery]";	mes "Your numbers are:";	mes "^0000FF" + @L7 + " " + @L8 + "^000000";	next;	menu "Confirm",L_Confirm1,"Re-Pick",L_HandPick1;L_Confirm1:	set #LW7,@L7;	set #LW8,@L8;	set #LID,$LID;L_Confirm21:	mes "[Lottery]";	mes "The live broadcasted draw is at every hour.";	mes "You can claim your ticket between then and the next draw.";	next;	mes "[Lottery]";	mes "Good luck!";	close;L_Claim1:	// CHECKS TICKET VALIDILITY	if (#LID != $LID2) goto L_Invalid1;	// CHECKS HOW MANY NUMBERS MATCHED	set @LPrize,0;	if (#LW7 == $LW7) set @LPrize,@LPrize+1;	if (#LW7 == $LW8) set @LPrize,@LPrize+1;	if (#LW8 == $LW7) set @LPrize,@LPrize+1;	if (#LW8 == $LW8) set @LPrize,@LPrize+1;	if (@LPrize == 2) goto LWinBig1;// NO WINNER	mes "[Lottery]";	mes "Bad luck, it appears you do not hold a winning ticket.";	next;	mes "[Lottery]";	mes "Better luck next time!.";	close;// MATCHED ALL SIXLWinBig1:	mes "[Lottery]";	mes "You have matched all two numbers!";	mes "Jackpot!";	mes "You've won ^0000FF" + $L_Prize_Money1 + "z^000000.";	Zeny += $L_Prize_Money1;	announce "Lottery: " + strcharinfo(0) + " has won the JACKPOT of " + $L_Prize_Money1 + "z!",8;	set #LID,0;	close;// NO ZENYL_NoZeny1:	mes "[Lottery]";	mes "You can't afford a lottery ticket.";	close;// INVALID TICKETL_Invalid1:	mes "[Lottery]";	mes "I'm sorry but it appears that you have an invalid ticket.";	close;// DOUBLE TICKETL_DoubleTicket1:	mes "[Lottery]";	mes "It appears that you already have a ticket for today.";	mes "You may only purchase one ticket per draw.";	close;L_Cancel1:	mes "[Lottery]";	mes "Come back soon!";	close;// GM MENU (Lets you manually do draws)L_GM1:	menu "Claim Prize",L_Claim1,"Buy New Ticket",L_Buy1,"[GM]Do Draw Now",-,"[GM]Rig the Lottery",L_GM_Rig1,"Cancel",L_Cancel1;	// CHECKS IF LOTTERY IS RIGGED	if ($L_Rigged1 == 1) goto L_Rigged_Draw1;	// GENERATES RANDOM NUMBERS 1-5GMPick11:	set $LW7,rand (1,5);GMPick21:	set $LW8,rand (1,5);	if ($LW8 == $LW7) goto GMPick21;// BROADCASTS DRAWL_Broadcast1:	announce "Lottery: Welcome to the special GM's lotto draw!",8;	announce "The numbers are as follows: [" + $LW7 + "] [" + $LW8 + "]",8;	announce "Congratulations to the winners!",8;// GENERATES DRAW ID CODEL_GenID1:	set $LID2,$LID;	// SETS TOMORROW'S ID NUMBER	set $LID,rand (1000000,9999999);	close;// SETS DRAW TO RIGGED NUMBERSL_Rigged_Draw1:	set $LW7,$LR8;	set $LW8,$LR8;	set $L_Rigged1,0;	goto L_Broadcast1;// ALLOWS GM TO DO A RIGGED DRAWL_GM_Rig1:	mes "[Lottery]";	mes "Please pick your numbers (1-5):";	set $LR7,0;	set $LR8,0;GMInput11:	input $LR7;	if ($LR7 < 1 || $LR8 > 5) goto GMInput11;	mes $LR7;GMInput21:	input $LR8;	if ($LR8 < 1 || $LR8 > 5) goto GMInput21;	if ($LR8 == $LR7) goto GMInput21;	mes $LR8;	next;	mes "[Lottery]";	mes "Lottery rigged for next draw.";	set $L_Rigged1,1;	close;}
Edited by khenma

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Like your example you have different Ticket ID. maybe you miss to claim it and after an hour it draw a new number.

ex.

you buy a ticket for 3:00pm draw and you miss to claim it and after an hour the Ez2 lotto draw the 4:00pm draw and you are trying to claim the ticket for 3:00pm draw which is not a valid ticket anymore because it have a different Ticket ID.

 

EZ2 Lotto

[cbox]//===== eAthena Script =======================================

//= Ez2 Lottery Script

//===== By: ==================================================

//= chan - teamcars1broglobal.blogspot.com

//===== Current Version: =====================================

//= 1.1.1a

//===== Compatible With: =====================================

//= Any Hercules Version

//===== Description: =========================================

//= Ez2 lottery draw.

//= Just like in Ez2 Lotto in the Philippines

//===== Additional Comments: =================================

//= Numbers drawn daily every hour

//= this is from acky Lottery Script

//= I just modify it

//============================================================

 

prontera,162,194,5 script ezlotterygenerator 817,{

 

OnInit:

waitingroom "Let's Play Ez2 Lotto",0;

set $L_TicketPrice,10; // TICKET COST

set $L_Prize_Money,1000000; // JACKPOT AMOUNT

set $L_Prize_Money_Small,500000; // SECONDARY PRIZE

if ($LID == 0) goto L_GenID;

end;

 

//Modify for own time

OnClock0000:

OnClock0100:

OnClock0200:

OnClock0300:

OnClock0400:

OnClock0500:

OnClock0600:

OnClock0700:

OnClock0800:

OnClock0900:

OnClock1000:

OnClock1100:

OnClock1200:

OnClock1300:

OnClock1400:

OnClock1500:

OnClock1600:

OnClock1700:

OnClock1800:

OnClock1900:

OnClock2000:

OnClock2100:

OnClock2200:

OnClock2300:

set $S_LastDr$,gettimestr("%H:%M",21);

goto C_Ez2;

 

C_Ez2:

// CHECKS IF LOTTERY IS RIGGED

if ($L_Rigged == 1) goto L_Rigged_Draw;

// GENERATES RANDOM NUMBERS 1-31

Pick1:

set $LW1,rand (1,31);

Pick2:

set $LW2,rand (1,31);

 

 

 

// BROADCASTS DRAW

L_Broadcast:

announce "Welcome to Ez2 Lotto " + $S_LastDr$ + " Draw!",8;

announce "The numbers are as follows: [" + $LW1 + "] [" + $LW2 + "]",8;

announce "Congratulations to the winners of Ez2 Lotto!",8;

 

 

// GENERATES DRAW ID CODE

L_GenID:

set $LID2,$LID;

// setS Next ID NUMBER

set $LID,rand (100000,999999);

end;

 

// setS DRAW TO RIGGED NUMBERS

L_Rigged_Draw:

 

set $LW1,$LR1;

set $LW2,$LR2;

set $L_Rigged,0;

goto L_Broadcast;

 

}

 

// BEGIN LOTTERY SCRIPT

- script ezlottery 76,{

L_Begin:

mes "[^008800Ez2 Teller^000000]";

mes "Winning EZ2 Lotto Numbers ("+$LID2+"):";

mes "The Last Draw ^0000FF[" + $S_LastDr$ + "]^000000";

mes "^0000FF[" + $LW1 + "] [" + $LW2 + "]^000000";

if ($LID > 99999) mes "Your Ticket ("+#LID+"):";

if ($LID > 99999) mes "^FF0000[" + #LW1 + "] [" + #LW2 + "]^000000";

mes "Next Draw-ID: ^FF0000" + $LID + "^000000.";

next;

if (getgmlevel() > 2) goto L_GM;

menu "Claim Prize",L_Claim,"Buy New Ticket",L_Buy,"Cancel",L_Cancel;

 

// PURCHASE TICKET

L_Buy:

if (#LID == $LID && #LW1 != 0) goto L_DoubleTicket;

mes "[^008800Ez2 Teller^000000]";

mes "Tickets cost ^0000FF" + $L_TicketPrice + "z^000000.";

mes "The Jackpot is ^FF0000" + $L_Prize_Money + "z^000000.";

next;

menu "Buy Ticket",-,"Cancel",L_Cancel;

if (Zeny < $L_TicketPrice) goto L_NoZeny;

set Zeny,Zeny-$L_TicketPrice;

mes "[^008800Ez2 Teller^000000]";

mes "Would you like your numbers Hand Picked or Lucky Picked?";

next;

menu "Lucky Picked",L_ComputerGen,"Hand Picked",L_HandPick,"Renew Ticket",L_Renew;

 

// RENEW LAST TICKET

L_Renew:

if ($LID < 99999) goto L_Invalid;

set #LID,$LID;

goto L_Confirm2;

 

L_ComputerGen:

// SELECTS RANDOM NUMBERS

set @L1,0;

set @L2,0;

 

Pick1:

set @L1,rand (1,31);

Pick2:

set @L2,rand (1,31);

 

 

mes "[^008800Ez2 Teller^000000]";

mes "The computer has selected the following numbers:";

mes "^0000FF" + @L1 + " " + @L2 + "^000000";

next;

menu "Confirm",L_Confirm,"Re-Generate",L_ComputerGen;

 

// HAND PICK LOTTERY NUMBERS

L_HandPick:

mes "[^008800Ez2 Teller^000000]";

mes "Please pick your numbers (1-31):";

set @L1,0;

set @L2,0;

 

input1:

input @L1;

if (@L1 < 1 || @L1 > 31) goto input1;

mes @L1;

input2:

input @L2;

if (@L2 < 1 || @L2 > 31) goto input2;

 

mes @L2;

 

next;

mes "[^008800Ez2 Teller^000000]";

mes "Your numbers are:";

mes "^0000FF" + @L1 + " " + @L2 + "^000000";

next;

menu "Confirm",L_Confirm,"Re-Pick",L_HandPick;

 

L_Confirm:

set #LW1,@L1;

set #LW2,@L2;

set #LID,$LID;

L_Confirm2:

mes "[^008800Ez2 Teller^000000]";

mes "The live broadcasted draw are at 11am, 4pm and 9pm";

mes "You can claim your ticket between then and the next draw.";

next;

mes "[^008800Ez2 Teller^000000]";

mes "Good luck!";

close;

 

L_Claim:

// CHECKS TICKET VALIDILITY

if (#LID != $LID2) goto L_Invalid;

// CHECKS HOW MANY NUMBERS MATCHED

set @LPrize,0;

if (#LW1 == $LW1) set @LPrize,@LPrize+1;

if (#LW2 == $LW2) set @LPrize,@LPrize+1;

if (@LPrize == 2) goto LWinBig;

if (#LW1 == $LW2) set @LPrize,@LPrize+2;

if (#LW2 == $LW1) set @LPrize,@LPrize+2;

if (@LPrize == 4) goto LWinSmall;

 

// NO WINNER

mes "[^008800Ez2 Teller^000000]";

mes "Bad luck, it appears you do not hold a winning ticket.";

next;

mes "[^008800Ez2 Teller^000000]";

mes "Better luck next time!.";

set #LID,0;

close;

 

// MATCHED TWO IN EXACT ORDER

LWinBig:

mes "[^008800Ez2 Teller^000000]";

mes "You have matched Two Numbers in Exact Order";

mes "Jackpot!";

mes "You've won ^0000FF" + $L_Prize_Money + "z^000000.";

set Zeny,Zeny+$L_Prize_Money;

announce "Ez2 Teller: " + strcharinfo(0) + " has won the JACKPOT of " + $L_Prize_Money + "z!",8;

set #LID,0;

close;

 

// MATCHED TWO I RANDOM ORDER

LWinSmall:

mes "[^008800Ez2 Teller^000000]";

mes "You have matched Two numbers in Random Order";

mes "You've won ^0000FF" + $L_Prize_Money_Small + "z^000000.";

set Zeny,Zeny+$L_Prize_Money_Small;

announce "Ez2 Teller: " + strcharinfo(0) + " has won a prize of " + $L_Prize_Money_Small + "z!",8;

set #LID,0;

close;

 

// NO Zeny

L_NoZeny:

mes "[^008800Ez2 Teller^000000]";

mes "You can't afford a Ez2 Lottery ticket.";

close;

 

// INVALID TICKET

L_Invalid:

mes "[^008800Ez2 Teller^000000]";

mes "I'm sorry but it appears that you have an invalid ticket.";

close;

 

// DOUBLE TICKET

L_DoubleTicket:

mes "[^008800Ez2 Teller^000000]";

mes "It appears that you already have a ticket for today.";

mes "You may only purchase one ticket per draw.";

close;

 

L_Cancel:

mes "[^008800Ez2 Teller^000000]";

mes "Come back soon!";

close;

 

// GM MENU (Lets you manually do draws)

L_GM:

menu "Claim Prize",L_Claim,"Buy New Ticket",L_Buy,"[GM]Do Draw Now",-,"[GM]Rig the Ez2 Lottery",L_GM_Rig,"Cancel",L_Cancel;

 

// CHECKS IF Lottery IS RIGGED

if ($L_Rigged == 1) goto L_Rigged_Draw;

// GENERATES RANDOM NUMBERS 1-31

GMPick1:

set $LW1,rand (1,31);

 

GMPick2:

set $LW2,rand (1,31);

 

 

 

// BROADCASTS DRAW

L_Broadcast:

announce "Ez2 Teller: Welcome to the Special GM's Ez2 Lotto draw!",8;

announce "The numbers are as follows: [" + $LW1 + "] [" + $LW2 + "]",8;

announce "Congratulations to the Ez2 Lotto winners!",8;

 

// GENERATES DRAW ID CODE

L_GenID:

set $LID2,$LID;

// setS Next ID NUMBER

set $LID,rand (100000,999999);

set $S_LastDr$,"Special GM's draw!";

close;

 

// setS DRAW TO RIGGED NUMBERS

L_Rigged_Draw:

set $LW1,$LR1;

set $LW2,$LR2;

set $L_Rigged,0;

goto L_Broadcast;

 

// ALLOWS GM TO DO A RIGGED DRAW

L_GM_Rig:

mes "[Lottery]";

mes "Please pick your numbers (1-31):";

set $LR1,0;

set $LR2,0;

GMinput1:

input $LR1;

if ($LR1 < 1 || $LR1 > 31) goto GMinput1;

mes $LR1;

GMinput2:

input $LR2;

if ($LR2 < 1 || $LR2 > 31) goto GMinput2;

 

mes $LR2;

next;

mes "[^008800Ez2 Teller^000000]";

mes "Lottery rigged for next draw.";

set $L_Rigged,1;

close;

}

 

prontera,162,194,5 duplicate(ezlottery) Ez2 Lotto Teller 817[/cbox]

Edited by themon

Share this post


Link to post
Share on other sites
  • 0

you can try this Keno Lotto also if you like

[cbox]prontera,166,198,5 script Klotterygenerator 817,{

OnInit:

waitingroom "Let's Play Keno Lotto",0;

set $KENO_TicketPrice,10; // TICKET COST

set $KENO_Prize_Money,30000000; // JACKPOT AMOUNT

if ($LKID == 0) goto KENO_GenID;

end;

 

//Modify for own time

//add any other HOURS

OnClock0000:

OnClock0100:

OnClock0200:

OnClock0300:

OnClock0400:

OnClock0500:

OnClock0600:

OnClock0700:

OnClock0800:

OnClock0900:

OnClock1000:

OnClock1100:

OnClock1200:

OnClock1300:

OnClock1400:

OnClock1500:

OnClock1600:

OnClock1700:

OnClock1800:

OnClock1900:

OnClock2000:

OnClock2100:

OnClock2200:

OnClock2300:

//-------------------

// CHECKS IF LOTTERY IS RIGGED

if ($KENO_Rigged == 1) goto KENO_Rigged_Draw;

// GENERATES RANDOM NUMBERS 1-80

KPick1:

set $LkW1,rand (1,80);

 

KPick2:

set $LkW2,rand (1,80);

if ($LkW2 == $LkW1) goto KPick2;

 

KPick3:

set $LkW3,rand (1,80);

if ($LkW3 == $LkW2) goto KPick3;

if ($LkW3 == $LkW1) goto KPick3;

 

KPick4:

set $LkW4,rand (1,80);

if ($LkW4 == $LkW2) goto KPick4;

if ($LkW4 == $LkW1) goto KPick4;

if ($LkW4 == $LkW3) goto KPick4;

 

KPick5:

set $LkW5,rand (1,80);

if ($LkW5 == $LkW1) goto KPick5;

if ($LkW5 == $LkW2) goto KPick5;

if ($LkW5 == $LkW3) goto KPick5;

if ($LkW5 == $LkW4) goto KPick5;

 

KPick6:

set $LkW6,rand (1,80);

if ($LkW6 == $LkW1) goto KPick6;

if ($LkW6 == $LkW2) goto KPick6;

if ($LkW6 == $LkW3) goto KPick6;

if ($LkW6 == $LkW4) goto KPick6;

if ($LkW6 == $LkW5) goto KPick6;

 

KPick7:

set $LkW7,rand (1,80);

if ($LkW7 == $LkW1) goto KPick7;

if ($LkW7 == $LkW2) goto KPick7;

if ($LkW7 == $LkW3) goto KPick7;

if ($LkW7 == $LkW4) goto KPick7;

if ($LkW7 == $LkW5) goto KPick7;

if ($LkW7 == $LkW6) goto KPick7;

 

KPick8:

set $LkW8,rand (1,80);

if ($LkW8 == $LkW1) goto KPick8;

if ($LkW8 == $LkW2) goto KPick8;

if ($LkW8 == $LkW3) goto KPick8;

if ($LkW8 == $LkW4) goto KPick8;

if ($LkW8 == $LkW5) goto KPick8;

if ($LkW8 == $LkW6) goto KPick8;

if ($LkW8 == $LkW7) goto KPick8;

 

KPick9:

set $LkW9,rand (1,80);

if ($LkW9 == $LkW1) goto KPick9;

if ($LkW9 == $LkW2) goto KPick9;

if ($LkW9 == $LkW3) goto KPick9;

if ($LkW9 == $LkW4) goto KPick9;

if ($LkW9 == $LkW5) goto KPick9;

if ($LkW9 == $LkW6) goto KPick9;

if ($LkW9 == $LkW7) goto KPick9;

if ($LkW9 == $LkW8) goto KPick9;

 

KPick10:

set $LkW10,rand (1,80);

if ($LkW10 == $LkW1) goto KPick10;

if ($LkW10 == $LkW2) goto KPick10;

if ($LkW10 == $LkW3) goto KPick10;

if ($LkW10 == $LkW4) goto KPick10;

if ($LkW10 == $LkW5) goto KPick10;

if ($LkW10 == $LkW6) goto KPick10;

if ($LkW10 == $LkW7) goto KPick10;

if ($LkW10 == $LkW8) goto KPick10;

if ($LkW10 == $LkW9) goto KPick10;

 

KPick11:

set $LkW11,rand (1,80);

if ($LkW11 == $LkW1) goto KPick11;

if ($LkW11 == $LkW2) goto KPick11;

if ($LkW11 == $LkW3) goto KPick11;

if ($LkW11 == $LkW4) goto KPick11;

if ($LkW11 == $LkW5) goto KPick11;

if ($LkW11 == $LkW6) goto KPick11;

if ($LkW11 == $LkW7) goto KPick11;

if ($LkW11 == $LkW8) goto KPick11;

if ($LkW11 == $LkW9) goto KPick11;

if ($LkW11 == $LkW10) goto KPick11;

 

KPick12:

set $LkW12,rand (1,80);

if ($LkW12 == $LkW1) goto KPick12;

if ($LkW12 == $LkW2) goto KPick12;

if ($LkW12 == $LkW3) goto KPick12;

if ($LkW12 == $LkW4) goto KPick12;

if ($LkW12 == $LkW5) goto KPick12;

if ($LkW12 == $LkW6) goto KPick12;

if ($LkW12 == $LkW7) goto KPick12;

if ($LkW12 == $LkW8) goto KPick12;

if ($LkW12 == $LkW9) goto KPick12;

if ($LkW12 == $LkW10) goto KPick12;

if ($LkW12 == $LkW11) goto KPick12;

 

KPick13:

set $LkW13,rand (1,80);

if ($LkW13 == $LkW1) goto KPick13;

if ($LkW13 == $LkW2) goto KPick13;

if ($LkW13 == $LkW3) goto KPick13;

if ($LkW13 == $LkW4) goto KPick13;

if ($LkW13 == $LkW5) goto KPick13;

if ($LkW13 == $LkW6) goto KPick13;

if ($LkW13 == $LkW7) goto KPick13;

if ($LkW13 == $LkW8) goto KPick13;

if ($LkW13 == $LkW9) goto KPick13;

if ($LkW13 == $LkW10) goto KPick13;

if ($LkW13 == $LkW11) goto KPick13;

if ($LkW13 == $LkW12) goto KPick13;

 

KPick14:

set $LkW14,rand (1,80);

if ($LkW14 == $LkW1) goto KPick14;

if ($LkW14 == $LkW2) goto KPick14;

if ($LkW14 == $LkW3) goto KPick14;

if ($LkW14 == $LkW4) goto KPick14;

if ($LkW14 == $LkW5) goto KPick14;

if ($LkW14 == $LkW6) goto KPick14;

if ($LkW14 == $LkW7) goto KPick14;

if ($LkW14 == $LkW8) goto KPick14;

if ($LkW14 == $LkW9) goto KPick14;

if ($LkW14 == $LkW10) goto KPick14;

if ($LkW14 == $LkW11) goto KPick14;

if ($LkW14 == $LkW12) goto KPick14;

if ($LkW14 == $LkW13) goto KPick14;

 

KPick15:

set $LkW15,rand (1,80);

if ($LkW15 == $LkW1) goto KPick15;

if ($LkW15 == $LkW2) goto KPick15;

if ($LkW15 == $LkW3) goto KPick15;

if ($LkW15 == $LkW4) goto KPick15;

if ($LkW15 == $LkW5) goto KPick15;

if ($LkW15 == $LkW6) goto KPick15;

if ($LkW15 == $LkW7) goto KPick15;

if ($LkW15 == $LkW8) goto KPick15;

if ($LkW15 == $LkW9) goto KPick15;

if ($LkW15 == $LkW10) goto KPick15;

if ($LkW15 == $LkW11) goto KPick15;

if ($LkW15 == $LkW12) goto KPick15;

if ($LkW15 == $LkW13) goto KPick15;

if ($LkW15 == $LkW14) goto KPick15;

 

KPick16:

set $LkW16,rand (1,80);

if ($LkW16 == $LkW1) goto KPick16;

if ($LkW16 == $LkW2) goto KPick16;

if ($LkW16 == $LkW3) goto KPick16;

if ($LkW16 == $LkW4) goto KPick16;

if ($LkW16 == $LkW5) goto KPick16;

if ($LkW16 == $LkW6) goto KPick16;

if ($LkW16 == $LkW7) goto KPick16;

if ($LkW16 == $LkW8) goto KPick16;

if ($LkW16 == $LkW9) goto KPick16;

if ($LkW16 == $LkW10) goto KPick16;

if ($LkW16 == $LkW11) goto KPick16;

if ($LkW16 == $LkW12) goto KPick16;

if ($LkW16 == $LkW13) goto KPick16;

if ($LkW16 == $LkW14) goto KPick16;

if ($LkW16 == $LkW15) goto KPick16;

 

KPick17:

set $LkW17,rand (1,80);

if ($LkW17 == $LkW1) goto KPick17;

if ($LkW17 == $LkW2) goto KPick17;

if ($LkW17 == $LkW3) goto KPick17;

if ($LkW17 == $LkW4) goto KPick17;

if ($LkW17 == $LkW5) goto KPick17;

if ($LkW17 == $LkW6) goto KPick17;

if ($LkW17 == $LkW7) goto KPick17;

if ($LkW17 == $LkW8) goto KPick17;

if ($LkW17 == $LkW9) goto KPick17;

if ($LkW17 == $LkW10) goto KPick17;

if ($LkW17 == $LkW11) goto KPick17;

if ($LkW17 == $LkW12) goto KPick17;

if ($LkW17 == $LkW13) goto KPick17;

if ($LkW17 == $LkW14) goto KPick17;

if ($LkW17 == $LkW15) goto KPick17;

if ($LkW17 == $LkW16) goto KPick17;

 

KPick18:

set $LkW18,rand (1,80);

if ($LkW18 == $LkW1) goto KPick18;

if ($LkW18== $LkW2) goto KPick18;

if ($LkW18== $LkW3) goto KPick18;

if ($LkW18== $LkW4) goto KPick18;

if ($LkW18== $LkW5) goto KPick18;

if ($LkW18== $LkW6) goto KPick18;

if ($LkW18== $LkW7) goto KPick18;

if ($LkW18== $LkW8) goto KPick18;

if ($LkW18== $LkW9) goto KPick18;

if ($LkW18== $LkW10) goto KPick18;

if ($LkW18== $LkW11) goto KPick18;

if ($LkW18== $LkW12) goto KPick18;

if ($LkW18== $LkW13) goto KPick18;

if ($LkW18== $LkW14) goto KPick18;

if ($LkW18== $LkW15) goto KPick18;

if ($LkW18== $LkW16) goto KPick18;

if ($LkW18== $LkW17) goto KPick18;

 

KPick19:

set $LkW19,rand (1,80);

if ($LkW19 == $LkW1) goto KPick19;

if ($LkW19== $LkW2) goto KPick19;

if ($LkW19== $LkW3) goto KPick19;

if ($LkW19== $LkW4) goto KPick19;

if ($LkW19== $LkW5) goto KPick19;

if ($LkW19== $LkW6) goto KPick19;

if ($LkW19== $LkW7) goto KPick19;

if ($LkW19== $LkW8) goto KPick19;

if ($LkW19== $LkW9) goto KPick19;

if ($LkW19== $LkW10) goto KPick19;

if ($LkW19== $LkW11) goto KPick19;

if ($LkW19== $LkW12) goto KPick19;

if ($LkW19== $LkW13) goto KPick19;

if ($LkW19== $LkW14) goto KPick19;

if ($LkW19== $LkW15) goto KPick19;

if ($LkW19== $LkW16) goto KPick19;

if ($LkW19== $LkW17) goto KPick19;

if ($LkW19== $LkW18) goto KPick19;

 

KPick20:

set $LkW20,rand (1,80);

if ($LkW20 == $LkW1) goto KPick20;

if ($LkW20== $LkW2) goto KPick20;

if ($LkW20== $LkW3) goto KPick20;

if ($LkW20== $LkW4) goto KPick20;

if ($LkW20== $LkW5) goto KPick20;

if ($LkW20== $LkW6) goto KPick20;

if ($LkW20== $LkW7) goto KPick20;

if ($LkW20== $LkW8) goto KPick20;

if ($LkW20== $LkW9) goto KPick20;

if ($LkW20== $LkW10) goto KPick20;

if ($LkW20== $LkW11) goto KPick20;

if ($LkW20== $LkW12) goto KPick20;

if ($LkW20== $LkW13) goto KPick20;

if ($LkW20== $LkW14) goto KPick20;

if ($LkW20== $LkW15) goto KPick20;

if ($LkW20== $LkW16) goto KPick20;

if ($LkW20== $LkW17) goto KPick20;

if ($LkW20== $LkW18) goto KPick20;

if ($LkW20== $LkW19) goto KPick20;

 

 

// BROADCASTS DRAW

KENO_Broadcast:

announce "Keno Teller: Welcome to KENO Lotto draw!",8;

announce "The numbers are as follows: [" + $LkW1 + "] [" + $LkW2 + "] [" + $LkW3 + "] [" + $LkW4 + "] [" + $LkW5 + "]",8;

announce "The numbers are as follows: [" + $LkW6 + "] [" + $LkW7 + "] [" + $LkW8 + "] [" + $LkW9 + "] [" + $LkW10 + "]",8;

announce "The numbers are as follows: [" + $LkW11 + "] [" + $LkW12 + "] [" + $LkW13 + "] [" + $LkW14 + "] [" + $LkW15 + "]",8;

announce "The numbers are as follows: [" + $LkW16 + "] [" + $LkW17 + "] [" + $LkW18 + "] [" + $LkW19 + "] [" + $LkW20 + "]",8;

announce "Congratulations to the winners of " + gettimestr("%H:%M",21) + " Keno Draw ",8;

 

// GENERATES DRAW ID CODE

KENO_GenID:

set $LKID2,$LKID;

// setS TOMORROW'S ID NUMBER

set $LKID,rand (100000,999999);

end;

 

// setS DRAW TO RIGGED NUMBERS

KENO_Rigged_Draw:

set $LkW1,$LkR1;

set $LkW2,$LkR2;

set $LkW3,$LkR3;

set $LkW4,$LkR4;

set $LkW5,$LkR5;

set $LkW6,$LkR6;

set $LkW7,$LkR7;

set $LkW8,$LkR8;

set $LkW9,$LkR9;

set $LkW10,$LkR10;

set $LkW11,$LkR11;

set $LkW12,$LkR12;

set $LkW13,$LkR13;

set $LkW14,$LkR14;

set $LkW15,$LkR15;

set $LkW16,$LkR16;

set $LkW17,$LkR17;

set $LkW18,$LkR18;

set $LkW19,$LkR19;

set $LkW20,$LkR20;

set $KENO_Rigged,0;

goto KENO_Broadcast;

}

 

// BEGIN LOTTERY SCRIPT

- script klottery 76,{

KENO_Begin:

mes "[^008800Keno Teller^000000]";

mes "Winning KENO Lotto Numbers (^00FF00"+$LKID2+"^000000):";

mes "^FF0000[" + $LkW1 + "] [" + $LkW2 + "] [" + $LkW3 + "] [" + $LkW4 + "] [" + $LkW5 + "]^000000";

mes "^0000FF[" + $LkW6 + "] [" + $LkW7 + "] [" + $LkW8 + "] [" + $LkW9 + "] [" + $LkW10 + "]^000000";

mes "^FF0000[" + $LkW11 + "] [" + $LkW12 + "] [" + $LkW13 + "] [" + $LkW14 + "] [" + $LkW15 + "]^000000";

mes "^0000FF[" + $LkW16 + "] [" + $LkW17 + "] [" + $LkW18 + "] [" + $LkW19 + "] [" + $LkW20 + "]^000000";

if ($LKID > 99999) mes "Your Ticket ("+#LkID+"):";

if ($LKID > 99999) mes "^FF0000[" + #LkW1 + "] [" + #LkW2 + "] [" + #LkW3 + "] [" + #LkW4 + "] [" + #LkW5 + "]^000000";

mes "^0000FF[" + #LkW6 + "] [" + #LkW7 + "] [" + #LkW8 + "] [" + #LkW9 + "] [" + #LkW10 + "]^000000";

mes "Next Draw-ID: ^FF0000" + $LKID + "^000000.";

next;

if (getgmlevel() > 90) goto KENO_GM;

menu "Claim Prize",KENO_Claim,"Buy New Ticket",KENO_Buy,"Cancel",KENO_Cancel;

 

// PURCHASE TICKET

KENO_Buy:

if (#LkID == $LKID && #LkW1 != 0) goto KENO_DoubleTicket;

mes "[^008800Keno Teller^000000]";

mes "Tickets cost ^0000FF" + $KENO_TicketPrice + "z^000000.";

mes "The Jackpot is ^FF0000" + $KENO_Prize_Money + "z^000000.";

next;

menu "Buy Ticket",-,"Cancel",KENO_Cancel;

if (Zeny < $KENO_TicketPrice) goto KENO_NoZeny;

set Zeny,Zeny-$KENO_TicketPrice;

mes "[^008800Keno Teller^000000]";

mes "Would you like your numbers hand Picked or computer generated?";

next;

menu "Computer Generated",KENO_ComputerGen,"Hand Picked",KENO_HandPick,"Renew Ticket",KENO_Renew;

 

// RENEW LAST TICKET

KENO_Renew:

if ($LKID < 99999) goto KENO_Invalid;

set #LkID,$LKID;

goto KENO_Confirm2;

 

KENO_ComputerGen:

// SELECTS RANDOM NUMBERS

set @Lk1,0;

set @Lk2,0;

set @Lk3,0;

set @Lk4,0;

set @Lk5,0;

set @Lk6,0;

set @Lk7,0;

set @Lk8,0;

set @Lk9,0;

set @Lk10,0;

 

KPick1:

set @Lk1,rand (1,80);

 

KPick2:

set @Lk2,rand (1,80);

if (@Lk2 == @Lk1) goto KPick2;

 

KPick3:

set @Lk3,rand (1,80);

if (@Lk3 == @Lk2) goto KPick3;

if (@Lk3 == @Lk1) goto KPick3;

 

KPick4:

set @Lk4,rand (1,80);

if (@Lk4 == @Lk2) goto KPick4;

if (@Lk4 == @Lk1) goto KPick4;

if (@Lk4 == @Lk3) goto KPick4;

 

KPick5:

set @Lk5,rand (1,80);

if (@Lk5 == @Lk1) goto KPick5;

if (@Lk5 == @Lk2) goto KPick5;

if (@Lk5 == @Lk3) goto KPick5;

if (@Lk5 == @Lk4) goto KPick5;

 

KPick6:

set @Lk6,rand (1,80);

if (@Lk6 == @Lk1) goto KPick6;

if (@Lk6 == @Lk2) goto KPick6;

if (@Lk6 == @Lk3) goto KPick6;

if (@Lk6 == @Lk4) goto KPick6;

if (@Lk6 == @Lk5) goto KPick6;

 

KPick7:

set @Lk7,rand (1,80);

if (@Lk7 == @Lk1) goto KPick7;

if (@Lk7 == @Lk2) goto KPick7;

if (@Lk7 == @Lk3) goto KPick7;

if (@Lk7 == @Lk4) goto KPick7;

if (@Lk7 == @Lk5) goto KPick7;

if (@Lk7 == @Lk6) goto KPick7;

 

KPick8:

set @Lk8,rand (1,80);

if (@Lk8 == @Lk1) goto KPick8;

if (@Lk8 == @Lk2) goto KPick8;

if (@Lk8 == @Lk3) goto KPick8;

if (@Lk8 == @Lk4) goto KPick8;

if (@Lk8 == @Lk5) goto KPick8;

if (@Lk8 == @Lk6) goto KPick8;

if (@Lk8 == @Lk7) goto KPick8;

 

KPick9:

set @Lk9,rand (1,80);

if (@Lk9 == @Lk1) goto KPick9;

if (@Lk9 == @Lk2) goto KPick9;

if (@Lk9 == @Lk3) goto KPick9;

if (@Lk9 == @Lk4) goto KPick9;

if (@Lk9 == @Lk5) goto KPick9;

if (@Lk9 == @Lk6) goto KPick9;

if (@Lk9 == @Lk7) goto KPick9;

if (@Lk9 == @Lk8) goto KPick9;

 

KPick10:

set @Lk10,rand (1,80);

if (@Lk10 == @Lk1) goto KPick10;

if (@Lk10 == @Lk2) goto KPick10;

if (@Lk10 == @Lk3) goto KPick10;

if (@Lk10 == @Lk4) goto KPick10;

if (@Lk10 == @Lk5) goto KPick10;

if (@Lk10 == @Lk6) goto KPick10;

if (@Lk10 == @Lk7) goto KPick10;

if (@Lk10 == @Lk8) goto KPick10;

if (@Lk10 == @Lk9) goto KPick10;

 

mes "[^008800Keno Teller^000000]";

mes "The computer has selected the following numbers:";

mes "^FF0000" + @Lk1 + " " + @Lk2 + " " + @Lk3 + " " + @Lk4 + " " + @Lk5 + "^000000";

mes "^0000FF" + @Lk6 + " " + @Lk7 + " " + @Lk8 + " " + @Lk9 + " " + @Lk10 + "^000000";

next;

menu "Confirm",KENO_Confirm,"Re-Generate",KENO_ComputerGen;

 

// HAND Pick LOTTERY NUMBERS

KENO_HandPick:

mes "[^008800Keno Teller^000000]";

mes "Please Pick your numbers (1-80):";

set @Lk1,0;

set @Lk2,0;

set @Lk3,0;

set @Lk4,0;

set @Lk5,0;

set @Lk6,0;

set @Lk7,0;

set @Lk8,0;

set @Lk9,0;

set @Lk10,0;

 

Kninput1:

input @Lk1;

if (@Lk1 < 1 || @Lk1 > 80) goto Kninput1;

mes @Lk1;

 

 

Kninput2:

input @Lk2;

if (@Lk2 < 1 || @Lk2 > 80) goto Kninput2;

if (@Lk2 == @Lk1) goto Kninput2;

mes @Lk2;

 

Kninput3:

input @Lk3;

if (@Lk3 < 1 || @Lk3 > 80) goto Kninput3;

if (@Lk3 == @Lk2) goto Kninput3;

if (@Lk3 == @Lk1) goto Kninput3;

mes @Lk3;

 

Kninput4:

input @Lk4;

if (@Lk4 < 1 || @Lk4 > 80) goto Kninput4;

if (@Lk4 == @Lk2) goto Kninput4;

if (@Lk4 == @Lk1) goto Kninput4;

if (@Lk4 == @Lk3) goto Kninput4;

mes @Lk4;

 

Kninput5:

input @Lk5;

if (@Lk5 < 1 || @Lk5 > 80) goto Kninput5;

if (@Lk5 == @Lk1) goto Kninput5;

if (@Lk5 == @Lk2) goto Kninput5;

if (@Lk5 == @Lk3) goto Kninput5;

if (@Lk5 == @Lk4) goto Kninput5;

mes @Lk5;

 

Kninput6:

input @Lk6;

if (@Lk6 < 1 || @Lk6 > 80) goto Kninput6;

if (@Lk6 == @Lk1) goto Kninput6;

if (@Lk6 == @Lk2) goto Kninput6;

if (@Lk6 == @Lk3) goto Kninput6;

if (@Lk6 == @Lk4) goto Kninput6;

if (@Lk6 == @Lk5) goto Kninput6;

mes @Lk6;

 

Kninput7:

input @Lk7;

if (@Lk7 < 1 || @Lk7 > 80) goto Kninput7;

if (@Lk7 == @Lk1) goto Kninput7;

if (@Lk7 == @Lk2) goto Kninput7;

if (@Lk7 == @Lk3) goto Kninput7;

if (@Lk7 == @Lk4) goto Kninput7;

if (@Lk7 == @Lk5) goto Kninput7;

if (@Lk7 == @Lk6) goto Kninput7;

mes @Lk7;

 

Kninput8:

input @Lk8;

if (@Lk8 < 1 || @Lk8 > 80) goto Kninput8;

if (@Lk8 == @Lk1) goto Kninput8;

if (@Lk8 == @Lk2) goto Kninput8;

if (@Lk8 == @Lk3) goto Kninput8;

if (@Lk8 == @Lk4) goto Kninput8;

if (@Lk8 == @Lk5) goto Kninput8;

if (@Lk8 == @Lk6) goto Kninput8;

if (@Lk8 == @Lk7) goto Kninput8;

mes @Lk8;

 

Kninput9:

input @Lk9;

if (@Lk9 < 1 || @Lk9 > 80) goto Kninput9;

if (@Lk9 == @Lk1) goto Kninput9;

if (@Lk9 == @Lk2) goto Kninput9;

if (@Lk9 == @Lk3) goto Kninput9;

if (@Lk9 == @Lk4) goto Kninput9;

if (@Lk9 == @Lk5) goto Kninput9;

if (@Lk9 == @Lk6) goto Kninput9;

if (@Lk9 == @Lk7) goto Kninput9;

if (@Lk9 == @Lk8) goto Kninput9;

mes @Lk9;

 

Kninput10:

input @Lk10;

if (@Lk10 < 1 || @Lk10 > 80) goto Kninput10;

if (@Lk10 == @Lk1) goto Kninput10;

if (@Lk10 == @Lk2) goto Kninput10;

if (@Lk10 == @Lk3) goto Kninput10;

if (@Lk10 == @Lk4) goto Kninput10;

if (@Lk10 == @Lk5) goto Kninput10;

if (@Lk10 == @Lk6) goto Kninput10;

if (@Lk10 == @Lk7) goto Kninput10;

if (@Lk10 == @Lk8) goto Kninput10;

if (@Lk10 == @Lk9) goto Kninput10;

mes @Lk10;

next;

 

mes "[^008800Keno Teller^000000]";

mes "Your numbers are:";

mes "^FF0000" + @Lk1 + " " + @Lk2 + " " + @Lk3 + " " + @Lk4 + " " + @Lk5 + "^000000";

mes "^0000FF" + @Lk6 + " " + @Lk7 + " " + @Lk8 + " " + @Lk9 + " " + @Lk10 + "^000000";

next;

menu "Confirm",KENO_Confirm,"Re-Pick",KENO_HandPick;

 

KENO_Confirm:

set #LkW1,@Lk1;

set #LkW2,@Lk2;

set #LkW3,@Lk3;

set #LkW4,@Lk4;

set #LkW5,@Lk5;

set #LkW6,@Lk6;

set #LkW7,@Lk7;

set #LkW8,@Lk8;

set #LkW9,@Lk9;

set #LkW10,@Lk10;

set #LkID,$LKID;

KENO_Confirm2:

mes "[^008800Keno Teller^000000]";

mes "Wait for the live broadcasted draw every hour!";

mes "You can claim your ticket between then and the next draw.";

next;

mes "[^008800Keno Teller^000000]";

mes "Good luck!";

close;

 

KENO_Claim:

// CHECKS TICKET VALIDILITY

if (#LkID != $LKID2) goto KENO_Invalid;

// CHECKS HOW MANY NUMBERS MATCHED

set @LkPrize,0;

if (#LkW1 == $LkW1) set @LkPrize,@LkPrize+1;

if (#LkW1 == $LkW2) set @LkPrize,@LkPrize+1;

if (#LkW1 == $LkW3) set @LkPrize,@LkPrize+1;

if (#LkW1 == $LkW4) set @LkPrize,@LkPrize+1;

if (#LkW1 == $LkW5) set @LkPrize,@LkPrize+1;

if (#LkW1 == $LkW6) set @LkPrize,@LkPrize+1;

if (#LkW1 == $LkW7) set @LkPrize,@LkPrize+1;

if (#LkW1 == $LkW8) set @LkPrize,@LkPrize+1;

if (#LkW1 == $LkW9) set @LkPrize,@LkPrize+1;

if (#LkW1 == $LkW10) set @LkPrize,@LkPrize+1;

if (#LkW1 == $LkW11) set @LkPrize,@LkPrize+1;

if (#LkW1 == $LkW12) set @LkPrize,@LkPrize+1;

if (#LkW1 == $LkW13) set @LkPrize,@LkPrize+1;

if (#LkW1 == $LkW14) set @LkPrize,@LkPrize+1;

if (#LkW1 == $LkW15) set @LkPrize,@LkPrize+1;

if (#LkW1 == $LkW16) set @LkPrize,@LkPrize+1;

if (#LkW1 == $LkW17) set @LkPrize,@LkPrize+1;

if (#LkW1 == $LkW18) set @LkPrize,@LkPrize+1;

if (#LkW1 == $LkW19) set @LkPrize,@LkPrize+1;

if (#LkW1 == $LkW20) set @LkPrize,@LkPrize+1;

 

if (#LkW2 == $LkW1) set @LkPrize,@LkPrize+1;

if (#LkW2 == $LkW2) set @LkPrize,@LkPrize+1;

if (#LkW2 == $LkW3) set @LkPrize,@LkPrize+1;

if (#LkW2 == $LkW4) set @LkPrize,@LkPrize+1;

if (#LkW2 == $LkW5) set @LkPrize,@LkPrize+1;

if (#LkW2 == $LkW6) set @LkPrize,@LkPrize+1;

if (#LkW2 == $LkW7) set @LkPrize,@LkPrize+1;

if (#LkW2 == $LkW8) set @LkPrize,@LkPrize+1;

if (#LkW2 == $LkW9) set @LkPrize,@LkPrize+1;

if (#LkW2 == $LkW10) set @LkPrize,@LkPrize+1;

if (#LkW2 == $LkW11) set @LkPrize,@LkPrize+1;

if (#LkW2 == $LkW12) set @LkPrize,@LkPrize+1;

if (#LkW2 == $LkW13) set @LkPrize,@LkPrize+1;

if (#LkW2 == $LkW14) set @LkPrize,@LkPrize+1;

if (#LkW2 == $LkW15) set @LkPrize,@LkPrize+1;

if (#LkW2 == $LkW16) set @LkPrize,@LkPrize+1;

if (#LkW2 == $LkW17) set @LkPrize,@LkPrize+1;

if (#LkW2 == $LkW18) set @LkPrize,@LkPrize+1;

if (#LkW2 == $LkW19) set @LkPrize,@LkPrize+1;

if (#LkW2 == $LkW20) set @LkPrize,@LkPrize+1;

 

if (#LkW3 == $LkW1) set @LkPrize,@LkPrize+1;

if (#LkW3 == $LkW2) set @LkPrize,@LkPrize+1;

if (#LkW3 == $LkW3) set @LkPrize,@LkPrize+1;

if (#LkW3 == $LkW4) set @LkPrize,@LkPrize+1;

if (#LkW3 == $LkW5) set @LkPrize,@LkPrize+1;

if (#LkW3 == $LkW6) set @LkPrize,@LkPrize+1;

if (#LkW3 == $LkW7) set @LkPrize,@LkPrize+1;

if (#LkW3 == $LkW8) set @LkPrize,@LkPrize+1;

if (#LkW3 == $LkW9) set @LkPrize,@LkPrize+1;

if (#LkW3 == $LkW10) set @LkPrize,@LkPrize+1;

if (#LkW3 == $LkW11) set @LkPrize,@LkPrize+1;

if (#LkW3 == $LkW12) set @LkPrize,@LkPrize+1;

if (#LkW3 == $LkW13) set @LkPrize,@LkPrize+1;

if (#LkW3 == $LkW14) set @LkPrize,@LkPrize+1;

if (#LkW3 == $LkW15) set @LkPrize,@LkPrize+1;

if (#LkW3 == $LkW16) set @LkPrize,@LkPrize+1;

if (#LkW3 == $LkW17) set @LkPrize,@LkPrize+1;

if (#LkW3 == $LkW18) set @LkPrize,@LkPrize+1;

if (#LkW3 == $LkW19) set @LkPrize,@LkPrize+1;

if (#LkW3 == $LkW20) set @LkPrize,@LkPrize+1;

 

if (#LkW4 == $LkW1) set @LkPrize,@LkPrize+1;

if (#LkW4 == $LkW2) set @LkPrize,@LkPrize+1;

if (#LkW4 == $LkW3) set @LkPrize,@LkPrize+1;

if (#LkW1 == $LkW4) set @LkPrize,@LkPrize+1;

if (#LkW4 == $LkW5) set @LkPrize,@LkPrize+1;

if (#LkW4 == $LkW6) set @LkPrize,@LkPrize+1;

if (#LkW4 == $LkW7) set @LkPrize,@LkPrize+1;

if (#LkW4 == $LkW8) set @LkPrize,@LkPrize+1;

if (#LkW4 == $LkW9) set @LkPrize,@LkPrize+1;

if (#LkW4 == $LkW10) set @LkPrize,@LkPrize+1;

if (#LkW4 == $LkW11) set @LkPrize,@LkPrize+1;

if (#LkW4 == $LkW12) set @LkPrize,@LkPrize+1;

if (#LkW4 == $LkW13) set @LkPrize,@LkPrize+1;

if (#LkW1 == $LkW14) set @LkPrize,@LkPrize+1;

if (#LkW4 == $LkW15) set @LkPrize,@LkPrize+1;

if (#LkW4 == $LkW16) set @LkPrize,@LkPrize+1;

if (#LkW4 == $LkW17) set @LkPrize,@LkPrize+1;

if (#LkW4 == $LkW18) set @LkPrize,@LkPrize+1;

if (#LkW4 == $LkW19) set @LkPrize,@LkPrize+1;

if (#LkW4 == $LkW20) set @LkPrize,@LkPrize+1;

 

if (#LkW5 == $LkW1) set @LkPrize,@LkPrize+1;

if (#LkW5 == $LkW2) set @LkPrize,@LkPrize+1;

if (#LkW5 == $LkW3) set @LkPrize,@LkPrize+1;

if (#LkW5 == $LkW4) set @LkPrize,@LkPrize+1;

if (#LkW5 == $LkW5) set @LkPrize,@LkPrize+1;

if (#LkW5 == $LkW6) set @LkPrize,@LkPrize+1;

if (#LkW5 == $LkW7) set @LkPrize,@LkPrize+1;

if (#LkW5 == $LkW8) set @LkPrize,@LkPrize+1;

if (#LkW5 == $LkW9) set @LkPrize,@LkPrize+1;

if (#LkW5 == $LkW10) set @LkPrize,@LkPrize+1;

if (#LkW5 == $LkW11) set @LkPrize,@LkPrize+1;

if (#LkW5 == $LkW12) set @LkPrize,@LkPrize+1;

if (#LkW5 == $LkW13) set @LkPrize,@LkPrize+1;

if (#LkW5 == $LkW14) set @LkPrize,@LkPrize+1;

if (#LkW5 == $LkW15) set @LkPrize,@LkPrize+1;

if (#LkW5 == $LkW16) set @LkPrize,@LkPrize+1;

if (#LkW5 == $LkW17) set @LkPrize,@LkPrize+1;

if (#LkW5 == $LkW18) set @LkPrize,@LkPrize+1;

if (#LkW5 == $LkW19) set @LkPrize,@LkPrize+1;

if (#LkW5 == $LkW20) set @LkPrize,@LkPrize+1;

 

if (#LkW6 == $LkW1) set @LkPrize,@LkPrize+1;

if (#LkW6 == $LkW2) set @LkPrize,@LkPrize+1;

if (#LkW6 == $LkW3) set @LkPrize,@LkPrize+1;

if (#LkW6 == $LkW4) set @LkPrize,@LkPrize+1;

if (#LkW6 == $LkW5) set @LkPrize,@LkPrize+1;

if (#LkW6 == $LkW6) set @LkPrize,@LkPrize+1;

if (#LkW6 == $LkW7) set @LkPrize,@LkPrize+1;

if (#LkW6 == $LkW8) set @LkPrize,@LkPrize+1;

if (#LkW6 == $LkW9) set @LkPrize,@LkPrize+1;

if (#LkW6 == $LkW10) set @LkPrize,@LkPrize+1;

if (#LkW6 == $LkW11) set @LkPrize,@LkPrize+1;

if (#LkW6 == $LkW12) set @LkPrize,@LkPrize+1;

if (#LkW6 == $LkW13) set @LkPrize,@LkPrize+1;

if (#LkW6 == $LkW14) set @LkPrize,@LkPrize+1;

if (#LkW6 == $LkW15) set @LkPrize,@LkPrize+1;

if (#LkW6 == $LkW16) set @LkPrize,@LkPrize+1;

if (#LkW6 == $LkW17) set @LkPrize,@LkPrize+1;

if (#LkW6 == $LkW18) set @LkPrize,@LkPrize+1;

if (#LkW6 == $LkW19) set @LkPrize,@LkPrize+1;

if (#LkW6 == $LkW20) set @LkPrize,@LkPrize+1;

 

if (#LkW7 == $LkW1) set @LkPrize,@LkPrize+1;

if (#LkW7 == $LkW2) set @LkPrize,@LkPrize+1;

if (#LkW7 == $LkW3) set @LkPrize,@LkPrize+1;

if (#LkW7 == $LkW4) set @LkPrize,@LkPrize+1;

if (#LkW7 == $LkW5) set @LkPrize,@LkPrize+1;

if (#LkW7 == $LkW6) set @LkPrize,@LkPrize+1;

if (#LkW7 == $LkW7) set @LkPrize,@LkPrize+1;

if (#LkW7 == $LkW8) set @LkPrize,@LkPrize+1;

if (#LkW7 == $LkW9) set @LkPrize,@LkPrize+1;

if (#LkW7 == $LkW10) set @LkPrize,@LkPrize+1;

if (#LkW7 == $LkW11) set @LkPrize,@LkPrize+1;

if (#LkW7 == $LkW12) set @LkPrize,@LkPrize+1;

if (#LkW7 == $LkW13) set @LkPrize,@LkPrize+1;

if (#LkW7 == $LkW14) set @LkPrize,@LkPrize+1;

if (#LkW7 == $LkW15) set @LkPrize,@LkPrize+1;

if (#LkW7 == $LkW16) set @LkPrize,@LkPrize+1;

if (#LkW7 == $LkW17) set @LkPrize,@LkPrize+1;

if (#LkW7 == $LkW18) set @LkPrize,@LkPrize+1;

if (#LkW7 == $LkW19) set @LkPrize,@LkPrize+1;

if (#LkW7 == $LkW20) set @LkPrize,@LkPrize+1;

 

if (#LkW8 == $LkW1) set @LkPrize,@LkPrize+1;

if (#LkW8 == $LkW2) set @LkPrize,@LkPrize+1;

if (#LkW8 == $LkW3) set @LkPrize,@LkPrize+1;

if (#LkW8 == $LkW4) set @LkPrize,@LkPrize+1;

if (#LkW8 == $LkW5) set @LkPrize,@LkPrize+1;

if (#LkW8 == $LkW6) set @LkPrize,@LkPrize+1;

if (#LkW8 == $LkW7) set @LkPrize,@LkPrize+1;

if (#LkW8 == $LkW8) set @LkPrize,@LkPrize+1;

if (#LkW8 == $LkW9) set @LkPrize,@LkPrize+1;

if (#LkW8 == $LkW10) set @LkPrize,@LkPrize+1;

if (#LkW8 == $LkW11) set @LkPrize,@LkPrize+1;

if (#LkW8 == $LkW12) set @LkPrize,@LkPrize+1;

if (#LkW8 == $LkW13) set @LkPrize,@LkPrize+1;

if (#LkW8 == $LkW14) set @LkPrize,@LkPrize+1;

if (#LkW8 == $LkW15) set @LkPrize,@LkPrize+1;

if (#LkW8 == $LkW16) set @LkPrize,@LkPrize+1;

if (#LkW8 == $LkW17) set @LkPrize,@LkPrize+1;

if (#LkW8 == $LkW18) set @LkPrize,@LkPrize+1;

if (#LkW8 == $LkW19) set @LkPrize,@LkPrize+1;

if (#LkW8 == $LkW20) set @LkPrize,@LkPrize+1;

 

if (#LkW9 == $LkW1) set @LkPrize,@LkPrize+1;

if (#LkW9 == $LkW2) set @LkPrize,@LkPrize+1;

if (#LkW9 == $LkW3) set @LkPrize,@LkPrize+1;

if (#LkW9 == $LkW4) set @LkPrize,@LkPrize+1;

if (#LkW9 == $LkW5) set @LkPrize,@LkPrize+1;

if (#LkW9 == $LkW6) set @LkPrize,@LkPrize+1;

if (#LkW9 == $LkW7) set @LkPrize,@LkPrize+1;

if (#LkW9 == $LkW8) set @LkPrize,@LkPrize+1;

if (#LkW9 == $LkW9) set @LkPrize,@LkPrize+1;

if (#LkW9 == $LkW10) set @LkPrize,@LkPrize+1;

if (#LkW9 == $LkW11) set @LkPrize,@LkPrize+1;

if (#LkW9 == $LkW12) set @LkPrize,@LkPrize+1;

if (#LkW9 == $LkW13) set @LkPrize,@LkPrize+1;

if (#LkW9 == $LkW14) set @LkPrize,@LkPrize+1;

if (#LkW9 == $LkW15) set @LkPrize,@LkPrize+1;

if (#LkW9 == $LkW16) set @LkPrize,@LkPrize+1;

if (#LkW9 == $LkW17) set @LkPrize,@LkPrize+1;

if (#LkW9 == $LkW18) set @LkPrize,@LkPrize+1;

if (#LkW9 == $LkW19) set @LkPrize,@LkPrize+1;

if (#LkW9 == $LkW20) set @LkPrize,@LkPrize+1;

 

if (#LkW10 == $LkW1) set @LkPrize,@LkPrize+1;

if (#LkW10 == $LkW2) set @LkPrize,@LkPrize+1;

if (#LkW10 == $LkW3) set @LkPrize,@LkPrize+1;

if (#LkW10 == $LkW4) set @LkPrize,@LkPrize+1;

if (#LkW10 == $LkW5) set @LkPrize,@LkPrize+1;

if (#LkW10 == $LkW6) set @LkPrize,@LkPrize+1;

if (#LkW10 == $LkW7) set @LkPrize,@LkPrize+1;

if (#LkW10 == $LkW8) set @LkPrize,@LkPrize+1;

if (#LkW10 == $LkW9) set @LkPrize,@LkPrize+1;

if (#LkW10 == $LkW10) set @LkPrize,@LkPrize+1;

if (#LkW10 == $LkW11) set @LkPrize,@LkPrize+1;

if (#LkW10 == $LkW12) set @LkPrize,@LkPrize+1;

if (#LkW10 == $LkW13) set @LkPrize,@LkPrize+1;

if (#LkW10 == $LkW14) set @LkPrize,@LkPrize+1;

if (#LkW10 == $LkW15) set @LkPrize,@LkPrize+1;

if (#LkW10 == $LkW16) set @LkPrize,@LkPrize+1;

if (#LkW10 == $LkW17) set @LkPrize,@LkPrize+1;

if (#LkW10 == $LkW18) set @LkPrize,@LkPrize+1;

if (#LkW10 == $LkW19) set @LkPrize,@LkPrize+1;

if (#LkW10 == $LkW20) set @LkPrize,@LkPrize+1;

 

if (@LkPrize == 10) goto LkWin10;

if (@LkPrize == 9) goto LkWin9;

if (@LkPrize == 8) goto LkWin8;

if (@LkPrize == 7) goto LkWin7;

if (@LkPrize == 6) goto LkWin6;

if (@LkPrize == 5) goto LkWin5;

if (@LkPrize == 4) goto LkWin4;

if (@LkPrize == 3) goto LkWin3;

if (@LkPrize == 2) goto LkWin2;

if (@LkPrize == 1) goto LkWin1;

 

 

// NO WINNER

mes "[^008800Keno Teller^000000]";

mes "Bad luck, it appears you do not hold a winning ticket.";

next;

mes "[^008800Keno Teller^000000]";

mes "Better luck next time!.";

close;

 

// MATCHED 10

LkWin10:

set @KENO_Prize_Money,($KENO_TicketPrice*10*9*8*7*6*5*4*3*2)-6288000;

mes "[^008800Keno Teller^000000]";

mes "You have matched ^0000FF" + @LkPrize + "^000000 numbers!";

mes "Jackpot!";

mes "You've won ^0000FF" + @KENO_Prize_Money + "z^000000.";

set Zeny,Zeny+@KENO_Prize_Money;

announce "Keno Teller: " + strcharinfo(0) + " has won the JACKPOT of " + @KENO_Prize_Money + "z!",8;

set @KENO_Prize_Money,0;

set #LkID,0;

close;

 

// MATCHED 9

LkWin9:

set @KENO_Prize_Money, ($KENO_TicketPrice*9*8*7*6*5*4*3*2)-628800;

mes "[^008800Keno Teller^000000]";

mes "You have matched ^0000FF" + @LkPrize + "^000000 numbers!";

mes "Jackpot!";

mes "You've won ^0000FF" + @KENO_Prize_Money + "z^000000.";

set Zeny,Zeny+@KENO_Prize_Money;

announce "Keno Teller: " + strcharinfo(0) + " has won the JACKPOT of " + @KENO_Prize_Money + "z!",8;

set @KENO_Prize_Money,0;

set #LkID,0;

close;

 

// MATCHED 8

LkWin8:

set @KENO_Prize_Money,($KENO_TicketPrice*8*7*6*5*4*3*2)-3200;

mes "[^008800Keno Teller^000000]";

mes "You have matched ^0000FF" + @LkPrize + "^000000 numbers!";

mes "Jackpot!";

mes "You've won ^0000FF" + @KENO_Prize_Money + "z^000000.";

set Zeny,Zeny+@KENO_Prize_Money;

announce "Keno Teller: " + strcharinfo(0) + " has won the JACKPOT of " + @KENO_Prize_Money + "z!",8;

set @KENO_Prize_Money,0;

set #LkID,0;

close;

 

// MATCHED 7

LkWin7:

set @KENO_Prize_Money,($KENO_TicketPrice*7*6*5*4*3*2)-400;

mes "[^008800Keno Teller^000000]";

mes "You have matched ^0000FF" + @LkPrize + "^000000 numbers!";

mes "Jackpot!";

mes "You've won ^0000FF" + @KENO_Prize_Money + "z^000000.";

set Zeny,Zeny+@KENO_Prize_Money;

announce "Keno Teller: " + strcharinfo(0) + " has won " + @KENO_Prize_Money + "z!",8;

set @KENO_Prize_Money,0;

set #LkID,0;

close;

 

// MATCHED 6

LkWin6:

set @KENO_Prize_Money,($KENO_TicketPrice*6*5*4*3*2)-200;

mes "[^008800Keno Teller^000000]";

mes "You have matched ^0000FF" + @LkPrize + "^000000 numbers!";

mes "Jackpot!";

mes "You've won ^0000FF" + @KENO_Prize_Money + "z^000000.";

set Zeny,Zeny+@KENO_Prize_Money;

announce "Keno Teller: " + strcharinfo(0) + " has won " + @KENO_Prize_Money + "z!",8;

set @KENO_Prize_Money,0;

set #LkID,0;

close;

 

// MATCHED 5

LkWin5:

set @KENO_Prize_Money,($KENO_TicketPrice*5*4*3*2)-200;

mes "[^008800Keno Teller^000000]";

mes "You have matched ^0000FF" + @LkPrize + "^000000 numbers!";

mes "Jackpot!";

mes "You've won ^0000FF" + @KENO_Prize_Money + "z^000000.";

set Zeny,Zeny+@KENO_Prize_Money;

announce "Keno Teller: " + strcharinfo(0) + " has won " + @KENO_Prize_Money + "z!",8;

set @KENO_Prize_Money,0;

set #LkID,0;

close;

 

// MATCHED 4

LkWin4:

set @KENO_Prize_Money,($KENO_TicketPrice*4*3*2)-40;

mes "[^008800Keno Teller^000000]";

mes "You have matched ^0000FF" + @LkPrize + "^000000 numbers!";

mes "Jackpot!";

mes "You've won ^0000FF" + @KENO_Prize_Money + "z^000000.";

set Zeny,Zeny+@KENO_Prize_Money;

announce "Keno Teller: " + strcharinfo(0) + " has won " + @KENO_Prize_Money + "z!",8;

set @KENO_Prize_Money,0;

set #LkID,0;

close;

 

// MATCHED 3

LkWin3:

set @KENO_Prize_Money,$KENO_TicketPrice*3*2;

mes "[^008800Keno Teller^000000]";

mes "You have matched ^0000FF" + @LkPrize + "^000000 numbers!";

mes "Jackpot!";

mes "You've won ^0000FF" + @KENO_Prize_Money + "z^000000.";

set Zeny,Zeny+@KENO_Prize_Money;

announce "Keno Teller: " + strcharinfo(0) + " has won " + @KENO_Prize_Money + "z!",8;

set @KENO_Prize_Money,0;

set #LkID,0;

close;

 

// MATCHED 2

LkWin2:

set @KENO_Prize_Money,$KENO_TicketPrice*2;

mes "[^008800Keno Teller^000000]";

mes "You have matched ^0000FF" + @LkPrize + "^000000 numbers!";

mes "Jackpot!";

mes "You've won ^0000FF" + @KENO_Prize_Money + "z^000000.";

set Zeny,Zeny+@KENO_Prize_Money;

announce "Keno Teller: " + strcharinfo(0) + " has won " + @KENO_Prize_Money + "z!",8;

set @KENO_Prize_Money,0;

set #LkID,0;

close;

 

// MATCHED 1

LkWin1:

set @KENO_Prize_Money,$KENO_TicketPrice;

mes "[^008800Keno Teller^000000]";

mes "You have matched ^0000FF" + @LkPrize + "^000000 numbers!";

mes "Jackpot!";

mes "You've won ^0000FF" + @KENO_Prize_Money + "z^000000.";

set Zeny,Zeny+@KENO_Prize_Money;

announce "Keno Teller: " + strcharinfo(0) + " has won " + @KENO_Prize_Money + "z!",8;

set @KENO_Prize_Money,0;

set #LkID,0;

close;

 

 

// NO Zeny

KENO_NoZeny:

mes "[^008800Keno Teller^000000]";

mes "You can't afford a Keno ticket.";

close;

 

// INVALID TICKET

KENO_Invalid:

mes "[^008800Keno Teller^000000]";

mes "I'm sorry but it appears that you have an invalid ticket.";

close;

 

// DOUBLE TICKET

KENO_DoubleTicket:

mes "[^008800Keno Teller^000000]";

mes "It appears that you already have a ticket for today.";

mes "You may only purchase one ticket per draw.";

close;

 

KENO_Cancel:

mes "[^008800Keno Teller^000000]";

mes "Come back soon!";

close;

 

// GM MENU (Lets you manually do draws)

KENO_GM:

menu "Claim Prize",KENO_Claim,"Buy New Ticket",KENO_Buy,"[GM]Do Draw Now",-,"[GM]Rig the Lottery",KENO_GM_Rig,"Cancel",KENO_Cancel;

 

// CHECKS IF LOTTERY IS RIGGED

if ($KENO_Rigged == 1) goto KENO_Rigged_Draw;

 

// GENERATES RANDOM NUMBERS 1-80

GMKPick1:

set $LkW1,rand (1,80);

 

GMKPick2:

set $LkW2,rand (1,80);

if ($LkW2 == $LkW1) goto GMKPick2;

 

GMKPick3:

set $LkW3,rand (1,80);

if ($LkW3 == $LkW2) goto GMKPick3;

if ($LkW3 == $LkW1) goto GMKPick3;

 

GMKPick4:

set $LkW4,rand (1,80);

if ($LkW4 == $LkW2) goto GMKPick4;

if ($LkW4 == $LkW1) goto GMKPick4;

if ($LkW4 == $LkW3) goto GMKPick4;

 

GMKPick5:

set $LkW5,rand (1,80);

if ($LkW5 == $LkW1) goto GMKPick5;

if ($LkW5 == $LkW2) goto GMKPick5;

if ($LkW5 == $LkW3) goto GMKPick5;

if ($LkW5 == $LkW4) goto GMKPick5;

 

GMKPick6:

set $LkW6,rand (1,80);

if ($LkW6 == $LkW1) goto GMKPick6;

if ($LkW6 == $LkW2) goto GMKPick6;

if ($LkW6 == $LkW3) goto GMKPick6;

if ($LkW6 == $LkW4) goto GMKPick6;

if ($LkW6 == $LkW5) goto GMKPick6;

 

GMKPick7:

set $LkW7,rand (1,80);

if ($LkW7 == $LkW1) goto GMKPick7;

if ($LkW7 == $LkW2) goto GMKPick7;

if ($LkW7 == $LkW3) goto GMKPick7;

if ($LkW7 == $LkW4) goto GMKPick7;

if ($LkW7 == $LkW5) goto GMKPick7;

if ($LkW7 == $LkW6) goto GMKPick7;

 

GMKPick8:

set $LkW8,rand (1,80);

if ($LkW8 == $LkW1) goto GMKPick8;

if ($LkW8 == $LkW2) goto GMKPick8;

if ($LkW8 == $LkW3) goto GMKPick8;

if ($LkW8 == $LkW4) goto GMKPick8;

if ($LkW8 == $LkW5) goto GMKPick8;

if ($LkW8 == $LkW6) goto GMKPick8;

if ($LkW8 == $LkW7) goto GMKPick8;

 

GMKPick9:

set $LkW9,rand (1,80);

if ($LkW9 == $LkW1) goto GMKPick9;

if ($LkW9 == $LkW2) goto GMKPick9;

if ($LkW9 == $LkW3) goto GMKPick9;

if ($LkW9 == $LkW4) goto GMKPick9;

if ($LkW9 == $LkW5) goto GMKPick9;

if ($LkW9 == $LkW6) goto GMKPick9;

if ($LkW9 == $LkW7) goto GMKPick9;

if ($LkW9 == $LkW8) goto GMKPick9;

 

GMKPick10:

set $LkW10,rand (1,80);

if ($LkW10 == $LkW1) goto GMKPick10;

if ($LkW10 == $LkW2) goto GMKPick10;

if ($LkW10 == $LkW3) goto GMKPick10;

if ($LkW10 == $LkW4) goto GMKPick10;

if ($LkW10 == $LkW5) goto GMKPick10;

if ($LkW10 == $LkW6) goto GMKPick10;

if ($LkW10 == $LkW7) goto GMKPick10;

if ($LkW10 == $LkW8) goto GMKPick10;

if ($LkW10 == $LkW9) goto GMKPick10;

 

GMKPick11:

set $LkW11,rand (1,80);

if ($LkW11 == $LkW1) goto GMKPick11;

if ($LkW11 == $LkW2) goto GMKPick11;

if ($LkW11 == $LkW3) goto GMKPick11;

if ($LkW11 == $LkW4) goto GMKPick11;

if ($LkW11 == $LkW5) goto GMKPick11;

if ($LkW11 == $LkW6) goto GMKPick11;

if ($LkW11 == $LkW7) goto GMKPick11;

if ($LkW11 == $LkW8) goto GMKPick11;

if ($LkW11 == $LkW9) goto GMKPick11;

if ($LkW11 == $LkW10) goto GMKPick11;

 

GMKPick12:

set $LkW12,rand (1,80);

if ($LkW12 == $LkW1) goto GMKPick12;

if ($LkW12 == $LkW2) goto GMKPick12;

if ($LkW12 == $LkW3) goto GMKPick12;

if ($LkW12 == $LkW4) goto GMKPick12;

if ($LkW12 == $LkW5) goto GMKPick12;

if ($LkW12 == $LkW6) goto GMKPick12;

if ($LkW12 == $LkW7) goto GMKPick12;

if ($LkW12 == $LkW8) goto GMKPick12;

if ($LkW12 == $LkW9) goto GMKPick12;

if ($LkW12 == $LkW10) goto GMKPick12;

if ($LkW12 == $LkW11) goto GMKPick12;

 

GMKPick13:

set $LkW13,rand (1,80);

if ($LkW13 == $LkW1) goto GMKPick13;

if ($LkW13 == $LkW2) goto GMKPick13;

if ($LkW13 == $LkW3) goto GMKPick13;

if ($LkW13 == $LkW4) goto GMKPick13;

if ($LkW13 == $LkW5) goto GMKPick13;

if ($LkW13 == $LkW6) goto GMKPick13;

if ($LkW13 == $LkW7) goto GMKPick13;

if ($LkW13 == $LkW8) goto GMKPick13;

if ($LkW13 == $LkW9) goto GMKPick13;

if ($LkW13 == $LkW10) goto GMKPick13;

if ($LkW13 == $LkW11) goto GMKPick13;

if ($LkW13 == $LkW12) goto GMKPick13;

 

GMKPick14:

set $LkW14,rand (1,80);

if ($LkW14 == $LkW1) goto GMKPick14;

if ($LkW14 == $LkW2) goto GMKPick14;

if ($LkW14 == $LkW3) goto GMKPick14;

if ($LkW14 == $LkW4) goto GMKPick14;

if ($LkW14 == $LkW5) goto GMKPick14;

if ($LkW14 == $LkW6) goto GMKPick14;

if ($LkW14 == $LkW7) goto GMKPick14;

if ($LkW14 == $LkW8) goto GMKPick14;

if ($LkW14 == $LkW9) goto GMKPick14;

if ($LkW14 == $LkW10) goto GMKPick14;

if ($LkW14 == $LkW11) goto GMKPick14;

if ($LkW14 == $LkW12) goto GMKPick14;

if ($LkW14 == $LkW13) goto GMKPick14;

 

GMKPick15:

set $LkW15,rand (1,80);

if ($LkW15 == $LkW1) goto GMKPick15;

if ($LkW15 == $LkW2) goto GMKPick15;

if ($LkW15 == $LkW3) goto GMKPick15;

if ($LkW15 == $LkW4) goto GMKPick15;

if ($LkW15 == $LkW5) goto GMKPick15;

if ($LkW15 == $LkW6) goto GMKPick15;

if ($LkW15 == $LkW7) goto GMKPick15;

if ($LkW15 == $LkW8) goto GMKPick15;

if ($LkW15 == $LkW9) goto GMKPick15;

if ($LkW15 == $LkW10) goto GMKPick15;

if ($LkW15 == $LkW11) goto GMKPick15;

if ($LkW15 == $LkW12) goto GMKPick15;

if ($LkW15 == $LkW13) goto GMKPick15;

if ($LkW15 == $LkW14) goto GMKPick15;

 

GMKPick16:

set $LkW16,rand (1,80);

if ($LkW16 == $LkW1) goto GMKPick16;

if ($LkW16 == $LkW2) goto GMKPick16;

if ($LkW16 == $LkW3) goto GMKPick16;

if ($LkW16 == $LkW4) goto GMKPick16;

if ($LkW16 == $LkW5) goto GMKPick16;

if ($LkW16 == $LkW6) goto GMKPick16;

if ($LkW16 == $LkW7) goto GMKPick16;

if ($LkW16 == $LkW8) goto GMKPick16;

if ($LkW16 == $LkW9) goto GMKPick16;

if ($LkW16 == $LkW10) goto GMKPick16;

if ($LkW16 == $LkW11) goto GMKPick16;

if ($LkW16 == $LkW12) goto GMKPick16;

if ($LkW16 == $LkW13) goto GMKPick16;

if ($LkW16 == $LkW14) goto GMKPick16;

if ($LkW16 == $LkW15) goto GMKPick16;

 

GMKPick17:

set $LkW17,rand (1,80);

if ($LkW17 == $LkW1) goto GMKPick17;

if ($LkW17 == $LkW2) goto GMKPick17;

if ($LkW17 == $LkW3) goto GMKPick17;

if ($LkW17 == $LkW4) goto GMKPick17;

if ($LkW17 == $LkW5) goto GMKPick17;

if ($LkW17 == $LkW6) goto GMKPick17;

if ($LkW17 == $LkW7) goto GMKPick17;

if ($LkW17 == $LkW8) goto GMKPick17;

if ($LkW17 == $LkW9) goto GMKPick17;

if ($LkW17 == $LkW10) goto GMKPick17;

if ($LkW17 == $LkW11) goto GMKPick17;

if ($LkW17 == $LkW12) goto GMKPick17;

if ($LkW17 == $LkW13) goto GMKPick17;

if ($LkW17 == $LkW14) goto GMKPick17;

if ($LkW17 == $LkW15) goto GMKPick17;

if ($LkW17 == $LkW16) goto GMKPick17;

 

GMKPick18:

set $LkW18,rand (1,80);

if ($LkW18 == $LkW1) goto GMKPick18;

if ($LkW18== $LkW2) goto GMKPick18;

if ($LkW18== $LkW3) goto GMKPick18;

if ($LkW18== $LkW4) goto GMKPick18;

if ($LkW18== $LkW5) goto GMKPick18;

if ($LkW18== $LkW6) goto GMKPick18;

if ($LkW18== $LkW7) goto GMKPick18;

if ($LkW18== $LkW8) goto GMKPick18;

if ($LkW18== $LkW9) goto GMKPick18;

if ($LkW18== $LkW10) goto GMKPick18;

if ($LkW18== $LkW11) goto GMKPick18;

if ($LkW18== $LkW12) goto GMKPick18;

if ($LkW18== $LkW13) goto GMKPick18;

if ($LkW18== $LkW14) goto GMKPick18;

if ($LkW18== $LkW15) goto GMKPick18;

if ($LkW18== $LkW16) goto GMKPick18;

if ($LkW18== $LkW17) goto GMKPick18;

 

GMKPick19:

set $LkW19,rand (1,80);

if ($LkW19 == $LkW1) goto GMKPick19;

if ($LkW19== $LkW2) goto GMKPick19;

if ($LkW19== $LkW3) goto GMKPick19;

if ($LkW19== $LkW4) goto GMKPick19;

if ($LkW19== $LkW5) goto GMKPick19;

if ($LkW19== $LkW6) goto GMKPick19;

if ($LkW19== $LkW7) goto GMKPick19;

if ($LkW19== $LkW8) goto GMKPick19;

if ($LkW19== $LkW9) goto GMKPick19;

if ($LkW19== $LkW10) goto GMKPick19;

if ($LkW19== $LkW11) goto GMKPick19;

if ($LkW19== $LkW12) goto GMKPick19;

if ($LkW19== $LkW13) goto GMKPick19;

if ($LkW19== $LkW14) goto GMKPick19;

if ($LkW19== $LkW15) goto GMKPick19;

if ($LkW19== $LkW16) goto GMKPick19;

if ($LkW19== $LkW17) goto GMKPick19;

if ($LkW19== $LkW18) goto GMKPick19;

 

GMKPick20:

set $LkW20,rand (1,80);

if ($LkW20 == $LkW1) goto GMKPick20;

if ($LkW20== $LkW2) goto GMKPick20;

if ($LkW20== $LkW3) goto GMKPick20;

if ($LkW20== $LkW4) goto GMKPick20;

if ($LkW20== $LkW5) goto GMKPick20;

if ($LkW20== $LkW6) goto GMKPick20;

if ($LkW20== $LkW7) goto GMKPick20;

if ($LkW20== $LkW8) goto GMKPick20;

if ($LkW20== $LkW9) goto GMKPick20;

if ($LkW20== $LkW10) goto GMKPick20;

if ($LkW20== $LkW11) goto GMKPick20;

if ($LkW20== $LkW12) goto GMKPick20;

if ($LkW20== $LkW13) goto GMKPick20;

if ($LkW20== $LkW14) goto GMKPick20;

if ($LkW20== $LkW15) goto GMKPick20;

if ($LkW20== $LkW16) goto GMKPick20;

if ($LkW20== $LkW17) goto GMKPick20;

if ($LkW20== $LkW18) goto GMKPick20;

if ($LkW20== $LkW19) goto GMKPick20;

 

// BROADCASTS DRAW

KENO_Broadcast:

announce "Keno Teller: Welcome to the special GM's KENO Lotto draw!",8;

announce "The numbers are as follows: [" + $LkW1 + "] [" + $LkW2 + "] [" + $LkW3 + "] [" + $LkW4 + "] [" + $LkW5 + "]",8;

announce "The numbers are as follows: [" + $LkW6 + "] [" + $LkW7 + "] [" + $LkW8 + "] [" + $LkW9 + "] [" + $LkW10 + "]",8;

announce "The numbers are as follows: [" + $LkW11 + "] [" + $LkW12 + "] [" + $LkW13 + "] [" + $LkW14 + "] [" + $LkW15 + "]",8;

announce "The numbers are as follows: [" + $LkW16 + "] [" + $LkW17 + "] [" + $LkW18 + "] [" + $LkW19 + "] [" + $LkW20 + "]",8;

announce "Congratulations to the winners!",8;

 

// GENERATES DRAW ID CODE

KENO_GenID:

set $LKID2,$LKID;

// setS TOMORROW'S ID NUMBER

set $LKID,rand (100000,999999);

close;

 

// setS DRAW TO RIGGED NUMBERS

KENO_Rigged_Draw:

set $LkW1,$LkR1;

set $LkW2,$LkR2;

set $LkW3,$LkR3;

set $LkW4,$LkR4;

set $LkW5,$LkR5;

set $LkW6,$LkR6;

set $LkW7,$LkR7;

set $LkW8,$LkR8;

set $LkW9,$LkR9;

set $LkW10,$LkR10;

set $LkW11,$LkR11;

set $LkW12,$LkR12;

set $LkW13,$LkR13;

set $LkW14,$LkR14;

set $LkW15,$LkR15;

set $LkW16,$LkR16;

set $LkW17,$LkR17;

set $LkW18,$LkR18;

set $LkW19,$LkR19;

set $LkW20,$LkR20;

set $KENO_Rigged,0;

goto KENO_Broadcast;

 

// ALLOWS GM TO DO A RIGGED DRAW

KENO_GM_Rig:

mes "[^008800Keno Teller^000000]";

mes "Please pick your numbers (1-80):";

set $LkR1,0;

set $LkR2,0;

set $LkR3,0;

set $LkR4,0;

set $LkR5,0;

set $LkR6,0;

set $LkR7,0;

set $LkR8,0;

set $LkR9,0;

set $LkR10,0;

set $LkR11,0;

set $LkR12,0;

set $LkR13,0;

set $LkR14,0;

set $LkR15,0;

set $LkR16,0;

set $LkR17,0;

set $LkR18,0;

set $LkR19,0;

set $LkR20,0;

GMKninput1:

input $LkR1;

if ($LkR1 < 1 || $LkR1 > 80) goto GMKninput1;

mes $LkR1;

GMKninput2:

input $LkR2;

if ($LkR2 < 1 || $LkR2 > 80) goto GMKninput2;

if ($LkR2 == $LkR1) goto GMKninput2;

mes $LkR2;

GMKninput3:

input $LkR3;

if ($LkR3 < 1 || $LkR3 > 80) goto GMKninput3;

if ($LkR3 == $LkR1) goto GMKninput3;

if ($LkR3 == $LkR2) goto GMKninput3;

mes $LkR3;

GMKninput4:

input $LkR4;

if ($LkR4 < 1 || $LkR4 > 80) goto GMKninput4;

if ($LkR4 == $LkR1) goto GMKninput4;

if ($LkR4 == $LkR2) goto GMKninput4;

if ($LkR4 == $LkR3) goto GMKninput4;

mes $LkR4;

GMKninput5:

input $LkR5;

if ($LkR5 < 1 || $LkR5 > 80) goto GMKninput5;

if ($LkR5 == $LkR1) goto GMKninput5;

if ($LkR5 == $LkR2) goto GMKninput5;

if ($LkR5 == $LkR3) goto GMKninput5;

if ($LkR5 == $LkR4) goto GMKninput5;

mes $LkR5;

GMKninput6:

input $LkR6;

if ($LkR6 < 1 || $LkR6 > 80) goto GMKninput6;

if ($LkR6 == $LkR1) goto GMKninput6;

if ($LkR6 == $LkR2) goto GMKninput6;

if ($LkR6 == $LkR3) goto GMKninput6;

if ($LkR6 == $LkR4) goto GMKninput6;

if ($LkR6 == $LkR5) goto GMKninput6;

mes $LkR6;

GMKninput7:

input $LkR7;

if ($LkR7 < 1 || $LkR7 > 80) goto GMKninput7;

if ($LkR7 == $LkR1) goto GMKninput7;

if ($LkR7 == $LkR2) goto GMKninput7;

if ($LkR7 == $LkR3) goto GMKninput7;

if ($LkR7 == $LkR4) goto GMKninput7;

if ($LkR7 == $LkR5) goto GMKninput7;

if ($LkR7 == $LkR6) goto GMKninput7;

mes $LkR7;

GMKninput8:

input $LkR8;

if ($LkR8 < 1 || $LkR8 > 80) goto GMKninput8;

if ($LkR8 == $LkR1) goto GMKninput8;

if ($LkR8 == $LkR2) goto GMKninput8;

if ($LkR8 == $LkR3) goto GMKninput8;

if ($LkR8 == $LkR4) goto GMKninput8;

if ($LkR8 == $LkR5) goto GMKninput8;

if ($LkR8 == $LkR6) goto GMKninput8;

if ($LkR8 == $LkR7) goto GMKninput8;

mes $LkR8;

GMKninput9:

input $LkR9;

if ($LkR9 < 1 || $LkR9 > 80) goto GMKninput9;

if ($LkR9 == $LkR1) goto GMKninput9;

if ($LkR9 == $LkR2) goto GMKninput9;

if ($LkR9 == $LkR3) goto GMKninput9;

if ($LkR9 == $LkR4) goto GMKninput9;

if ($LkR9 == $LkR5) goto GMKninput9;

if ($LkR9 == $LkR6) goto GMKninput9;

if ($LkR9 == $LkR7) goto GMKninput9;

if ($LkR9 == $LkR8) goto GMKninput9;

mes $LkR9;

GMKninput10:

input $LkR10;

if ($LkR10 < 1 || $LkR10 > 80) goto GMKninput10;

if ($LkR10 == $LkR1) goto GMKninput10;

if ($LkR10 == $LkR2) goto GMKninput10;

if ($LkR10 == $LkR3) goto GMKninput10;

if ($LkR10 == $LkR4) goto GMKninput10;

if ($LkR10 == $LkR5) goto GMKninput10;

if ($LkR10 == $LkR6) goto GMKninput10;

if ($LkR10 == $LkR7) goto GMKninput10;

if ($LkR10 == $LkR8) goto GMKninput10;

if ($LkR10 == $LkR9) goto GMKninput10;

mes $LkR10;

GMKninput11:

input $LkR11;

if ($LkR11 < 1 || $LkR11 > 80) goto GMKninput11;

if ($LkR11 == $LkR1) goto GMKninput11;

if ($LkR11 == $LkR2) goto GMKninput11;

if ($LkR11 == $LkR3) goto GMKninput11;

if ($LkR11 == $LkR4) goto GMKninput11;

if ($LkR11 == $LkR5) goto GMKninput11;

if ($LkR11 == $LkR6) goto GMKninput11;

if ($LkR11 == $LkR7) goto GMKninput11;

if ($LkR11 == $LkR8) goto GMKninput11;

if ($LkR11 == $LkR9) goto GMKninput11;

if ($LkR11 == $LkR10) goto GMKninput11;

mes $LkR11;

GMKninput12:

input $LkR12;

if ($LkR12 < 1 || $LkR12 > 80) goto GMKninput12;

if ($LkR12 == $LkR1) goto GMKninput12;

if ($LkR12 == $LkR2) goto GMKninput12;

if ($LkR12 == $LkR3) goto GMKninput12;

if ($LkR12 == $LkR4) goto GMKninput12;

if ($LkR12 == $LkR5) goto GMKninput12;

if ($LkR12 == $LkR6) goto GMKninput12;

if ($LkR12 == $LkR7) goto GMKninput12;

if ($LkR12 == $LkR8) goto GMKninput12;

if ($LkR12 == $LkR9) goto GMKninput12;

if ($LkR12 == $LkR10) goto GMKninput12;

if ($LkR12 == $LkR11) goto GMKninput12;

mes $LkR12;

GMKninput13:

input $LkR13;

if ($LkR13 < 1 || $LkR13 > 80) goto GMKninput13;

if ($LkR13 == $LkR1) goto GMKninput13;

if ($LkR13 == $LkR2) goto GMKninput13;

if ($LkR13 == $LkR3) goto GMKninput13;

if ($LkR13 == $LkR4) goto GMKninput13;

if ($LkR13 == $LkR5) goto GMKninput13;

if ($LkR13 == $LkR6) goto GMKninput13;

if ($LkR13 == $LkR7) goto GMKninput13;

if ($LkR13 == $LkR8) goto GMKninput13;

if ($LkR13 == $LkR9) goto GMKninput13;

if ($LkR13 == $LkR10) goto GMKninput13;

if ($LkR13 == $LkR11) goto GMKninput13;

if ($LkR13 == $LkR12) goto GMKninput13;

mes $LkR13;

GMKninput14:

input $LkR14;

if ($LkR14 < 1 || $LkR14 > 80) goto GMKninput14;

if ($LkR14 == $LkR1) goto GMKninput14;

if ($LkR14 == $LkR2) goto GMKninput14;

if ($LkR14 == $LkR3) goto GMKninput14;

if ($LkR14 == $LkR4) goto GMKninput14;

if ($LkR14 == $LkR5) goto GMKninput14;

if ($LkR14 == $LkR6) goto GMKninput14;

if ($LkR14 == $LkR7) goto GMKninput14;

if ($LkR14 == $LkR8) goto GMKninput14;

if ($LkR14 == $LkR9) goto GMKninput14;

if ($LkR14 == $LkR10) goto GMKninput14;

if ($LkR14 == $LkR11) goto GMKninput14;

if ($LkR14 == $LkR12) goto GMKninput14;

if ($LkR14 == $LkR13) goto GMKninput14;

mes $LkR14;

GMKninput15:

input $LkR15;

if ($LkR15 < 1 || $LkR15 > 80) goto GMKninput15;

if ($LkR15 == $LkR1) goto GMKninput15;

if ($LkR15 == $LkR2) goto GMKninput15;

if ($LkR15 == $LkR3) goto GMKninput15;

if ($LkR15 == $LkR4) goto GMKninput15;

if ($LkR15 == $LkR5) goto GMKninput15;

if ($LkR15 == $LkR6) goto GMKninput15;

if ($LkR15 == $LkR7) goto GMKninput15;

if ($LkR15 == $LkR8) goto GMKninput15;

if ($LkR15 == $LkR9) goto GMKninput15;

if ($LkR15 == $LkR10) goto GMKninput15;

if ($LkR15 == $LkR11) goto GMKninput15;

if ($LkR15 == $LkR12) goto GMKninput15;

if ($LkR15 == $LkR13) goto GMKninput15;

if ($LkR15 == $LkR14) goto GMKninput15;

mes $LkR15;

GMKninput16:

input $LkR16;

if ($LkR16 < 1 || $LkR16 > 80) goto GMKninput16;

if ($LkR16 == $LkR1) goto GMKninput16;

if ($LkR16 == $LkR2) goto GMKninput16;

if ($LkR16 == $LkR3) goto GMKninput16;

if ($LkR16 == $LkR4) goto GMKninput16;

if ($LkR16 == $LkR5) goto GMKninput16;

if ($LkR16 == $LkR6) goto GMKninput16;

if ($LkR16 == $LkR7) goto GMKninput16;

if ($LkR16 == $LkR8) goto GMKninput16;

if ($LkR16 == $LkR9) goto GMKninput16;

if ($LkR16 == $LkR10) goto GMKninput16;

if ($LkR16 == $LkR11) goto GMKninput16;

if ($LkR16 == $LkR12) goto GMKninput16;

if ($LkR16 == $LkR13) goto GMKninput16;

if ($LkR16 == $LkR14) goto GMKninput16;

if ($LkR16 == $LkR15) goto GMKninput16;

mes $LkR16;

GMKninput17:

input $LkR17;

if ($LkR17 < 1 || $LkR17 > 80) goto GMKninput17;

if ($LkR17 == $LkR1) goto GMKninput17;

if ($LkR17 == $LkR2) goto GMKninput17;

if ($LkR17 == $LkR3) goto GMKninput17;

if ($LkR17 == $LkR4) goto GMKninput17;

if ($LkR17 == $LkR5) goto GMKninput17;

if ($LkR17 == $LkR6) goto GMKninput17;

if ($LkR17 == $LkR7) goto GMKninput17;

if ($LkR17 == $LkR8) goto GMKninput17;

if ($LkR17 == $LkR9) goto GMKninput17;

if ($LkR17 == $LkR10) goto GMKninput17;

if ($LkR17 == $LkR11) goto GMKninput17;

if ($LkR17 == $LkR12) goto GMKninput17;

if ($LkR17 == $LkR13) goto GMKninput17;

if ($LkR17 == $LkR14) goto GMKninput17;

if ($LkR17 == $LkR15) goto GMKninput17;

if ($LkR17 == $LkR16) goto GMKninput17;

mes $LkR17;

GMKninput18:

input $LkR18;

if ($LkR18 < 1 || $LkR18 > 80) goto GMKninput18;

if ($LkR18 == $LkR1) goto GMKninput18;

if ($LkR18 == $LkR2) goto GMKninput18;

if ($LkR18 == $LkR3) goto GMKninput18;

if ($LkR18 == $LkR4) goto GMKninput18;

if ($LkR18 == $LkR5) goto GMKninput18;

if ($LkR18 == $LkR6) goto GMKninput18;

if ($LkR18 == $LkR7) goto GMKninput18;

if ($LkR18 == $LkR8) goto GMKninput18;

if ($LkR18 == $LkR9) goto GMKninput18;

if ($LkR18 == $LkR10) goto GMKninput18;

if ($LkR18 == $LkR11) goto GMKninput18;

if ($LkR18 == $LkR12) goto GMKninput18;

if ($LkR18 == $LkR13) goto GMKninput18;

if ($LkR18 == $LkR14) goto GMKninput18;

if ($LkR18 == $LkR15) goto GMKninput18;

if ($LkR18 == $LkR16) goto GMKninput18;

if ($LkR18 == $LkR17) goto GMKninput18;

mes $LkR18;

GMKninput19:

input $LkR19;

if ($LkR19 < 1 || $LkR19 > 80) goto GMKninput19;

if ($LkR19 == $LkR1) goto GMKninput19;

if ($LkR19 == $LkR2) goto GMKninput19;

if ($LkR19 == $LkR3) goto GMKninput19;

if ($LkR19 == $LkR4) goto GMKninput19;

if ($LkR19 == $LkR5) goto GMKninput19;

if ($LkR19 == $LkR6) goto GMKninput19;

if ($LkR19 == $LkR7) goto GMKninput19;

if ($LkR19 == $LkR8) goto GMKninput19;

if ($LkR19 == $LkR9) goto GMKninput19;

if ($LkR19 == $LkR10) goto GMKninput19;

if ($LkR19 == $LkR11) goto GMKninput19;

if ($LkR19 == $LkR12) goto GMKninput19;

if ($LkR19 == $LkR13) goto GMKninput19;

if ($LkR19 == $LkR14) goto GMKninput19;

if ($LkR19 == $LkR15) goto GMKninput19;

if ($LkR19 == $LkR16) goto GMKninput19;

if ($LkR19 == $LkR17) goto GMKninput19;

if ($LkR19 == $LkR18) goto GMKninput19;

mes $LkR19;

GMKninput20:

input $LkR20;

if ($LkR20 < 1 || $LkR20 > 80) goto GMKninput20;

if ($LkR20 == $LkR1) goto GMKninput20;

if ($LkR20 == $LkR2) goto GMKninput20;

if ($LkR20 == $LkR3) goto GMKninput20;

if ($LkR20 == $LkR4) goto GMKninput20;

if ($LkR20 == $LkR5) goto GMKninput20;

if ($LkR20 == $LkR6) goto GMKninput20;

if ($LkR20 == $LkR7) goto GMKninput20;

if ($LkR20 == $LkR8) goto GMKninput20;

if ($LkR20 == $LkR9) goto GMKninput20;

if ($LkR20 == $LkR10) goto GMKninput20;

if ($LkR20 == $LkR11) goto GMKninput20;

if ($LkR20 == $LkR12) goto GMKninput20;

if ($LkR20 == $LkR13) goto GMKninput20;

if ($LkR20 == $LkR14) goto GMKninput20;

if ($LkR20 == $LkR15) goto GMKninput20;

if ($LkR20 == $LkR16) goto GMKninput20;

if ($LkR20 == $LkR17) goto GMKninput20;

if ($LkR20 == $LkR18) goto GMKninput20;

if ($LkR20 == $LkR19) goto GMKninput20;

mes $LkR20;

next;

mes "[^008800Keno Teller^000000]";

mes "Lottery rigged for next draw.";

set $KENO_Rigged,1;

close;

}

 

prontera,166,198,5 duplicate(klottery) Keno Lotto Teller 817[/cbox]

Share this post


Link to post
Share on other sites
  • 0

Like your example you have different Ticket ID. maybe you miss to claim it and after an hour it draw a new number.

ex.

you buy a ticket for 3:00pm draw and you miss to claim it and after an hour the Ez2 lotto draw the 4:00pm draw and you are trying to claim the ticket for 3:00pm draw which is not a valid ticket anymore because it have a different Ticket ID.

 

EZ2 Lotto

[cbox]//===== eAthena Script =======================================

//= Ez2 Lottery Script

//===== By: ==================================================

//= chan - teamcars1broglobal.blogspot.com

//===== Current Version: =====================================

//= 1.1.1a

//===== Compatible With: =====================================

//= Any Hercules Version

//===== Description: =========================================

//= Ez2 lottery draw.

//= Just like in Ez2 Lotto in the Philippines

//===== Additional Comments: =================================

//= Numbers drawn daily every hour

//= this is from acky Lottery Script

//= I just modify it

//============================================================

 

prontera,162,194,5 script ezlotterygenerator 817,{

 

OnInit:

waitingroom "Let's Play Ez2 Lotto",0;

set $L_TicketPrice,10; // TICKET COST

set $L_Prize_Money,1000000; // JACKPOT AMOUNT

set $L_Prize_Money_Small,500000; // SECONDARY PRIZE

if ($LID == 0) goto L_GenID;

end;

 

//Modify for own time

OnClock0000:

OnClock0100:

OnClock0200:

OnClock0300:

OnClock0400:

OnClock0500:

OnClock0600:

OnClock0700:

OnClock0800:

OnClock0900:

OnClock1000:

OnClock1100:

OnClock1200:

OnClock1300:

OnClock1400:

OnClock1500:

OnClock1600:

OnClock1700:

OnClock1800:

OnClock1900:

OnClock2000:

OnClock2100:

OnClock2200:

OnClock2300:

set $S_LastDr$,gettimestr("%H:%M",21);

goto C_Ez2;

 

C_Ez2:

// CHECKS IF LOTTERY IS RIGGED

if ($L_Rigged == 1) goto L_Rigged_Draw;

// GENERATES RANDOM NUMBERS 1-31

Pick1:

set $LW1,rand (1,31);

Pick2:

set $LW2,rand (1,31);

 

 

 

// BROADCASTS DRAW

L_Broadcast:

announce "Welcome to Ez2 Lotto " + $S_LastDr$ + " Draw!",8;

announce "The numbers are as follows: [" + $LW1 + "] [" + $LW2 + "]",8;

announce "Congratulations to the winners of Ez2 Lotto!",8;

 

 

// GENERATES DRAW ID CODE

L_GenID:

set $LID2,$LID;

// setS Next ID NUMBER

set $LID,rand (100000,999999);

end;

 

// setS DRAW TO RIGGED NUMBERS

L_Rigged_Draw:

 

set $LW1,$LR1;

set $LW2,$LR2;

set $L_Rigged,0;

goto L_Broadcast;

 

}

 

// BEGIN LOTTERY SCRIPT

- script ezlottery 76,{

L_Begin:

mes "[^008800Ez2 Teller^000000]";

mes "Winning EZ2 Lotto Numbers ("+$LID2+"):";

mes "The Last Draw ^0000FF[" + $S_LastDr$ + "]^000000";

mes "^0000FF[" + $LW1 + "] [" + $LW2 + "]^000000";

if ($LID > 99999) mes "Your Ticket ("+#LID+"):";

if ($LID > 99999) mes "^FF0000[" + #LW1 + "] [" + #LW2 + "]^000000";

mes "Next Draw-ID: ^FF0000" + $LID + "^000000.";

next;

if (getgmlevel() > 2) goto L_GM;

menu "Claim Prize",L_Claim,"Buy New Ticket",L_Buy,"Cancel",L_Cancel;

 

// PURCHASE TICKET

L_Buy:

if (#LID == $LID && #LW1 != 0) goto L_DoubleTicket;

mes "[^008800Ez2 Teller^000000]";

mes "Tickets cost ^0000FF" + $L_TicketPrice + "z^000000.";

mes "The Jackpot is ^FF0000" + $L_Prize_Money + "z^000000.";

next;

menu "Buy Ticket",-,"Cancel",L_Cancel;

if (Zeny < $L_TicketPrice) goto L_NoZeny;

set Zeny,Zeny-$L_TicketPrice;

mes "[^008800Ez2 Teller^000000]";

mes "Would you like your numbers Hand Picked or Lucky Picked?";

next;

menu "Lucky Picked",L_ComputerGen,"Hand Picked",L_HandPick,"Renew Ticket",L_Renew;

 

// RENEW LAST TICKET

L_Renew:

if ($LID < 99999) goto L_Invalid;

set #LID,$LID;

goto L_Confirm2;

 

L_ComputerGen:

// SELECTS RANDOM NUMBERS

set @L1,0;

set @L2,0;

 

Pick1:

set @L1,rand (1,31);

Pick2:

set @L2,rand (1,31);

 

 

mes "[^008800Ez2 Teller^000000]";

mes "The computer has selected the following numbers:";

mes "^0000FF" + @L1 + " " + @L2 + "^000000";

next;

menu "Confirm",L_Confirm,"Re-Generate",L_ComputerGen;

 

// HAND PICK LOTTERY NUMBERS

L_HandPick:

mes "[^008800Ez2 Teller^000000]";

mes "Please pick your numbers (1-31):";

set @L1,0;

set @L2,0;

 

input1:

input @L1;

if (@L1 < 1 || @L1 > 31) goto input1;

mes @L1;

input2:

input @L2;

if (@L2 < 1 || @L2 > 31) goto input2;

 

mes @L2;

 

next;

mes "[^008800Ez2 Teller^000000]";

mes "Your numbers are:";

mes "^0000FF" + @L1 + " " + @L2 + "^000000";

next;

menu "Confirm",L_Confirm,"Re-Pick",L_HandPick;

 

L_Confirm:

set #LW1,@L1;

set #LW2,@L2;

set #LID,$LID;

L_Confirm2:

mes "[^008800Ez2 Teller^000000]";

mes "The live broadcasted draw are at 11am, 4pm and 9pm";

mes "You can claim your ticket between then and the next draw.";

next;

mes "[^008800Ez2 Teller^000000]";

mes "Good luck!";

close;

 

L_Claim:

// CHECKS TICKET VALIDILITY

if (#LID != $LID2) goto L_Invalid;

// CHECKS HOW MANY NUMBERS MATCHED

set @LPrize,0;

if (#LW1 == $LW1) set @LPrize,@LPrize+1;

if (#LW2 == $LW2) set @LPrize,@LPrize+1;

if (@LPrize == 2) goto LWinBig;

if (#LW1 == $LW2) set @LPrize,@LPrize+2;

if (#LW2 == $LW1) set @LPrize,@LPrize+2;

if (@LPrize == 4) goto LWinSmall;

 

// NO WINNER

mes "[^008800Ez2 Teller^000000]";

mes "Bad luck, it appears you do not hold a winning ticket.";

next;

mes "[^008800Ez2 Teller^000000]";

mes "Better luck next time!.";

set #LID,0;

close;

 

// MATCHED TWO IN EXACT ORDER

LWinBig:

mes "[^008800Ez2 Teller^000000]";

mes "You have matched Two Numbers in Exact Order";

mes "Jackpot!";

mes "You've won ^0000FF" + $L_Prize_Money + "z^000000.";

set Zeny,Zeny+$L_Prize_Money;

announce "Ez2 Teller: " + strcharinfo(0) + " has won the JACKPOT of " + $L_Prize_Money + "z!",8;

set #LID,0;

close;

 

// MATCHED TWO I RANDOM ORDER

LWinSmall:

mes "[^008800Ez2 Teller^000000]";

mes "You have matched Two numbers in Random Order";

mes "You've won ^0000FF" + $L_Prize_Money_Small + "z^000000.";

set Zeny,Zeny+$L_Prize_Money_Small;

announce "Ez2 Teller: " + strcharinfo(0) + " has won a prize of " + $L_Prize_Money_Small + "z!",8;

set #LID,0;

close;

 

// NO Zeny

L_NoZeny:

mes "[^008800Ez2 Teller^000000]";

mes "You can't afford a Ez2 Lottery ticket.";

close;

 

// INVALID TICKET

L_Invalid:

mes "[^008800Ez2 Teller^000000]";

mes "I'm sorry but it appears that you have an invalid ticket.";

close;

 

// DOUBLE TICKET

L_DoubleTicket:

mes "[^008800Ez2 Teller^000000]";

mes "It appears that you already have a ticket for today.";

mes "You may only purchase one ticket per draw.";

close;

 

L_Cancel:

mes "[^008800Ez2 Teller^000000]";

mes "Come back soon!";

close;

 

// GM MENU (Lets you manually do draws)

L_GM:

menu "Claim Prize",L_Claim,"Buy New Ticket",L_Buy,"[GM]Do Draw Now",-,"[GM]Rig the Ez2 Lottery",L_GM_Rig,"Cancel",L_Cancel;

 

// CHECKS IF Lottery IS RIGGED

if ($L_Rigged == 1) goto L_Rigged_Draw;

// GENERATES RANDOM NUMBERS 1-31

GMPick1:

set $LW1,rand (1,31);

 

GMPick2:

set $LW2,rand (1,31);

 

 

 

// BROADCASTS DRAW

L_Broadcast:

announce "Ez2 Teller: Welcome to the Special GM's Ez2 Lotto draw!",8;

announce "The numbers are as follows: [" + $LW1 + "] [" + $LW2 + "]",8;

announce "Congratulations to the Ez2 Lotto winners!",8;

 

// GENERATES DRAW ID CODE

L_GenID:

set $LID2,$LID;

// setS Next ID NUMBER

set $LID,rand (100000,999999);

set $S_LastDr$,"Special GM's draw!";

close;

 

// setS DRAW TO RIGGED NUMBERS

L_Rigged_Draw:

set $LW1,$LR1;

set $LW2,$LR2;

set $L_Rigged,0;

goto L_Broadcast;

 

// ALLOWS GM TO DO A RIGGED DRAW

L_GM_Rig:

mes "[Lottery]";

mes "Please pick your numbers (1-31):";

set $LR1,0;

set $LR2,0;

GMinput1:

input $LR1;

if ($LR1 < 1 || $LR1 > 31) goto GMinput1;

mes $LR1;

GMinput2:

input $LR2;

if ($LR2 < 1 || $LR2 > 31) goto GMinput2;

 

mes $LR2;

next;

mes "[^008800Ez2 Teller^000000]";

mes "Lottery rigged for next draw.";

set $L_Rigged,1;

close;

}

 

prontera,162,194,5 duplicate(ezlottery) Ez2 Lotto Teller 817[/cbox]

 

so do you mean that the ticket is only valid for one draw?

 

if that so, is it possible to automatically delete the ticket after the draw,?

 

for ex.

 

you buy ticket for the 3PM draw, then after announcing the winning ticket, your ticket after 3PM will be deleted,

 

cause i notice that after the draw, your ticket still exists,.

 

anyway thanks.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.