From 2bbc5125a7948466b7b3c2339894488f23086b94 Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Mon, 2 May 2022 21:30:52 +0000 Subject: [PATCH] Addition of PC Cafe (PC Bang) system. --- .../dist/db_installer/sql/game/characters.sql | 1 + .../dist/game/config/AdminCommands.xml | 3 + .../dist/game/config/Custom/PcCafe.ini | 42 ++++ .../dist/game/data/html/admin/main_menu.htm | 1 + .../dist/game/data/html/admin/pccafe.htm | 60 ++++++ .../data/scripts/handlers/MasterHandler.java | 2 + .../AdminPcCafePoints.java | 204 ++++++++++++++++++ .../java/org/l2jmobius/Config.java | 42 ++++ .../org/l2jmobius/gameserver/GameServer.java | 2 + .../gameserver/data/xml/MultisellData.java | 24 ++- .../instancemanager/PcCafePointsManager.java | 92 ++++++++ .../org/l2jmobius/gameserver/model/Party.java | 2 + .../gameserver/model/actor/Attackable.java | 2 + .../gameserver/model/actor/Player.java | 24 ++- .../model/events/AbstractScript.java | 2 + .../dist/db_installer/sql/game/characters.sql | 1 + .../dist/game/config/AdminCommands.xml | 3 + .../dist/game/config/Custom/PcCafe.ini | 42 ++++ .../dist/game/data/html/admin/main_menu.htm | 1 + .../dist/game/data/html/admin/pccafe.htm | 60 ++++++ .../data/scripts/handlers/MasterHandler.java | 2 + .../AdminPcCafePoints.java | 204 ++++++++++++++++++ .../java/org/l2jmobius/Config.java | 42 ++++ .../org/l2jmobius/gameserver/GameServer.java | 2 + .../gameserver/data/xml/MultisellData.java | 25 ++- .../instancemanager/PcCafePointsManager.java | 98 +++++++++ .../org/l2jmobius/gameserver/model/Party.java | 2 + .../gameserver/model/actor/Attackable.java | 2 + .../gameserver/model/actor/Player.java | 24 ++- .../model/events/AbstractScript.java | 2 + .../dist/db_installer/sql/game/characters.sql | 1 + .../dist/game/config/AdminCommands.xml | 3 + .../dist/game/config/Custom/PcCafe.ini | 42 ++++ .../dist/game/data/html/admin/main_menu.htm | 1 + .../dist/game/data/html/admin/pccafe.htm | 60 ++++++ .../data/scripts/handlers/MasterHandler.java | 2 + .../AdminPcCafePoints.java | 204 ++++++++++++++++++ .../java/org/l2jmobius/Config.java | 42 ++++ .../org/l2jmobius/gameserver/GameServer.java | 2 + .../gameserver/data/xml/MultisellData.java | 25 ++- .../instancemanager/PcCafePointsManager.java | 98 +++++++++ .../org/l2jmobius/gameserver/model/Party.java | 2 + .../gameserver/model/actor/Attackable.java | 2 + .../gameserver/model/actor/Player.java | 18 +- .../model/events/AbstractScript.java | 2 + 45 files changed, 1502 insertions(+), 15 deletions(-) create mode 100644 L2J_Mobius_CT_0_Interlude/dist/game/config/Custom/PcCafe.ini create mode 100644 L2J_Mobius_CT_0_Interlude/dist/game/data/html/admin/pccafe.htm create mode 100644 L2J_Mobius_CT_0_Interlude/dist/game/data/scripts/handlers/admincommandhandlers/AdminPcCafePoints.java create mode 100644 L2J_Mobius_CT_0_Interlude/java/org/l2jmobius/gameserver/instancemanager/PcCafePointsManager.java create mode 100644 L2J_Mobius_CT_2.4_Epilogue/dist/game/config/Custom/PcCafe.ini create mode 100644 L2J_Mobius_CT_2.4_Epilogue/dist/game/data/html/admin/pccafe.htm create mode 100644 L2J_Mobius_CT_2.4_Epilogue/dist/game/data/scripts/handlers/admincommandhandlers/AdminPcCafePoints.java create mode 100644 L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/instancemanager/PcCafePointsManager.java create mode 100644 L2J_Mobius_CT_2.6_HighFive/dist/game/config/Custom/PcCafe.ini create mode 100644 L2J_Mobius_CT_2.6_HighFive/dist/game/data/html/admin/pccafe.htm create mode 100644 L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/admincommandhandlers/AdminPcCafePoints.java create mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/instancemanager/PcCafePointsManager.java diff --git a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/characters.sql b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/characters.sql index 6627ea59a6..57b7796bc9 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/characters.sql +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/sql/game/characters.sql @@ -56,6 +56,7 @@ CREATE TABLE IF NOT EXISTS `characters` ( `createDate` date NOT NULL DEFAULT '2015-01-01', `language` VARCHAR(2) DEFAULT NULL, `faction` TINYINT UNSIGNED NOT NULL DEFAULT '0', + `pccafe_points` int(6) NOT NULL DEFAULT '0', `last_recom_date` BIGINT UNSIGNED NOT NULL DEFAULT 0, `rec_have` TINYINT UNSIGNED NOT NULL DEFAULT 0, `rec_left` TINYINT UNSIGNED NOT NULL DEFAULT 0, diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/config/AdminCommands.xml b/L2J_Mobius_CT_0_Interlude/dist/game/config/AdminCommands.xml index b7bb5908e2..795ad3e6fb 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/game/config/AdminCommands.xml +++ b/L2J_Mobius_CT_0_Interlude/dist/game/config/AdminCommands.xml @@ -358,6 +358,9 @@ + + + diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/config/Custom/PcCafe.ini b/L2J_Mobius_CT_0_Interlude/dist/game/config/Custom/PcCafe.ini new file mode 100644 index 0000000000..6dbccdc44a --- /dev/null +++ b/L2J_Mobius_CT_0_Interlude/dist/game/config/Custom/PcCafe.ini @@ -0,0 +1,42 @@ +# --------------------------------------------------------------------------- +# 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 diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/data/html/admin/main_menu.htm b/L2J_Mobius_CT_0_Interlude/dist/game/data/html/admin/main_menu.htm index 778d09cec3..d38256ac9a 100644 --- a/L2J_Mobius_CT_0_Interlude/dist/game/data/html/admin/main_menu.htm +++ b/L2J_Mobius_CT_0_Interlude/dist/game/data/html/admin/main_menu.htm @@ -28,6 +28,7 @@