Jump to content

Recommended Posts

Posted

Χαιρετώ,

 

σήμερα αποφάσισα να κάνω ένα ακόμα share για αυτήν την κοινότητα!

 

Τι περιέχει αυτό το share :

 

- Πως φτιάχνουμε δικό μας config και μερικά χρήσιμα πράγματα για αυτό. (Κεφάλαιο 1)

- Γενικές πληροφορίες (Κεφάλαιο 2)

- Πως φτιάχνουμε ένα δικό μας voiced command. (Κεφάλαιο 3)

 

Κεφάλαιο 1

 

Ανοίγουμε το αρχείο Config.java (μπορεί να το δείτε και L2Config.java)

 

Στο πάνω μέρος θα δείτε αυτές τις γραμμές :

 

	public static final String BANNED_IP_XML = "./config/banned.xml";
public static final String CLANS_FILE = "./config/clans.properties";
public static final String EVENTS_FILE = "./config/events.properties";
public static final String FLOOD_PROTECTOR_FILE = "./config/floodprotector.properties";
public static final String HEXID_FILE = "./config/hexid.txt";
public static final String ID_CONFIG_FILE = "./config/idfactory.properties";
public static final String LOGIN_CONFIGURATION_FILE = "./config/loginserver.properties";
public static final String NPCS_FILE = "./config/npcs.properties";
public static final String PLAYERS_FILE = "./config/players.properties";
public static final String SERVER_FILE = "./config/server.properties";
public static final String SIEGE_FILE = "./config/siege.properties";

 

κάτω από την γραμμή (public static final String SIEGE_FILE = "./config/siege.properties";) βάζουμε την παρακάτω γραμμή :

 

public static final String ROMEO_FILE = "./config/romeo.properties";

 

χρησιμοποίησα το όνομα μου ως παράδειγμα. εσείς στην θέση του ROMEO_FILE μπορείτε να βάλετε το δικό σας όνομα πχ. CUSTOM_FILE και στην θέση του romeo.properties κάνετε ακριβώς το ίδιο πχ. custom.properties

 

Ακριβώς κάτω από παραπάνω γραμμές θα δείτε αυτό εδώ το κομμάτι :

 

	// --------------------------------------------------
// Clans settings
// --------------------------------------------------

 

κάτω από αυτό θα βάζετε το 1 μέρος από κάθε config που βάζετε για παράδειγμα public static boolean ALLOW_WEDDING_SYSTEM;

 

σε κάθε config που βάζετε γράφετε public static και μετά :

 

boolean = για περιπτώσεις True/False

int = για περιπτώσεις αριθμού

String = για οτιδήποτε όπως : !ahanvmc-@_!

 

συνολικές γραμμές :

 

public static boolean ALLOW_ROMEO_GUIDE; (πχ. True/False)

public static int HOW_MANY_CHAPTERS_GUIDE_HAS; (πχ. 4)

public static String WHAT_IS_THE_EXACTLY_NAME_OF_ROMEO; (πχ. `Romeo)

 

μετά από αυτό κάνουμε search στο αρχείο Config.java

 

			catch (Exception e)
		{
			e.printStackTrace();
			throw new Error("Server failed to load " + CLANS_FILE + " file.");
		}

 

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

 

			// Romeo settings
		try
		{
			Properties romeo = new Properties();
			InputStream is = new FileInputStream(new File(ROMEO_FILE));
			romeo.load(is);
			is.close();

		}
		catch (Exception e)
		{
			e.printStackTrace();
			throw new Error("Server failed to load " + ROMEO_FILE + " file.");
		}

 

κάτω από την γραμμή is.close(); βάζουμε το τελευταίο κομμάτι του config μας.

 

πχ. για αυτές τις γραμμές :

 

1) public static boolean ALLOW_ROMEO_GUIDE;

2) public static int HOW_MANY_CHAPTERS_GUIDE_HAS;

3) public static String WHAT_IS_THE_EXACTLY_NAME_OF_ROMEO;

 

βάζουμε :

 

1) ALLOW_ROMEO_GUIDE = Boolean.parseBoolean(romeo.getProperty("AllowRomeoGuide", "True"));

2) HOW_MANY_CHAPTERS_GUIDE_HAS= Integer.parseInt(romeo.getProperty("HowManyChaptersGuideHas", "4"));

3) WHAT_IS_THE_EXACTLY_NAME_OF_ROMEO = romeo.getProperty("WhatIsTheExactlyNameOfRomeo", "`Romeo"));

 

αφού δημιουργήσουμε το αρχείο romeo.properties στον φάκελο config βάζουμε μέσα τις παρακάτω γραμμές :

 

# Config guide by Romeo

AllowRomeoGuide = True

HowManyChaptersGuideHas = 4

WhatIsTheExactlyNameOfRomeo = `Romeo

 


 

Κεφάλαιο 2

 

Σήμερα θα σας μιλήσω για γενικά θέματα στην l2j. Ας αρχίσουμε,

 

Βασικοί ορισμοί :

 

- boolean = True/False (πχ, boolean l2j = true; )

- int = μεγάλοι ακέραιοι (πχ, int l2j = 100; )

- String = γενικό (τα πάντα) (πχ, String message = !l2jisdabest@; )

- static = είναι κάτι το στατικό (δεν αλλάζει)

 

- activeChar.setHero(true); = να κάνει τον ενεργό παίχτη hero για πάντα (true). ενώ για μέχρι το restart (false, βλέπε παρακάτω).

- activeChar.setNoble(false);

- activeChar.setName("εδώ το όνομα"); = με αυτήν την εντολή αλλάζει το όνομα του ενεργού παίχτη.

- activeChar.setTitle(""); = με αυτήν την εντολή αλλάζει τον τίτλο του ενεργού παίχτη σε κενό.

 

Διευκρινίσεις :

 

- package net.sf.l2j; (αυτό το βλέπουμε στο πάνω πάνω μέρος του αρχείου που είμαστε. τι σημαίνει? σημαίνει σε πιο package είναι το αρχείο που είμαστε (την διαδρομή του)

 

- import net.sf.l2j.gameserver.util.FloodProtectorConfig; (αυτό το βλέπουμε κάτω από το παραπάνω. τι σημαίνει? σημαίνει ότι χρησιμοποιούμε (στην προκειμένη περίπτωση το FloodProtectorConfig και βρίσκεται στο gameserver.util) μια εντολή από αυτό το αρχείο.

 

Δείγματα από κώδικες :

 

θέλουμε για παράδειγμα να βάλουμε ένα announce όταν μπαίνει ένας hero στον server. (ότι έχει να κάνει σχέση με το login, δηλαδή μόλις μπαίνει ο char στο l2 πάμε στο EnterWorld.java)

 

		if (activeChar.isHero())
	{
		Announcements.getInstance();
		Announcements.announceToAll("Hero Character : "+activeChar.getName()+" is now online!");
		return;
	}

 

ας αναλύσουμε κάθε κομμάτι αυτού του κώδικα :

 

if (activeChar.isHero()) = σημαίνει : εάν ο ενεργός παίχτης είναι hero.

{ = ανοίγουμε αγκύλες για να βάλουμε μέσα τον κώδικα που θέλουμε να δράσει.

Announcements.announceToAll("Hero Character : "+activeChar.getName()+" is now online!"); = είναι το announce που θέλουμε να δείξει όταν μπεί ο char.

} = κλείνουμε την αγκύλη που ανοίξαμε.

 

ένα άλλο δείγμα που είναι χρήσιμο (pvp spree system) :

 

πάμε στο αρχείο L2PcInstance.java και πατάμε CTRL + F για να αναζητήσουμε την γραμμή : private int _pvpKills;

 

από κάτω αφήνουμε ένα κενό και βάζουμε : private int pvpspree = 0;

 

μετά κάνουμε πάλι αναζήτηση για να βρούμε την γραμμή : setPvpKills(getPvpKills() + 1);

 

από κάτω βάζουμε αυτόν τον κώδικα :

 

		pvpspree++;

	switch (pvpspree)
	{
		case 1 : 
			Announcements.announceToAll(getName()+" is Dominating!");
			break;

		case 2 : 
			Announcements.announceToAll(getName()+" is on a killing spree!");
			break;
	}

 

το switch είναι ο καλύτερος τρόπος για να γίνει αυτό το πράγμα.

 

το case 1 μας δηλώνει στην προκειμένη περίπτωση ότι σε 1 συνεχόμενο pvp θα γίνει η παρακάτω πράξη δηλαδή το announce.

το ίδιο ισχύει και για το case 2 δηλαδή σε 2 συνεχόμενα pvp θα γίνει η παρακάτω πράξη.

 

προσοχή! μετά από κάθε πράξη στο switch βάζουμε το break;

 

αυτά πιστεύω είναι αρκετά!

 


 

Κεφάλαιο 3

 

Σε αυτό το κεφάλαιο θα σας δείξω πως να κάνετε ένα voicedcommand (.)

 

Πηγαίνουμε στην διαδρομή : net.sf.l2j.gameserver.handler.voicedcommandhandlers , πατάμε δεξί κλικ, New -> Class . Από μόνο του μας έχει απλά να βάλουμε το όνομα που θέλουμε να έχει το αρχείο για παράδειγμα MyFirstVC αφού πατήσουμε Finish μας ανοίγει ένα καινούργιο αρχείο που περιέχει αυτό :

 

/*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
* 
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
* 
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package net.sf.l2j.gameserver.handler.voicedcommandhandlers;

/**
* @author `Romeo
*
*/
public class MyFirstVC
{

}

 

στην προκειμένη περίπτωση του voicedcommand δίπλα από το public class MyFirstVC βάζουμε : implements IVoicedCommandHandler και πρέπει να δείχνει κάπως έτσι :

 

public class MyFirstVC implements IVoicedCommandHandler

τότε θα δούμε error (σφάλμα) στην λέξη MyFirstVC. Ως πιθανές λύσεις μας έχει :

 

1) Add unimplemented methods

2) Make type 'MyFirstVC' abstract

 

στην προκειμένη περίπτωση χρησιμοποιούμε την πρώτη πιθανή λύση. όταν την διαλέξουμε θα δείτε ότι στον κώδικα μας θα μπούν οι παρακάτω γραμμές :

 

	/* (non-Javadoc)
 * @see net.sf.l2j.gameserver.handler.IVoicedCommandHandler#useVoicedCommand(java.lang.String, net.sf.l2j.gameserver.model.actor.instance.L2PcInstance, java.lang.String)
 */
@Override
public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
{
	// TODO Auto-generated method stub
	return false;
}

/* (non-Javadoc)
 * @see net.sf.l2j.gameserver.handler.IVoicedCommandHandler#getVoicedCommandList()
 */
@Override
public String[] getVoicedCommandList()
{
	// TODO Auto-generated method stub
	return null;
}

 

κάτω από την γραμμή

 

public class MyFirstVC implements IVoicedCommandHandler
{

 

θα βάλουμε αυτόν τον κώδικα

 

	private static final String[] _voicedCommands =
{
	"myfirstvc"
};

 

που μέσα στις αγκύλες υπάρχει το command που θα είναι available για να χρησιμοποιήσουμε. τότε θα μας βγάλει ένα warning (ειδοποίηση) για το _voicedCommands. τότε κάνουμε αντιγραφή το _voicedCommands και πάμε κάτω κάτω που θα δούμε αυτό

 

	public String[] getVoicedCommandList()
{
	// TODO Auto-generated method stub
	return null;
}

και εκεί που λέει return null; στην θέση του null βάζουμε το _voicedCommands

 

τότε όλος ο κώδικας πρέπει να μοιάζει σαν αυτόν :

 

/*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
* 
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
* 
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package net.sf.l2j.gameserver.handler.voicedcommandhandlers;

import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;

/**
* @author `Romeo
*
*/
public class MyFirstVC implements IVoicedCommandHandler
{

private static final String[] _voicedCommands =
{
	"myfirstvc"
};

@Override
public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
{
	return false;
}

@Override
public String[] getVoicedCommandList()
{
	return _voicedCommands;
}

}

 

τώρα είναι έτοιμος για να βάλουμε τις εντολές που θέλουμε να εκτελεί. εκεί που λέει

 

 	@Override
public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
{
	return false;

 

από κάτω βάζουμε τις εντολές που θέλουμε, εγώ για παράδειγμα θα βάλω να βγάζει ένα announce και να κάνει τον char hero μέχρι το restart.

 

βάζουμε :

 

		Announcements.announceToAll(activeChar.getName()+ ": I used .myfirstvc and I am hero until restart.");
	activeChar.setHero(false);

 

τελιώσαμε, τώρα όλος ο κώδικας μας πρέπει να μοιάζει σαν αυτόν :

 

/*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
* 
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
* 
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package net.sf.l2j.gameserver.handler.voicedcommandhandlers;

import net.sf.l2j.gameserver.Announcements;
import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;

/**
* @author `Romeo
*
*/
public class MyFirstVC implements IVoicedCommandHandler
{

private static final String[] _voicedCommands =
{
	"myfirstvc"
};

@Override
public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
{
	Announcements.announceToAll(activeChar.getName()+ ": I used .myfirstvc and I am hero until restart.");
	activeChar.setHero(false);
	return false;
}

@Override
public String[] getVoicedCommandList()
{
	return _voicedCommands;
}

}

 

Description : όταν πατάς .myfirstvc γίνεσαι hero μέχρι το restart και βγάζει announce προς όλους.

 

το τελευταίο πράγμα που πρέπει να κάνεις είναι να δηλώσεις το voiced command. λοιπόν, πηγαίνουμε στο VoicedCommandHandler.java και κάτω από την γραμμή

 

_datatable = new HashMap<String, IVoicedCommandHandler>();

 

βάζουμε

 

registerVoicedCommandHandler(new MyFirstVC()); θα βγάλει error στο MyFirstVC γιατί πρέπει να το κάνεις import.

 

αυτό ήταν όλο για να κάνεις ένα voiced command.

 

Περισσότερα κεφάλαια, soon!

 

Kind regards,

 

`Romeo

Guest
This topic is now closed to further replies.


  • Posts

    • What a deductive skills. What is it, 2012? And would You ask for unban with false accusations? I don't have to prove YOU anything. Have fun.
    • Released new security update for Faceit anti-cheat and Gamers Club. Cheat is available again! We also added a few more slots for 1 month subscription and 6 months.
    • This post originally appeared on zupyak.   If you're diving into MLB The Show 25, you know how essential stubs are for building a powerhouse team. Whether you're aiming to snag elite players, upgrade your roster, or stock up on packs, stubs are the key to success. The good news? You don't need to spend real money to earn them. With a little strategy and effort, you can rake in stubs and dominate the diamond.  Here are the top five strategies to maximize your MLB The Show stub earnings and create the ultimate team without breaking the bank.    1. Earning Stubs with Diamond Quest Diamond Quest is a goldmine for stubs. By completing challenges in this mode, you can earn Diamond cards, which often have high sell values. Once you've earned these cards, sell them in the in-game Marketplace for a quick influx of stubs. Additionally, the packs you earn from Diamond Quest can be opened for more cards to sell or use in collections.   2. Completing Conquest Maps Conquest Maps are another excellent way to rack up stubs. Focus on capturing territories and completing map-specific goals. Many maps offer hidden rewards, including packs and stubs, which can significantly boost your earnings. You don't always need to conquer Strongholds—simply taking over territories can yield great rewards.   3. Flipping Cards in the Marketplace The Marketplace is your playground for flipping cards. Look for cards with a significant gap between their "Buy Now" and "Sell Now" prices. Place a Buy Order slightly above the current "Sell Now" price, then list the card for a "Sell Order" just below the "Buy Now" price. After the 10% Marketplace tax, you'll still make a profit. This strategy works best with high-value cards but requires patience and consistency.     4. Leveraging Player Exchanges Player Exchanges are an underrated method for earning stubs. Purchase cheap Silver cards near their quick-sell value, then exchange them for Gold players. These Gold players can either be used in your lineup or sold for a profit. This method is especially effective early in the game when Gold cards hold higher value.   5. Selling Things You Don't Need Don't let unused items clutter your inventory. Regularly check for duplicate cards, equipment, or other items you don't need. Sell these through the Marketplace to free up space and earn extra stubs. Even Bronze and Silver cards can add up over time, so don't overlook them. With these strategies, you'll be well on your way to building a dream team without spending real money. Let me know if you'd like to dive deeper into any of these methods!   Final Thoughts Building your dream team in MLB The Show 25 doesn't have to cost real money. With these five strategies—earning rewards through Diamond Quest, conquering Conquest Maps, flipping cards in the Marketplace, leveraging Player Exchanges, and selling unused items—you'll be well on your way to amassing stubs and creating a roster that rivals even the best in the game. Remember, consistency is key! Whether you're grinding through challenges or flipping cards daily, every little bit adds up over time. Stick with these methods, and soon enough, you'll have the stubs you need to dominate the diamond. Let us know which strategy works best for you—or if you've discovered any additional tips that deserve a spot on this list! Happy grinding!   
    • I don't see that ur account got unbanned https://maxcheaters.com/profile/80641-∽ave∽/  
    • Looking for gracia final/gracia epilogue server files including source.
  • Topics

×
×
  • Create New...