PC Cafe system.
This commit is contained in:
@@ -53,7 +53,8 @@ CREATE TABLE IF NOT EXISTS `characters` (
|
||||
`vitality_points` MEDIUMINT UNSIGNED NOT NULL DEFAULT 0,
|
||||
`createDate` date NOT NULL DEFAULT '0000-00-00',
|
||||
`language` VARCHAR(2) DEFAULT NULL,
|
||||
`faction` TINYINT UNSIGNED NOT NULL DEFAULT 0,
|
||||
`faction` TINYINT UNSIGNED NOT NULL DEFAULT '0',
|
||||
`pccafe_points` int(6) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`charId`),
|
||||
KEY `account_name` (`account_name`),
|
||||
KEY `char_name` (`char_name`),
|
||||
|
5
trunk/dist/game/config/AdminCommands.xml
vendored
5
trunk/dist/game/config/AdminCommands.xml
vendored
@@ -426,7 +426,7 @@
|
||||
|
||||
<!-- ADMIN PLEDGE -->
|
||||
<admin command="admin_pledge" accessLevel="100" />
|
||||
|
||||
|
||||
<!-- ADMIN POLYMORPH -->
|
||||
<admin command="admin_polymorph" accessLevel="100" />
|
||||
<admin command="admin_unpolymorph" accessLevel="100" />
|
||||
@@ -434,6 +434,9 @@
|
||||
<admin command="admin_untransform" accessLevel="100" />
|
||||
<admin command="admin_transform_menu" accessLevel="100" />
|
||||
|
||||
<!-- ADMIN PC CAFE POINTS -->
|
||||
<admin command="admin_pccafepoints" accessLevel="100" />
|
||||
|
||||
<!-- ADMIN PRIME POINTS -->
|
||||
<admin command="admin_primepoints" accessLevel="100" />
|
||||
|
||||
|
44
trunk/dist/game/config/Custom.ini
vendored
44
trunk/dist/game/config/Custom.ini
vendored
@@ -506,6 +506,50 @@ PremiumRateDropChanceByItemId = 57,2;6656,1;6657,1;6658,1;6659,1;6660,1;6661,1;6
|
||||
PremiumRateDropAmountByItemId = 57,2;6656,1;6657,1;6658,1;6659,1;6660,1;6661,1;6662,1;8191,1;10170,1;10314,1
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# PC Cafe (PC Bang) System
|
||||
# ---------------------------------------------------------------------------
|
||||
# PC CAFE POINTS ID = -100
|
||||
|
||||
# PC Cafe Enabled.
|
||||
PcCafeEnabled = False
|
||||
|
||||
# Allow only players with a Premium account.
|
||||
PcCafeOnlyPremium = False
|
||||
|
||||
# Max points that player may have.
|
||||
# Limited by int limit.
|
||||
MaxPcCafePoints = 200000
|
||||
|
||||
# PC Bang point rate.
|
||||
# Acquisition formula equals (exp * 0.0001 * AcquisitionPointsRate)
|
||||
# e.g. with 1.0 it's 10000 exp = 1 PC Bang point
|
||||
# 2.0 - 10000 exp = 2 PC Bang points
|
||||
# 0.5 - 5000 exp = 1 PC Bang point
|
||||
AcquisitionPointsRate = 1.0
|
||||
|
||||
# Use random points rewarding.
|
||||
# If enabled points will be random from points/2 to points.
|
||||
AcquisitionPointsRandom = False
|
||||
|
||||
# Creates a chance to aquire double points.
|
||||
DoublingAcquisitionPoints = True
|
||||
|
||||
# Double points chance.
|
||||
# Used when DoublingAcquisitionPoints is enabled.
|
||||
# Default 1 (%)
|
||||
DoublingAcquisitionPointsChance = 1
|
||||
|
||||
# Reward low exp kills
|
||||
# Acquire points if player gains exp and aquire formula equals 0.
|
||||
RewardLowExpKills = True
|
||||
|
||||
# Chance for low exp kills
|
||||
# Used when RewardLowExpKills is enabled.
|
||||
# Default 50 (%)
|
||||
RewardLowExpKillsChance = 50
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Sell Buffs configuration
|
||||
# ---------------------------------------------------------------------------
|
||||
|
@@ -44,8 +44,8 @@ Characters Related:<br1>
|
||||
<td><button value="Effects" action="bypass -h admin_admin3" width=82 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td><button value="PC Points" action="bypass -h admin_pccafepoints" width=82 height=20 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
|
||||
<td><button value="NCoins" action="bypass -h admin_primepoints" width=82 height=20 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
|
||||
<td><button value="Premium" action="bypass -h admin_premium_menu" width=82 height=20 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@@ -28,6 +28,7 @@
|
||||
<td><button value="goSpawn" action="bypass -h admin_list_spawns $qbox 1" width=65 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
|
||||
</tr><tr>
|
||||
<td><button value="Scan" action="bypass -h admin_scan $qbox" width=65 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
|
||||
<td><button value="PC Points" action="bypass -h admin_pccafepoints" width=65 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
|
||||
<td><button value="NCoins" action="bypass -h admin_primepoints" width=65 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
60
trunk/dist/game/data/html/admin/pccafe.htm
vendored
Normal file
60
trunk/dist/game/data/html/admin/pccafe.htm
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
<html><title>Admin PC Points Manager</title><body>
|
||||
<center>
|
||||
<table width=270 align=center>
|
||||
<tr>
|
||||
<td width=45><button value="Main" action="bypass admin_admin" width=45 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
|
||||
<td width=180><center>Admin PC Points Manager</center></td>
|
||||
<td width=45><button value="Back" action="bypass -h admin_admin6" width=45 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<font color="LEVEL">Target info</font><br1>
|
||||
<table width="270" align=center border="0" bgcolor="444444">
|
||||
<tr>
|
||||
<td>Player Name:</td>
|
||||
<td><font color="00FF00">%targetName%<font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Player Points:</td>
|
||||
<td><font color="00FF00">%points%<font></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<font color="LEVEL">Target Operations</font><br1>
|
||||
<table width=256 align=center border=0 bgcolor="444444">
|
||||
<tr>
|
||||
<td width=128 align=center>Operation</td>
|
||||
<td width=128 align=center><combobox width=120 height=17 var=ebox list=increase;decrease;set></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=128 align=center>Value</td>
|
||||
<td width=128 align=center><edit var="val" width=120 type="number"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="270" align=center border="0" bgcolor="444444">
|
||||
<tr>
|
||||
<td><center><br><button value="Confirm" action="bypass -h admin_pccafepoints $ebox $val" width=80 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></center></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<font color="LEVEL">Reward More players</font><br1>
|
||||
<table width=256 align=center border=0 bgcolor="444444">
|
||||
<tr>
|
||||
<td width=128 align=center>Range</td>
|
||||
<td width=128 align=center><edit var="range" width=120 type="number"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=128 align=center>Value</td>
|
||||
<td width=128 align=center><edit var="val2" width=120 type="number"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="257" align=center border="0" bgcolor="444444">
|
||||
<tr>
|
||||
<td><center><br><button value="Confirm" action="bypass -h admin_pccafepoints rewardOnline $val2 $range" width=80 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></center></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><center>Note: If you leave 'Range' empty or set 0,<br1>it will reward all online players.</center></td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
</body></html>
|
10
trunk/dist/game/data/html/pccafe.htm
vendored
Normal file
10
trunk/dist/game/data/html/pccafe.htm
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<html><title>Player Commendation System</title><body>Player Commendation Points:<br>
|
||||
You can use PC points to buy items.<br>
|
||||
It is possible to buy several <font color="LEVEL">General Items</font>, like hair accessories or even time-limited <font color="LEVEL">Commendation Weapons</font>.<br>
|
||||
Take a look on the current rewards.<br>
|
||||
<br>
|
||||
<font color="LEVEL">
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h pccafe_buy 900001">Buy General Items</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h pccafe_buy 900002">Buy Commendation Weapons</Button>
|
||||
</font>
|
||||
</body></html>
|
129
trunk/dist/game/data/multisell/900001.xml
vendored
Normal file
129
trunk/dist/game/data/multisell/900001.xml
vendored
Normal file
@@ -0,0 +1,129 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/multisell.xsd">
|
||||
<item>
|
||||
<!-- Pc Bang Point -->
|
||||
<ingredient count="600" id="-100" />
|
||||
<!-- Firework -->
|
||||
<production count="1" id="6406" />
|
||||
</item>
|
||||
<item>
|
||||
<!-- Pc Bang Point -->
|
||||
<ingredient count="1200" id="-100" />
|
||||
<production count="1" id="6407" />
|
||||
</item>
|
||||
<item>
|
||||
<!-- Pc Bang Point -->
|
||||
<ingredient count="96000" id="-100" />
|
||||
<production count="1" id="7842" />
|
||||
</item>
|
||||
<item>
|
||||
<!-- Pc Bang Point -->
|
||||
<ingredient count="96000" id="-100" />
|
||||
<production count="1" id="7844" />
|
||||
</item>
|
||||
<item>
|
||||
<!-- Pc Bang Point -->
|
||||
<ingredient count="144000" id="-100" />
|
||||
<production count="1" id="8557" />
|
||||
</item>
|
||||
<item>
|
||||
<!-- Pc Bang Point -->
|
||||
<ingredient count="144000" id="-100" />
|
||||
<production count="1" id="8910" />
|
||||
</item>
|
||||
<item>
|
||||
<!-- Pc Bang Point -->
|
||||
<ingredient count="12000" id="-100" />
|
||||
<production count="1" id="9184" />
|
||||
</item>
|
||||
<item>
|
||||
<!-- Pc Bang Point -->
|
||||
<ingredient count="12000" id="-100" />
|
||||
<production count="1" id="9185" />
|
||||
</item>
|
||||
<item>
|
||||
<!-- Pc Bang Point -->
|
||||
<ingredient count="12000" id="-100" />
|
||||
<production count="1" id="9187" />
|
||||
</item>
|
||||
<item>
|
||||
<!-- Pc Bang Point -->
|
||||
<ingredient count="12000" id="-100" />
|
||||
<production count="1" id="9188" />
|
||||
</item>
|
||||
<item>
|
||||
<!-- Pc Bang Point -->
|
||||
<ingredient count="12000" id="-100" />
|
||||
<production count="1" id="9190" />
|
||||
</item>
|
||||
<item>
|
||||
<!-- Pc Bang Point -->
|
||||
<ingredient count="12000" id="-100" />
|
||||
<production count="1" id="9191" />
|
||||
</item>
|
||||
<item>
|
||||
<!-- Pc Bang Point -->
|
||||
<ingredient count="12000" id="-100" />
|
||||
<production count="1" id="9192" />
|
||||
</item>
|
||||
<item>
|
||||
<!-- Pc Bang Point -->
|
||||
<ingredient count="12000" id="-100" />
|
||||
<production count="1" id="9194" />
|
||||
</item>
|
||||
<item>
|
||||
<!-- Pc Bang Point -->
|
||||
<ingredient count="12000" id="-100" />
|
||||
<production count="1" id="9195" />
|
||||
</item>
|
||||
<item>
|
||||
<!-- Pc Bang Point -->
|
||||
<ingredient count="12000" id="-100" />
|
||||
<production count="1" id="9197" />
|
||||
</item>
|
||||
<item>
|
||||
<!-- Pc Bang Point -->
|
||||
<ingredient count="12000" id="-100" />
|
||||
<production count="1" id="9198" />
|
||||
</item>
|
||||
<item>
|
||||
<!-- Pc Bang Point -->
|
||||
<ingredient count="12000" id="-100" />
|
||||
<production count="1" id="9199" />
|
||||
</item>
|
||||
<item>
|
||||
<!-- Pc Bang Point -->
|
||||
<ingredient count="12000" id="-100" />
|
||||
<production count="1" id="9201" />
|
||||
</item>
|
||||
<item>
|
||||
<!-- Pc Bang Point -->
|
||||
<ingredient count="12000" id="-100" />
|
||||
<production count="1" id="9202" />
|
||||
</item>
|
||||
<item>
|
||||
<!-- Pc Bang Point -->
|
||||
<ingredient count="12000" id="-100" />
|
||||
<production count="1" id="9204" />
|
||||
</item>
|
||||
<item>
|
||||
<!-- Pc Bang Point -->
|
||||
<ingredient count="192000" id="-100" />
|
||||
<production count="1" id="12779" />
|
||||
</item>
|
||||
<item>
|
||||
<!-- Pc Bang Point -->
|
||||
<ingredient count="192000" id="-100" />
|
||||
<production count="1" id="12780" />
|
||||
</item>
|
||||
<item>
|
||||
<!-- Pc Bang Point -->
|
||||
<ingredient count="3500" id="-100" />
|
||||
<production count="1" id="15356" />
|
||||
</item>
|
||||
<item>
|
||||
<!-- Pc Bang Point -->
|
||||
<ingredient count="3000" id="-100" />
|
||||
<production count="1" id="15357" />
|
||||
</item>
|
||||
</list>
|
316
trunk/dist/game/data/multisell/900002.xml
vendored
Normal file
316
trunk/dist/game/data/multisell/900002.xml
vendored
Normal file
@@ -0,0 +1,316 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/multisell.xsd">
|
||||
<!-- PC - Apocalypse Weapons -->
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34509" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34510" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34511" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34512" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34513" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34514" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34515" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34516" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34517" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34518" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34519" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34520" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34521" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34522" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34523" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34524" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34525" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34526" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34527" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34528" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34529" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34530" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34531" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34532" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34533" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34534" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34535" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34536" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34537" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34538" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34539" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34540" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34541" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34542" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34543" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34544" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34545" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34546" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34547" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34548" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34549" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34550" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34551" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34552" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34553" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34554" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34555" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34556" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34557" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34558" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34559" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34560" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34561" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34562" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34563" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34564" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34565" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34566" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34567" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34568" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34569" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34570" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34571" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34572" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34573" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34574" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34719" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34720" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34721" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34722" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34723" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34724" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34725" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34726" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34727" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34728" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34729" />
|
||||
</item>
|
||||
<item>
|
||||
<ingredient count="20000" id="-100" />
|
||||
<production count="1" id="34730" />
|
||||
</item>
|
||||
</list>
|
@@ -99,6 +99,7 @@ import handlers.admincommandhandlers.AdminMessages;
|
||||
import handlers.admincommandhandlers.AdminMobGroup;
|
||||
import handlers.admincommandhandlers.AdminMonsterRace;
|
||||
import handlers.admincommandhandlers.AdminOlympiad;
|
||||
import handlers.admincommandhandlers.AdminPcCafePoints;
|
||||
import handlers.admincommandhandlers.AdminPForge;
|
||||
import handlers.admincommandhandlers.AdminPathNode;
|
||||
import handlers.admincommandhandlers.AdminPcCondOverride;
|
||||
@@ -375,6 +376,7 @@ public class MasterHandler
|
||||
AdminMonsterRace.class,
|
||||
AdminOlympiad.class,
|
||||
AdminPathNode.class,
|
||||
AdminPcCafePoints.class,
|
||||
AdminPetition.class,
|
||||
AdminPForge.class,
|
||||
AdminPledge.class,
|
||||
|
205
trunk/dist/game/data/scripts/handlers/admincommandhandlers/AdminPcCafePoints.java
vendored
Normal file
205
trunk/dist/game/data/scripts/handlers/admincommandhandlers/AdminPcCafePoints.java
vendored
Normal file
@@ -0,0 +1,205 @@
|
||||
/*
|
||||
* 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 java.util.Collection;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.cache.HtmCache;
|
||||
import com.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||
import com.l2jmobius.gameserver.model.L2World;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ExPCCafePointInfo;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import com.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
* Admin PC Points manage admin commands.
|
||||
*/
|
||||
public final class AdminPcCafePoints implements IAdminCommandHandler
|
||||
{
|
||||
private static final String[] ADMIN_COMMANDS =
|
||||
{
|
||||
"admin_pccafepoints",
|
||||
};
|
||||
|
||||
@Override
|
||||
public boolean useAdminCommand(String command, L2PcInstance activeChar)
|
||||
{
|
||||
final StringTokenizer st = new StringTokenizer(command, " ");
|
||||
final String actualCommand = st.nextToken();
|
||||
|
||||
if (actualCommand.equals("admin_pccafepoints"))
|
||||
{
|
||||
if (st.hasMoreTokens())
|
||||
{
|
||||
final String action = st.nextToken();
|
||||
|
||||
final L2PcInstance target = getTarget(activeChar);
|
||||
if ((target == null) || !st.hasMoreTokens())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
int value = 0;
|
||||
try
|
||||
{
|
||||
value = Integer.parseInt(st.nextToken());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
showMenuHtml(activeChar);
|
||||
activeChar.sendMessage("Invalid Value!");
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (action)
|
||||
{
|
||||
case "set":
|
||||
{
|
||||
if (value > Config.PC_CAFE_MAX_POINTS)
|
||||
{
|
||||
showMenuHtml(activeChar);
|
||||
activeChar.sendMessage("You cannot set more than " + Config.PC_CAFE_MAX_POINTS + " PC points!");
|
||||
return false;
|
||||
}
|
||||
if (value < 0)
|
||||
{
|
||||
value = 0;
|
||||
}
|
||||
|
||||
target.setPcCafePoints(value);
|
||||
target.sendMessage("Admin set your PC Cafe point(s) to " + value + "!");
|
||||
activeChar.sendMessage("You set " + value + " PC Cafe point(s) to player " + target.getName());
|
||||
target.sendPacket(new ExPCCafePointInfo(value, value, 1));
|
||||
break;
|
||||
}
|
||||
case "increase":
|
||||
{
|
||||
if (target.getPcCafePoints() == Config.PC_CAFE_MAX_POINTS)
|
||||
{
|
||||
showMenuHtml(activeChar);
|
||||
activeChar.sendMessage(target.getName() + " already have max count of PC points!");
|
||||
return false;
|
||||
}
|
||||
|
||||
int pcCafeCount = Math.min(target.getPcCafePoints() + value, Config.PC_CAFE_MAX_POINTS);
|
||||
if (pcCafeCount < 0)
|
||||
{
|
||||
pcCafeCount = Config.PC_CAFE_MAX_POINTS;
|
||||
}
|
||||
target.setPcCafePoints(pcCafeCount);
|
||||
target.sendMessage("Admin increased your PC Cafe point(s) by " + value + "!");
|
||||
activeChar.sendMessage("You increased PC Cafe point(s) of " + target.getName() + " by " + value);
|
||||
target.sendPacket(new ExPCCafePointInfo(pcCafeCount, value, 1));
|
||||
break;
|
||||
}
|
||||
case "decrease":
|
||||
{
|
||||
if (target.getPcCafePoints() == 0)
|
||||
{
|
||||
showMenuHtml(activeChar);
|
||||
activeChar.sendMessage(target.getName() + " already have min count of PC points!");
|
||||
return false;
|
||||
}
|
||||
|
||||
final int pcCafeCount = Math.max(target.getPcCafePoints() - value, 0);
|
||||
target.setPcCafePoints(pcCafeCount);
|
||||
target.sendMessage("Admin decreased your PC Cafe point(s) by " + value + "!");
|
||||
activeChar.sendMessage("You decreased PC Cafe point(s) of " + target.getName() + " by " + value);
|
||||
target.sendPacket(new ExPCCafePointInfo(pcCafeCount, value, 1));
|
||||
break;
|
||||
}
|
||||
case "rewardOnline":
|
||||
{
|
||||
int range = 0;
|
||||
try
|
||||
{
|
||||
range = Integer.parseInt(st.nextToken());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
}
|
||||
|
||||
if (range <= 0)
|
||||
{
|
||||
final int count = increaseForAll(L2World.getInstance().getPlayers(), value);
|
||||
activeChar.sendMessage("You increased PC Cafe point(s) of all online players (" + count + ") by " + value + ".");
|
||||
}
|
||||
else if (range > 0)
|
||||
{
|
||||
final int count = increaseForAll(L2World.getInstance().getVisibleObjects(activeChar, L2PcInstance.class, range), value);
|
||||
activeChar.sendMessage("You increased PC Cafe point(s) of all players (" + count + ") in range " + range + " by " + value + ".");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
showMenuHtml(activeChar);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private int increaseForAll(Collection<L2PcInstance> playerList, int value)
|
||||
{
|
||||
int counter = 0;
|
||||
for (L2PcInstance temp : playerList)
|
||||
{
|
||||
if ((temp != null) && (temp.isOnlineInt() == 1))
|
||||
{
|
||||
if (temp.getPcCafePoints() == Integer.MAX_VALUE)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
int pcCafeCount = Math.min(temp.getPcCafePoints() + value, Integer.MAX_VALUE);
|
||||
if (pcCafeCount < 0)
|
||||
{
|
||||
pcCafeCount = Integer.MAX_VALUE;
|
||||
}
|
||||
temp.setPcCafePoints(pcCafeCount);
|
||||
temp.sendMessage("Admin increased your PC Cafe point(s) by " + value + "!");
|
||||
temp.sendPacket(new ExPCCafePointInfo(pcCafeCount, value, 1));
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
return counter;
|
||||
}
|
||||
|
||||
private L2PcInstance getTarget(L2PcInstance activeChar)
|
||||
{
|
||||
return ((activeChar.getTarget() != null) && (activeChar.getTarget().getActingPlayer() != null)) ? activeChar.getTarget().getActingPlayer() : activeChar;
|
||||
}
|
||||
|
||||
private void showMenuHtml(L2PcInstance activeChar)
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(0, 1);
|
||||
final L2PcInstance target = getTarget(activeChar);
|
||||
final int points = target.getPcCafePoints();
|
||||
html.setHtml(HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/admin/pccafe.htm"));
|
||||
html.replace("%points%", Util.formatAdena(points));
|
||||
html.replace("%targetName%", target.getName());
|
||||
activeChar.sendPacket(html);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getAdminCommandList()
|
||||
{
|
||||
return ADMIN_COMMANDS;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user