Jump to content

Recommended Posts

Posted

Hello gyes, since it requested, i will try to make this guide about some methods and creating methods explanations.

 

This time, we will talk about set and is methods.You know..., maybe all of you know these methods , you have seen it at hero status,noble status :

setHero(true,false)  ,   setNoble(true,false)  , isHero()  ,  isNoble().

I will explain you exactly how these methods are working, so that you can create easy your own .

 

In my guide i will use the name MaxCheatersMember.So, there will be two methods, right?

The one is   setMaxCheatersMember(true,false)  and the other isMaxCheatersMember() .

 

Creating the methods....

First of all, lets create the method isMaxCheatersMember() .  I will make it via steps.

1)We go at L2PcInstance.java class and we create a boolean named like we want i will use this:

private boolean _maxcheater;

 

2)For make it easy and more readable, find this line: public boolean isNoble() , above this create a method :

public boolean isMaxCheatersMember()

{

}

 

3)We have a empty method,named isMaxCheatersMember,right? Inside this method just add this line:

return _maxcheater; . So the method will have the body return _maxcheater; .

The isMaxCheatersMember() method is ready, now we will create the method seMaxCheatersMember(true or false).

 

4)Above of the line: public boolean isMaxCheatersMember() or under the whole method we create a new method named setMaxCheatersMember(boolean value)

{

}

 [in the value you can put everything ,even x,y,z

 

5)Now we have again a empty method xD , inside this method now we put this line:

_maxcheater = value; (where value the name of your boolean)

 

Now we have the both methods we need: isMaxCheatersMember() and setMaxCheatersMember(boolean value)

 

 

How they work.....?Explanation?

I will explain it again in some simple steps:

 

1)First of all we create a private boolean named _maxcheater;. A boolean can have only 2 values ,

it can be true or false .

Ok , but why private?

We set it as private because the only class that checks this value is the class L2PcInstance, only this class checks this boolean , only.

 

2)the whole method:

public boolean isMaxCheatersMember()

{

  return _maxcheater;

}

just returns the value of _maxcheater; So if _maxcheater boolean is true , the method

isMaxCheatersMember() will return true, if false the method will return false; You catch it , o yea!!

By default it is false, as we created the boolean _maxcheater as false in the beggining.But for changing it,for changing the boolean, so for changing the value of method isMaxCheatersMember() to return true if we want, or false, look at the step 3.

Why the method is public?

Because , we want to use this method and in another classes, not only in L2PcInstance for example maybe we want to go at Enterworld class and we need to add this method there!

 

3)Here's come the creation of method:

public void setMaxCheatersMember(boolean value)

{

 _maxcheater = value;

}

What the hell is it?Ok, this method first of all needs a parameter,a parameter in our example is the: boolean value .Then it reads this boolean , so it will read if it is true or false.Then it takes the value of the boolean, and it set's it at _maxcheater boolean.For example if value=true then _maxcheater = true ; if False, the opposite. It's easy i think to understand it.

Why public and why void and not boolean?

Not private for the same reason as method isMaxCheatersMember().

Ok, now lets explain why void and not boolean.If we had boolean we should return something, for example return _aboolean; But we don't want this method to return something, we want this method to DO something.We we want a method to do something, we put void.

 

That was how these simple methods work, i think that for newbies it is usefull and they can understand it.

 

Puting methods into methods...

Ok, i will continue with these 2 methods. isMaxCheatersMember() and setMaxCheatersMember(true,false) .

Now , players can't get this method to true, its false by default....for example now i will explain you how to "check" if the players has some conditions to take the isMaxCheatersMember() status(i mean to be true).

 

In my example, one player will become isMaxCheatersMember() if he has 50000 pvp.How can we do it?We can do it and without put methods into methods, but by doing this it's better, i think it looks more advanced.

So what we want our method to return or do something? Think about it, we need to DO, so we create a void method.

Let's create it, i will explain you what i did then.

 

public void checkForMxcStatus(L2PcInstance activeChar)

{

 if (activeChar.getPvpKills() >= 50000 && !(activeChar.isMaxCheatersMember()))

 {

   activeChar.setMaxCheatersMember(true);

 }

 else if (activeChar.getPvpKills() < 50000)

 {

   activeChar.setMaxCheatersMember(false);

 }

}

 

What we did?

1)We created a public (you know now why public) method as void named checkForMxcStatus with 1 parameter which is an l2pcinstance object, the well known to all of you activeChar.

2)First of all we check if the activeChar has 50000 pvp and if he is'nt MaxCheatersMember() (! means not).

3)If the player has these conditions, we set him isGamingParadiseMember() with the setMaxCheatersMember() method that we created before.

4)then we use the else if to check if the player's pvps ar lower than 50000 , if it is we set him isMaxCheatersMember false, again with the method setMaxCheatersMember().

 

Yes that can be done with a better way, that was an example.If you are a newbie, the best you can do is practice to methods, they are very very very very usefull to continue your carreer.I hope i helped gyes, for now i need some masause at my fingers.

 

 

PS: the is and get is example, but all are used to use these methods to be more understandable, you catch me :D

 

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

    • If the problem is that the target is lost, the action of aiming at another character, upon losing collision, does not allow aiming.   This one works as it should, allowing you to target characters
    • MICROTEXT AND WATERMARKS BREAK MOST RENDERINGS Microtext and watermarks aren’t just small decorative details. They are one of the most common reasons a document fails verification, even when it looks decent at first glance. The issue is that these elements are almost impossible to reproduce “by eye.” Microtext requires precise geometry and legibility at a very small size, while a watermark needs the correct density, transparency, and accurate placement relative to other security features. Any deviation becomes obvious during detailed inspection. ▪ What’s most often done wrong: - microtext is drawn too thick or blurry - the watermark is made either too visible or almost invisible - the positioning between microtext and watermark is ignored - the original printing technology isn’t taken into account when choosing density and shape - The stronger the document’s security features, the less room there is for approximation. What matters here isn’t visual similarity, but accurate reproduction of the original technical characteristics. If your document contains microtext and watermarks, this is always an area that requires extra attention. Write to us in DMs. We’ll review your case and point out exactly which details need the highest precision during rendering. › TG: @mustang_service_ms ( https:// t.me/ mustang_service_ms ) › Channel: Mustang Service ( https:// t.me/ +JPpJCETg-xM1NjNl ) #drawing #microtext #photoshop #editing #watermarks
    • GoldRush launches tomorrow! July 18 16:00 GMT+3 Europe / International Register your account in the website, connect wallet and be ready to dominate!
    • 🏰 L2EXALTA LEGACY — Interlude x45 📅 Grand Opening: 31/07/2026 — 21:30 (GMT+3) 🌐 Website: https://l2exalta.org/ 💬 Discord: https://discord.gg/zNTCZD4AcT 📌 Wiki: https://l2exalta.org/en/wiki.html#progression   ⚙️ MAIN INFO Chronicle : Interlude Rates : x45 Adena : x50 Spoil : x1 Drop : x5 Safe Enchant : +3 Files : L2OFF   💰 ECONOMY EX Coin : dynamic market currency, mined from monsters, Raid Bosses and Grand Bosses value fluctuates over time Exalta Vouchers : premium currency used for store, donations and EX Coin exchange Exchange : convert EX Coin into Exalta Vouchers Investment options : choose safer or riskier market strategies with EX Coin   ⚔️ PROGRESSION & GEAR Exalta Armors : signature top-tier gear line Forge System : upgrade weapons, armor and jewels with risk/reward mechanics Raid Boss progression tied to materials and prestige   🤖 AUTOFARM Access : Auto Hunting button, bottom-right UI Duration : controlled via tickets or in-game currency Route Mode : record custom farm routes Support Mode : healer/support builds auto-follow, heal and assist party Smart targeting logic with class-specific behavior (mage/archer/melee/support) Captcha designed not to interrupt legitimate AutoFarm sessions   🧪 BUFFER Exalta Buffer NPC/interface Scheme Buffer : save multiple buff loadouts Class presets for mage, fighter, support, PvP   🛠️ SMART GADGETS / QOL Autoloot filter Drop value tracker Boss timer tools Farm stats tracker Auto-consume system In-game server assistant   🗺️ DUNGEON FINDER / PVE Party matching with roles (Tank / Healer / DPS) Ready-check before teleport Monastery of Silence custom PvE zone Party-based reward structure   🎟️ DAILY PROGRESS / EXALTA PASS Daily and weekly tasks (farm, PvP, boss, check-in) Premium Pass track with extra rewards Monastery Daily Quest Reward boards for claiming progress   🏠 HOUSING & EXPEDITIONS Player residences with service NPCs Exalta Spirit Expeditions to themed territories Rewards vary by territory Owner-only access   🏆 PVP / TOURNAMENT Scheduled Tournament system Ranking points from wins/participation Spectator Mode for watching live matches PvP Statues for top-ranked players Anti-feed protections   🛡️ CLAN CONTENT Clan Civil War battlefield event Clan Dungeon Raid content DPS Meter for contribution tracking Support Credit system Classic siege/clan politics preserved   🏪 AUCTION / SHOPS Auction House with seller fee Black Market Dealer (limited-time special offers) Custom shops and multisells Confirmation prompts on purchases/sales   💳 DONATIONS / VIP Donation rewards linked to Exalta Vouchers VIP tiers with comfort/cosmetic bonuses Premium store Gift/promo codes for events   🎥 STREAMER / COMMUNITY Streamer Panel with visible stream links Viewer rewards system Streamer Points for cosmetics/vouchers In-game voice chat (global/party/clan/alliance/command)   🔒 FAIR PLAY Strong Anti-Bot protection Reward protection tied to valid client state Captcha on suspicious activity Staff investigation tools No bots, packet tools or modified clients allowed   👑 GRANDBOSS SPAWNS Orfen : 1 day + 1h random Core : 1 day + 1h random Queen Ant : 1 day 6h + 1h random Zaken : 2 days 12h + 1h random Baium : 5 days + 1h random Antharas : 8 days + 1h random Valakas : 11 days + 1h random   🏅 OLYMPIAD Runs Thursday, Friday, Saturday Heroes change monthly Balanced and fair matchmaking
  • 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..