Jump to content
  • 0

Question

Posted

I want to add this code: http://www.maxcheaters.com/topic/49498-sharehero-reward-for-pvps/?hl=%2Bhero+%2Breward+%2Bpvps

Its about giving hero at x pvp's.
 

+public void increasePvpKills(L2PcInstance activeChar)

+if (activeChar.getPvpKills() >= 5000)
        {
       activeChar.sendMessage ("Congratz , you are now a hero ");
        activeChar.setHero(true);
        }

I wonder if there is a way of keeping 

- public void increasePvpKills()

beacause when i change the public void to

public void increasePvpKills(L2PcInstance activeChar) 

  i get erros in some other codes.

Recommended Posts

  • 0
Posted (edited)

I want to add this code: http://www.maxcheaters.com/topic/49498-sharehero-reward-for-pvps/?hl=%2Bhero+%2Breward+%2Bpvps

 

Its about giving hero at x pvp's.

 

+public void increasePvpKills(L2PcInstance activeChar)

+if (activeChar.getPvpKills() >= 5000)
        {
       activeChar.sendMessage ("Congratz , you are now a hero ");
        activeChar.setHero(true);
        }

I wonder if there is a way of keeping 

- public void increasePvpKills()

beacause when i change the public void to

public void increasePvpKills(L2PcInstance activeChar) 

  i get erros in some other codes.

bad code but... ok 

 

 

increasePvpKills(L2PcInstance activeChar

 

if (activeChar.getPvpKills() >= 5000)

{

activeChar.sendMessage ("Congratz , you are now a hero ");

activeChar.setHero(true);

}

remove red letters  no need since we are already inside L2PcInstance class.

Edited by AbSoLuTePoWeR
  • 0
Posted (edited)

bad code but... ok 

 

 

increasePvpKills(L2PcInstance activeChar

 

if (activeChar.getPvpKills() >= 5000)

{

activeChar.sendMessage ("Congratz , you are now a hero ");

activeChar.setHero(true);

}

remove red letters  no need since we are already inside L2PcInstance class.

well i did not find any better version of this code so i guess i have to deal with it.

 

Thanks again for your answer it worked.

How can i make it to give hero forever? After restarting hero was gone.

Edited by Rio
  • 0
Posted

well i did not find any better version of this code so i guess i have to deal with it.

 

Thanks again for your answer it worked.

How can i make it to give hero forever? After restarting hero was gone.

pack? in gameserver.model.entity.Hero.java there is a method activatehero or puthero look this method and you can make your own like this.

  • 0
Posted

Im using l2jfrozen.
im a bit confused should i post this code
in gamserver.model.entity.hero.java?

  • 0
Posted

Im using l2jfrozen.

im a bit confused should i post this code

in gamserver.model.entity.hero.java?

no. read the code. and try to understand how is working.

i am not talking about the whole hero.java. i am talking about the methods-voids inside hero.java about the void puthero or activehero.

 

this void will help you to understand how to make your char hero with out gone in restart.

  • 0
Posted

Here is the code 

public void putHero(L2PcInstance player, boolean isComplete)
    {
        try
        {
            if (Config.DEBUG)
            {
                System.out.println("Adding new hero");
                System.out.println("Name:" + player.getName());
                System.out.println("ClassId:" + player.getClassId().getId());
            }
            StatsSet newHero = new StatsSet();
            newHero.set(Olympiad.CHAR_NAME, player.getName());
            newHero.set(Olympiad.CLASS_ID, player.getClassId().getId());
            newHero.set(COUNT, 1);
            newHero.set(PLAYED, 1);
            _heroes.put(player.getObjectId(),newHero);
            if (isComplete)
                _completeHeroes.put(player.getObjectId(),newHero);
        }
        catch (Exception e)
        {
            /*   */
        }
    }

but i have not idea how to modify it.

  • 0
Posted

Here is the code 

You can go with tessa's way OR you can add putHero anywhere in L2PcInstance.java

public void putHero(L2PcInstance player, boolean isComplete)
    {
        try
        {
            StatsSet newHero = new StatsSet();
            newHero.set(Olympiad.CHAR_NAME, player.getName());
            newHero.set(Olympiad.CLASS_ID, player.getClassId().getId());
            newHero.set(COUNT, 1);
            newHero.set(PLAYED, 1);
            _heroes.put(player.getObjectId(),newHero);
            if (isComplete)
                _completeHeroes.put(player.getObjectId(),newHero);
        }
        catch (Exception e)
        {

        }
    }

and then find the method increasePvPKills()  at L2PcInstance.java

and add a check if (player.getPvPkills() == XX && !_completeHeroes.contains(player.getObjectId))

 

 

which basicaly will make the player hero if he reach the proper pvp kills and no contained in the list.

Even tho u need to save and load it somewhere and this way suck.. but is kinda an idea on how to make it.

  • 0
Posted (edited)

OR you can add putHero anywhere in L2PcInstance.java

 

Nonnonnonononononnonononnnonono sir. Leave Britney the method alone (and where it belongs) !

 

All in one it's a terrible idea to put it permanent, you will probably mess Olympiads system.

Edited by Tryskell
  • 0
Posted (edited)

Nonnonnonononononnonononnnonono sir. Leave Britney the method alone (and where it belongs) !

 

All in one it's a terrible idea to put it permanent, you will probably mess Olympiads system.

Wait the "will probably mess olympiad system" ok but he ask about the code, normally he should make a row in characters "isHero" and store it as int there even tho again it wont appear in olympiad manager.

 

So about the code, open your navicat and characters find isNoble row and also find it inside L2PcInstance at the 2 sql

RESTORE_CHARACTER, UPDATE_CHARACTER      and add a new one and call it  isHero and basicaly do the same as isNoble does.. add the line at statement and where it loads, store values

and make two methods isPermaHero() that return the boolean _isPermaHero  and another one setPermaHero(boolean h) that set value at _isPermaHero = h;

 

and then find the method increasePvPKills(L2PcInstance activeChar) at L2PcInstance and add your check

 

if (activeChar.getPvPKills() == 1000 && !activeChar.isPermaHero())

{

    activeChar.setPermaHero(true); //set var as true so it can be stored

    activeChar.setHero(true); //set current hero

    activeChar.sendMessage("Congrats, you reached 1000 pvp's, you earned hero's status!");

}

 

even if server shutdown or character logs out, it will store at characters as if it was noble or vip or whatever.

 

Ps. tryskell first time you write a comment without being 333 lines, im proud of you honey <3

Edited by AccessDenied
  • 0
Posted

I write big posts only when there is a need to argue or to explain, nothing more, nothing less.

 

And my disease seems to spread, as you act like that. My machiavelic plan works !

  • 0
Posted

You have to add only on l2pcinstance.java all the code..

There is some better quake pvp systems and add your own effects/hero/annoounce

  • 0
Posted

I write big posts only when there is a need to argue or to explain, nothing more, nothing less.

 

And my disease seems to spread, as you act like that. My machiavelic plan works !

to be honest i love it when u do it :3

Guest
This topic is now closed to further replies.


  • Posts

    • Greetings, everyone. I am sharing a configuration designed for any code editor/console with AI agents. This setup allows for expanded context and highly specific skills depending on your project requirements. It also comes with reusable skills ready for immediate use. Current configuration covers: WEB, L2j server datapacks, and L2j dev (including skills for handling decompiled Java datapacks, etc.). I have left a LINK to the original video on which this specific configuration is based. It also contains brief guides on how to implement new skills. You can simply ask your AI agent to review the guide to get started.   https://github.com/zambo420/Supercharge-your-AI-assistant-for-WEB-and-L2-DATAPACKS-dev.-.git   # 🤖 AI Skills Starter Kit - Forum Quick Start > **Supercharge your AI assistant (Claude, Gemini, Copilot)** ## ⚡ Installation in 2 Minutes   ### 1. Download and copy Copy the `Agents AI install in project/` folder to your project root.   ### 2. Rename and structure ``` your-project/ ├── skills/                      # Rename skills_reutilizables → skills │   ├── skill-creator/ │   ├── react-19/               # Copy the ones you need │   ├── typescript/ │   └── setup.ps1               # Copy from templates/ ├── AGENTS.md                    # Copy from templates/AGENTS.md.template └── src/                         # Your code ```   ### 3. Edit AGENTS.md Customize with your skills:   ```markdown   ## Available Skills | Skill | Description | File | |-------|-------------|------| | `react-19` | React 19 patterns | [SKILL.md](skills/react-19/SKILL.md) |   ## Auto-invoke Skills | Action | Skill | |--------|-------| | Working with React components | `react-19` | ```   ### 4. Sync ```powershell .\skills\setup.ps1 ```   ### 5. Done! Restart your AI assistant and start working.   ---   ## 📦 Included Skills (56 Total) ### Frontend - `react-19` - React 19, hooks, RSC - `typescript` - TypeScript patterns - `tailwind-4` - TailwindCSS v4 - `vite` - Build configuration - `zustand-5` - State management - `nextjs-15` - Next.js 15 - `i18next` - Internationalization - `react-router` - React Router v7 ### Backend - `zod-4` - Validation schemas - `ioredis` - Redis caching - `jwt` - JWT authentication - `django-drf` - Django REST Framework ### Testing & AI - `playwright` - E2E testing - `pytest` - Python testing - `ai-sdk-5` - Vercel AI SDK ### Utilities - `skill-creator` - Create new skills - `java-ant-build` - Apache Ant build system - `jira-epic` - Create Jira epics - `jira-task` - Create Jira tasks ### L2J/Game Server (33 skills) - `gameserver-data` - XMLs, multisells, spawns, NPCs - `gameserver-config` - Server configuration files - `authserver-config` - Login server configuration - `client-files` - Client textures, L2Text, system - `lucera2-core` - L2J core patterns, base classes - `lucera2-handlers` - Admin/user commands, bypass - `lucera2-services` - Community Board, ACP, Buffer - `lucera2-scripts` - Quests, NPCs, bosses, events - `lucera2-network` - Network packets - `lucera2-geodata` - Pathfinding, line of sight - `lucera2-ai` - NPC AI, monster behavior - `lucera2-zones` - Zone scripts, restrictions - `lucera2-achievements` - Achievement system - `lucera2-phantoms` - Fake players (bots) - `lucera2-data` - XML/SQL parsers, holders - `lucera2-authserver` - Login server Java code - `lucera2-olympiad` - Olympiad, heroes, nobles - `lucera2-residences` - Castles, clan halls, siege - `lucera2-skills-effects` - Skill effects, conditions - `lucera2-telegram` - Telegram bot integration - `lucera2-events-pvp` - TvT, GvG, CTF events - `lucera2-seasonal-events` - Holiday events - `lucera2-npc-instances` - Custom NPC types - `lucera2-items-inventory` - Items, inventory - `lucera2-clans-alliances` - Clans, wars - `lucera2-voting-ranking` - Voting rewards - `lucera2-siege-duel` - Siege, duel mechanics - `lucera2-pets-summons` - Pets, servitors - `lucera2-promo-rewards` - Promo codes, daily rewards - `lucera2-item-handlers` - Item handlers - `lucera2-instances-dungeons` - Instance dungeons - `lucera2-minigames` - Lottery, Fishing - `lucera2-autofarm` - AutoFarm bot system - `lucera2-party-matching` - Party finder - `lucera2-cursed-weapons` - Zariche, Akamanah - `lucera2-vip-premium` - VIP/premium accounts - `lucera2-extjar-projects` - Creating .ext.jar projects ---   ## 🎯 The Magic Trick The **Auto-invoke** table is the key:   ```markdown ## Auto-invoke Skills   | Action | Skill | |--------|-------| | Creating React components | `react-19` | | Adding TypeScript types | `typescript` | | Writing E2E tests | `playwright` | ```   **Without this table, AI ignores skills.** With it, they load automatically.   ---   ## 📁 Important Files | File | Purpose | |------|---------| | `AGENTS.md` | Main agent configuration | | `skills/setup.ps1` | Syncs to .claude/.gemini/.github | | `skills/*/SKILL.md` | Each skill definition |   ---   ## 💡 Tips 1. **One place only**: Keep all skills in `skills/` 2. **Auto-invoke**: Without this table, it won't work 3. **setup.ps1**: Run after every change 4. **Restart**: AI needs restart to load changes   ---   ## 🔧 Create Your Own Skill   ```markdown --- name: my-skill description: My skill description ---   ## When to Use - When to use this skill   ## Key Patterns - Important patterns   ## Code Examples \`\`\`typescript // Code example \`\`\` ```   Add to AGENTS.md and run `.\skills\setup.ps1`.   ---   ## 🤝 Compatibility - ✅ Claude Code (Antigravity) - ✅ Gemini CLI - ✅ GitHub Copilot - ✅ Cursor - ✅ Any AI that supports AGENTS.md   ---   ## 📚 More Info See `README.md` for complete guide and detailed documentation.    
    • hello guys im searching these days to find something like a patch interface i dont know what it is i logged in many servers i love like those graphics the titles and names are more smooth with bold letters ..i logged in euro-pvp.com but deazel(lucera dev) told me that euro-pvp has multiprotocol with interlude and classic ... and i found a server with name l2gamepower thats only interlude and has same graphics .. can someone explain me or help me how can i have this graphics with namers titles more bold letters and in log in has a name with a patch    https://imgur.com/a/0HzBKWk
    • For the first time in thousands of posts I've read on this forum, I’ve actually found a message that is enriching on both a personal and professional level. I’ll take your advice to heart: I’m going to start creating more and stop overthinking things that get me nowhere. I totally agree about the toxic community; it's a shame. Time to keep working. Thanks a lot for your input.   Exactly, that’s why the Scryde method and their merge system work so well. People don't lose their progress and can still keep rushing new servers. Obviously, gameplay has mutated into something much faster-paced, but obviously, this happens in real life too, everyone is more accelerated and on edge. Thanks to social media and mental conditioning. But, well, it’s something we have to accept. Don't even get me started on gambling and online casinos; that’s a whole other topic regarding all the P2W servers.   Really, amen bro.
  • 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..

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock