Jump to content

L2Jacis Πως Να Περναμε Ενα Config Και Να Φτιαχνουμε Δικο Μας .properties


Recommended Posts

Καλησπέρα μελοι του MaxCheaters

στο συγκεκριμένο topic θα μάθουμε πως βάζουμε ένα config στο l2jacis.

 

Ας αρχίσουμε

 

αρχικά βρίσκουμε το code που θέλουμε. Εγώ διάλεξα αυτό εδώ. Πατήστε εδώ για να πατέ στο link

 

Εάν θέλουμε να κάνουμε καινούριο φάκελο για τα configs πχ customs

Μπορούμε να φτιάξουμε έναν φάκελο με όνομα custom και εκεί μέσα να βάζουμε τα αρχεία.properties αλά ας δούμε και πως γίνετε αυτό.

ας αρχίσουμε  :D

 

Οπου έχω - σημαίνει πως πρέπει να βγάλω. εάν έχω + σημαίνει πως πρέπει να βάλουμε :)

 

ανοίγουμε το config.java

java/net/sf/l2j/Config.java

πάμε λίγο πιο κάτω λίγο κάτω και βλέπουμε

public static final String SIEGE_FILE = "./config/siege.properties";

από κάτω βάζουμε 

public static final String CUSTOMS_FILE = "./config/customs/customs.properties";

κάνουμε search

public static int CLIENT_PACKET_QUEUE_MAX_UNKNOWN_PER_MIN = 5; // default 5

ακριβός από κάτω βάζουμε

/** Customs Settings */
public static boolean STARTING_BUFFS;
public static List<int[]> STARTING_BUFFS_M = new ArrayList<int[]>(); 
public static List<int[]> STARTING_BUFFS_F = new ArrayList<int[]>();

customsettings.png

τώρα κάνουμε search loadClans ακριβός από πάνω βάζουμε

/**
* custom settings.
*/
private static final void loadCustoms()
{
final ExProperties customs = initProperties(CUSTOMS_FILE);
STARTING_BUFFS = customs.getProperty("StartingBuffs", true);
String[] propertySplit = customs.getProperty("StartingBuffsMage", "1204,2").split(";");
STARTING_BUFFS_M.clear();
for (String buff : propertySplit)
{
    String[] buffSplit = buff.split(",");
    if (buffSplit.length != 2)
     _log.warning("StartingBuffsMage[Config.load()]: invalid config property -> StartingBuffsMage \"" + buff + "\"");
  else
  {
  try
  {
  STARTING_BUFFS_M.add(new int[]{Integer.parseInt(buffSplit[0]), Integer.parseInt(buffSplit[1])});
  }
  catch (NumberFormatException nfe)
  {
  if (STARTING_BUFFS_M.equals(""))
  System.out.println("EROOOOOOOOOOOR WITH STARTING BUFS");
              }
  }
  }
  propertySplit = customs.getProperty("StartingBuffsFighter", "1204,2").split(";");
  STARTING_BUFFS_F.clear();
  for (String buff : propertySplit)
  {
  String[] buffSplit = buff.split(",");
  if (buffSplit.length != 2)
  _log.warning("StartingBuffsFighter[Config.load()]: invalid config property -> StartingBuffsFighter \"" + buff + "\"");
  else
  {
  try
  {
  STARTING_BUFFS_F.add(new int[]{Integer.parseInt(buffSplit[0]), Integer.parseInt(buffSplit[1])});
  }
             catch (NumberFormatException nfe)
            {
             if (STARTING_BUFFS_F.equals(""))
             System.out.println("EROOOOOOOOOOOR WITH STARTING BUFS");
             }
 }
 }
 
}

τώρα κάνουμε search

loadServer();

από κάτω βάζουμε 

// Customs settings
loadCustoms();

τώρα κάνουμε ότι κάνω στης φωτογραφίες για να φτιάξουμε το αρχείο

folder.png

steps.png

Screenshot_1.png

customs.png

Αφού τα κάνουμε όλα αυτά ανoίγουμε το customs.properties και μέσα βαζουμε

#Newbie Characters have starting buffs
StartingBuffs = True
 
#Starting Buffs for Mystics.
StartingBuffsMage = 1204,2;1085,3;
 
#Starting Buffs for Fighters.
StartingBuffsFighter = 1204,2;1086,2;
 

Αυτά για αυτό το topic. εάν σας άρεσε αφήστε ένα comment :D

True για να το ενεργοποιείστε

False για να το απενεργοποιήσετε 

Εάν έχω γράψει κάτι λάθος στο topic παρακαλώ γράψτε μου ένα comment από κάτω στο topic για να το διορθώσω.   :)

Edited by PaRaNoiC*
  • Upvote 3
Link to comment
Share on other sites

  • 7 months later...

TOPIC UPDATED!!!

έγραψα από την αρχή το topic (τώρα δουλεύει 100%) ελπίζω να βοηθήσει :)

 

Παρακαλώ κάποιος moderator να διαγράψει όλα τα παραπάνω comments :)

Link to comment
Share on other sites

  • 3 weeks later...

Μία μικρή παραβολή στον οδηγό είναι η διαφορά του .properties απο το .ini

.properties: Δεν ανοίγει με προεπιλεγμένο πρόγραμμα επεξεργασίας, Στο notepad++ αναγνωρίζει την γλώσσα και βάζει χρώματα για καλύτερη ανάγνωση.

.ini: Ανοίγει με προεπιλεγμένο πρόγραμμα επεξεργασιας, Στο notepad++ αναγνωρίζει την γλώσσα και βάζει χρώματα για καλύτερη ανάγνωση.

Link to comment
Share on other sites

Μία μικρή παραβολή στον οδηγό είναι η διαφορά του .properties απο το .ini

.properties: Δεν ανοίγει με προεπιλεγμένο πρόγραμμα επεξεργασίας, Στο notepad++ αναγνωρίζει την γλώσσα και βάζει χρώματα για καλύτερη ανάγνωση.

.ini: Ανοίγει με προεπιλεγμένο πρόγραμμα επεξεργασιας, Στο notepad++ αναγνωρίζει την γλώσσα και βάζει χρώματα για καλύτερη ανάγνωση.

 

"Open with..." command, check the "Always use the program to open that type of file", genius...

 

And comments are shown in green, which is far enough as color system.

 

If that was the reason L2JHellas moved to .ini (I didn't understand why, now I get it), it's ridiculous. It's like if you forgot to check the file association with your music player and decided to encode all your MP3 to WMP format, only because Windows Media Player can't read your file, lol !

 

Here's a tutorial for you :

2whoy39.png

Edited by Tryskell
Link to comment
Share on other sites

  • 2 weeks later...

"Open with..." command, check the "Always use the program to open that type of file", genius...

 

And comments are shown in green, which is far enough as color system.

 

If that was the reason L2JHellas moved to .ini (I didn't understand why, now I get it), it's ridiculous. It's like if you forgot to check the file association with your music player and decided to encode all your MP3 to WMP format, only because Windows Media Player can't read your file, lol !

 

Here's a tutorial for you :

2whoy39.png

nice reasoning

1 project used by 1000 member

if owner of project change ( properties to ini ) 1000 member will not need to do the above 

it is practical

 

Edit : and this change need 10 second is not like mp3 :)

Edited by pirama
Link to comment
Share on other sites

On 5/2/2017 at 3:53 PM, .Elfocrash said:

Love how people find reasons to disagree even if they don't matter.

 

Nice guide.

Thanks. :)

Link to comment
Share on other sites

31 minutes ago, PaRaNoiC* said:

Thanks. :)

Ο τυπας γραφει περιπου 9 μηνες πριν κ εσυ απαντας τωρα.. καλοι βλακες ειστε

Link to comment
Share on other sites

1 hour ago, Afou To Patisa said:

Ο τυπας γραφει περιπου 9 μηνες πριν κ εσυ απαντας τωρα.. καλοι βλακες ειστε

exeis kapoio problhma? twra ithela na apantisw twra apantisa. xD episis den thimomoun oti eixa auto to guide ala to vrika eki pou epsaxna gia auto apantisa twra. :) 

Link to comment
Share on other sites

  • 2 months later...
  • 10 months later...

kai gw twra eida oti o allos o xazos apantise prin poso kairo mou ekane kai tutorial 0axx0x0xa0ax0x0xa0xax0axa0 poso xazos eliwsa axaxxaaxaxaxxaaxxaax

 

Edited by Nightw0lf
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...