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

    • Inventory restock: Premium business accounts are now available.   ✔ Wallester Business EU 🇪🇺|💳 Unlimited virtual cards, physical cards, 🏦 multi-currency IBAN, ₿ crypto & stablecoin deposits. ✔ Stripe Business UK 🇬🇧|💳 Instant virtual cards (Visa/Mastercard), high-conversion checkout, multi-currency payouts, ₿ crypto payments, no-code payment links. ✔ Mercury Business US 🇺🇸|🏦 US checking & savings, 💳 unlimited virtual cards, domestic & International wires, native stablecoin settlement. ✔ Payset Business EU 🇪🇺|🏦 Multiple IBANs, UK sort code, SEPA Instant, 💳 unlimited virtual cards, multi-currency accounts. ✔ Novo Business US 🇺🇸|🏦 Business checking account, ACH payments & invoicing, 💳 virtual & physical cards, novo boost.
    • Let me see if I understand correctly, older gentlemen, when a newcomer shows up to create modern things with the help of AI, doing what you charge them to do, you point the finger and laugh. I believe that's why everything is stagnant. The product isn't for programming experts, it's for newcomers. Don't buy from you if they can do it themselves using this base. You're going to deliver a similar product, maybe even worse than this one, so why are you complaining? PowerShell, as you well know, started with it, then came new platforms and new apps, new creation models, all with different languages; I chose the simplest one for my taste. This is about being organized and knowing how to choose the right words for each situation. It's not 100%, but it already gives a good impression. Nothing is 100%, so a topic written by AI, and all the code that you charge an absurd amount for to prohibit and sell hacks, could be open source so that everyone can create new practices, new models, new information for passing packets, prohibiting the use of cheats that cause server owners to break so much. Let's remember that the Admin doesn't always shut down the server; it's the players who find problems and take advantage by buying and reselling items, and they say that the GM shuts down the server every week, but that's a lie. What they do is duplicate items with packages and sell them, but perhaps this could give some future developers a starting point to create their own protection following the model in the initial documentation. Because none of you answer a question from a newbie, you think you're superior because you have knowledge, but with AI, people like that can have the same knowledge as you, but with less practice. And if they practice a lot, 10,000 hours, they can be as good as all of you older developers in the L2J field.
    • ✨ Exclusive Offer for Marketplace Growth 🔥 Elevate your performance with a premium bonus. 💲 Top up your balance with $100 or more and receive an additional $5 credit — seamlessly added to your account. ⭐️ Designed for those who value efficiency, scale, and results. ⚡️ Effortless. Refined. Effective. 💥 Enhance your strategy today 💥
  • 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..