Jump to content
  • 0

Question

Recommended Posts

  • 0
Posted

everything fixed, I managed to read upon a different way of rewriting the code. now it runs smoothly and i got rid of the announcements because they were spamming the chat, instead its going to send a system message.

  • 0
Posted (edited)

Well, you can do it with switch, like (some old code)

Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java    (revision 198)
+++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java    (working copy)
@@ -4530,6 +4531,8 @@
         if (isMounted())
             stopFeed();
         
+        spreeKills = 0;
+        
         synchronized (this)
         {
             if (isFakeDeath())
@@ -4788,8 +4803,59 @@
      * Increase the pvp kills count and send the info to the player
      *
      */
+    private int spreeKills = 0;
+    
     public void increasePvpKills()
     {
+        spreeKills++;
+        
+        switch(spreeKills)
+        {
+        case 1:
+            //add skill code and w/e
+            break;
+            
+        case 2:
+            //add skill code and w/e
+            break;
+            
+        case 3:
+            //add skill code and w/e
+            break;
+            default:
+                ;
+        }   
         // Add karma to attacker and increase its PK counter
         setPvpKills(getPvpKills() + 1);

Well, it's good to put some sendMessage() so you can see if the code is working or not :P

Edited by SweeTs
  • 0
Posted (edited)

Yeah I see where you're going from, but the code might be unstable, im not really into switching.

 

 

besides if the entire code is not working, but in eclipse everything seems to be fine, I think its misplacing the code is fucking me up again.

Edited by ExtreameR
  • 0
Posted

I am checking your method right now I'll update with the result!

 

it has to be beneath

 

sendMessage("You have been rewarded with a skill.");

+addSKill(id, i);

  • 0
Posted (edited)

Yeah I know :L 

 

Edit: im currently due to some ECG scans, I will let you know in about 2 hours if it worked or not

Edited by ExtreameR
  • 0
Posted (edited)

I tried your way xdem, got nowhere.

 

 

I also tried it like this

 

if(combo == Config.COMBO1_KILLS)
{
sendMessage("You have been rewarded with a skill.");
addSkill(SkillTable.getInstance().getInfo(Config.COMBO_SKILL_ID, Config.COMBO1_LEVEL));
Announcements.getInstance().announceToAll("Player "+getName() + " is in a Combo Mode with " +combos +" pvp kills in a row!");
}
else if(combo == Config.COMBO2_KILLS)
{
sendMessage("You have been rewarded with a skill level 2.");
addSkill(SkillTable.getInstance().getInfo(Config.COMBO_SKILL_ID, Config.COMBO2_LEVEL));
Announcements.getInstance().announceToAll("Player "+getName() + " is in a Combo Mode with " +combos +" pvp kills in a row!");
}
else if(combo == Config.COMBO3_KILLS)
{
sendMessage("You have been rewarded with a skill level 3.");
addSkill(SkillTable.getInstance().getInfo(Config.COMBO_SKILL_ID, Config.COMBO3_LEVEL));
Announcements.getInstance().announceToAll("Player "+getName() + " is in a Combo Mode with " +combos +" pvp kills in a row!");
}
else if(combo == Config.COMBO4_KILLS)
{
sendMessage("You have been rewarded with a skill level 4.");
addSkill(SkillTable.getInstance().getInfo(Config.COMBO_SKILL_ID, Config.COMBO4_LEVEL));
Announcements.getInstance().announceToAll("Player "+getName() + " is in a Combo Mode with " +combos +" pvp kills in a row!");
}

that doesnt work either.

 

 

It just seem that that part of the code doesn't work at all config and Ini work perfectly fine.

Edited by ExtreameR
  • 0
Posted

debug your codes mate, the problem comes from another source, check configs and one by one the methods called

  • 0
Posted (edited)

its explained at the top devlin, I don't want to use you, i want to fix my own code :/ basically when a player reaches 5 kills without death and does not kill the guy 5 times with the same ip/clan/ally etc. he obtains a skill level 1

 

after another X amount of kills without death, he obtains skill level 2

 

after 5 more amount of kills without death obtains skill level 3

 

when he reaches the cap, skill level 5, it stops there.

 

when he dies or restarts the skills dissapears.

 

 

Nor I want newbies just to copy and paste it and claim it as theirs, i wanna make something that I've done and so it works :/

Edited by ExtreameR
Guest
This topic is now closed to further replies.



  • Posts

    • 🔥 HF Rework Multi-Proff x10 is coming! ⚔️ New Samurai Crow Client ⚔️ Reworked Systems & Progression ⚔️ Updated Instances ⚔️ Classic Multeria Atmosphere 🧪 Pre-OBT is already live! 📅 Official OBT: June 29 🚀 Launch: July 3 🐞 Report bugs during testing and earn valuable rewards at launch! See you on the battlefield! https://rework.multeria.world/
    • PlayCMS - это удобная система управления веб-сайтом, разработанная специально для игровых проектов Lineage 2. CMS позволяет быстро запустить полнофункциональный серверный сайт с регистрацией игроков, личным кабинетом, новостями, рейтингами, магазином, модулями и гибкой панелью администратора. Система ориентирована на владельцев серверов Lineage 2, которым нужен красивый, функциональный и понятный сайт без лишних сложностей.  PlayCMS уже предоставляет базовые функции для управления проектами, такие как публикация новостей, настройка страниц, работа с пользователями, подключение шаблонов, а также установка модулей и плагинов. Ключевые особенности PlayCMS: — удобная административная панель; — регистрация и авторизация игроков; — учетная запись пользователя; — новостные и информационные страницы; — рейтинги игроков и кланов; — поддержка шаблонов дизайна; — установка модулей и плагинов через административную панель; — магазин цифровых продуктов; — категории продуктов; — возможность добавить фавикон; — защита лицензии для административной панели; — адаптация для игровых проектов Lineage 2; — возможность расширения функционала в соответствии с потребностями сервера. PlayCMS подходит как для новых игровых проектов, так и для существующих серверов, которым нужен удобный сайт с современным дизайном и интуитивно понятным управлением. Система проста в настройке и поддерживает индивидуальные шаблоны, дополнительные плагины и модули, что позволяет вам развивать свой сайт параллельно с развитием сервера. PlayCMS — это готовое решение для владельцев серверов Lineage 2, которым нужен красивый, быстрый и функциональный сайт. Демоверсия —  https://demo.playcms.ru/ Я разработчик этого чуда. Я готов выслушать конструктивную критику, а также ваши предложения по улучшению движка. Кроме того, я пишу модули любой сложности для этой CMS. Свяжитесь со мной: Telegram — @playcms       EN   PlayCMS is a user-friendly website management system designed specifically for Lineage 2 gaming projects. The CMS allows you to quickly launch a fully functional server website with player registration, personal account, news, ratings, a store, modules, and a flexible admin panel. The system is focused on Lineage 2 server owners who need a beautiful, functional, and clear website without unnecessary complexity. PlayCMS already provides basic features for project management, such as publishing news, customizing pages, working with users, connecting templates, and installing modules and plugins. Key Features of PlayCMS: — a convenient administrative panel; — player registration and authorization; — user account; — news and information pages; — player and clan ratings; — support for design templates; — installation of modules and plugins through the admin panel; — digital product store; — product categories; — ability to add a favicon; — license protection for the admin panel; — adaptation for Lineage 2 game projects; — the ability to expand functionality to meet the needs of the server. PlayCMS is suitable for both new gaming projects and existing servers that require a user-friendly website with a modern appearance and intuitive management. The system is easy to configure and supports individual templates, additional plugins, and modules, allowing you to develop your website alongside your server. PlayCMS is a ready-made solution for Lineage 2 server owners who need a beautiful, fast, and functional website. Demo - https://demo.playcms.ru/ I am the developer of this miracle. I am ready to listen to constructive criticism, as well as your suggestions for improving the engine. I also write modules of any complexity for this cms. Contact me: Telegram - @playcms   Скачать\Download : https://drive.google.com/file/d/15Az9WVDD4SQNyOPAsXMU4-mGHOiA_U_d/view    
    • To increase visibility and make sure your offer reaches the right audience, I'd recommend exploring the tools at CS2WH. They have a Deals Bot that might help you track market prices and adjust your strategy on the fly. I'm finding their resources super helpful for keeping tabs on the trading scene. Plus, they emphasize safety and provide insights on legal skin trading, which is crucial for maintaining credibility.
    • I'm also trying to contact them, and I only have their Telegram contact, probably the same one as yours, and I haven't received a response in months.
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..