Jump to content

Recommended Posts

Posted (edited)

Hello members of maxcheaters!

 

I have make this idea for my test project. It's a small code.

Example: if a player is mage or fighter in x pvp count, will get Custom Tattoo. (Fighter or Mage depending in class)!

You can choose the count of pvp and Tattoo id you want on config.

 

It's for pvp server.. with this, the pvp has more interest.

I've seen in l2mora, giving an item pvp in every pvp, for to get these tattoos .. now instead be given an item pvp in each pvp, given once, with the count of pvp want.

 

I think it would be best if given like this way. To have importance the pvps and trade.

For example, players will trade, since it does not exist in the shop, and will go for pvp, instead of waiting for the vote reward!

 

An example for for stats on tattoos:

Data/stats/armor/0400-0499.xml

<item id='492' name="Tattoo of Soul">
  <for>
    <set val='500' order='0x010' stat='pAtk'/>
    <set val='300' order='0x010' stat='pAtkSpd'/>
    <set val='15' order='0x010' stat='rCrit'/>
    <add val='100' order='0x10' stat='pDef'/>
    <add val='50' order='0x010' stat='runSpd'/>
    <add val='100' order='0x10' stat='mDef'/>
    <enchant val='0' order='0x0C' stat='pDef'/>
  </for>
</item>
<item id='493' name="Tattoo of Avadon">
  <for>
    <set val='500' order='0x010' stat='mAtk'/>
    <set val='300' order='0x010' stat='mAtkSpd'/>
    <set val='15' order='0x010' stat='mCrit'/>
    <add val='50' order='0x010' stat='runSpd'/>
    <add val='100' order='0x10' stat='pDef'/>
    <add val='100' order='0x10' stat='mDef'/>
    <enchant val='0' order='0x0C' stat='pDef'/>
  </for>
</item>

NOTE: On your Lineage 2 system find armorgrp.dat and do there a edit. (With L2FileEdit). Find the tattoo's name and replace "Tattoo of soul with Fighter Tattoo" and "Tattoo of Avadon with Mage Tattoo".

 

http://pastebin.com/TjyTWj6c

Edited by 'Baggos'
Posted (edited)

I'm sure this doesn't work as expected! :lol:

Will you try to find why?

+       if (isMageClass())
+       return;
Edited by Tessa
Posted (edited)

I'm sure this doesn't work as expected! :lol:

Will you try to find why?

Yes, but in private message do not fill again. :lol:

 

Or make edit your post and i'll see...

+       if (isMageClass())
+       return;

What with this? :-\  We need to get it out, and put something else?

 

this?

-       if (isMageClass())
-       return;

+       if (getClassId() == ClassId.mage)
+       return;

Or all this is wrong?

Edited by 'Baggos'
Posted (edited)

Yes, but in private message do not fill again. :lol:

 

Or make edit your post and i'll see...

+       if (isMageClass())
+       return;

What with this? :-\  We need to get it out, and put something else?

this?

if (getClassId() == ClassId.mage)
   return;

Or all this is wrong?

mate just do it: 

 

+ if (Config.FIGHTER_TATTOO_ENABLE && pvpKillCount == Config.PVP_COUNT && !isMageClass())
+ {
+ addItem(Config.TATTOO_FIGHTER_ID);
+ sendMessage("Congratulations! " + Config.PVP_COUNT + "  PvP Kills! You won Fighter Tattoo.");
 also here need a invetory-items update
+ }
+ else if(Config.MAGE_TATTOO_ENABLE && pvpKillCount == Config.PVP_COUNT1 )
+     {
+        addItem(Config.TATTOO_MAGE_ID);
+ sendMessage("Congratulations! " + Config.PVP_COUNT + "  PvP Kills! You won Mage Tattoo.");
 also here need a invetory-items update
+ }
+ }
Edited by AbSoLuTePoWeR
Posted (edited)

Updated on this:

Thank you AbsolutePower for your replay...

Tessa Thank you also... :P :lol:

-       // Check if the character is Mage, and if is, do not give Fighter Tattoo.
-       if (isMageClass())
-        return;
-            
-       if (Config.FIGHTER_TATTOO_ENABLE && pvpKillCount == Config.PVP_COUNT)
 
+       if (Config.FIGHTER_TATTOO_ENABLE && pvpKillCount == Config.PVP_COUNT && !isMageClass())
 
        {
        addItem(Config.TATTOO_FIGHTER_ID);
        sendMessage("Congratulations! " + Config.PVP_COUNT + "  PvP Kills! You won Fighter Tattoo.");
+       getInventory().updateDatabase();
        }
-       else if(Config.MAGE_TATTOO_ENABLE && pvpKillCount == Config.PVP_COUNT1 && !isMageClass())
+       else if(Config.MAGE_TATTOO_ENABLE && pvpKillCount == Config.PVP_COUNT1)
        {
        addItem(Config.TATTOO_MAGE_ID);
        sendMessage("Congratulations! " + Config.PVP_COUNT + "  PvP Kills! You won Mage Tattoo.");
+       getInventory().updateDatabase();
    }
}

I do not think updateDatabase be a problem ... but i put it .

Edited by 'Baggos'
Posted

Almost done... :lol:

Now you should correct the addItem() method, because I'm not sure if your current code will give something to someone!

Posted (edited)

Almost done... :lol:

Now you should correct the addItem() method, because I'm not sure if your current code will give something to someone!

Yesterday i tried with fighter and gave two, as i had no class check.

Now why not? :P

The PC, does not open the second window Lineage will burn. :lol:

Yesterday i was in a friend. haha

Edited by 'Baggos'
Posted (edited)

Are you sure?

addItem(Config.TATTOO_FIGHTER_ID);

Which pack uses only 1 argument?

 

You trying to call your own method by this... it's not a good practice to name your methods like that, addItem already exists.

Edited by Tessa
Posted

 

mate just do it: 

 

+ if (Config.FIGHTER_TATTOO_ENABLE && pvpKillCount == Config.PVP_COUNT && !isMageClass())
+ {
+ addItem(Config.TATTOO_FIGHTER_ID);
+ sendMessage("Congratulations! " + Config.PVP_COUNT + "  PvP Kills! You won Fighter Tattoo.");
 also here need a invetory-items update
+ }
+ else if(Config.MAGE_TATTOO_ENABLE && pvpKillCount == Config.PVP_COUNT1 )
+     {
+        addItem(Config.TATTOO_MAGE_ID);
+ sendMessage("Congratulations! " + Config.PVP_COUNT + "  PvP Kills! You won Mage Tattoo.");
 also here need a invetory-items update
+ }
+ }

 

it won't work,lol.check the way he created the method he calls.

 

baggos,there's no reason to make your life harder by doing all these(which doesn't work btw) stuff for something simple.

check below,for such a code you need just a simple check in the place that pvps are increased,nothing else.

 

### Eclipse Workspace Patch 1.0
#P gameserver
Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java    (revision 42)
+++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java    (working copy)
@@ -4811,6 +4811,18 @@
         // Add karma to attacker and increase its PK counter
         setPvpKills(getPvpKills() + 1);
         
+        if (getPvpKills() == 100)
+        {
+            if (!isMageClass())
+            {
+                addItem("PvP Reward", Config.REWARD_FIGHTER_ID, Config.REWARD_FIGHTER_COUNT, this, true);
+                sendMessage("You've been rewarded with a fighter tattoo");
+            }
+            else
+               {
+                addItem("PvP Reward", Config.REWARD_MAGE_ID, Config.REWARD_MAGE_COUNT, this, true);
+                    sendMessage("You've been rewarded with a mage tatoo");
+               }
+        }
+        
         PvpPkColorSystem.getInstance().checkPvpColors(this);
 
         // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter
Index: java/net/sf/l2j/Config.java
===================================================================
--- java/net/sf/l2j/Config.java    (revision 41)
+++ java/net/sf/l2j/Config.java    (working copy)
@@ -422,6 +422,11 @@
     /** Buffs */
     public static boolean STORE_SKILL_COOLTIME;
     public static byte BUFFS_MAX_AMOUNT;
+    
+    public static int REWARD_FIGHTER_ID;
+    public static int REWARD_FIGHTER_COUNT;
+    public static int REWARD_MAGE_ID;
+    public static int REWARD_MAGE_COUNT;
     
     //--------------------------------------------------
     // Server
@@ -1134,6 +1139,10 @@
                 
                 BUFFS_MAX_AMOUNT = Byte.parseByte(players.getProperty("MaxBuffsAmount","20"));
                 STORE_SKILL_COOLTIME = Boolean.parseBoolean(players.getProperty("StoreSkillCooltime", "true"));
+                REWARD_FIGHTER_ID = Integer.parseInt(players.getProperty("RewardFighterID","1"));
+                REWARD_FIGHTER_COUNT = Integer.parseInt(players.getProperty("RewardFightCount","2"));
+                REWARD_MAGE_ID = Integer.parseInt(players.getProperty("RewardMageId","3"));
+                REWARD_MAGE_COUNT = Integer.parseInt(players.getProperty("RewardMageCount","4"));
             }
             catch (Exception e)
             {
Index: config/players.properties
===================================================================
--- config/players.properties    (revision 41)
+++ config/players.properties    (working copy)
@@ -310,4 +310,10 @@
 MaxBuffsAmount = 20
 
 # Store buffs/debuffs on user logout?
-StoreSkillCooltime = True
\ No newline at end of file
+StoreSkillCooltime = True
+
+#Class Based pvp reward at 100 pvps
+RewardFighterID = 1
+RewardFighterCount = 2
+RewardMageID = 3
+RewardMageCount = 4
\ No newline at end of file
Posted

 

it won't work,lol.check the way he created the method he calls.

 

baggos,there's no reason to make your life harder by doing all these(which doesn't work btw) stuff for something simple.

check below,for such a code you need just a simple check in the place that pvps are increased,nothing else.

### Eclipse Workspace Patch 1.0
#P gameserver
Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java    (revision 42)
+++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java    (working copy)
@@ -4811,6 +4811,18 @@
         // Add karma to attacker and increase its PK counter
         setPvpKills(getPvpKills() + 1);
         
+        if (getPvpKills() == 100)
+        {
+            if (!isMageClass())
+            {
+                addItem("PvP Reward", Config.REWARD_FIGHTER_ID, Config.REWARD_FIGHTER_COUNT, this, true);
+                sendMessage("You've been rewarded with a fighter tattoo");
+            }
+            else
+               {
+                addItem("PvP Reward", Config.REWARD_MAGE_ID, Config.REWARD_MAGE_COUNT, this, true);
+                    sendMessage("You've been rewarded with a mage tatoo");
+               }
+        }
+        
         PvpPkColorSystem.getInstance().checkPvpColors(this);
 
         // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter
Index: java/net/sf/l2j/Config.java
===================================================================
--- java/net/sf/l2j/Config.java    (revision 41)
+++ java/net/sf/l2j/Config.java    (working copy)
@@ -422,6 +422,11 @@
     /** Buffs */
     public static boolean STORE_SKILL_COOLTIME;
     public static byte BUFFS_MAX_AMOUNT;
+    
+    public static int REWARD_FIGHTER_ID;
+    public static int REWARD_FIGHTER_COUNT;
+    public static int REWARD_MAGE_ID;
+    public static int REWARD_MAGE_COUNT;
     
     //--------------------------------------------------
     // Server
@@ -1134,6 +1139,10 @@
                 
                 BUFFS_MAX_AMOUNT = Byte.parseByte(players.getProperty("MaxBuffsAmount","20"));
                 STORE_SKILL_COOLTIME = Boolean.parseBoolean(players.getProperty("StoreSkillCooltime", "true"));
+                REWARD_FIGHTER_ID = Integer.parseInt(players.getProperty("RewardFighterID","1"));
+                REWARD_FIGHTER_COUNT = Integer.parseInt(players.getProperty("RewardFightCount","2"));
+                REWARD_MAGE_ID = Integer.parseInt(players.getProperty("RewardMageId","3"));
+                REWARD_MAGE_COUNT = Integer.parseInt(players.getProperty("RewardMageCount","4"));
             }
             catch (Exception e)
             {
Index: config/players.properties
===================================================================
--- config/players.properties    (revision 41)
+++ config/players.properties    (working copy)
@@ -310,4 +310,10 @@
 MaxBuffsAmount = 20
 
 # Store buffs/debuffs on user logout?
-StoreSkillCooltime = True
\ No newline at end of file
+StoreSkillCooltime = True
+
+#Class Based pvp reward at 100 pvps
+RewardFighterID = 1
+RewardFighterCount = 2
+RewardMageID = 3
+RewardMageCount = 4
\ No newline at end of file

I made my own way, because I did not want to do copy/paste, but I had to get an idea of ​​how to do it.

Yesterday I tried like you, without the "pvpkillCount" is work, and i thought all will work if i put only addItem.Configblabla.

For the reason to i create something new and not like all this is already share...

This is my false... I wanted something new. and probably needs more knowledge than i thought.

Anyway... Updated with your choose... also with ""if (getPvpKills() == Config.PVP_COUNT)"" and choose enable or not..

Thank thus nevertheless..

Posted

nice! =)

 

As I said for something like that - i mean such small and easy2do codes - there isn't any reason to make your life harder.Just use the existing methods and you are done.

 

gl in your next ones

Posted (edited)

That's logically wrong, kinda..

+                       // Add Fighter or Mage Tattoos
+                       if (getPvpKills() == Config.PVP_COUNT)
+                       {
+                       if (Config.FIGHTER_TATTOO_ENABLE && !isMageClass())
+                       {
+                       addItem("Tattoo", Config.TATTOO_FIGHTER_ID, Config.FIGHTER_TATTOO_COUNT, this, true);
+                       sendMessage("Congratulations! " + Config.PVP_COUNT + "  PvP Kills! You won Fighter Tattoo.");
+                       }
+                       else if(Config.MAGE_TATTOO_ENABLE)
+                       {
+                       addItem("Tattoo", Config.TATTOO_MAGE_ID, Config.MAGE_TATTOO_COUNT, this, true);
+                       sendMessage("Congratulations! " + Config.PVP_COUNT + "  PvP Kills! You won Mage Tattoo.");
+                       }
+                       }

From my pov, first of all, you should check if the config is enabled. If yes, proceed, else do nothing. :P

Edited by SweeTs
Posted (edited)

That's logically wrong, kinda..

+                       // Add Fighter or Mage Tattoos
+                       if (getPvpKills() == Config.PVP_COUNT)
+                       {
+                       if (Config.FIGHTER_TATTOO_ENABLE && !isMageClass())
+                       {
+                       addItem("Tattoo", Config.TATTOO_FIGHTER_ID, Config.FIGHTER_TATTOO_COUNT, this, true);
+                       sendMessage("Congratulations! " + Config.PVP_COUNT + "  PvP Kills! You won Fighter Tattoo.");
+                       }
+                       else if(Config.MAGE_TATTOO_ENABLE)
+                       {
+                       addItem("Tattoo", Config.TATTOO_MAGE_ID, Config.MAGE_TATTOO_COUNT, this, true);
+                       sendMessage("Congratulations! " + Config.PVP_COUNT + "  PvP Kills! You won Mage Tattoo.");
+                       }
+                       }

From my pov, first of all, you should check if the config is enabled. If yes, proceed, else do nothing. :P

 

That's logically wrong, kinda..

+                       // Add Fighter or Mage Tattoos
+                       if (getPvpKills() == Config.PVP_COUNT)
+                       {
+                       if (Config.FIGHTER_TATTOO_ENABLE && !isMageClass())
+                       {
+                       addItem("Tattoo", Config.TATTOO_FIGHTER_ID, Config.FIGHTER_TATTOO_COUNT, this, true);
+                       sendMessage("Congratulations! " + Config.PVP_COUNT + "  PvP Kills! You won Fighter Tattoo.");
+                       }
+                       else if(Config.MAGE_TATTOO_ENABLE)
+                       {
+                       addItem("Tattoo", Config.TATTOO_MAGE_ID, Config.MAGE_TATTOO_COUNT, this, true);
+                       sendMessage("Congratulations! " + Config.PVP_COUNT + "  PvP Kills! You won Mage Tattoo.");
+                       }
+                       }

From my pov, first of all, you should check if the config is enabled. If yes, proceed, else do nothing. :P

you are right,I didnt noticed it

Edited by Fanky
Posted (edited)

That's logically wrong, kinda..

+                       // Add Fighter or Mage Tattoos
+                       if (getPvpKills() == Config.PVP_COUNT)
+                       {
+                       if (Config.FIGHTER_TATTOO_ENABLE && !isMageClass())
+                       {
+                       addItem("Tattoo", Config.TATTOO_FIGHTER_ID, Config.FIGHTER_TATTOO_COUNT, this, true);
+                       sendMessage("Congratulations! " + Config.PVP_COUNT + "  PvP Kills! You won Fighter Tattoo.");
+                       }
+                       else if(Config.MAGE_TATTOO_ENABLE)
+                       {
+                       addItem("Tattoo", Config.TATTOO_MAGE_ID, Config.MAGE_TATTOO_COUNT, this, true);
+                       sendMessage("Congratulations! " + Config.PVP_COUNT + "  PvP Kills! You won Mage Tattoo.");
+                       }
+                       }

From my pov, first of all, you should check if the config is enabled. If yes, proceed, else do nothing. :P

 

You mean this way?

+  // Add Fighter or Mage Tattoos
+  if (Config.REWARD_TATTOOS_ENABLE && !isMageClass())
+  {
+  if (getPvpKills() == Config.PVP_COUNT)
+  {
+  addItem("Tattoo", Config.TATTOO_FIGHTER_ID, Config.FIGHTER_TATTOO_COUNT, this, true);
+  sendMessage("Congratulations! " + Config.PVP_COUNT + "  PvP Kills! You won Fighter Tattoo.");
+  }
+  else
+  {
+  addItem("Tattoo", Config.TATTOO_MAGE_ID, Config.MAGE_TATTOO_COUNT, this, true);
+  sendMessage("Congratulations! " + Config.PVP_COUNT + "  PvP Kills! You won Mage Tattoo.");
+  }
+  }
+  }
Edited by 'Baggos'
Posted (edited)

Wrong.. :D

 

Try to understand the code, let me explain

if (Config.FIGHTER_TATTOO_ENABLE && Config.MAGE_TATTOO_ENABLE && !isMageClass())

If fighter and mage tatto enabled and the char is not mage.

 

Also rest of the code is logically wrong as well.

 

Well, it's kinda stupid to have 2 options for fighter and mage tattoo, since why you would reward only one class, so you can make it only with one config and use Fanky version

if (Config.CUSTOM_TATTOO_ENABLE)
{
        if (getPvpKills() == 100)
        {
            if (!isMageClass())
            {
                addItem("PvP Reward", Config.REWARD_FIGHTER_ID, Config.REWARD_FIGHTER_COUNT, this, true);
                sendMessage("You've been rewarded with a fighter tattoo");
            }
            else
               {
                addItem("PvP Reward", Config.REWARD_MAGE_ID, Config.REWARD_MAGE_COUNT, this, true);
                    sendMessage("You've been rewarded with a mage tatoo");
               }
        }
}

Otherwise, you have to check 2 times the pvp count (if for example you enable fighter, and disable mage), one check for fighter and then the same shit for mage. :)

Edited by SweeTs

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



  • Posts

    • 11-29-2025 - OUR TOPIC IS RELEVANT! CONTACT US BY THE CONTACTS BELOW
    • 🔥 Launch was a success! Over 500 players joined L2Elixir on opening day, and we are holding a steady 420–450 online! We faced extortion attempts and heavy DDoS attacks, but our protections held strong — even if the cost was far higher than expected. What matters is we fought back and kept the server online for you. ⚔️ 💙 Our priority is simple: Deliver a stable, fair, and growing server that will evolve for years to come. We continue to invest in protections, advertising, and development — and we won’t stop. All we ask from YOU is one thing: 👉 Keep playing. The more active the community is, the faster the server grows. 💠 Important Note: We have no paid clans or CPs, no “boosted” groups, no unfair benefits. Everyone has an equal chance to progress and compete. Thank you to everyone who joined, supported, and believed in this project. Let’s make L2Elixir great again — even in 2025–2026! 🚀   Website: https://l2elixir.org/ Discord: https://discord.gg/5ydPHvhbxs   @Atom Can you please move to Private Servers? Thanks!
    • https://jumpshare.com/share/kIdeKALOhgtMKpBKqxpg Test Equip Armors-> FullPlate, Gloves, Legs, Chest , Boots
    • 黑色星期五 — 为您的流量提供高级福利 仅在11月28日,我们的特别促销码可为您提供13%的商店折扣。 促销码: BLACKFRIDAY (13% 折扣) 您可以通过我们的网站或 Telegram 机器人在商店购物! 有效链接: 数字商品商店(网站): 前往 商店 Telegram 机器人: 前往 – 通过 Telegram Messenger 方便访问商店。 其他服务: 虚拟号码服务: 前往 用于购买 Telegram Stars 的机器人: 前往 – 快速且优惠地在 Telegram 中购买 Stars。 SMM 面板: 前往 – 推广您的社交媒体账户。 我们向您呈现当前的 促销和特惠活动 列表,用于购买我们服务的产品和服务: 1. 您可以在首次购买时使用促销码:SOCNET(15% 折扣) 2. 获取 $1 商店余额或 10–20% 折扣 — 只需在我们网站注册后发送您的用户名,格式如下:“SEND ME BONUS, MY USERNAME IS...” — 您需要在我们的论坛帖子中写下这句话! 3. SMM 面板首次试用可获得 $1:只需在我们的网站(支持)提交主题为“Get Trial Bonus”的工单。 4. 我们的 Telegram 频道和 Stars 购买机器人每周都会举办 Telegram Stars 抽奖活动! 新闻: ➡ Telegram 频道: https://t.me/accsforyou_shop ➡ WhatsApp 频道: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord 服务器: https://discord.gg/y9AStFFsrh 联系方式与支持: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ 邮箱: solomonbog@socnet.store
  • Topics

×
×
  • Create New...

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