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;}
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
Share this post
Link to post
Share on other sites