From ffb4b42633438e8c1af2af58861f12cf1bf3bfa8 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Sat, 27 Aug 2016 18:04:48 +0000 Subject: [PATCH] Removed Lottery. --- .../dist/game/config/General.ini | 33 - .../dist/game/data/html/default/30990-1.htm | 9 - .../dist/game/data/html/default/30990-2.htm | 14 - .../dist/game/data/html/default/30990-3.htm | 8 - .../dist/game/data/html/default/30990-4.htm | 5 - .../dist/game/data/html/default/30990-5.htm | 55 -- .../dist/game/data/html/default/30990-6.htm | 7 - .../dist/game/data/html/default/30990.htm | 7 - .../dist/game/data/html/default/30991-1.htm | 10 - .../dist/game/data/html/default/30991-2.htm | 14 - .../dist/game/data/html/default/30991-3.htm | 8 - .../dist/game/data/html/default/30991-4.htm | 5 - .../dist/game/data/html/default/30991-5.htm | 54 -- .../dist/game/data/html/default/30991-6.htm | 8 - .../dist/game/data/html/default/30991.htm | 7 - .../dist/game/data/html/default/30992-1.htm | 9 - .../dist/game/data/html/default/30992-2.htm | 14 - .../dist/game/data/html/default/30992-3.htm | 9 - .../dist/game/data/html/default/30992-4.htm | 5 - .../dist/game/data/html/default/30992-5.htm | 54 -- .../dist/game/data/html/default/30992-6.htm | 8 - .../dist/game/data/html/default/30992.htm | 7 - .../dist/game/data/html/default/30993-1.htm | 11 - .../dist/game/data/html/default/30993-2.htm | 14 - .../dist/game/data/html/default/30993-3.htm | 7 - .../dist/game/data/html/default/30993-4.htm | 4 - .../dist/game/data/html/default/30993-5.htm | 54 -- .../dist/game/data/html/default/30993-6.htm | 7 - .../dist/game/data/html/default/30993.htm | 7 - .../dist/game/data/html/default/30994-1.htm | 10 - .../dist/game/data/html/default/30994-2.htm | 14 - .../dist/game/data/html/default/30994-3.htm | 7 - .../dist/game/data/html/default/30994-4.htm | 4 - .../dist/game/data/html/default/30994-5.htm | 54 -- .../dist/game/data/html/default/30994-6.htm | 7 - .../dist/game/data/html/default/30994.htm | 6 - .../data/scripts/handlers/MasterHandler.java | 2 - .../scripts/handlers/bypasshandlers/Loto.java | 348 ----------- .../dist/game/data/spawns/Aden/TownOfAden.xml | 2 +- .../dist/game/data/spawns/Dion/TownOfDion.xml | 2 +- .../game/data/spawns/Fearon/FearonVillage.xml | 2 +- .../game/data/spawns/Giran/TownOfGiran.xml | 2 +- .../game/data/spawns/Gludin/GludinVillage.xml | 2 +- .../game/data/spawns/Gludio/TownOfGludio.xml | 2 +- .../data/spawns/Goddard/TownOfGoddard.xml | 2 +- .../data/spawns/Hunters/HuntersVillage.xml | 2 +- .../dist/game/data/spawns/Innadril/Heine.xml | 2 +- .../dist/game/data/spawns/Oren/TownOfOren.xml | 2 +- .../dist/game/data/spawns/Rune/TownOfRune.xml | 2 +- .../spawns/Schuttgart/TownOfSchuttgart.xml | 2 +- .../java/com/l2jmobius/Config.java | 14 - .../instancemanager/games/Lottery.java | 574 ------------------ .../model/actor/instance/L2PcInstance.java | 13 - 53 files changed, 12 insertions(+), 1519 deletions(-) delete mode 100644 L2J_Mobius_Underground/dist/game/data/html/default/30990-1.htm delete mode 100644 L2J_Mobius_Underground/dist/game/data/html/default/30990-2.htm delete mode 100644 L2J_Mobius_Underground/dist/game/data/html/default/30990-3.htm delete mode 100644 L2J_Mobius_Underground/dist/game/data/html/default/30990-4.htm delete mode 100644 L2J_Mobius_Underground/dist/game/data/html/default/30990-5.htm delete mode 100644 L2J_Mobius_Underground/dist/game/data/html/default/30990-6.htm delete mode 100644 L2J_Mobius_Underground/dist/game/data/html/default/30990.htm delete mode 100644 L2J_Mobius_Underground/dist/game/data/html/default/30991-1.htm delete mode 100644 L2J_Mobius_Underground/dist/game/data/html/default/30991-2.htm delete mode 100644 L2J_Mobius_Underground/dist/game/data/html/default/30991-3.htm delete mode 100644 L2J_Mobius_Underground/dist/game/data/html/default/30991-4.htm delete mode 100644 L2J_Mobius_Underground/dist/game/data/html/default/30991-5.htm delete mode 100644 L2J_Mobius_Underground/dist/game/data/html/default/30991-6.htm delete mode 100644 L2J_Mobius_Underground/dist/game/data/html/default/30991.htm delete mode 100644 L2J_Mobius_Underground/dist/game/data/html/default/30992-1.htm delete mode 100644 L2J_Mobius_Underground/dist/game/data/html/default/30992-2.htm delete mode 100644 L2J_Mobius_Underground/dist/game/data/html/default/30992-3.htm delete mode 100644 L2J_Mobius_Underground/dist/game/data/html/default/30992-4.htm delete mode 100644 L2J_Mobius_Underground/dist/game/data/html/default/30992-5.htm delete mode 100644 L2J_Mobius_Underground/dist/game/data/html/default/30992-6.htm delete mode 100644 L2J_Mobius_Underground/dist/game/data/html/default/30992.htm delete mode 100644 L2J_Mobius_Underground/dist/game/data/html/default/30993-1.htm delete mode 100644 L2J_Mobius_Underground/dist/game/data/html/default/30993-2.htm delete mode 100644 L2J_Mobius_Underground/dist/game/data/html/default/30993-3.htm delete mode 100644 L2J_Mobius_Underground/dist/game/data/html/default/30993-4.htm delete mode 100644 L2J_Mobius_Underground/dist/game/data/html/default/30993-5.htm delete mode 100644 L2J_Mobius_Underground/dist/game/data/html/default/30993-6.htm delete mode 100644 L2J_Mobius_Underground/dist/game/data/html/default/30993.htm delete mode 100644 L2J_Mobius_Underground/dist/game/data/html/default/30994-1.htm delete mode 100644 L2J_Mobius_Underground/dist/game/data/html/default/30994-2.htm delete mode 100644 L2J_Mobius_Underground/dist/game/data/html/default/30994-3.htm delete mode 100644 L2J_Mobius_Underground/dist/game/data/html/default/30994-4.htm delete mode 100644 L2J_Mobius_Underground/dist/game/data/html/default/30994-5.htm delete mode 100644 L2J_Mobius_Underground/dist/game/data/html/default/30994-6.htm delete mode 100644 L2J_Mobius_Underground/dist/game/data/html/default/30994.htm delete mode 100644 L2J_Mobius_Underground/dist/game/data/scripts/handlers/bypasshandlers/Loto.java delete mode 100644 L2J_Mobius_Underground/java/com/l2jmobius/gameserver/instancemanager/games/Lottery.java diff --git a/L2J_Mobius_Underground/dist/game/config/General.ini b/L2J_Mobius_Underground/dist/game/config/General.ini index 17e605a1ab..a066a7043f 100644 --- a/L2J_Mobius_Underground/dist/game/config/General.ini +++ b/L2J_Mobius_Underground/dist/game/config/General.ini @@ -539,39 +539,6 @@ AltManorSaveAllActions = False AltManorSavePeriodRate = 2 -# --------------------------------------------------------------------------- -# Lottery -# --------------------------------------------------------------------------- - -# Default: True -# Crashes the client (packet problem?) -AllowLottery = False - -# Initial Lottery prize. -# Default: 50000 -AltLotteryPrize = 50000 - -# Lottery Ticket Price -# Default: 2000 -AltLotteryTicketPrice = 2000 - -# What part of jackpot amount should receive characters who pick 5 wining numbers -# Default: 0.6 -AltLottery5NumberRate = 0.6 - -# What part of jackpot amount should receive characters who pick 4 wining numbers -# Default: 0.2 -AltLottery4NumberRate = 0.2 - -# What part of jackpot amount should receive characters who pick 3 wining numbers -# Default: 0.2 -AltLottery3NumberRate = 0.2 - -# How much Adena receive characters who pick two or less of the winning number -# Default: 200 -AltLottery2and1NumberPrize = 200 - - # --------------------------------------------------------------------------- # Item Auction # --------------------------------------------------------------------------- diff --git a/L2J_Mobius_Underground/dist/game/data/html/default/30990-1.htm b/L2J_Mobius_Underground/dist/game/data/html/default/30990-1.htm deleted file mode 100644 index e29ac0180a..0000000000 --- a/L2J_Mobius_Underground/dist/game/data/html/default/30990-1.htm +++ /dev/null @@ -1,9 +0,0 @@ -Lottery Ticket Seller:
-Welcome! Want a lottery ticket?
-One costs 2,000 Adena.
-Wanna buy? Then choose to proceed!
-If you don't know the game rules, refer to the instructions!
-
- -
- \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/html/default/30990-2.htm b/L2J_Mobius_Underground/dist/game/data/html/default/30990-2.htm deleted file mode 100644 index 166bfce312..0000000000 --- a/L2J_Mobius_Underground/dist/game/data/html/default/30990-2.htm +++ /dev/null @@ -1,14 +0,0 @@ -Lottery Ticket Seller:
-Here is how to play the lottery:
-Select five numbers between 1 and 20. Your prize is determined by how many winning numbers you match.
-First place goes to those who pick all five winning numbers. First place prize amount is 60% of the total jackpot amount, minus the fourth place prize.
-Second place goes to those who pick four out of the five winning numbers. Second place prize amount is 20% of the total jackpot amount, minus the fourth place prize.
-Third place goes to those who pick three out of the five winning numbers. Third place prize amount is 20% of the total jackpot amount, minus the fourth place prize.
-Those who pick two or less of the winning number may receive 200 Adena.
-The prize money for each category will be divided equally amongst winners. If there are no winners in any category, those winnings are transferred to the next jackpot.
-Lottery Tickets are sold on a weekly basis, starting at 7:10 pm every Saturday until 6:50 pm the following Saturday.
-The winning numbers are announced at 7:00 pm every Saturday. All times are subject to change.
-I wish you luck! Enjoy the lottery.
- - - \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/html/default/30990-3.htm b/L2J_Mobius_Underground/dist/game/data/html/default/30990-3.htm deleted file mode 100644 index 5b8b5351c6..0000000000 --- a/L2J_Mobius_Underground/dist/game/data/html/default/30990-3.htm +++ /dev/null @@ -1,8 +0,0 @@ -Lottery Ticket Seller:
-Welcome to the Aden Lottery owned and operated by the Innadril Merchants Association!
-May I have your attention please!
-The total jackpot amount so far for the Round 160 Lottery is %adena% Adena.
-
- -
- \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/html/default/30990-4.htm b/L2J_Mobius_Underground/dist/game/data/html/default/30990-4.htm deleted file mode 100644 index a1d1f0b69e..0000000000 --- a/L2J_Mobius_Underground/dist/game/data/html/default/30990-4.htm +++ /dev/null @@ -1,5 +0,0 @@ - -Lottery Ticket Seller:
-%result% - - \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/html/default/30990-5.htm b/L2J_Mobius_Underground/dist/game/data/html/default/30990-5.htm deleted file mode 100644 index c2b388c105..0000000000 --- a/L2J_Mobius_Underground/dist/game/data/html/default/30990-5.htm +++ /dev/null @@ -1,55 +0,0 @@ - -Lottery Ticket Seller:
-This is Round %race% of Lottery. Choose five numbers:
-
- - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-

- - \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/html/default/30990-6.htm b/L2J_Mobius_Underground/dist/game/data/html/default/30990-6.htm deleted file mode 100644 index 45f756ba21..0000000000 --- a/L2J_Mobius_Underground/dist/game/data/html/default/30990-6.htm +++ /dev/null @@ -1,7 +0,0 @@ -Lottery Ticket Seller:
-Thank you for playing the lottery.
-The winners will be announced at 7:00 pm on Saturday
-
- -
- \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/html/default/30990.htm b/L2J_Mobius_Underground/dist/game/data/html/default/30990.htm deleted file mode 100644 index c74a75a09e..0000000000 --- a/L2J_Mobius_Underground/dist/game/data/html/default/30990.htm +++ /dev/null @@ -1,7 +0,0 @@ -Lottery Ticket Seller:
-Hello! Welcome to the Aden Lottery owned and operated by the Innadril Merchants Association!
-Every ticket is a potential winner! Step right up!
- - - - \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/html/default/30991-1.htm b/L2J_Mobius_Underground/dist/game/data/html/default/30991-1.htm deleted file mode 100644 index 540b05b9ea..0000000000 --- a/L2J_Mobius_Underground/dist/game/data/html/default/30991-1.htm +++ /dev/null @@ -1,10 +0,0 @@ -Lottery Ticket Seller:
-Thank you for playing the lottery.
-One lottery Ticket costs %ticket_price% Adena.
-If you wish to play the lottery, press the button.
-
- - - -
- \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/html/default/30991-2.htm b/L2J_Mobius_Underground/dist/game/data/html/default/30991-2.htm deleted file mode 100644 index bcf6c1b542..0000000000 --- a/L2J_Mobius_Underground/dist/game/data/html/default/30991-2.htm +++ /dev/null @@ -1,14 +0,0 @@ -Lottery Ticket Seller:
-Here is how to play the lottery:
-Select five numbers between 1 and 20. Your prize is determined by how many winning numbers you match.
-First place goes to those who pick all five winning numbers. First place prize amount is %prize5% % of the total jackpot amount, minus the fourth place prize.
-Second place goes to those who pick four out of the five winning numbers. Second place prize amount is %prize4% % of the total jackpot amount, minus the fourth place prize.
-Third place goes to those who pick three out of the five winning numbers. Third place prize amount is %prize3% % of the total jackpot amount, minus the fourth place prize.
-Those who pick two or less of the winning number may receive %prize2% Adena.
-The prize money for each category will be divided equally amongst winners. If there are no winners in any category, those winnings are transferred to the next jackpot.
-Lottery Tickets are sold on a weekly basis, starting at 7:10 pm every Saturday until 6:50 pm the following Saturday.
-The winning numbers are announced at 7:00 pm every Saturday. All times are subject to change.
-I wish you luck! Enjoy the lottery.
- - - \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/html/default/30991-3.htm b/L2J_Mobius_Underground/dist/game/data/html/default/30991-3.htm deleted file mode 100644 index 0b20a7c6e9..0000000000 --- a/L2J_Mobius_Underground/dist/game/data/html/default/30991-3.htm +++ /dev/null @@ -1,8 +0,0 @@ - -Lottery Ticket Seller:
-May I have your attention please!
-The total jackpot amount so far for the Round %race% Lottery is %adena% Adena.

-
- -
- \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/html/default/30991-4.htm b/L2J_Mobius_Underground/dist/game/data/html/default/30991-4.htm deleted file mode 100644 index a1d1f0b69e..0000000000 --- a/L2J_Mobius_Underground/dist/game/data/html/default/30991-4.htm +++ /dev/null @@ -1,5 +0,0 @@ - -Lottery Ticket Seller:
-%result% - - \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/html/default/30991-5.htm b/L2J_Mobius_Underground/dist/game/data/html/default/30991-5.htm deleted file mode 100644 index b5391b4f18..0000000000 --- a/L2J_Mobius_Underground/dist/game/data/html/default/30991-5.htm +++ /dev/null @@ -1,54 +0,0 @@ -Lottery Ticket Seller:
-This is Round %race% of Lottery. Choose five numbers:
-
- - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-

- - \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/html/default/30991-6.htm b/L2J_Mobius_Underground/dist/game/data/html/default/30991-6.htm deleted file mode 100644 index 8f676bf871..0000000000 --- a/L2J_Mobius_Underground/dist/game/data/html/default/30991-6.htm +++ /dev/null @@ -1,8 +0,0 @@ - -Lottery Ticket Seller:
-Thank you for playing the lottery.
-The winners will be announced at 7:00 pm on Saturday
-
- -
- \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/html/default/30991.htm b/L2J_Mobius_Underground/dist/game/data/html/default/30991.htm deleted file mode 100644 index 8909f601eb..0000000000 --- a/L2J_Mobius_Underground/dist/game/data/html/default/30991.htm +++ /dev/null @@ -1,7 +0,0 @@ - -Lottery Ticket Seller:
-Every ticket is a potential winner! Step right up!
- - - - \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/html/default/30992-1.htm b/L2J_Mobius_Underground/dist/game/data/html/default/30992-1.htm deleted file mode 100644 index b45a268a76..0000000000 --- a/L2J_Mobius_Underground/dist/game/data/html/default/30992-1.htm +++ /dev/null @@ -1,9 +0,0 @@ -Lottery Ticket Seller:
-Welcome! Want a lottery ticket?
-One costs %ticket_price% Adena.
-Wanna buy? Then choose to proceed!
-If you don't know the game rules, refer to the instructions!
-
- -
- \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/html/default/30992-2.htm b/L2J_Mobius_Underground/dist/game/data/html/default/30992-2.htm deleted file mode 100644 index 73bc779c60..0000000000 --- a/L2J_Mobius_Underground/dist/game/data/html/default/30992-2.htm +++ /dev/null @@ -1,14 +0,0 @@ -Lottery Ticket Seller:
-Here is how to play the lottery:
-Select five numbers between 1 and 20. Your prize is determined by how many winning numbers you match.
-First place goes to those who pick all five winning numbers. First place prize amount is %prize5%% of the total jackpot amount, minus the fourth place prize.
-Second place goes to those who pick four out of the five winning numbers. Second place prize amount is %prize4%% of the total jackpot amount, minus the fourth place prize.
-Third place goes to those who pick three out of the five winning numbers. Third place prize amount is %prize3%% of the total jackpot amount, minus the fourth place prize.
-Those who pick two or less of the winning number may receive %prize2% Adena.
-The prize money for each category will be divided equally amongst winners. If there are no winners in any category, those winnings are transferred to the next jackpot.
-Lottery Tickets are sold on a weekly basis, starting at 7:10 pm every Saturday until 6:50 pm the following Saturday.
-The winning numbers are announced at 7:00 pm every Saturday. All times are subject to change.
-I wish you luck! Enjoy the lottery.
- - - \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/html/default/30992-3.htm b/L2J_Mobius_Underground/dist/game/data/html/default/30992-3.htm deleted file mode 100644 index 738ee5435f..0000000000 --- a/L2J_Mobius_Underground/dist/game/data/html/default/30992-3.htm +++ /dev/null @@ -1,9 +0,0 @@ -Lottery Ticket Seller:
-Welcome to the Aden Lottery owned and operated by the Innadril Merchants Association!
-May I have your attention please!
-The total jackpot amount so far for the Round %race% Lottery is %adena% Adena.
-
- -
- - \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/html/default/30992-4.htm b/L2J_Mobius_Underground/dist/game/data/html/default/30992-4.htm deleted file mode 100644 index a1d1f0b69e..0000000000 --- a/L2J_Mobius_Underground/dist/game/data/html/default/30992-4.htm +++ /dev/null @@ -1,5 +0,0 @@ - -Lottery Ticket Seller:
-%result% - - \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/html/default/30992-5.htm b/L2J_Mobius_Underground/dist/game/data/html/default/30992-5.htm deleted file mode 100644 index aac08bfdba..0000000000 --- a/L2J_Mobius_Underground/dist/game/data/html/default/30992-5.htm +++ /dev/null @@ -1,54 +0,0 @@ -Lottery Ticket Seller:
-This is Round %race% of Lottery. Choose five numbers:
-
- - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-

- - \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/html/default/30992-6.htm b/L2J_Mobius_Underground/dist/game/data/html/default/30992-6.htm deleted file mode 100644 index 8f676bf871..0000000000 --- a/L2J_Mobius_Underground/dist/game/data/html/default/30992-6.htm +++ /dev/null @@ -1,8 +0,0 @@ - -Lottery Ticket Seller:
-Thank you for playing the lottery.
-The winners will be announced at 7:00 pm on Saturday
-
- -
- \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/html/default/30992.htm b/L2J_Mobius_Underground/dist/game/data/html/default/30992.htm deleted file mode 100644 index c74a75a09e..0000000000 --- a/L2J_Mobius_Underground/dist/game/data/html/default/30992.htm +++ /dev/null @@ -1,7 +0,0 @@ -Lottery Ticket Seller:
-Hello! Welcome to the Aden Lottery owned and operated by the Innadril Merchants Association!
-Every ticket is a potential winner! Step right up!
- - - - \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/html/default/30993-1.htm b/L2J_Mobius_Underground/dist/game/data/html/default/30993-1.htm deleted file mode 100644 index 7d6b8bacc1..0000000000 --- a/L2J_Mobius_Underground/dist/game/data/html/default/30993-1.htm +++ /dev/null @@ -1,11 +0,0 @@ - -Lottery Ticket Seller:
-Thank you for playing the lottery.
-One lottery Ticket costs %ticket_price% Adena.
-If you wish to play the lottery, press the button.
-
- - - -
- \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/html/default/30993-2.htm b/L2J_Mobius_Underground/dist/game/data/html/default/30993-2.htm deleted file mode 100644 index bcf6c1b542..0000000000 --- a/L2J_Mobius_Underground/dist/game/data/html/default/30993-2.htm +++ /dev/null @@ -1,14 +0,0 @@ -Lottery Ticket Seller:
-Here is how to play the lottery:
-Select five numbers between 1 and 20. Your prize is determined by how many winning numbers you match.
-First place goes to those who pick all five winning numbers. First place prize amount is %prize5% % of the total jackpot amount, minus the fourth place prize.
-Second place goes to those who pick four out of the five winning numbers. Second place prize amount is %prize4% % of the total jackpot amount, minus the fourth place prize.
-Third place goes to those who pick three out of the five winning numbers. Third place prize amount is %prize3% % of the total jackpot amount, minus the fourth place prize.
-Those who pick two or less of the winning number may receive %prize2% Adena.
-The prize money for each category will be divided equally amongst winners. If there are no winners in any category, those winnings are transferred to the next jackpot.
-Lottery Tickets are sold on a weekly basis, starting at 7:10 pm every Saturday until 6:50 pm the following Saturday.
-The winning numbers are announced at 7:00 pm every Saturday. All times are subject to change.
-I wish you luck! Enjoy the lottery.
- - - \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/html/default/30993-3.htm b/L2J_Mobius_Underground/dist/game/data/html/default/30993-3.htm deleted file mode 100644 index 477af51c07..0000000000 --- a/L2J_Mobius_Underground/dist/game/data/html/default/30993-3.htm +++ /dev/null @@ -1,7 +0,0 @@ -Lottery Ticket Seller:
-May I have your attention please!
-The total jackpot amount so far for the Round %race% Lottery is %adena% Adena.

-
- -
- \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/html/default/30993-4.htm b/L2J_Mobius_Underground/dist/game/data/html/default/30993-4.htm deleted file mode 100644 index 2639dbfa9a..0000000000 --- a/L2J_Mobius_Underground/dist/game/data/html/default/30993-4.htm +++ /dev/null @@ -1,4 +0,0 @@ -Lottery Ticket Seller:
-%result% - - \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/html/default/30993-5.htm b/L2J_Mobius_Underground/dist/game/data/html/default/30993-5.htm deleted file mode 100644 index aac08bfdba..0000000000 --- a/L2J_Mobius_Underground/dist/game/data/html/default/30993-5.htm +++ /dev/null @@ -1,54 +0,0 @@ -Lottery Ticket Seller:
-This is Round %race% of Lottery. Choose five numbers:
-
- - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-

- - \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/html/default/30993-6.htm b/L2J_Mobius_Underground/dist/game/data/html/default/30993-6.htm deleted file mode 100644 index 5fccbb2f8c..0000000000 --- a/L2J_Mobius_Underground/dist/game/data/html/default/30993-6.htm +++ /dev/null @@ -1,7 +0,0 @@ -Lottery Ticket Seller:
-Thank you for playing the lottery.
-The winners will be announced at 7:00 pm on Saturday
-
- -
- \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/html/default/30993.htm b/L2J_Mobius_Underground/dist/game/data/html/default/30993.htm deleted file mode 100644 index c74a75a09e..0000000000 --- a/L2J_Mobius_Underground/dist/game/data/html/default/30993.htm +++ /dev/null @@ -1,7 +0,0 @@ -Lottery Ticket Seller:
-Hello! Welcome to the Aden Lottery owned and operated by the Innadril Merchants Association!
-Every ticket is a potential winner! Step right up!
- - - - \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/html/default/30994-1.htm b/L2J_Mobius_Underground/dist/game/data/html/default/30994-1.htm deleted file mode 100644 index 540b05b9ea..0000000000 --- a/L2J_Mobius_Underground/dist/game/data/html/default/30994-1.htm +++ /dev/null @@ -1,10 +0,0 @@ -Lottery Ticket Seller:
-Thank you for playing the lottery.
-One lottery Ticket costs %ticket_price% Adena.
-If you wish to play the lottery, press the button.
-
- - - -
- \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/html/default/30994-2.htm b/L2J_Mobius_Underground/dist/game/data/html/default/30994-2.htm deleted file mode 100644 index bcf6c1b542..0000000000 --- a/L2J_Mobius_Underground/dist/game/data/html/default/30994-2.htm +++ /dev/null @@ -1,14 +0,0 @@ -Lottery Ticket Seller:
-Here is how to play the lottery:
-Select five numbers between 1 and 20. Your prize is determined by how many winning numbers you match.
-First place goes to those who pick all five winning numbers. First place prize amount is %prize5% % of the total jackpot amount, minus the fourth place prize.
-Second place goes to those who pick four out of the five winning numbers. Second place prize amount is %prize4% % of the total jackpot amount, minus the fourth place prize.
-Third place goes to those who pick three out of the five winning numbers. Third place prize amount is %prize3% % of the total jackpot amount, minus the fourth place prize.
-Those who pick two or less of the winning number may receive %prize2% Adena.
-The prize money for each category will be divided equally amongst winners. If there are no winners in any category, those winnings are transferred to the next jackpot.
-Lottery Tickets are sold on a weekly basis, starting at 7:10 pm every Saturday until 6:50 pm the following Saturday.
-The winning numbers are announced at 7:00 pm every Saturday. All times are subject to change.
-I wish you luck! Enjoy the lottery.
- - - \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/html/default/30994-3.htm b/L2J_Mobius_Underground/dist/game/data/html/default/30994-3.htm deleted file mode 100644 index 267e6673d8..0000000000 --- a/L2J_Mobius_Underground/dist/game/data/html/default/30994-3.htm +++ /dev/null @@ -1,7 +0,0 @@ -Lottery Ticket Seller:
-May I have your attention please!
-The total jackpot amount so far for the Round %race% Lottery is %adena% Adena.

-
- -
- \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/html/default/30994-4.htm b/L2J_Mobius_Underground/dist/game/data/html/default/30994-4.htm deleted file mode 100644 index 4ed2798260..0000000000 --- a/L2J_Mobius_Underground/dist/game/data/html/default/30994-4.htm +++ /dev/null @@ -1,4 +0,0 @@ -Lottery Ticket Seller:
-%result% - - \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/html/default/30994-5.htm b/L2J_Mobius_Underground/dist/game/data/html/default/30994-5.htm deleted file mode 100644 index aac08bfdba..0000000000 --- a/L2J_Mobius_Underground/dist/game/data/html/default/30994-5.htm +++ /dev/null @@ -1,54 +0,0 @@ -Lottery Ticket Seller:
-This is Round %race% of Lottery. Choose five numbers:
-
- - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-

- - \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/html/default/30994-6.htm b/L2J_Mobius_Underground/dist/game/data/html/default/30994-6.htm deleted file mode 100644 index 5386ce99d9..0000000000 --- a/L2J_Mobius_Underground/dist/game/data/html/default/30994-6.htm +++ /dev/null @@ -1,7 +0,0 @@ -Lottery Ticket Seller:
-Thank you for playing the lottery.
-The winners will be announced at 7:00 pm on Saturday
-
- -
- \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/html/default/30994.htm b/L2J_Mobius_Underground/dist/game/data/html/default/30994.htm deleted file mode 100644 index 2e84ecba8c..0000000000 --- a/L2J_Mobius_Underground/dist/game/data/html/default/30994.htm +++ /dev/null @@ -1,6 +0,0 @@ -Lottery Ticket Seller:
-Every ticket is a potential winner! Step right up!
- - - - \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/handlers/MasterHandler.java b/L2J_Mobius_Underground/dist/game/data/scripts/handlers/MasterHandler.java index d2cef7280f..7c48bbb637 100644 --- a/L2J_Mobius_Underground/dist/game/data/scripts/handlers/MasterHandler.java +++ b/L2J_Mobius_Underground/dist/game/data/scripts/handlers/MasterHandler.java @@ -142,7 +142,6 @@ import handlers.bypasshandlers.EventEngine; import handlers.bypasshandlers.Freight; import handlers.bypasshandlers.ItemAuctionLink; import handlers.bypasshandlers.Link; -import handlers.bypasshandlers.Loto; import handlers.bypasshandlers.Multisell; import handlers.bypasshandlers.NpcViewMod; import handlers.bypasshandlers.Observation; @@ -447,7 +446,6 @@ public class MasterHandler Freight.class, ItemAuctionLink.class, Link.class, - Loto.class, Multisell.class, NpcViewMod.class, Observation.class, diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/handlers/bypasshandlers/Loto.java b/L2J_Mobius_Underground/dist/game/data/scripts/handlers/bypasshandlers/Loto.java deleted file mode 100644 index 085e14ec2f..0000000000 --- a/L2J_Mobius_Underground/dist/game/data/scripts/handlers/bypasshandlers/Loto.java +++ /dev/null @@ -1,348 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package handlers.bypasshandlers; - -import java.text.DateFormat; - -import com.l2jmobius.Config; -import com.l2jmobius.gameserver.handler.IBypassHandler; -import com.l2jmobius.gameserver.idfactory.IdFactory; -import com.l2jmobius.gameserver.instancemanager.games.Lottery; -import com.l2jmobius.gameserver.model.actor.L2Character; -import com.l2jmobius.gameserver.model.actor.L2Npc; -import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; -import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.network.SystemMessageId; -import com.l2jmobius.gameserver.network.serverpackets.ActionFailed; -import com.l2jmobius.gameserver.network.serverpackets.InventoryUpdate; -import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage; -import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; - -public class Loto implements IBypassHandler -{ - private static final String[] COMMANDS = - { - "Loto" - }; - - @Override - public boolean useBypass(String command, L2PcInstance activeChar, L2Character target) - { - if (!target.isNpc()) - { - return false; - } - - int val = 0; - try - { - val = Integer.parseInt(command.substring(5)); - } - catch (IndexOutOfBoundsException ioobe) - { - } - catch (NumberFormatException nfe) - { - } - if (val == 0) - { - // new loto ticket - for (int i = 0; i < 5; i++) - { - activeChar.setLoto(i, 0); - } - } - showLotoWindow(activeChar, (L2Npc) target, val); - - return false; - } - - /** - * Open a Loto window on client with the text of the L2NpcInstance.
- *
- * Actions :
- *
- *
  • Get the text of the selected HTML file in function of the npcId and of the page number
  • - *
  • Send a Server->Client NpcHtmlMessage containing the text of the L2NpcInstance to the L2PcInstance
  • - *
  • Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet

  • - * @param player The L2PcInstance that talk with the L2NpcInstance - * @param npc L2Npc loto instance - * @param val The number of the page of the L2NpcInstance to display - */ - // 0 - first buy lottery ticket window - // 1-20 - buttons - // 21 - second buy lottery ticket window - // 22 - selected ticket with 5 numbers - // 23 - current lottery jackpot - // 24 - Previous winning numbers/Prize claim - // >24 - check lottery ticket by item object id - public static final void showLotoWindow(L2PcInstance player, L2Npc npc, int val) - { - final int npcId = npc.getTemplate().getId(); - String filename; - SystemMessage sm; - final NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId()); - - if (val == 0) // 0 - first buy lottery ticket window - { - filename = (npc.getHtmlPath(npcId, 1)); - html.setFile(player.getHtmlPrefix(), filename); - } - else if ((val >= 1) && (val <= 21)) // 1-20 - buttons, 21 - second buy lottery ticket window - { - if (!Lottery.getInstance().isStarted()) - { - // tickets can't be sold - player.sendPacket(SystemMessageId.LOTTERY_TICKETS_ARE_NOT_CURRENTLY_BEING_SOLD); - return; - } - if (!Lottery.getInstance().isSellableTickets()) - { - // tickets can't be sold - player.sendPacket(SystemMessageId.TICKETS_FOR_THE_CURRENT_LOTTERY_ARE_NO_LONGER_AVAILABLE); - return; - } - - filename = (npc.getHtmlPath(npcId, 5)); - html.setFile(player.getHtmlPrefix(), filename); - - int count = 0; - int found = 0; - // counting buttons and unsetting button if found - for (int i = 0; i < 5; i++) - { - if (player.getLoto(i) == val) - { - // unsetting button - player.setLoto(i, 0); - found = 1; - } - else if (player.getLoto(i) > 0) - { - count++; - } - } - - // if not rearched limit 5 and not unseted value - if ((count < 5) && (found == 0) && (val <= 20)) - { - for (int i = 0; i < 5; i++) - { - if (player.getLoto(i) == 0) - { - player.setLoto(i, val); - break; - } - } - } - - // setting pusshed buttons - count = 0; - for (int i = 0; i < 5; i++) - { - if (player.getLoto(i) > 0) - { - count++; - String button = String.valueOf(player.getLoto(i)); - if (player.getLoto(i) < 10) - { - button = "0" + button; - } - final String search = "fore=\"L2UI.lottoNum" + button + "\" back=\"L2UI.lottoNum" + button + "a_check\""; - final String replace = "fore=\"L2UI.lottoNum" + button + "a_check\" back=\"L2UI.lottoNum" + button + "\""; - html.replace(search, replace); - } - } - - if (count == 5) - { - final String search = "0\">Return"; - final String replace = "22\">Your lucky numbers have been selected above."; - html.replace(search, replace); - } - } - else if (val == 22) // 22 - selected ticket with 5 numbers - { - if (!Lottery.getInstance().isStarted()) - { - // tickets can't be sold - player.sendPacket(SystemMessageId.LOTTERY_TICKETS_ARE_NOT_CURRENTLY_BEING_SOLD); - return; - } - if (!Lottery.getInstance().isSellableTickets()) - { - // tickets can't be sold - player.sendPacket(SystemMessageId.TICKETS_FOR_THE_CURRENT_LOTTERY_ARE_NO_LONGER_AVAILABLE); - return; - } - - final long price = Config.ALT_LOTTERY_TICKET_PRICE; - final int lotonumber = Lottery.getInstance().getId(); - int enchant = 0; - int type2 = 0; - - for (int i = 0; i < 5; i++) - { - if (player.getLoto(i) == 0) - { - return; - } - - if (player.getLoto(i) < 17) - { - enchant += Math.pow(2, player.getLoto(i) - 1); - } - else - { - type2 += Math.pow(2, player.getLoto(i) - 17); - } - } - if (player.getAdena() < price) - { - sm = SystemMessage.getSystemMessage(SystemMessageId.YOU_DO_NOT_HAVE_ENOUGH_ADENA); - player.sendPacket(sm); - return; - } - if (!player.reduceAdena("Loto", price, npc, true)) - { - return; - } - Lottery.getInstance().increasePrize(price); - - sm = SystemMessage.getSystemMessage(SystemMessageId.YOU_HAVE_EARNED_S1); - sm.addItemName(4442); - player.sendPacket(sm); - - final L2ItemInstance item = new L2ItemInstance(IdFactory.getInstance().getNextId(), 4442); - item.setCount(1); - item.setCustomType1(lotonumber); - item.setEnchantLevel(enchant); - item.setCustomType2(type2); - player.getInventory().addItem("Loto", item, player, npc); - - final InventoryUpdate iu = new InventoryUpdate(); - iu.addItem(item); - final L2ItemInstance adenaupdate = player.getInventory().getAdenaInstance(); - iu.addModifiedItem(adenaupdate); - player.sendInventoryUpdate(iu); - - filename = (npc.getHtmlPath(npcId, 6)); - html.setFile(player.getHtmlPrefix(), filename); - } - else if (val == 23) // 23 - current lottery jackpot - { - filename = (npc.getHtmlPath(npcId, 3)); - html.setFile(player.getHtmlPrefix(), filename); - } - else if (val == 24) // 24 - Previous winning numbers/Prize claim - { - filename = (npc.getHtmlPath(npcId, 4)); - html.setFile(player.getHtmlPrefix(), filename); - - final int lotonumber = Lottery.getInstance().getId(); - String message = ""; - for (L2ItemInstance item : player.getInventory().getItems()) - { - if (item == null) - { - continue; - } - if ((item.getId() == 4442) && (item.getCustomType1() < lotonumber)) - { - message = message + "" + item.getCustomType1() + " Event Number "; - final int[] numbers = Lottery.getInstance().decodeNumbers(item.getEnchantLevel(), item.getCustomType2()); - for (int i = 0; i < 5; i++) - { - message += numbers[i] + " "; - } - final long[] check = Lottery.getInstance().checkTicket(item); - if (check[0] > 0) - { - switch ((int) check[0]) - { - case 1: - message += "- 1st Prize"; - break; - case 2: - message += "- 2nd Prize"; - break; - case 3: - message += "- 3th Prize"; - break; - case 4: - message += "- 4th Prize"; - break; - } - message += " " + check[1] + "a."; - } - message += "
    "; - } - } - if (message.isEmpty()) - { - message += "There has been no winning lottery ticket.
    "; - } - html.replace("%result%", message); - } - else if (val == 25) // 25 - lottery instructions - { - filename = (npc.getHtmlPath(npcId, 2)); - html.setFile(player.getHtmlPrefix(), filename); - } - else if (val > 25) // >25 - check lottery ticket by item object id - { - final int lotonumber = Lottery.getInstance().getId(); - final L2ItemInstance item = player.getInventory().getItemByObjectId(val); - if ((item == null) || (item.getId() != 4442) || (item.getCustomType1() >= lotonumber)) - { - return; - } - final long[] check = Lottery.getInstance().checkTicket(item); - - sm = SystemMessage.getSystemMessage(SystemMessageId.S1_DISAPPEARED); - sm.addItemName(4442); - player.sendPacket(sm); - - final long adena = check[1]; - if (adena > 0) - { - player.addAdena("Loto", adena, npc, true); - } - player.destroyItem("Loto", item, npc, false); - return; - } - html.replace("%objectId%", String.valueOf(npc.getObjectId())); - html.replace("%race%", "" + Lottery.getInstance().getId()); - html.replace("%adena%", "" + Lottery.getInstance().getPrize()); - html.replace("%ticket_price%", "" + Config.ALT_LOTTERY_TICKET_PRICE); - html.replace("%prize5%", "" + (Config.ALT_LOTTERY_5_NUMBER_RATE * 100)); - html.replace("%prize4%", "" + (Config.ALT_LOTTERY_4_NUMBER_RATE * 100)); - html.replace("%prize3%", "" + (Config.ALT_LOTTERY_3_NUMBER_RATE * 100)); - html.replace("%prize2%", "" + Config.ALT_LOTTERY_2_AND_1_NUMBER_PRIZE); - html.replace("%enddate%", "" + DateFormat.getDateInstance().format(Lottery.getInstance().getEndDate())); - player.sendPacket(html); - - // Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet - player.sendPacket(ActionFailed.STATIC_PACKET); - } - - @Override - public String[] getBypassList() - { - return COMMANDS; - } -} diff --git a/L2J_Mobius_Underground/dist/game/data/spawns/Aden/TownOfAden.xml b/L2J_Mobius_Underground/dist/game/data/spawns/Aden/TownOfAden.xml index 06124154b1..1a38234f65 100644 --- a/L2J_Mobius_Underground/dist/game/data/spawns/Aden/TownOfAden.xml +++ b/L2J_Mobius_Underground/dist/game/data/spawns/Aden/TownOfAden.xml @@ -47,7 +47,7 @@ - + diff --git a/L2J_Mobius_Underground/dist/game/data/spawns/Dion/TownOfDion.xml b/L2J_Mobius_Underground/dist/game/data/spawns/Dion/TownOfDion.xml index d5c53546bd..7f45fb0aef 100644 --- a/L2J_Mobius_Underground/dist/game/data/spawns/Dion/TownOfDion.xml +++ b/L2J_Mobius_Underground/dist/game/data/spawns/Dion/TownOfDion.xml @@ -58,7 +58,7 @@ - + diff --git a/L2J_Mobius_Underground/dist/game/data/spawns/Fearon/FearonVillage.xml b/L2J_Mobius_Underground/dist/game/data/spawns/Fearon/FearonVillage.xml index 757f8071f0..0df7a080c2 100644 --- a/L2J_Mobius_Underground/dist/game/data/spawns/Fearon/FearonVillage.xml +++ b/L2J_Mobius_Underground/dist/game/data/spawns/Fearon/FearonVillage.xml @@ -12,7 +12,7 @@ - + diff --git a/L2J_Mobius_Underground/dist/game/data/spawns/Giran/TownOfGiran.xml b/L2J_Mobius_Underground/dist/game/data/spawns/Giran/TownOfGiran.xml index 0c1476fa39..658c2af142 100644 --- a/L2J_Mobius_Underground/dist/game/data/spawns/Giran/TownOfGiran.xml +++ b/L2J_Mobius_Underground/dist/game/data/spawns/Giran/TownOfGiran.xml @@ -70,7 +70,7 @@ - + diff --git a/L2J_Mobius_Underground/dist/game/data/spawns/Gludin/GludinVillage.xml b/L2J_Mobius_Underground/dist/game/data/spawns/Gludin/GludinVillage.xml index 41145e7f80..6ee3d7222f 100644 --- a/L2J_Mobius_Underground/dist/game/data/spawns/Gludin/GludinVillage.xml +++ b/L2J_Mobius_Underground/dist/game/data/spawns/Gludin/GludinVillage.xml @@ -50,7 +50,7 @@ - + diff --git a/L2J_Mobius_Underground/dist/game/data/spawns/Gludio/TownOfGludio.xml b/L2J_Mobius_Underground/dist/game/data/spawns/Gludio/TownOfGludio.xml index 4d0b84c3a0..a192be8ae0 100644 --- a/L2J_Mobius_Underground/dist/game/data/spawns/Gludio/TownOfGludio.xml +++ b/L2J_Mobius_Underground/dist/game/data/spawns/Gludio/TownOfGludio.xml @@ -48,7 +48,7 @@ - + diff --git a/L2J_Mobius_Underground/dist/game/data/spawns/Goddard/TownOfGoddard.xml b/L2J_Mobius_Underground/dist/game/data/spawns/Goddard/TownOfGoddard.xml index c3993c23ae..5f4d3b4cd2 100644 --- a/L2J_Mobius_Underground/dist/game/data/spawns/Goddard/TownOfGoddard.xml +++ b/L2J_Mobius_Underground/dist/game/data/spawns/Goddard/TownOfGoddard.xml @@ -7,7 +7,7 @@ - + diff --git a/L2J_Mobius_Underground/dist/game/data/spawns/Hunters/HuntersVillage.xml b/L2J_Mobius_Underground/dist/game/data/spawns/Hunters/HuntersVillage.xml index 7e8a9a1f9e..222821d567 100644 --- a/L2J_Mobius_Underground/dist/game/data/spawns/Hunters/HuntersVillage.xml +++ b/L2J_Mobius_Underground/dist/game/data/spawns/Hunters/HuntersVillage.xml @@ -45,7 +45,7 @@ - + diff --git a/L2J_Mobius_Underground/dist/game/data/spawns/Innadril/Heine.xml b/L2J_Mobius_Underground/dist/game/data/spawns/Innadril/Heine.xml index 66c1364cf6..7a4b9c20ba 100644 --- a/L2J_Mobius_Underground/dist/game/data/spawns/Innadril/Heine.xml +++ b/L2J_Mobius_Underground/dist/game/data/spawns/Innadril/Heine.xml @@ -43,7 +43,7 @@ - + diff --git a/L2J_Mobius_Underground/dist/game/data/spawns/Oren/TownOfOren.xml b/L2J_Mobius_Underground/dist/game/data/spawns/Oren/TownOfOren.xml index 122a9b1284..4140dd2443 100644 --- a/L2J_Mobius_Underground/dist/game/data/spawns/Oren/TownOfOren.xml +++ b/L2J_Mobius_Underground/dist/game/data/spawns/Oren/TownOfOren.xml @@ -40,7 +40,7 @@ - + diff --git a/L2J_Mobius_Underground/dist/game/data/spawns/Rune/TownOfRune.xml b/L2J_Mobius_Underground/dist/game/data/spawns/Rune/TownOfRune.xml index 36bfcff870..50cae59f1c 100644 --- a/L2J_Mobius_Underground/dist/game/data/spawns/Rune/TownOfRune.xml +++ b/L2J_Mobius_Underground/dist/game/data/spawns/Rune/TownOfRune.xml @@ -17,7 +17,7 @@ - + diff --git a/L2J_Mobius_Underground/dist/game/data/spawns/Schuttgart/TownOfSchuttgart.xml b/L2J_Mobius_Underground/dist/game/data/spawns/Schuttgart/TownOfSchuttgart.xml index d803717b3e..ee6d155a8e 100644 --- a/L2J_Mobius_Underground/dist/game/data/spawns/Schuttgart/TownOfSchuttgart.xml +++ b/L2J_Mobius_Underground/dist/game/data/spawns/Schuttgart/TownOfSchuttgart.xml @@ -11,7 +11,7 @@ - + diff --git a/L2J_Mobius_Underground/java/com/l2jmobius/Config.java b/L2J_Mobius_Underground/java/com/l2jmobius/Config.java index 0e0325b263..9844e7950c 100644 --- a/L2J_Mobius_Underground/java/com/l2jmobius/Config.java +++ b/L2J_Mobius_Underground/java/com/l2jmobius/Config.java @@ -455,7 +455,6 @@ public final class Config public static int INSTANCE_FINISH_TIME; public static boolean RESTORE_PLAYER_INSTANCE; public static int EJECT_DEAD_PLAYER_TIME; - public static boolean ALLOW_LOTTERY; public static boolean ALLOW_RACE; public static boolean ALLOW_WATER; public static boolean ALLOW_RENTPET; @@ -517,12 +516,6 @@ public final class Config public static int ALT_MANOR_MAINTENANCE_MIN; public static boolean ALT_MANOR_SAVE_ALL_ACTIONS; public static int ALT_MANOR_SAVE_PERIOD_RATE; - public static long ALT_LOTTERY_PRIZE; - public static long ALT_LOTTERY_TICKET_PRICE; - public static float ALT_LOTTERY_5_NUMBER_RATE; - public static float ALT_LOTTERY_4_NUMBER_RATE; - public static float ALT_LOTTERY_3_NUMBER_RATE; - public static long ALT_LOTTERY_2_AND_1_NUMBER_PRIZE; public static boolean ALT_ITEM_AUCTION_ENABLED; public static int ALT_ITEM_AUCTION_EXPIRED_AFTER; public static long ALT_ITEM_AUCTION_TIME_EXTENDS_ON_BID; @@ -1682,7 +1675,6 @@ public final class Config INSTANCE_FINISH_TIME = General.getInt("DefaultFinishTime", 5); RESTORE_PLAYER_INSTANCE = General.getBoolean("RestorePlayerInstance", false); EJECT_DEAD_PLAYER_TIME = General.getInt("EjectDeadPlayerTime", 1); - ALLOW_LOTTERY = General.getBoolean("AllowLottery", true); ALLOW_RACE = General.getBoolean("AllowRace", true); ALLOW_WATER = General.getBoolean("AllowWater", true); ALLOW_RENTPET = General.getBoolean("AllowRentPet", false); @@ -1719,12 +1711,6 @@ public final class Config ALT_MANOR_MAINTENANCE_MIN = General.getInt("AltManorMaintenanceMin", 6); ALT_MANOR_SAVE_ALL_ACTIONS = General.getBoolean("AltManorSaveAllActions", false); ALT_MANOR_SAVE_PERIOD_RATE = General.getInt("AltManorSavePeriodRate", 2); - ALT_LOTTERY_PRIZE = General.getLong("AltLotteryPrize", 50000); - ALT_LOTTERY_TICKET_PRICE = General.getLong("AltLotteryTicketPrice", 2000); - ALT_LOTTERY_5_NUMBER_RATE = General.getFloat("AltLottery5NumberRate", 0.6f); - ALT_LOTTERY_4_NUMBER_RATE = General.getFloat("AltLottery4NumberRate", 0.2f); - ALT_LOTTERY_3_NUMBER_RATE = General.getFloat("AltLottery3NumberRate", 0.2f); - ALT_LOTTERY_2_AND_1_NUMBER_PRIZE = General.getLong("AltLottery2and1NumberPrize", 200); ALT_ITEM_AUCTION_ENABLED = General.getBoolean("AltItemAuctionEnabled", true); ALT_ITEM_AUCTION_EXPIRED_AFTER = General.getInt("AltItemAuctionExpiredAfter", 14); ALT_ITEM_AUCTION_TIME_EXTENDS_ON_BID = General.getInt("AltItemAuctionTimeExtendsOnBid", 0) * 1000; diff --git a/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/instancemanager/games/Lottery.java b/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/instancemanager/games/Lottery.java deleted file mode 100644 index f5231906c0..0000000000 --- a/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/instancemanager/games/Lottery.java +++ /dev/null @@ -1,574 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.l2jmobius.gameserver.instancemanager.games; - -import java.sql.Connection; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; -import java.util.Calendar; -import java.util.logging.Level; -import java.util.logging.Logger; - -import com.l2jmobius.Config; -import com.l2jmobius.commons.database.DatabaseFactory; -import com.l2jmobius.commons.util.Rnd; -import com.l2jmobius.gameserver.ThreadPoolManager; -import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; -import com.l2jmobius.gameserver.network.SystemMessageId; -import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; -import com.l2jmobius.gameserver.util.Broadcast; - -public class Lottery -{ - public static final long SECOND = 1000; - public static final long MINUTE = 60000; - - protected static final Logger _log = Logger.getLogger(Lottery.class.getName()); - - private static final String INSERT_LOTTERY = "INSERT INTO games(id, idnr, enddate, prize, newprize) VALUES (?, ?, ?, ?, ?)"; - private static final String UPDATE_PRICE = "UPDATE games SET prize=?, newprize=? WHERE id = 1 AND idnr = ?"; - private static final String UPDATE_LOTTERY = "UPDATE games SET finished=1, prize=?, newprize=?, number1=?, number2=?, prize1=?, prize2=?, prize3=? WHERE id=1 AND idnr=?"; - private static final String SELECT_LAST_LOTTERY = "SELECT idnr, prize, newprize, enddate, finished FROM games WHERE id = 1 ORDER BY idnr DESC LIMIT 1"; - private static final String SELECT_LOTTERY_ITEM = "SELECT enchant_level, custom_type2 FROM items WHERE item_id = 4442 AND custom_type1 = ?"; - private static final String SELECT_LOTTERY_TICKET = "SELECT number1, number2, prize1, prize2, prize3 FROM games WHERE id = 1 and idnr = ?"; - - protected int _number; - protected long _prize; - protected boolean _isSellingTickets; - protected boolean _isStarted; - protected long _enddate; - - protected Lottery() - { - _number = 1; - _prize = Config.ALT_LOTTERY_PRIZE; - _isSellingTickets = false; - _isStarted = false; - _enddate = System.currentTimeMillis(); - - if (Config.ALLOW_LOTTERY) - { - (new startLottery()).run(); - } - } - - public static Lottery getInstance() - { - return SingletonHolder._instance; - } - - public int getId() - { - return _number; - } - - public long getPrize() - { - return _prize; - } - - public long getEndDate() - { - return _enddate; - } - - public void increasePrize(long count) - { - _prize += count; - try (Connection con = DatabaseFactory.getInstance().getConnection(); - PreparedStatement ps = con.prepareStatement(UPDATE_PRICE)) - { - ps.setLong(1, getPrize()); - ps.setLong(2, getPrize()); - ps.setInt(3, getId()); - ps.execute(); - } - catch (SQLException e) - { - _log.log(Level.WARNING, "Lottery: Could not increase current lottery prize: " + e.getMessage(), e); - } - } - - public boolean isSellableTickets() - { - return _isSellingTickets; - } - - public boolean isStarted() - { - return _isStarted; - } - - private class startLottery implements Runnable - { - protected startLottery() - { - // Do nothing - } - - @Override - public void run() - { - try (Connection con = DatabaseFactory.getInstance().getConnection(); - Statement statement = con.createStatement(); - ResultSet rset = statement.executeQuery(SELECT_LAST_LOTTERY)) - { - if (rset.next()) - { - _number = rset.getInt("idnr"); - - if (rset.getInt("finished") == 1) - { - _number++; - _prize = rset.getLong("newprize"); - } - else - { - _prize = rset.getLong("prize"); - _enddate = rset.getLong("enddate"); - - if (_enddate <= (System.currentTimeMillis() + (2 * MINUTE))) - { - (new finishLottery()).run(); - return; - } - - if (_enddate > System.currentTimeMillis()) - { - _isStarted = true; - ThreadPoolManager.getInstance().scheduleGeneral(new finishLottery(), _enddate - System.currentTimeMillis()); - - if (_enddate > (System.currentTimeMillis() + (12 * MINUTE))) - { - _isSellingTickets = true; - ThreadPoolManager.getInstance().scheduleGeneral(new stopSellingTickets(), _enddate - System.currentTimeMillis() - (10 * MINUTE)); - } - return; - } - } - } - } - catch (SQLException e) - { - _log.log(Level.WARNING, "Lottery: Could not restore lottery data: " + e.getMessage(), e); - } - - if (Config.DEBUG) - { - _log.info("Lottery: Starting ticket sell for lottery #" + getId() + "."); - } - _isSellingTickets = true; - _isStarted = true; - - Broadcast.toAllOnlinePlayers("Lottery tickets are now available for Lucky Lottery #" + getId() + "."); - final Calendar finishtime = Calendar.getInstance(); - finishtime.setTimeInMillis(_enddate); - finishtime.set(Calendar.MINUTE, 0); - finishtime.set(Calendar.SECOND, 0); - - if (finishtime.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY) - { - finishtime.set(Calendar.HOUR_OF_DAY, 19); - _enddate = finishtime.getTimeInMillis(); - _enddate += 604800000; - } - else - { - finishtime.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY); - finishtime.set(Calendar.HOUR_OF_DAY, 19); - _enddate = finishtime.getTimeInMillis(); - } - - ThreadPoolManager.getInstance().scheduleGeneral(new stopSellingTickets(), _enddate - System.currentTimeMillis() - (10 * MINUTE)); - ThreadPoolManager.getInstance().scheduleGeneral(new finishLottery(), _enddate - System.currentTimeMillis()); - - try (Connection con = DatabaseFactory.getInstance().getConnection(); - PreparedStatement ps = con.prepareStatement(INSERT_LOTTERY)) - { - ps.setInt(1, 1); - ps.setInt(2, getId()); - ps.setLong(3, getEndDate()); - ps.setLong(4, getPrize()); - ps.setLong(5, getPrize()); - ps.execute(); - } - catch (SQLException e) - { - _log.log(Level.WARNING, "Lottery: Could not store new lottery data: " + e.getMessage(), e); - } - } - } - - private class stopSellingTickets implements Runnable - { - protected stopSellingTickets() - { - // Do nothing - } - - @Override - public void run() - { - if (Config.DEBUG) - { - _log.info("Lottery: Stopping ticket sell for lottery #" + getId() + "."); - } - _isSellingTickets = false; - - Broadcast.toAllOnlinePlayers(SystemMessage.getSystemMessage(SystemMessageId.LOTTERY_TICKET_SALES_HAVE_BEEN_TEMPORARILY_SUSPENDED)); - } - } - - private class finishLottery implements Runnable - { - protected finishLottery() - { - // Do nothing - } - - @Override - public void run() - { - if (Config.DEBUG) - { - _log.info("Lottery: Ending lottery #" + getId() + "."); - } - - final int[] luckynums = new int[5]; - int luckynum = 0; - - for (int i = 0; i < 5; i++) - { - boolean found = true; - - while (found) - { - luckynum = Rnd.get(20) + 1; - found = false; - - for (int j = 0; j < i; j++) - { - if (luckynums[j] == luckynum) - { - found = true; - } - } - } - - luckynums[i] = luckynum; - } - - if (Config.DEBUG) - { - _log.info("Lottery: The lucky numbers are " + luckynums[0] + ", " + luckynums[1] + ", " + luckynums[2] + ", " + luckynums[3] + ", " + luckynums[4] + "."); - } - - int enchant = 0; - int type2 = 0; - - for (int i = 0; i < 5; i++) - { - if (luckynums[i] < 17) - { - enchant += Math.pow(2, luckynums[i] - 1); - } - else - { - type2 += Math.pow(2, luckynums[i] - 17); - } - } - - if (Config.DEBUG) - { - _log.info("Lottery: Encoded lucky numbers are " + enchant + ", " + type2); - } - - int count1 = 0; - int count2 = 0; - int count3 = 0; - int count4 = 0; - - try (Connection con = DatabaseFactory.getInstance().getConnection(); - PreparedStatement ps = con.prepareStatement(SELECT_LOTTERY_ITEM)) - { - ps.setInt(1, getId()); - try (ResultSet rset = ps.executeQuery()) - { - while (rset.next()) - { - int curenchant = rset.getInt("enchant_level") & enchant; - int curtype2 = rset.getInt("custom_type2") & type2; - - if ((curenchant == 0) && (curtype2 == 0)) - { - continue; - } - - int count = 0; - - for (int i = 1; i <= 16; i++) - { - final int val = curenchant / 2; - - if (val != Math.round((double) curenchant / 2)) - { - count++; - } - - final int val2 = curtype2 / 2; - - if (val2 != ((double) curtype2 / 2)) - { - count++; - } - - curenchant = val; - curtype2 = val2; - } - - if (count == 5) - { - count1++; - } - else if (count == 4) - { - count2++; - } - else if (count == 3) - { - count3++; - } - else if (count > 0) - { - count4++; - } - } - } - } - catch (SQLException e) - { - _log.log(Level.WARNING, "Lottery: Could restore lottery data: " + e.getMessage(), e); - } - - final long prize4 = count4 * Config.ALT_LOTTERY_2_AND_1_NUMBER_PRIZE; - long prize1 = 0; - long prize2 = 0; - long prize3 = 0; - - if (count1 > 0) - { - prize1 = (long) (((getPrize() - prize4) * Config.ALT_LOTTERY_5_NUMBER_RATE) / count1); - } - - if (count2 > 0) - { - prize2 = (long) (((getPrize() - prize4) * Config.ALT_LOTTERY_4_NUMBER_RATE) / count2); - } - - if (count3 > 0) - { - prize3 = (long) (((getPrize() - prize4) * Config.ALT_LOTTERY_3_NUMBER_RATE) / count3); - } - - if (Config.DEBUG) - { - _log.info("Lottery: " + count1 + " players with all FIVE numbers each win " + prize1 + "."); - _log.info("Lottery: " + count2 + " players with FOUR numbers each win " + prize2 + "."); - _log.info("Lottery: " + count3 + " players with THREE numbers each win " + prize3 + "."); - _log.info("Lottery: " + count4 + " players with ONE or TWO numbers each win " + prize4 + "."); - } - - final long newprize = getPrize() - (prize1 + prize2 + prize3 + prize4); - if (Config.DEBUG) - { - _log.info("Lottery: Jackpot for next lottery is " + newprize + "."); - } - - SystemMessage sm; - if (count1 > 0) - { - // There are winners. - sm = SystemMessage.getSystemMessage(SystemMessageId.THE_PRIZE_AMOUNT_FOR_THE_WINNER_OF_LOTTERY_S1_IS_S2_ADENA_WE_HAVE_S3_FIRST_PRIZE_WINNERS); - sm.addInt(getId()); - sm.addLong(getPrize()); - sm.addLong(count1); - } - else - { - // There are no winners. - sm = SystemMessage.getSystemMessage(SystemMessageId.THE_PRIZE_AMOUNT_FOR_LUCKY_LOTTERY_S1_IS_S2_ADENA_THERE_WAS_NO_FIRST_PRIZE_WINNER_IN_THIS_DRAWING_THEREFORE_THE_JACKPOT_WILL_BE_ADDED_TO_THE_NEXT_DRAWING); - sm.addInt(getId()); - sm.addLong(getPrize()); - } - Broadcast.toAllOnlinePlayers(sm); - - try (Connection con = DatabaseFactory.getInstance().getConnection(); - PreparedStatement ps = con.prepareStatement(UPDATE_LOTTERY)) - { - ps.setLong(1, getPrize()); - ps.setLong(2, newprize); - ps.setInt(3, enchant); - ps.setInt(4, type2); - ps.setLong(5, prize1); - ps.setLong(6, prize2); - ps.setLong(7, prize3); - ps.setInt(8, getId()); - ps.execute(); - } - catch (SQLException e) - { - _log.log(Level.WARNING, "Lottery: Could not store finished lottery data: " + e.getMessage(), e); - } - - ThreadPoolManager.getInstance().scheduleGeneral(new startLottery(), MINUTE); - _number++; - - _isStarted = false; - } - } - - public int[] decodeNumbers(int enchant, int type2) - { - final int res[] = new int[5]; - int id = 0; - int nr = 1; - - while (enchant > 0) - { - final int val = enchant / 2; - if (val != Math.round((double) enchant / 2)) - { - res[id++] = nr; - } - enchant /= 2; - nr++; - } - - nr = 17; - - while (type2 > 0) - { - final int val = type2 / 2; - if (val != ((double) type2 / 2)) - { - res[id++] = nr; - } - type2 /= 2; - nr++; - } - - return res; - } - - public long[] checkTicket(L2ItemInstance item) - { - return checkTicket(item.getCustomType1(), item.getEnchantLevel(), item.getCustomType2()); - } - - public long[] checkTicket(int id, int enchant, int type2) - { - final long res[] = - { - 0, - 0 - }; - try (Connection con = DatabaseFactory.getInstance().getConnection(); - PreparedStatement ps = con.prepareStatement(SELECT_LOTTERY_TICKET)) - { - ps.setInt(1, id); - try (ResultSet rs = ps.executeQuery()) - { - if (rs.next()) - { - int curenchant = rs.getInt("number1") & enchant; - int curtype2 = rs.getInt("number2") & type2; - - if ((curenchant == 0) && (curtype2 == 0)) - { - return res; - } - - int count = 0; - - for (int i = 1; i <= 16; i++) - { - final int val = curenchant / 2; - if (val != Math.round((double) curenchant / 2)) - { - count++; - } - final int val2 = curtype2 / 2; - if (val2 != ((double) curtype2 / 2)) - { - count++; - } - curenchant = val; - curtype2 = val2; - } - - switch (count) - { - case 0: - { - break; - } - case 5: - { - res[0] = 1; - res[1] = rs.getLong("prize1"); - break; - } - case 4: - { - res[0] = 2; - res[1] = rs.getLong("prize2"); - break; - } - case 3: - { - res[0] = 3; - res[1] = rs.getLong("prize3"); - break; - } - default: - { - res[0] = 4; - res[1] = 200; - } - } - - if (Config.DEBUG) - { - _log.warning("count: " + count + ", id: " + id + ", enchant: " + enchant + ", type2: " + type2); - } - } - } - } - catch (SQLException e) - { - _log.log(Level.WARNING, "Lottery: Could not check lottery ticket #" + id + ": " + e.getMessage(), e); - } - return res; - } - - private static class SingletonHolder - { - protected static final Lottery _instance = new Lottery(); - } -} diff --git a/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java b/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java index cc0f06444e..c9534d5d9e 100644 --- a/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java +++ b/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java @@ -719,9 +719,6 @@ public final class L2PcInstance extends L2Playable private byte _handysBlockCheckerEventArena = -1; - /** new loto ticket **/ - private final int _loto[] = new int[5]; - // public static int _loto_nums[] = {0,1,2,3,4,5,6,7,8,9,}; /** new race ticket **/ private final int _race[] = new int[2]; @@ -8947,16 +8944,6 @@ public final class L2PcInstance extends L2Playable _teleportType = type; } - public void setLoto(int i, int val) - { - _loto[i] = val; - } - - public int getLoto(int i) - { - return _loto[i]; - } - public void setRace(int i, int val) { _race[i] = val;