Addition of Monster Race with reward system.

Adapted from aCis free version.
This commit is contained in:
MobiusDevelopment
2020-02-02 04:36:04 +00:00
parent 92ac8e59a7
commit 20a4e99da1
333 changed files with 22197 additions and 10208 deletions

View File

@@ -416,9 +416,6 @@
<admin command="admin_mobgroup_attackgrp" accessLevel="100" />
<admin command="admin_mobgroup_invul" accessLevel="100" />
<!-- ADMIN MONSTER RACE -->
<admin command="admin_mons" accessLevel="100" />
<!-- ADMIN ONLINE -->
<admin command="admin_online" accessLevel="100" />

View File

@@ -1,19 +1,22 @@
<html><body><br><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Chat 0">Back</Button><br>
In a monster race eight monsters race at the same time. If you guess which monster is expected to finish first and buy that monster's race ticket, based upon the odds to win you will receive an appropriate amount of Adena.<br>
<font color="LEVEL">How the Race Works</font>Monster races run every 20 minutes in real time.<br>
<font color="LEVEL">How to Participate</font><br>
You can purchase a monster race ticket through a race manager NPC. Only between 18 minutes before the start of a race until 3 minutes before the race begins can you buy a ticket for the applicable race. When you purchase a ticket through a race manager, you can find out the names of the participating monsters and their current statistics. Three minutes before a race starts, the race manager will stop ticket sales and announce the monsters' individual odds for the current race.<br>
<font color="LEVEL">Betting</font><br>
There are two types of race betting. The Win bet means that you back a particular monster to win 1st place. The Place bet means that you will have to guess the 1st and 2nd place monsters, regardless of who finishes first or second.<br>
<html><body>
<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Chat 0">Go Back</Button>
<br>
In a monster race eight monsters race at the same time. If you guess which monster is expected to finish first and buy that monster's race ticket, based upon the odds to win you will receive an appropriate amount of adena.<br>
<font color="LEVEL">Racing Schedule</font><br>
Monster races every 20 minutes in real time.<br>
<font color="LEVEL">Method of Race Participation</font><br>
You can purchase a monster race ticket through a race manager NPC. Only between 18 minutes before the start of a race until 3 minutes before the race begins you can buy a ticket for the applicable race. When you purchase a ticket through a conversation with a race manager, you can find out the names of participating monsters in the race and their current statistics. Five minutes before a race starts, the race manager will stop ticket sales and announce monsters' individual odds rate for the current race.<br>
<font color="LEVEL">Types of Race</font><br>
There are two types of race betting. The Win type betting means that you back a monster that will win the first prize. Place type of betting means that you will have to guess the 1st and 2nd winning monsters, regardless of who finishes first or second.<br>
<font color="00FFFF">Win</font><br1>
* Among the entire betting amount for Win betting, after subtracting the race track's own share of profit, the amount left will be your total winnings. Three minutes before the race, each monster's expected odds are announced. Each Win ticket's dividend amount is calculated by multiplying the odds by the price of a ticket. The odds are never less than 1.<br1>
* The prize money does not get transferred to the next race.<br>
* Among the entire betting amount for Win betting, after subtracting the race track's own share of profit, the amount left will be your total winnings. Three minutes before the race each monster's expected odds are announced. Each Win ticket's dividend amount is calculated by multiplying the odds by the price of a ticket. The odds rate is never less than 1.<br1>
* The prize money does not get transferred to the next race.<br>
<font color="00FFFF">Place</font><br1>
* Place betting is a way of betting when you correctly guess the two monsters who will finish first and second regardless of their order. The method of calculating the dividend amount is the same as Win betting.<br1>
* Currently place betting is not available.<br>
* Place betting is a way of betting when you correctly guess the two monsters who will finish first and second regardless of their order. The method of calculating dividend amount is the same as Win betting.<br>
* Currently place betting is not offered.<br>
<font color="LEVEL">End of Race</font><br>
When a race is over, the race manager will shout the results of the race. You can trade your ticket for Adena by speaking to a race manager NPC. Check the Winning Information Data to find out the types of bets and total winnings for the race you bet on, as well as your win status and prize amount. If you won, you can receive your prize money thorough a race manager NPC. If you did not win, a race manager will buy back your ticket for a small amount of money.<br>
When a race is over, the race manager will shout out the results of the race. Through a conversation with a race manager NPC, you can trade your ticket for adena. By looking up on the Winning Information Data, you can find out the types of tickets and quantity of the winnings in the race you betted on and your win status and prize amount you won. If you won, you can receive your prize money thorough a race manager NPC. If you did not win, a race manager will buy back your ticket by paying you a very small amount of money.<br>
If a server goes down while tickets are being sold, or while a race is in progress, the race will be cancelled. You can receive a full refund for your ticket for a cancelled race through a race manager.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Chat 0">Back</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Chat 0">Go Back</Button>
</body></html>

View File

@@ -3,6 +3,7 @@
<img src="L2UI.SquareWhite" width=270 height=1>
<img src="L2UI.SquareBlank" width=1 height=3>
</center>
<table width=270 border=0 bgcolor="111111">
<tr>
<td fixwidth=60>Lane Selection</td>
@@ -11,6 +12,7 @@
<td fixwidth=30 align=right>Odds</td>
</tr>
</table>
<table width=270 border=0>
<tr>
<td fixwidth=13><img src="L2UI.rightBtn2" width=14 height=13></td>
@@ -20,18 +22,21 @@
<td fixwidth=30 align=right><font color="00ffff">13%</font></td>
</tr>
</table>
<table width=270 border=0>
<tr><td width=100>Select Bet Amount</td>
<td width=170>
<a action="bypass -h npc_%objectId%_BuyTicket 11" >100 Adena</a> , <a action="bypass -h npc_%objectId%_BuyTicket 12" >500 Adena</a><br1>
<a action="bypass -h npc_%objectId%_BuyTicket 13" >1,000 Adena</a> , <a action="bypass -h npc_%objectId%_BuyTicket 14" >5,000 Adena</a><br1>
<a action="bypass -h npc_%objectId%_BuyTicket 15" >10,000 Adena</a> , <a action="bypass -h npc_%objectId%_BuyTicket 16" >20,000 Adena</a><br1>
<a action="bypass -h npc_%objectId%_BuyTicket 17" >50,000 Adena</a> , <a action="bypass -h npc_%objectId%_BuyTicket 18" >100,000 Adena</a><br1>
<a action="bypass -h npc_%objectId%_BuyTicket 11" >100 Adena</a> , <a action="bypass -h npc_%objectId%_BuyTicket 12" >500 Adena</a> <br1>
<a action="bypass -h npc_%objectId%_BuyTicket 13" >1,000 Adena</a> , <a action="bypass -h npc_%objectId%_BuyTicket 14" >5,000 Adena</a> <br1>
<a action="bypass -h npc_%objectId%_BuyTicket 15" >10,000 Adena</a> , <a action="bypass -h npc_%objectId%_BuyTicket 16" >20,000 Adena</a> <br1>
<a action="bypass -h npc_%objectId%_BuyTicket 17" >50,000 Adena</a> , <a action="bypass -h npc_%objectId%_BuyTicket 18" >100,000 Adena</a> <br1>
</td></tr>
</table>
<img src="L2UI.SquareBlank" width=270 height=10>
<img src="L2UI.SquareWhite" width=270 height=1>
<img src="L2UI.SquareBlank" width=270 height=5>
<table width=270 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=70 height=20><button value="Select Lane" action="bypass -h npc_%objectId%_BuyTicket 0" back="L2UI.DefaultButton_click" fore="L2UI.DefaultButton" width=67 height=19></td>
@@ -39,4 +44,5 @@
<td width=70 align=right><button value="Confirm" action="bypass -h npc_%objectId%_BuyTicket 20" back="L2UI.DefaultButton_click" fore="L2UI.DefaultButton" width=67 height=19></td>
</tr>
</table>
</body></html>

View File

@@ -11,6 +11,7 @@
<td fixwidth=30 align=right>Odds</td>
</tr>
</table>
<table width=270 border=0>
<tr>
<td fixwidth=13><img src="L2UI.rightBtn2" width=14 height=13></td>
@@ -20,6 +21,7 @@
<td fixwidth=30 align=right><font color="00ffff">13%</font></td>
</tr>
</table>
<table width=270 border=0 bgcolor=111111>
<tr>
<td fixwidth=60>Bet Amount </td>
@@ -37,11 +39,13 @@
<td>Total </td>
<td><font color="LEVEL">0total</font> Adena</td>
</tr>
</table><br>
</table>
<br>
<center>If the information is correct, please click Confirm.</center><br>
<img src="L2UI.SquareBlank" width=270 height=10>
<img src="L2UI.SquareWhite" width=270 height=1>
<img src="L2UI.SquareBlank" width=270 height=5>
<table width=270 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=70 height=20><button value=&$141; action="bypass -h npc_%objectId%_Chat 0" back="L2UI.DefaultButton_click" fore="L2UI.DefaultButton" width=67 height=19></td>

View File

@@ -15,49 +15,49 @@
<tr>
<td fixwidth=40>No.1</td>
<td fixwidth=130 align=left><font color="LEVEL">Mob1</font></td>
<td fixwidth=100 align=right><font color="00ffff">&$804;</font> </td>
<td fixwidth=100 align=right><font color="00ffff">Odd1</font> </td>
</tr>
<tr>
<td fixwidth=40>No.2</td>
<td fixwidth=130 align=left><font color="LEVEL">Mob2</font></td>
<td fixwidth=100 align=right><font color="00ffff">&$804;</font> </td>
<td fixwidth=100 align=right><font color="00ffff">Odd2</font> </td>
</tr>
<tr>
<td fixwidth=40>No.3</td>
<td fixwidth=130 align=left><font color="LEVEL">Mob3</font></td>
<td fixwidth=100 align=right><font color="00ffff">&$804;</font> </td>
<td fixwidth=100 align=right><font color="00ffff">Odd3</font> </td>
</tr>
<tr>
<td fixwidth=40>No.4</td>
<td fixwidth=130 align=left><font color="LEVEL">Mob4</font></td>
<td fixwidth=100 align=right><font color="00ffff">&$804;</font> </td>
<td fixwidth=100 align=right><font color="00ffff">Odd4</font> </td>
</tr>
<tr>
<td fixwidth=40>No.5</td>
<td fixwidth=130 align=left><font color="LEVEL">Mob5</font></td>
<td fixwidth=100 align=right><font color="00ffff">&$804;</font> </td>
<td fixwidth=100 align=right><font color="00ffff">Odd5</font> </td>
</tr>
<tr>
<td fixwidth=40>No.6</td>
<td fixwidth=130 align=left><font color="LEVEL">Mob6</font></td>
<td fixwidth=100 align=right><font color="00ffff">&$804;</font> </td>
<td fixwidth=100 align=right><font color="00ffff">Odd6</font> </td>
</tr>
<tr>
<td fixwidth=40>No.7</td>
<td fixwidth=130 align=left><font color="LEVEL">Mob7</font></td>
<td fixwidth=100 align=right><font color="00ffff">&$804;</font> </td>
<td fixwidth=100 align=right><font color="00ffff">Odd7</font> </td>
</tr>
<tr>
<td fixwidth=40>No.8</td>
<td fixwidth=130 align=left><font color="LEVEL">Mob8</font></td>
<td fixwidth=100 align=right><font color="00ffff">&$804;</font> </td>
<td fixwidth=100 align=right><font color="00ffff">Odd8</font> </td>
</tr>
</table>
<img src="L2UI.SquareBlank" width=270 height=10>

View File

@@ -3,22 +3,12 @@
<img src="L2UI.SquareWhite" width=270 height=1>
<img src="L2UI.SquareBlank" width=1 height=3>
<table width=270 border=0 bgcolor=111111>
<tr><td fixwidth=60>Winnings for a Race.</td><td fixwidth=60 align=right>Lane</td><td fixwidth=160 align=right>Bet Amount</td></tr>
<tr><td fixwidth=60 fixheight=1></td><td fixwidth=60></td><td fixwidth=160></td></tr>
<tr><td fixwidth=70>Winnings for a Race.</td><td fixwidth=70 align=right>Lane</td><td fixwidth=130 align=right>Bet Amount</td></tr>
<tr><td fixwidth=70 fixheight=1></td><td fixwidth=70></td><td fixwidth=130></td></tr>
</table>
<table width=270 border=0>
<tr>
<td><Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Chat 8">1 Race Number</Button></td>
<td align=right><font color="LEVEL">1</font> Number</td>
<td align=right><font color="LEVEL">100</font> Adena</td>
</tr>
%tickets%
</table>
<img src="L2UI.SquareWhite" width=270 height=1>
<table width=270 border=0>
<tr><td width=90><Button ALIGN=LEFT ICON="NORMAL" action="bypass _mrsl01_1">Previous List</Button></td><td width=90 align=center>1 Page </td><td width=90 align=right><Button ALIGN=LEFT ICON="NORMAL" action="bypass _mrsl01_2"> Next List</Button></td></tr>
</table>
<img src="L2UI.SquareWhite" width=270 height=1>
<img src="L2UI.SquareBlank" width=270 height=5>
<table width=270 border=0 cellpadding=0 cellspacing=0>

View File

@@ -4,11 +4,11 @@
<img src="L2UI.SquareBlank" width=1 height=3>
<table width=270 border=0>
<tr>
<td width=230>Race #19090<br>
Lane 1<br>
Bet: 100 adena<br>
1st place: Lane [4]<br>
Odds:[0.01]
<td width=230>Race #%raceId%<br>
Lane: %lane%<br>
Bet: %bet% Adena<br>
1st place: Lane [%firstLane%]<br>
Odds: [%odd%]
</td>
</tr>
</table>
@@ -18,8 +18,8 @@ Odds:[0.01]
<table width=270 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=90 height=20><button value="Previous" action="bypass -h npc_%objectId%_Chat 7" back="L2UI.DefaultButton_click" fore="L2UI.DefaultButton" width=67 height=19></td>
<td width=90 height=20><button value="Previous" action="bypass -h npc_%objectId%_ShowTickets" back="L2UI.DefaultButton_click" fore="L2UI.DefaultButton" width=67 height=19></td>
<td width=90></td>
<td width=90 align=right><button value="Calculate" action="bypass _mrsl03_30635184" back="L2UI.DefaultButton_click" fore="L2UI.DefaultButton" width=67 height=19></td>
<td width=90 align=right><button value="Calculate" action="bypass -h npc_%objectId%_CalculateWin %ticketObjectId%" back="L2UI.DefaultButton_click" fore="L2UI.DefaultButton" width=67 height=19></td>
</tr></table>
</body></html>

View File

@@ -7,41 +7,7 @@
</table>
<table width=270 border=0>
<tr><td fixwidth=60 fixheight=1></td><td fixwidth=70></td><td fixwidth=70></td><td fixwidth=70></td></tr>
<tr>
<td><font color="LEVEL">7</font> th</td>
<td><font color="LEVEL">8</font> Lane </td><td><font color="LEVEL">1</font> Lane</td>
<td align=right><font color="00ffff">0.00</font> Times</td>
</tr>
<tr>
<td><font color="LEVEL">6</font> th</td>
<td><font color="LEVEL">4</font> Lane </td><td><font color="LEVEL">8</font> Lane</td>
<td align=right><font color="00ffff">0.00</font> Times</td>
</tr>
<tr>
<td><font color="LEVEL">5</font> th</td>
<td><font color="LEVEL">7</font> Lane </td><td><font color="LEVEL">2</font> Lane</td>
<td align=right><font color="00ffff">0.00</font> Times</td>
</tr>
<tr>
<td><font color="LEVEL">4</font> th</td>
<td><font color="LEVEL">6</font> Lane </td><td><font color="LEVEL">8</font> Lane</td>
<td align=right><font color="00ffff">0.00</font> Times</td>
</tr>
<tr>
<td><font color="LEVEL">3</font> th</td>
<td><font color="LEVEL">4</font> Lane </td><td><font color="LEVEL">1</font> Lane</td>
<td align=right><font color="00ffff">0.00</font> Times</td>
</tr>
<tr>
<td><font color="LEVEL">2</font> th</td>
<td><font color="LEVEL">1</font> Lane </td><td><font color="LEVEL">8</font> Lane</td>
<td align=right><font color="00ffff">0.00</font> Times</td>
</tr>
<tr>
<td><font color="LEVEL">1</font> th</td>
<td><font color="LEVEL">7</font> Lane </td><td><font color="LEVEL">6</font> Lane</td>
<td align=right><font color="00ffff">0.00</font> Times</td>
</tr>
%infos%
</table>
<img src="L2UI.SquareBlank" width=270 height=10>
<img src="L2UI.SquareWhite" width=270 height=1>

View File

@@ -1,15 +1,15 @@
<html>
<body>
<center>Monster Race Manager</center>
<img src="L2UI.SquareWhite" width=270 height=1> <img src="L2UI.SquareBlank" width=1 height=3>
<table width=270 border=0>
<tr><td width=270><Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Chat 1">Monster Race Help</Button></td></tr>
<!--<tr><td width=270><Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_ShowOdds">View Odds</Button></td></tr>-->
<tr><td width=270><Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_ShowInfo">View Monster Information</Button></td></tr>
<tr><td width=270><Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_BuyTicket 0">Purchase Ticket</Button></td></tr>
<tr><td width=270><Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Chat 7">Calculate Winnings</Button></td></tr>
<tr><td width=270><Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Chat 9">View Past Results</Button></td></tr>
<tr><td width=270><Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest TeleportToRaceTrack" msg="1298;Monster Race Track">Exit the Monster Race Track</Button></td></tr>
</table>
<img src="L2UI.SquareBlank" width=270 height=10> <img src="L2UI.SquareWhite" width=270 height=1> <img src="L2UI.SquareBlank" width=270 height=5>
<img src="L2UI.SquareWhite" width=270 height=1>
<img src="L2UI.SquareBlank" width=1 height=3>
<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Chat 1">Monster Race Help</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_ShowOdds">View Odds</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_ShowInfo">View Monster Information</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_BuyTicket 0">Purchase Ticket</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_ShowTickets">Calculate Winnings</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_ViewHistory">View Past Results</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest TeleportToRaceTrack" msg="1298;Monster Race Track">Exit the monster race track.</Button>
<img src="L2UI.SquareBlank" width=270 height=10>
<img src="L2UI.SquareWhite" width=270 height=1>
<img src="L2UI.SquareBlank" width=270 height=5>
</body></html>

View File

@@ -105,7 +105,6 @@ import handlers.admincommandhandlers.AdminMenu;
import handlers.admincommandhandlers.AdminMessages;
import handlers.admincommandhandlers.AdminMissingHtmls;
import handlers.admincommandhandlers.AdminMobGroup;
import handlers.admincommandhandlers.AdminMonsterRace;
import handlers.admincommandhandlers.AdminOlympiad;
import handlers.admincommandhandlers.AdminOnline;
import handlers.admincommandhandlers.AdminPForge;
@@ -442,7 +441,6 @@ public class MasterHandler
AdminMessages.class,
AdminMissingHtmls.class,
AdminMobGroup.class,
AdminMonsterRace.class,
AdminOlympiad.class,
AdminOnline.class,
AdminPathNode.class,

View File

@@ -1,166 +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 <http://www.gnu.org/licenses/>.
*/
package handlers.admincommandhandlers;
import org.l2jmobius.commons.concurrent.ThreadPool;
import org.l2jmobius.gameserver.MonsterRace;
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.DeleteObject;
import org.l2jmobius.gameserver.network.serverpackets.MonRaceInfo;
import org.l2jmobius.gameserver.network.serverpackets.PlaySound;
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
/**
* This class handles following admin commands: - invul = turns invulnerability on/off
* @version $Revision: 1.1.6.4 $ $Date: 2007/07/31 10:06:00 $
*/
public class AdminMonsterRace implements IAdminCommandHandler
{
private static final String[] ADMIN_COMMANDS =
{
"admin_mons"
};
static int state = -1;
@Override
public boolean useAdminCommand(String command, PlayerInstance activeChar)
{
if (command.equalsIgnoreCase("admin_mons"))
{
handleSendPacket(activeChar);
}
return true;
}
@Override
public String[] getAdminCommandList()
{
return ADMIN_COMMANDS;
}
private void handleSendPacket(PlayerInstance activeChar)
{
/*
* -1 0 to initialize the race 0 15322 to start race 13765 -1 in middle of race -1 0 to end the race 8003 to 8027
*/
final int[][] codes =
{
{
-1,
0
},
{
0,
15322
},
{
13765,
-1
},
{
-1,
0
}
};
final MonsterRace race = MonsterRace.getInstance();
if (state == -1)
{
state++;
race.newRace();
race.newSpeeds();
final MonRaceInfo spk = new MonRaceInfo(codes[state][0], codes[state][1], race.getMonsters(), race.getSpeeds());
activeChar.sendPacket(spk);
activeChar.broadcastPacket(spk);
}
else if (state == 0)
{
state++;
final SystemMessage sm = new SystemMessage(SystemMessageId.THEY_RE_OFF);
sm.addInt(0);
activeChar.sendPacket(sm);
final PlaySound sRace = new PlaySound(1, "S_Race", 0, 0, 0, 0, 0);
activeChar.sendPacket(sRace);
activeChar.broadcastPacket(sRace);
final PlaySound sRace2 = new PlaySound(0, "ItemSound2.race_start", 1, 121209259, 12125, 182487, -3559);
activeChar.sendPacket(sRace2);
activeChar.broadcastPacket(sRace2);
final MonRaceInfo spk = new MonRaceInfo(codes[state][0], codes[state][1], race.getMonsters(), race.getSpeeds());
activeChar.sendPacket(spk);
activeChar.broadcastPacket(spk);
ThreadPool.schedule(new RunRace(codes, activeChar), 5000);
}
}
private class RunRace implements Runnable
{
private final int[][] codes;
private final PlayerInstance activeChar;
public RunRace(int[][] pCodes, PlayerInstance pActiveChar)
{
codes = pCodes;
activeChar = pActiveChar;
}
@Override
public void run()
{
// int[][] speeds1 = MonsterRace.getInstance().getSpeeds();
// MonsterRace.getInstance().newSpeeds();
// int[][] speeds2 = MonsterRace.getInstance().getSpeeds();
/*
* int[] speed = new int[8]; for (int i=0; i<8; i++) { for (int j=0; j<20; j++) { //LOGGER.info("Adding "+speeds1[i][j] +" and "+ speeds2[i][j]); speed[i] += (speeds1[i][j]*1); // + (speeds2[i][j]*1); } LOGGER.info("Total speed for "+(i+1)+" = "+speed[i]); }
*/
final MonRaceInfo spk = new MonRaceInfo(codes[2][0], codes[2][1], MonsterRace.getInstance().getMonsters(), MonsterRace.getInstance().getSpeeds());
activeChar.sendPacket(spk);
activeChar.broadcastPacket(spk);
ThreadPool.schedule(new RunEnd(activeChar), 30000);
}
}
private static class RunEnd implements Runnable
{
private final PlayerInstance activeChar;
public RunEnd(PlayerInstance pActiveChar)
{
activeChar = pActiveChar;
}
@Override
public void run()
{
DeleteObject obj = null;
for (int i = 0; i < 8; i++)
{
obj = new DeleteObject(MonsterRace.getInstance().getMonsters()[i]);
activeChar.sendPacket(obj);
activeChar.broadcastPacket(obj);
}
state = -1;
}
}
}