Jump to content
  • Sign Up
×
×
  • Create New...

Hondata

Moderator
  • Posts

    7
  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    0%

Hondata last won the day on August 13 2023

Hondata had the most liked content!

About Hondata

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Hondata's Achievements

  1. And a more original server-focused package following the missions of the original game. The entire calling package was restructured, making it lighter and easier to execute. It is good for people who want to start a package, without customizing equipment and skills. * I put together 4 bases: "RusaCis3.5" "Lucera" "aCis" "Dev" It has a Modern UI template. Author post: IFox
  2. I share this guide with you to be able to use the Smart Crypt Decrypt code that is used to decrypt the client's files (utx, ukx and u). The programs that you will need is Microsoft Visual Studio (in my case I will use the 2013 version, you can use other versions) and CFF Explorer. Microsoft Visual Studio 2013: [Hidden Content] CFF Explorer: [Hidden Content] Smart Crypt Decryptor Code: #include <windows.h> void DumpFile() { typedef void(__cdecl *f_appLoadFileToArray)(char *, wchar_t *, int); typedef void(__cdecl *f_appSaveArrayToFile)(char *, wchar_t *, int); f_appLoadFileToArray appLoadFileToArray = (f_appLoadFileToArray)GetProcAddress(GetModuleHandleA("Core.dll"), "?appLoadFileToArray@@YAHAAV?$TArray@E@@PBGPAVFFileManager@@@Z"); f_appSaveArrayToFile appSaveArrayToFile = (f_appSaveArrayToFile)GetProcAddress(GetModuleHandleA("Core.dll"), "?appSaveArrayToFile@@YAHABV?$TArray@E@@PBGPAVFFileManager@@@Z"); char TArray[0x14]; memset(TArray, 0, 0x14); appLoadFileToArray(TArray, L"..\\System\\Interface.u", *((int *)GetProcAddress(GetModuleHandleA("Core.dll"), "?GFileManager@@3PAVFFileManager@@A"))); appSaveArrayToFile(TArray, L"..\\System\\Interface.decrypted.u", *((int *)GetProcAddress(GetModuleHandleA("Core.dll"), "?GFileManager@@3PAVFFileManager@@A"))); } bool dumped = false; void StartCheck() { // wait until WinDrv is loaded just so we know everything we need is initialized correctly if (GetModuleHandleA("WinDrv.dll") != NULL) { if (!dumped) { DumpFile(); dumped = true; } } } __declspec(dllexport) BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: case DLL_THREAD_ATTACH: StartCheck(); case DLL_THREAD_DETACH: case DLL_PROCESS_DETACH: break; } return TRUE; } Once they have these programs installed, let's continue. First of all we open the Microsoft Visual Studio and let's FILE> New> Project or in another faster way Ctrl + Shift + N It will show us the following We select Visual C ++ thenWin32 Console Application and we end withOK the name is put or not, the only thing it will do is give a name to the solution, that is, if you put "juanito" when compiling the DLL it will have a name of "juanito.dll" Then another window does not appear we give Next we select DLL and we mark Empty project and Finish It should show us the following: We right click on Header Files> Add> New item ... Another window appears, with two optionsC ++ File (.cpp) and Header File (.h) select C ++ File and then OK] in this case the name is also optional to add, we are not creating a NASA program to worry about references and / or names. We copy the code that you leave above #include <windows.h> void DumpFile() { typedef void(__cdecl *f_appLoadFileToArray)(char *, wchar_t *, int); typedef void(__cdecl *f_appSaveArrayToFile)(char *, wchar_t *, int); f_appLoadFileToArray appLoadFileToArray = (f_appLoadFileToArray)GetProcAddress(GetModuleHandleA("Core.dll"), "?appLoadFileToArray@@YAHAAV?$TArray@E@@PBGPAVFFileManager@@@Z"); f_appSaveArrayToFile appSaveArrayToFile = (f_appSaveArrayToFile)GetProcAddress(GetModuleHandleA("Core.dll"), "?appSaveArrayToFile@@YAHABV?$TArray@E@@PBGPAVFFileManager@@@Z"); char TArray[0x14]; memset(TArray, 0, 0x14); appLoadFileToArray(TArray, L"..\\System\\Interface.u", *((int *)GetProcAddress(GetModuleHandleA("Core.dll"), "?GFileManager@@3PAVFFileManager@@A"))); appSaveArrayToFile(TArray, L"..\\System\\Interface.decrypted.u", *((int *)GetProcAddress(GetModuleHandleA("Core.dll"), "?GFileManager@@3PAVFFileManager@@A"))); } bool dumped = false; void StartCheck() { // wait until WinDrv is loaded just so we know everything we need is initialized correctly if (GetModuleHandleA("WinDrv.dll") != NULL) { if (!dumped) { DumpFile(); dumped = true; } } } __declspec(dllexport) BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: case DLL_THREAD_ATTACH: StartCheck(); case DLL_THREAD_DETACH: case DLL_PROCESS_DETACH: break; } return TRUE; } and save it (it is also optional, I usually do it) Once done, with Ctrl + Shift + B we compile the project We should get the following message ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ========== That says everything went well. We go to where the projects are saved by default, in my case: \ users \ user \ documents \ visual studio 2013 \ Projects inside a folder was created with the default name or the one that we add in my case is ConsoleApplication1 we go inside and then to the Debug folder and our DLL ConsoleApplication1.dll should be We copy and paste it into the system and we are done with this. Then we go to l2.exe(before we make a copy of the exe) right click, and if they installed the CFF Explorer, Open With CFF Explorer should appear and if not, they go to the program and open it from there. They go to the Import Adder part then Add and we look for the dll that we create and copy into the system. Once the DLL has been added, the following appears: We select _DllMain @ 12 >> Import By Name and then Rebuild Import Table . There is no sign saying Import Table correctly rebuilt. and we finish saving the l2.exe with the changes made. Then it is only to open the L2 and within the system "Interface.decrypted.u" will be created for you. To be able to decrypt other files (ukx or utx) you will have to change something in the code and it is the following appLoadFileToArray(TArray, L"..\\System\\Interface.u", *((int *)GetProcAddress(GetModuleHandleA("Core.dll"), "?GFileManager@@3PAVFFileManager@@A"))); appSaveArrayToFile(TArray, L"..\\System\\Interface.decrypted.u", *((int *)GetProcAddress(GetModuleHandleA("Core.dll"), "?GFileManager@@3PAVFFileManager@@A"))); for example, if you want to decrypt a texture, copy the .utx into the system, changing the extension to .u (I think it's not necessary, but never try) and in the code change the following: appLoadFileToArray(TArray, L"..\\System\\Textura_que_quiero_desencryptar.u", *((int *)GetProcAddress(GetModuleHandleA("Core.dll"), "?GFileManager@@3PAVFFileManager@@A"))); [background=#2a2e31]appSaveArrayToFile(TArray, L"..\\System\\Textura_que_quiero_desencryptar.decrypted.u", *((int *)GetProcAddress(GetModuleHandleA("Core.dll"), "?GFileManager@@3PAVFFileManager@@A"))); compile the dll again and copy it into the system and voila, open l2 and create the Texture_que_want_desencryptar.decrypted.u then with the umodel you can extract the textures. Decryptor for * u files encrypted by Smart Crypt of early revisions. By default, for Interface.u, however, using the source below and the C / C ++ compiler, you can use this method for other files as well. Place decrypt files in the System folder Place encrypted files in the System folder ( interface.u ) Run L2.exe Now there are decrypted files in the System folder ( Interface.decrypted.u ) Our portal is not the developer of this program and does not provide advice on its work. Source is in the public domain and provided below. Smart Crypt Decrypt code: #include <windows.h> void DumpFile() { typedef void (__cdecl *f_appLoadFileToArray)(char *, wchar_t *, int); typedef void (__cdecl *f_appSaveArrayToFile)(char *, wchar_t *, int); f_appLoadFileToArray appLoadFileToArray = (f_appLoadFileToArray)GetProcAddress(GetModuleHandleA("Core.dll"), "?appLoadFileToArray@@YAHAAV?$TArray@E@@PBGPAVFFileManager@@@Z"); f_appSaveArrayToFile appSaveArrayToFile = (f_appSaveArrayToFile)GetProcAddress(GetModuleHandleA("Core.dll"), "?appSaveArrayToFile@@YAHABV?$TArray@E@@PBGPAVFFileManager@@@Z"); char TArray[0x14]; memset(TArray,0,0x14); appLoadFileToArray(TArray, L"..\\System\\Interface.u", *((int *)GetProcAddress(GetModuleHandleA("Core.dll"), "?GFileManager@@3PAVFFileManager@@A"))); appSaveArrayToFile(TArray, L"..\\System\\Interface.decrypted.u", *((int *)GetProcAddress(GetModuleHandleA("Core.dll"), "?GFileManager@@3PAVFFileManager@@A"))); } bool dumped = false; void StartCheck() { // wait until WinDrv is loaded just so we know everything we need is initialized correctly if (GetModuleHandleA("WinDrv.dll") != NULL) { if (!dumped) { DumpFile(); dumped = true; } } } __declspec(dllexport) BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: case DLL_THREAD_ATTACH: StartCheck(); case DLL_THREAD_DETACH: case DLL_PROCESS_DETACH: break; } return TRUE; } Downloads: Smart Decrypt.rar Password: [Hidden Content]
  3. Saves all active toggle skills from player and it restores them back on revive. Ideal for a pvp zone or in general if u want to. Preview: Video //To save player effects (onDie) RestoreEffectsManager.getInstance().savePlayerEffects(player); //To Restore player effects (onRevive) RestoreEffectsManager.getInstance().restorePlayerEffects(player); Code for source: diff --git a/java/net/sf/l2j/gameserver/mods/RestoreEffects.java b/java/net/sf/l2j/gameserver/mods/RestoreEffects.java new file mode 100644 index 0000000..6b7ef6f --- /dev/null +++ a/java/net/sf/l2j/gameserver/mods/RestoreEffects.java @@ -0,0 +1,98 @@ +package net.sf.l2j.gameserver.mods.returneffects; + +import java.util.Collection; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.atomic.AtomicInteger; +import net.sf.l2j.gameserver.model.actor.Player; +import net.sf.l2j.gameserver.skills.AbstractEffect; + +public class RestoreEffects +{ + final Map<Integer, AbstractEffect> _effects = new ConcurrentHashMap<>(); + Player _player = null; + private final AtomicInteger _intcounter = new AtomicInteger(); + + public RestoreEffects(Player player) + { + this._player = player; + } + + public void startSavingEffects() + { + for (AbstractEffect effect : _player.getAllEffects()) + { + final int counter = _intcounter.incrementAndGet(); + if (effect.getSkill().isToggle()) + _effects.put(counter, effect); + } + } + + public void restoreEffects() + { + for (AbstractEffect effect : getModEffects()) + { + _player.getCast().doToggleCast(effect.getSkill(), _player); + } + } + + public int effectsSize() + { + return _effects.size(); + } + + public Collection<AbstractEffect> getModEffects() + { + return _effects.values(); + } +} diff --git a/java/net/sf/l2j/gameserver/mods/RestoreEffectsManager.java b/java/net/sf/l2j/gameserver/mods/RestoreEffectsManager.java new file mode 100644 index 0000000..6b7ef6f --- /dev/null +++ a/java/net/sf/l2j/gameserver/mods/RestoreEffectsManager.java +package net.sf.l2j.gameserver.mods.returneffects; + +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +import net.sf.l2j.gameserver.model.actor.Player; + +public class RestoreEffectsManager +{ + final Map<Integer, RestoreEffects> _effects = new ConcurrentHashMap<>(); + + public void savePlayerEffects(Player player) + { + if (player.getAllEffects() == null) + return; + + RestoreEffects modEffects = new RestoreEffects(player); + modEffects.startSavingEffects(); + _effects.put(player.getObjectId(), modEffects); + } + + public void restorePlayerEffects(Player player) + { + RestoreEffects rEffects = getPlayerEffects(player.getObjectId()); + + if (rEffects == null) + return; + + rEffects.restoreEffects(); + } + + public RestoreEffects getPlayerEffects(int plrObjId) + { + return _effects.get(plrObjId); + } + + public static final RestoreEffectsManager getInstance() + { + return SingletonHolder._instance; + } + + private static class SingletonHolder + { + protected static final RestoreEffectsManager _instance = new RestoreEffectsManager(); + } +} Credits for this mod: LordPanic (I have been approved to upload his codes)
  4. As title says. Note: You can change the colors etc from xml. code for source: diff --git a/java/net/sf/l2j/gameserver/data/xml/PvPColorSystem.java b/java/net/sf/l2j/gameserver/data/xml/PvPColorSystem.java new file mode 100644 index 0000000..6b7ef6f --- /dev/null +++ a/java/net/sf/l2j/gameserver/data/xml/PvPColorSystem.java @@ -0,0 +1,98 @@ +package net.sf.l2j.gameserver.data.xml; + +import java.nio.file.Path; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +import net.sf.l2j.commons.data.xml.IXmlReader; + +import net.sf.l2j.gameserver.model.actor.Player; +import org.w3c.dom.Document; +import org.w3c.dom.NamedNodeMap; + + +public class PvPColorSystem implements IXmlReader +{ + final Map<Integer, Integer> _nameColors = new ConcurrentHashMap<>(); + final Map<Integer, Integer> _titleColors = new ConcurrentHashMap<>(); + + public static PvPColorSystem getInstance() + { + return PvPColorSystem.SingletonHolder._instance; + } + + private static class SingletonHolder + { + protected static final PvPColorSystem _instance = new PvPColorSystem(); + } + + public PvPColorSystem() + { + load(); + } + + @Override + public void load() + { + parseFile("./data/xml/pvpColors.xml"); + LOGGER.info("PvpColorSystem: loaded " + _nameColors.size() + " [Name] colors and " + _titleColors.size() + " [Title] colors."); + } + + public void setNameColors(int pvps, int color) + { + _nameColors.put(pvps, color); + } + + public void setTitleColors(int pvps, int color) + { + _titleColors.put(pvps, color); + } + + public void updateNameColor(Player player) + { + _nameColors.forEach((kills, color) -> + { + if (player.getPkKills() >= kills) + + player.getAppearance().setTitleColor(color); + }); + } + + public void updateTitleColor(Player player) + { + _titleColors.forEach((kills, color) -> + { + if (player.getPvpKills() >= kills) + + player.getAppearance().setNameColor(color); + }); + } + + @Override + public void parseDocument(Document doc, Path path) + { + forEach(doc, "list", listNode -> forEach(listNode, "pvpcolors", pvpColors -> + { + forEach(pvpColors, "pvp", pVp -> + { + forEach(pVp, "title", titleColors -> + { + final NamedNodeMap pvpCls = titleColors.getAttributes(); + setTitleColors(parseInteger(pvpCls, "pvpKills"), Integer.decode("0x" + parseString(pvpCls, "color"))); + + }); + }); + + forEach(pvpColors, "pk", pK -> + { + forEach(pK, "name", nameColors -> + { + final NamedNodeMap pkCls = nameColors.getAttributes(); + setNameColors(parseInteger(pkCls, "pkKills"), Integer.decode("0x" + parseString(pkCls, "color"))); + }); + }); + + })); + } +} diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver.GameServer.java b/aCis_gameserver/java/net/sf/l2j/gameserver.GameServer.java index a707ce5..d247e2e 100644 --- a/aCis_gameserver/java/net/sf/l2j/gameserver.GameServer.java +++ b/aCis_gameserver/java/net/sf/l2j/gameserver.GameServer.java import net.sf.l2j.gameserver.data.xml.MultisellData; import net.sf.l2j.gameserver.data.xml.NewbieBuffData; import net.sf.l2j.gameserver.data.xml.NpcData; import net.sf.l2j.gameserver.data.xml.PlayerData; import net.sf.l2j.gameserver.data.xml.PlayerLevelData; +import net.sf.l2j.gameserver.data.xml.PvPColorSystem; import net.sf.l2j.gameserver.data.xml.RecipeData; import net.sf.l2j.gameserver.data.xml.ScriptData; import net.sf.l2j.gameserver.data.xml.SkillTreeData; StringUtil.printSection("Four Sepulchers"); FourSepulchersManager.getInstance(); StringUtil.printSection("Quests & Scripts"); ScriptData.getInstance(); + PvPColorSystem.getInstance(); if (Config.ALLOW_BOAT) { BoatManager.getInstance(); diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java index a707ce5..d247e2e 100644 --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java import net.sf.l2j.gameserver.data.xml.AdminData; import net.sf.l2j.gameserver.data.xml.AnnouncementData; import net.sf.l2j.gameserver.data.xml.MapRegionData.TeleportType; +import net.sf.l2j.gameserver.data.xml.PvPColorSystem; import net.sf.l2j.gameserver.enums.CabalType; import net.sf.l2j.gameserver.enums.SealType; import net.sf.l2j.gameserver.enums.SiegeSide; // Tutorial final QuestState qs = player.getQuestList().getQuestState("Tutorial"); if (qs != null) qs.getQuest().notifyEvent("UC", null, player); + PvpColorSystem.getInstance().updateNameColor(player); + PvpColorSystem.getInstance().updateTitleColor(player); player.sendPacket(ActionFailed.STATIC_PACKET); } @Override protected boolean triggersOnActionRequest() { return false; } diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/Player.java b/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/Player.java index a707ce5..d247e2e 100644 --- a/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/Player.java +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/Player.java import net.sf.l2j.gameserver.data.xml.MapRegionData.TeleportType; import net.sf.l2j.gameserver.data.xml.NpcData; import net.sf.l2j.gameserver.data.xml.PlayerData; import net.sf.l2j.gameserver.data.xml.PlayerLevelData; +import net.sf.l2j.gameserver.data.xml.PvPColorSystem; import net.sf.l2j.gameserver.enums.AiEventType; import net.sf.l2j.gameserver.enums.CabalType; import net.sf.l2j.gameserver.enums.GaugeColor; import net.sf.l2j.gameserver.enums.LootRule; // Check if it's pvp (cases : regular, wars, victim is PKer) if (checkIfPvP(target) || (targetPlayer.getClan() != null && getClan() != null && getClan().isAtWarWith(targetPlayer.getClanId()) && targetPlayer.getClan().isAtWarWith(getClanId()) && targetPlayer.getPledgeType() != Clan.SUBUNIT_ACADEMY && getPledgeType() != Clan.SUBUNIT_ACADEMY) || (targetPlayer.getKarma() > 0 && Config.KARMA_AWARD_PK_KILL)) { if (target instanceof Player) { // Add PvP point to attacker. setPvpKills(getPvpKills() + 1); + PvPColorSystem.getInstance().updateNameColor(this); // Send UserInfo packet to attacker with its Karma and PK Counter sendPacket(new UserInfo(this)); } } // Otherwise, killer is considered as a PKer. else if (targetPlayer.getKarma() == 0 && targetPlayer.getPvpFlag() == 0) { // PK Points are increased only if you kill a player. if (target instanceof Player) setPkKills(getPkKills() + 1); // Calculate new karma. + PvPColorSystem.getInstance().updateTitleColor(this); setKarma(getKarma() + Formulas.calculateKarmaGain(getPkKills(), target instanceof Summon)); // Unequip adventurer items. checkItemRestriction(); // Stop Pvp task if running. PvpFlagTaskManager.getInstance().remove(this, true); } } code for xml: diff --git a/aCis_datapack/data/xml/events.xml b/aCis_datapack/data/xml/pvpColors.xml new file mode 100644 index 0000000..6b7ef6f --- /dev/null +++ b/aCis_datapack/data/xml/pvpColors.xml +<?xml version="1.0" encoding="UTF-8"?> +<list> + <pvpcolors> + <pvp> + <title pvpKills = "1" color = "D4E9AA"/> + <title pvpKills = "2" color = "BDDB81"/> + <title pvpKills = "3" color = "A8CD5D"/> + <title pvpKills = "4" color = "91BD3A"/> + <title pvpKills = "5" color = "a4e8f9"/> + <title pvpKills = "6" color = "7bdaf2"/> + <title pvpKills = "7" color = "60ceea"/> + <title pvpKills = "8" color = "48b3ce"/> + <title pvpKills = "9" color = "F6ACDD"/> + <title pvpKills = "10" color = "F098D3"/> + <title pvpKills = "11" color = "DA75B8"/> + <title pvpKills = "12" color = "AF8BEE"/> + <title pvpKills = "13" color = "A276EF"/> + <title pvpKills = "14" color = "8A65CB"/> + <title pvpKills = "15" color = "A09CA6"/> + <title pvpKills = "16" color = "807C86"/> + <title pvpKills = "17" color = "544868"/> + </pvp> + <pk> + <name pkKills = "1" color = "D4E9AA"/> + <name pkKills = "2" color = "BDDB81"/> + <name pkKills = "3" color = "A8CD5D"/> + <name pkKills = "4" color = "91BD3A"/> + <name pkKills = "5" color = "a4e8f9"/> + <name pkKills = "6" color = "7bdaf2"/> + <name pkKills = "7" color = "60ceea"/> + <name pkKills = "8" color = "48b3ce"/> + <name pkKills = "9" color = "F6ACDD"/> + <name pkKills = "10" color = "F098D3"/> + <name pkKills = "11" color = "DA75B8"/> + <name pkKills = "12" color = "AF8BEE"/> + <name pkKills = "13" color = "A276EF"/> + <name pkKills = "14" color = "8A65CB"/> + <name pkKills = "15" color = "A09CA6"/> + <name pkKills = "16" color = "807C86"/> + <name pkKills = "17" color = "544868"/> + </pk> + </pvpcolors> +</list> Credits for this mod: LordPanic (I have been approved to upload his codes)
  5. As title says, simulating the damage u make vs the target. Currently works only for players (self too) . It's up to you if u want to add more creature instances. By default all simulations use ss/bss except bare hand hits. Known Issues* Simulation for chargeable physical (ex.tyrant,duelist) skills is not precise (auto hits,magical skills work fine). +else if(command.startsWith("_menuSimulation") || command.startsWith("_menuSelectSkill") || +command.startsWith("_menuDoSim")){ + DamageSimulator.getInstance().parseCmd(command, activeChar); +} DamageSimulation.java DimSim.java SimManager.java simulation.html Video with normal hits Video with skills Credits for this mod: LordPanic (I have been approved to upload his codes)
  6. thanks for share and welcome i edit your topic (letters color) because in dark theme i cant read. [Hidden Content]

Important Information

Privacy Notice: We utilize cookies to optimize your browsing experience and analyze website traffic. By consenting, you acknowledge and agree to our Cookie Policy, ensuring your privacy preferences are respected.