Jump to content
  • 0

Question

Posted

Kalispera.ekana ena new code.eukolo.alla thelo kapios dev sobaros,na m pi an exo 3exasi tpt h eine tpt lathos

Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(revision 4001)
+++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(working copy)
@@ -4447,12 +4447,29 @@
    {
        // Add karma to attacker and increase its PK counter
        setPvpKills(getPvpKills() + 1);
+        
+		// Give Skill for a pvp/pk kill
+		addSkill("Give",6392, this, true);
+		sendMessage("You take a Skill for a pvp kill!");

        // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter
        sendPacket(new UserInfo(this));
    }

    /**
+	 * @param string
+	 * @param i
+	 * @param l2PcInstance
+	 * @param b
+	 */
+	private void addSkill(String string, int i, L2PcInstance l2PcInstance,
+			boolean b)
+	{
+		// TODO Auto-generated method stub
+		
+	}
+
+	/**
     * Increase pk count, karma and send the info to the player
     *
     * @param targLVL : level of the killed player
@@ -4498,7 +4515,12 @@
        // Add karma to attacker and increase its PK counter
        setPkKills(getPkKills() + 1);
        setKarma(getKarma() + newKarma);
+        
+        // Give Skill for a pvp/pk kill
+		addSkill("Give",6392, this, true);
+		sendMessage("You take a Skill for a pvp kill!");

+
        // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter
        sendPacket(new UserInfo(this));
    }
Index: java/net/sf/l2j/Config.java
===================================================================
--- java/net/sf/l2j/Config.java	(revision 4001)
+++ java/net/sf/l2j/Config.java	(working copy)
@@ -881,6 +881,11 @@
    public static boolean L2JMOD_WEDDING_SAMESEX;
    public static boolean L2JMOD_WEDDING_FORMALWEAR;
    public static int L2JMOD_WEDDING_DIVORCE_COSTS;
+    
+    public static boolean   PK_REWARD_SYSTEM;
+    public static int       PK_REWARD_SKILL_ID;
+    public static boolean   PVP_REWARD_SYSTEM;
+    public static int       PVP_REWARD_SKILL_ID;

    // Packet information
    /** Count the amount of packets per minute ? */
@@ -1858,6 +1863,11 @@
                L2JMOD_WEDDING_SAMESEX                  = Boolean.parseBoolean(L2JModSettings.getProperty("WeddingAllowSameSex", "False"));
                L2JMOD_WEDDING_FORMALWEAR               = Boolean.parseBoolean(L2JModSettings.getProperty("WeddingFormalWear", "True"));
                L2JMOD_WEDDING_DIVORCE_COSTS            = Integer.parseInt(L2JModSettings.getProperty("WeddingDivorceCosts", "20"));
+                
+                PK_REWARD_SYSTEM                  = Boolean.parseBoolean(L2JModSettings.getProperty("PkRewardSystem", "False"));
+                PK_REWARD_SKILL_ID                 = Integer.parseInt(L2JModSettings.getProperty("PkRewardSkillID", "6392"));
+                PVP_REWARD_SYSTEM                 = Boolean.parseBoolean(L2JModSettings.getProperty("PvPRewardSystem", "False"));
+                PVP_REWARD_SKILL_ID                = Integer.parseInt(L2JModSettings.getProperty("PvPRewardSkillID", "6392"));

                if (TVT_EVENT_PARTICIPATION_NPC_ID == 0)
                {
Index: java/config/l2jmods.properties
===================================================================
--- java/config/l2jmods.properties	(revision 4001)
+++ java/config/l2jmods.properties	(working copy)
@@ -132,3 +132,19 @@
# ex.: 1;2;3;4;5;6
# no ";" at the start or end
TvTEventDoorsCloseOpenOnStartEnd =
+
+#---------------------------------------------------------------
+# Skill Reward For PvP/PK                                      -
+#---------------------------------------------------------------
+#Default:False
+# Enable Pk Reward System
+PkRewardSystem = False
+
+# Reward Skill ID
+PkRewardSkillID = 6392
+
+# Enable PvP Reward System
+PvPRewardSystem = False
+
+# Reward Skill ID
+PvPRewardSkillID = 6392

Thanks.An mpori kapios as to test

Recommended Posts

  • 0
Posted

Yparxi eidh to code sto l2jserver section

tcp perimenoume kapion na s pei.....

den nomizo.exo psa3i ala dn exo vri.

tespa perimeno

  • 0
Posted

gia dose link na do.

ασε μας ρε απογευματιατικα, θα ψαχνω και για links :P

αν είναι δες στα configs της l2jteon.

  • 0
Posted

ασε μας ρε απογευματιατικα, θα ψαχνω και για links :P

αν είναι δες στα configs της l2jteon.

h teon exi gia items.emena dini skill.

auto thelo na m pite.an ine sostos o code.

  • 0
Posted

Είναι λάθος. Γιατί πολύ απλά έχεις βάλει configs, ενώ δεν τα χρησιμοποιείς.

dhldh ine la8os mono kai mono epidi vazo config,h genika eine lathos?

  • 0
Posted

Κοίτα..βάζεις config αλλά μέσα στο core δεν τα χρησιμοποιείς.

 

if (Config.PK_REWARD_SYSTEM)
{

}

 

Αυτό εδώ ελέγχει αν το config PK_REWARD_SYSTEM ειναι true. Aν είναι, τότε εκτελεί τον κώδικα. Εσύ δεν έχεις

βάλει πουθενά κάτι τέτοιο, αρα το config που έχεις βάλει είναι άχρηστο.

 

 

Επίσης αυτό εδώ

addSkill("Give",6392, this, true);

θα δώσει στον παίχτη το skill με id 6392. Αν θες να το κάνεις να δίνει το skill id που θα βάζει ο καθένας στα config του πρέπει να το κάνεις

addSkill("Give",Config.PK_REWARD_SKILL_ID, this, true);

 

Ελπίζω να σε βοήθησα. :)

  • 0
Posted

Είναι λάθος. Γιατί πολύ απλά έχεις βάλει configs, ενώ δεν τα χρησιμοποιείς.

 

Δεν έχει σημασία, μπορώ να fullάρω το config file, δίχως να χρησιμοποιήσω τα config, χωρίς να εμφανιστούν errors.

Το μόνο που θα συμβεί θα είναι μείωση της απόδοσης και φυσικά αύξηση του μεγέθους.

 

Το code δεν θα κάνει απολύτως τίποτα.

Απλά:

private void addSkill(String string, int i, L2PcInstance l2PcInstance,
+			boolean b)
+	{
+		// TODO Auto-generated method stub
+		
+	}

 

//TODO = Not done yet.

Εδώ ουσιαστικά πρέπει να δηλώσεις την 'δράση' addSkill

 

Εάν μπεις στο game και το δοκιμάσεις, δεν θα συμβεί απολύτως τίποτα.

  • 0
Posted

Δεν έχει σημασία, μπορώ να fullάρω το config file, δίχως να χρησιμοποιήσω τα config, χωρίς να εμφανιστούν errors.

Το μόνο που θα συμβεί θα είναι μείωση της απόδοσης και φυσικά αύξηση του μεγέθους.

 

Tο ότι δεν βγάζει λάθος στο compile δεν σημαίνει ότι ο κώδικας είναι σωστός. Βάζει config χωρίς να τα χρησιμοποιεί.

Άρα είναι λά8ος >.<

  • 0
Posted

Tο ότι δεν βγάζει λάθος στο compile δεν σημαίνει ότι ο κώδικας είναι σωστός. Βάζει config χωρίς να τα χρησιμοποιεί.

Άρα είναι λά8ος >.<

 

Αλλά και πάλι δεν επηρεάζει το παιχνίδι από άποψη σφαλμάτων.

Όπως είπα ίσως μειωθεί η απόδοση, αλλά δεν θα είναι κάτι το δραματικό.

Ο κώδικας όμως είναι όντως λάθος, και ο λόγος είναι από πάνω..

  • 0
Posted

Pistevo pws me ena aplo addSkill 8a doulepsei, kai gt exeis balei configs eno dn exeis dhlosei kapoia configs panw sto code s?

  • 0
Posted

Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(revision 4001)
+++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(working copy)
@@ -4447,12 +4447,18 @@
     {
         // Add karma to attacker and increase its PK counter
         setPvpKills(getPvpKills() + 1);
+        
+        if (Config.PVP_REWARD_SYSTEM)
+		{
+		addSkill(SkillTable.getInstance().getInfo(Config.PVP_REWARD_SKILL_ID,Config.PVP_REWARD_SKILL_LVL));
+		}

         // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter
         sendPacket(new UserInfo(this));
     }

@@ -4498,7 +4504,12 @@
         // Add karma to attacker and increase its PK counter
         setPkKills(getPkKills() + 1);
         setKarma(getKarma() + newKarma);

+        
+		if (Config.PK_REWARD_SYSTEM)
+		{
+		addSkill(SkillTable.getInstance().getInfo(Config.PK_REWARD_SKILL_ID,Config.PK_REWARD_SKILL_LVL));
+		}
+        
         // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter
         sendPacket(new UserInfo(this));
     }
Index: java/net/sf/l2j/Config.java
===================================================================
--- java/net/sf/l2j/Config.java	(revision 4001)
+++ java/net/sf/l2j/Config.java	(working copy)
@@ -881,6 +881,13 @@
     public static boolean L2JMOD_WEDDING_SAMESEX;
     public static boolean L2JMOD_WEDDING_FORMALWEAR;
     public static int L2JMOD_WEDDING_DIVORCE_COSTS;
+    
+    public static boolean   PK_REWARD_SYSTEM;
+    public static int       PK_REWARD_SKILL_LVL;
+    public static int       PK_REWARD_SKILL_ID;
+    public static boolean   PVP_REWARD_SYSTEM;
+    public static int       PVP_REWARD_SKILL_LVL;
+    public static int       PVP_REWARD_SKILL_ID;

     // Packet information
     /** Count the amount of packets per minute ? */
@@ -1858,6 +1865,13 @@
                 L2JMOD_WEDDING_SAMESEX                  = Boolean.parseBoolean(L2JModSettings.getProperty("WeddingAllowSameSex", "False"));
                 L2JMOD_WEDDING_FORMALWEAR               = Boolean.parseBoolean(L2JModSettings.getProperty("WeddingFormalWear", "True"));
                 L2JMOD_WEDDING_DIVORCE_COSTS            = Integer.parseInt(L2JModSettings.getProperty("WeddingDivorceCosts", "20"));
+                
+                PK_REWARD_SYSTEM                  = Boolean.parseBoolean(L2JModSettings.getProperty("PkRewardSystem", "False"));
+                PK_REWARD_SKILL_LVL               = Integer.parseInt(L2JModSettings.getProperty("PkRewardSkillLvL", "4"));
+                PK_REWARD_SKILL_ID                 = Integer.parseInt(L2JModSettings.getProperty("PkRewardSkillID", "6392"));
+                PVP_REWARD_SYSTEM                 = Boolean.parseBoolean(L2JModSettings.getProperty("PvPRewardSystem", "False"));
+                PVP_REWARD_SKILL_LVL              = Integer.parseInt(L2JModSettings.getProperty("PvPRewardSkillLvL", "4"));
+                PVP_REWARD_SKILL_ID                = Integer.parseInt(L2JModSettings.getProperty("PvPRewardSkillID", "6392"));

                 if (TVT_EVENT_PARTICIPATION_NPC_ID == 0)
                 {
Index: java/config/l2jmods.properties
===================================================================
--- java/config/l2jmods.properties	(revision 4001)
+++ java/config/l2jmods.properties	(working copy)
@@ -132,3 +132,25 @@
# ex.: 1;2;3;4;5;6
# no ";" at the start or end
TvTEventDoorsCloseOpenOnStartEnd =
+
+#---------------------------------------------------------------
+# Skill Reward For PvP/PK                                      -
+#---------------------------------------------------------------
+#Default:False
+# Enable Pk Reward System
+PkRewardSystem = False
+
+# Reward Pk Skill LvL
+PkRewardSkillLvL = 4
+
+# Reward Skill ID
+PkRewardSkillID = 6392
+
+# Enable PvP Reward System
+PvPRewardSystem = False
+
+# Reward PvP Skill LvL
+PvPRewardSkillLvL = 4
+
+# Reward Skill ID
+PvPRewardSkillID = 6392

tora eine sosto?

  • 0
Posted

Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(revision 4001)
+++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(working copy)
@@ -4447,12 +4447,18 @@
     {
         // Add karma to attacker and increase its PK counter
         setPvpKills(getPvpKills() + 1);
+        
+        if (Config.PVP_REWARD_SYSTEM)
+		{
+		addSkill(SkillTable.getInstance().getInfo(Config.PVP_REWARD_SKILL_ID,Config.PVP_REWARD_SKILL_LVL));
+		}

         // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter
         sendPacket(new UserInfo(this));
     }

@@ -4498,7 +4504,12 @@
         // Add karma to attacker and increase its PK counter
         setPkKills(getPkKills() + 1);
         setKarma(getKarma() + newKarma);

+        
+		if (Config.PK_REWARD_SYSTEM)
+		{
+		addSkill(SkillTable.getInstance().getInfo(Config.PK_REWARD_SKILL_ID,Config.PK_REWARD_SKILL_LVL));
+		}
+        
         // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter
         sendPacket(new UserInfo(this));
     }
Index: java/net/sf/l2j/Config.java
===================================================================
--- java/net/sf/l2j/Config.java	(revision 4001)
+++ java/net/sf/l2j/Config.java	(working copy)
@@ -881,6 +881,13 @@
     public static boolean L2JMOD_WEDDING_SAMESEX;
     public static boolean L2JMOD_WEDDING_FORMALWEAR;
     public static int L2JMOD_WEDDING_DIVORCE_COSTS;
+    
+    public static boolean   PK_REWARD_SYSTEM;
+    public static int       PK_REWARD_SKILL_LVL;
+    public static int       PK_REWARD_SKILL_ID;
+    public static boolean   PVP_REWARD_SYSTEM;
+    public static int       PVP_REWARD_SKILL_LVL;
+    public static int       PVP_REWARD_SKILL_ID;

     // Packet information
     /** Count the amount of packets per minute ? */
@@ -1858,6 +1865,13 @@
                 L2JMOD_WEDDING_SAMESEX                  = Boolean.parseBoolean(L2JModSettings.getProperty("WeddingAllowSameSex", "False"));
                 L2JMOD_WEDDING_FORMALWEAR               = Boolean.parseBoolean(L2JModSettings.getProperty("WeddingFormalWear", "True"));
                 L2JMOD_WEDDING_DIVORCE_COSTS            = Integer.parseInt(L2JModSettings.getProperty("WeddingDivorceCosts", "20"));
+                
+                PK_REWARD_SYSTEM                  = Boolean.parseBoolean(L2JModSettings.getProperty("PkRewardSystem", "False"));
+                PK_REWARD_SKILL_LVL               = Integer.parseInt(L2JModSettings.getProperty("PkRewardSkillLvL", "4"));
+                PK_REWARD_SKILL_ID                 = Integer.parseInt(L2JModSettings.getProperty("PkRewardSkillID", "6392"));
+                PVP_REWARD_SYSTEM                 = Boolean.parseBoolean(L2JModSettings.getProperty("PvPRewardSystem", "False"));
+                PVP_REWARD_SKILL_LVL              = Integer.parseInt(L2JModSettings.getProperty("PvPRewardSkillLvL", "4"));
+                PVP_REWARD_SKILL_ID                = Integer.parseInt(L2JModSettings.getProperty("PvPRewardSkillID", "6392"));

                 if (TVT_EVENT_PARTICIPATION_NPC_ID == 0)
                 {
Index: java/config/l2jmods.properties
===================================================================
--- java/config/l2jmods.properties	(revision 4001)
+++ java/config/l2jmods.properties	(working copy)
@@ -132,3 +132,25 @@
# ex.: 1;2;3;4;5;6
# no ";" at the start or end
TvTEventDoorsCloseOpenOnStartEnd =
+
+#---------------------------------------------------------------
+# Skill Reward For PvP/PK                                      -
+#---------------------------------------------------------------
+#Default:False
+# Enable Pk Reward System
+PkRewardSystem = False
+
+# Reward Pk Skill LvL
+PkRewardSkillLvL = 4
+
+# Reward Skill ID
+PkRewardSkillID = 6392
+
+# Enable PvP Reward System
+PvPRewardSystem = False
+
+# Reward PvP Skill LvL
+PvPRewardSkillLvL = 4
+
+# Reward Skill ID
+PvPRewardSkillID = 6392

tora eine sosto?

Nai twra m fenete einai swsto alla kai prin 8a douleve
Guest
This topic is now closed to further replies.
  • Posts

    • Server mid rate craft PvP   CLIENTE INTERLUDE Website server Discord olympus x25 &nbsp;server 🇧🇷🇦🇷🇨🇱🇬🇷🇲🇽🇵🇪🇸🇰🇪🇸🇺🇾 Server mid rate craft PvP 🔱CLIENTE INTERLUDE🔱 🔅xpx25 🔅Sp x25 🔅Adena x15 🔅Droop x2 🔅Spoil x2 🔅Raidboss xp x2 🔅Raidboss sp x2 🔅Raidboss droop x1 🔅All Rate quest reward  x1 ⚠️All Quest drop reward. x1 🔅Manor x 3 🔅Seal stone x1 🛡️🗡️INFO GRADO S🗡️🛡️ ⚠️Inicia desabilitado drop/spoil/quest. 🔱PROFESIONES/SUBCLASS🔱 🛡️1st profession - 50medal 🛡️2nd profession - 500 medal 🛡️3rd profession - 1k medal +30kk adena 🛡️Sub class - Quest. No necesita matar raids. ⚙️Configuraciones⚙️ 🛡️Gmshop  grade - B. 🛡️Grade A-S Craft - yes x1 chance 🛡️Globlal teleport - yes 🛡️Buffer 1hora. 🛡️Buffer slot 24(+4divine)+12 dances-song 🛡️Auto learn skils - yes 🛡️Autoloot - yes 🛡️Mana potion recarga 1000 ,9segundos delay. 🛡️Champions system:     ▫️lvl 30 - 76     ▫️chance respawn 0.5%.     ▫️adena x20 🛡️Max lvl party 14 lvl. 🛡️Festive sweeper on. 🛡️Max client pc 2. 🛡️Raid boss respawn retail. 🛡️Nobleza quest - yes. 🛡️Barakiel respawn 6 horas + -30 min. 🛡️Olimpiada duracion 14 dias. 🛡️Olimpiada de 18:00 a 00:00 🛡️Safe enchant +3 🛡️Normal enchant scroll 50% ⚠️+11-16 chance 30% 🛡️Bleesed enchant scroll 55% ⚠️+11-16 chance 35% 🛡️Rate dinamico x1 lvl 77-80   🛡️🗡️CLANES INFO🗡️🛡️ 🔅Crear clan min. level 20 🔅Max Alianzas 1 🔅Duracion penalidades clan / alianzas 8 horas. 🔅Cambio de lider 24 horas. 🛡️⚔️ ASEDIOS ⚔️🛡️ 🔅Cada 2 semanas. 🔅Proteccion hwid 1 pc. 🔅Clanes registrados. acceden a zona de asedio. 🔅Castillo asediable Aden. 🔅Reward 1000 FA 🔅Horario 16:00 GMT-3 🎊PACK DE INICIO🎊 🔅Start set - armor\weapon no grade. 🔅Level 20  - 5 shadow cuppon grado D 🔅Level 40 - 5 shadow cuppon grado C 🔅Free Autofarm 24 horas. 💰 INFO PREMIUM 💰 🔅Free autofarm. 🔅xp x30 🔅sp x30 🔅adena x17 🔅drop x4 🔅spoil x4 🔅enchant +2% 🔅seal stone x1 🔅Altb Gk-Gmshop/buffe ⚔️ RAID  BOSS INFO ⚔️ 🔅Raid boss 70 ++ respawn 5 días despues. 🔅Raid boss 75 ++ respawn 15 días despues 🔅Drop LETTER L2DAY para tradear en GMshop. ⚔️ INFO SEVEN SING ⚔️ 🔅Inicio del drop Seal stones dia 5 de iniciado el server. 🎊 EPIC RAID INFO 🎊 🔅Queen Ant (lvl 40)respawn Lunes a Viernes 22:00 GMT-3 drop chance 30%. 🔅Core (lvl 80)respawn Martes-miercoles 20:20 GMT-3 drop chance 100%. 🔅Orfen (lvl 80)respawn Martes-miercoles 21:00 GMT-3 drop chance 100%. 🔅Zaken (lvl 80)respawn Jueves 23:00 GMT-3 drop chance 100%. 🔅Frintezza (lvl 80)respawn Viernes 23:00 GMT-3 drop chance 100%. 🔅Baium (lvl 80)respawn Sabado 22:00 GMT-3 drop chance 100%. 🔅Valakas (lvl 80)respawn Domingo 20:00 GMT-3 drop chance 100%. 🔅Antharas (lvl 80)respawn Domingo 22:00 GMT-3 drop chance 100%.
    • The server is running in l2house.com.ar with C4 mode and in L2Tekila within the same login you can also test it in C5, if you want me to raise another chronicle to test, just let me know.
    • video nice song TopGear  gaming 1990    ....  
    • I have a system where Accounts are saved on login screen for fast login. I am playing a server where this feature is not on the logic screen. How I can try to add this feature to the system? I don't know what files I would have to touch.   Thanks!!
  • Topics

×
×
  • Create New...