Skip to content
This repository has been archived by the owner on May 15, 2023. It is now read-only.

Commit

Permalink
Adding acis, update lucera
Browse files Browse the repository at this point in the history
aCis

- initial commit
- Patch diff for minimal installation process
  - also contains voiced command handler

Lucera

- Fixed output paths on project dir
- Updated dictionary and workspace project files
- Added missing default values on config for console RGB colors
- HWID Protection fallback to IP that fallback into player name in case of null
  - refactor ips to fingerprint
  - removed ip check
  - added objects null coalesce check on HWID, IP, player name on this order
- Game console string seperator
- Updated script version
  • Loading branch information
nightw0lv committed Dec 23, 2020
1 parent 344942f commit eef91f6
Show file tree
Hide file tree
Showing 52 changed files with 2,548 additions and 50 deletions.
8 changes: 8 additions & 0 deletions Interlude/aCis/VDSystem/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Interlude/aCis/VDSystem/.idea/artifacts/VDSystem.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions Interlude/aCis/VDSystem/.idea/dictionaries/CPU.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions Interlude/aCis/VDSystem/.idea/libraries/libs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Interlude/aCis/VDSystem/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Interlude/aCis/VDSystem/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Interlude/aCis/VDSystem/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

149 changes: 149 additions & 0 deletions Interlude/aCis/VDSystem/Patch.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
### Eclipse Workspace Patch 1.0
#P aCis_gameserver
diff --git .classpath .classpath
index 169aae4..16e4bb0 100644
--- .classpath
+++ .classpath
@@ -8,5 +8,6 @@
</attributes>
</classpathentry>
<classpathentry kind="lib" path="lib/mariadb-java-client-2.6.1.jar"/>
+ <classpathentry kind="lib" path="lib/VDSystem.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git java/net/sf/l2j/gameserver/GameServer.java java/net/sf/l2j/gameserver/GameServer.java
index a60aaad..881ad50 100644
--- java/net/sf/l2j/gameserver/GameServer.java
+++ java/net/sf/l2j/gameserver/GameServer.java
@@ -81,6 +81,7 @@
import net.sf.l2j.gameserver.handler.SkillHandler;
import net.sf.l2j.gameserver.handler.TargetHandler;
import net.sf.l2j.gameserver.handler.UserCommandHandler;
+import net.sf.l2j.gameserver.handler.VoicedCommandHandler;
import net.sf.l2j.gameserver.idfactory.IdFactory;
import net.sf.l2j.gameserver.model.World;
import net.sf.l2j.gameserver.model.boat.BoatGiranTalking;
@@ -103,6 +104,8 @@
import net.sf.l2j.util.DeadLockDetector;
import net.sf.l2j.util.IPv4Filter;

+import itopz.com.VDSystemManager;
+
public class GameServer
{
private static final CLogger LOGGER = new CLogger(GameServer.class.getName());
@@ -270,6 +273,8 @@
if (Config.ALLOW_FISH_CHAMPIONSHIP)
FishingChampionshipManager.getInstance();

+ VDSystemManager.getInstance();
+
StringUtil.printSection("Handlers");
LOGGER.info("Loaded {} admin command handlers.", AdminCommandHandler.getInstance().size());
LOGGER.info("Loaded {} chat handlers.", ChatHandler.getInstance().size());
@@ -277,6 +282,7 @@
LOGGER.info("Loaded {} skill handlers.", SkillHandler.getInstance().size());
LOGGER.info("Loaded {} target handlers.", TargetHandler.getInstance().size());
LOGGER.info("Loaded {} user command handlers.", UserCommandHandler.getInstance().size());
+ LOGGER.info("Loaded {} voice command handlers.", VoicedCommandHandler.getInstance().size());

StringUtil.printSection("System");
Runtime.getRuntime().addShutdownHook(Shutdown.getInstance());
diff --git java/net/sf/l2j/gameserver/handler/IVoicedCommandHandler.java java/net/sf/l2j/gameserver/handler/IVoicedCommandHandler.java
new file mode 100644
index 0000000..46838ef
--- /dev/null
+++ java/net/sf/l2j/gameserver/handler/IVoicedCommandHandler.java
@@ -0,0 +1,10 @@
+package net.sf.l2j.gameserver.handler;
+
+import net.sf.l2j.gameserver.model.actor.Player;
+
+public interface IVoicedCommandHandler
+{
+ public boolean useVoicedCommand(String command, Player activeChar);
+
+ public String[] getVoicedCommandList();
+}
\ No newline at end of file
diff --git java/net/sf/l2j/gameserver/handler/VoicedCommandHandler.java java/net/sf/l2j/gameserver/handler/VoicedCommandHandler.java
new file mode 100644
index 0000000..8ed75c8
--- /dev/null
+++ java/net/sf/l2j/gameserver/handler/VoicedCommandHandler.java
@@ -0,0 +1,41 @@
+package net.sf.l2j.gameserver.handler;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+public class VoicedCommandHandler
+{
+ private final Map<Integer, IVoicedCommandHandler> VOICED_COMMANDS = new HashMap<>();
+
+ protected VoicedCommandHandler()
+ {
+ // registerVoicedCommand(new exampleCMD());
+ }
+
+ public void registerVoicedCommand(IVoicedCommandHandler voicedCommand)
+ {
+ Arrays.stream(voicedCommand.getVoicedCommandList()).forEach(v -> VOICED_COMMANDS.put(v.intern().hashCode(), voicedCommand));
+ }
+
+ public IVoicedCommandHandler getVoicedCommand(String voicedCommand)
+ {
+ return VOICED_COMMANDS.get(voicedCommand.hashCode());
+ }
+
+ public int size()
+ {
+ return VOICED_COMMANDS.size();
+ }
+
+ public static final VoicedCommandHandler getInstance()
+ {
+ return SingletonHolder.INSTANCE;
+ }
+
+ private static final class SingletonHolder
+ {
+ private static final VoicedCommandHandler INSTANCE = new VoicedCommandHandler();
+ }
+
+}
\ No newline at end of file
diff --git java/net/sf/l2j/gameserver/handler/chathandlers/ChatAll.java java/net/sf/l2j/gameserver/handler/chathandlers/ChatAll.java
index 12c89b6..d344d90 100644
--- java/net/sf/l2j/gameserver/handler/chathandlers/ChatAll.java
+++ java/net/sf/l2j/gameserver/handler/chathandlers/ChatAll.java
@@ -1,7 +1,10 @@
package net.sf.l2j.gameserver.handler.chathandlers;

+import java.util.Optional;
+
import net.sf.l2j.gameserver.enums.SayType;
import net.sf.l2j.gameserver.handler.IChatHandler;
+import net.sf.l2j.gameserver.handler.VoicedCommandHandler;
import net.sf.l2j.gameserver.model.actor.Player;
import net.sf.l2j.gameserver.network.FloodProtectors;
import net.sf.l2j.gameserver.network.FloodProtectors.Action;
@@ -20,6 +23,11 @@
if (!FloodProtectors.performAction(activeChar.getClient(), Action.GLOBAL_CHAT))
return;

+ if (text.startsWith("."))
+ {
+ Optional.ofNullable(VoicedCommandHandler.getInstance().getVoicedCommand(text.substring(1).toLowerCase())).ifPresent(s -> s.useVoicedCommand(text, activeChar));
+ return;
+ }
final CreatureSay cs = new CreatureSay(activeChar, type, text);
for (Player player : activeChar.getKnownTypeInRadius(Player.class, 1250))
player.sendPacket(cs);
diff --git lib/VDSystem.jar lib/VDSystem.jar
new file mode 100644
index 0000000..30cc15e
--- /dev/null
+++ lib/VDSystem.jar
Binary files differ
12 changes: 12 additions & 0 deletions Interlude/aCis/VDSystem/VDSystem.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="libs" level="project" />
</component>
</module>
81 changes: 81 additions & 0 deletions Interlude/aCis/VDSystem/config/VDSystem.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# ================================================================== #
# -- ITOPZ Console VARS -- #
# ================================================================== #
# Console font, can be any font
# Default: Roboto
ConsoleFont = Roboto

# Console font size
# Default: 12
ConsoleFontSize = 12

# Console R,G,B background color
# R default: 204
ConsoleColorR = 204
# G default: 238
ConsoleColorG = 238
# B default: 241
ConsoleColorB = 241

# Console width size
# Default: 400
ConsoleWidth = 400

# Console height size
# Default: 350
ConsoleHeight = 350

# ================================================================== #
# -- ITOPZ GLOBAL VOTE VARS -- #
# ================================================================== #
# Enable global reward
# Default: True
iTopZGlobalVoteReward = True

# Server ID
# Default: 325339 (Test Server)
ServerID = 325339

# Api key
# Can be obtained at https://itopz.com/ after adding a server.
# Default: DEMO (random values returned for test environments)
ApiKey = DEMO

# Check Votes delay in seconds
# Default: 1800 (30 minutes)
CheckDelay = 1800

# Announce statistics on game
# Default: True
AnnounceStatistics = True

# Reward every XX votes
# Default: 20
VoteStep = 20

# Reward items
# itemId (int), MIN(long), MAX(long), CHANCE(min 0, max 100)
# example: itemId,MIN-MAX-CHANCE;itemId,MIN-MAX-CHANCE;
# Default: 57,10000-99999-100;5575,500-1000-80;6622,1-5-20;
GlobalRewards = 57,10000-99999-100;5575,500-1000-80;6622,1-5-20;

# ================================================================== #
# -- ITOPZ Individual VOTE VARS -- #
# ================================================================== #
# Will also register a new command .itopz
# Enable individual reward
# Default: True
IndividualReward = True

# Reward items
# itemId (int), MIN(long), MAX(long), CHANCE(min 0, max 100)
# example: itemId,MIN-MAX-CHANCE;itemId,MIN-MAX-CHANCE;
# Default: 57,10000-99999-100;5575,500-1000-80;6622,1-5-20;
IndividualRewards = 57,10000-99999-100;5575,500-1000-80;6622,1-5-20;

# ================================================================== #
# -- ITOPZ Donate Manager VARS -- #
# ================================================================== #
# Enable Donation manager reward
# Default: True
DonateManager = True
Binary file added Interlude/aCis/VDSystem/images/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Interlude/aCis/VDSystem/images/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Interlude/aCis/VDSystem/images/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Interlude/aCis/VDSystem/images/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Interlude/aCis/VDSystem/images/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Interlude/aCis/VDSystem/images/6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Interlude/aCis/VDSystem/images/7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit eef91f6

Please sign in to comment.