Jump to content

Question

12 answers to this question

Recommended Posts

  • 0
Posted

EnterWorld.java

 

Something like this (i am from phone atm, can't search for the exact methods and etc). Try to do it by yourself, wont be hard.

private boolean hasOverEnchantedItems(L2PcInstance player, int enchantLimit)
{
For (L2ItemInstance item : player.getInventory.getAllItems())
{
     if (item.getEnchantLevel() > enchantLimit)
        //player has over enchanted items
        return true;
}
return false;

Now return in main method of EnterWorld.java and add this somewhere

if (hasOverEnchantedItems(activeChar,20) //more than +20, banned
{
   //  JAIL - BAN
 //    Steal code from admin commands
}

Note: This is going to be kinda slow and add some weight to your server... So, there might be another method than getAllItems() which returns only the armors or the weapons (for example getWeapons()). Try to search a little bit...Also, i would give a try to search how an item is added into the game, aka the constructor of L2itemInstance, where and when it is called. You could add a check into this constructor, but this is going to be kinda hard for you (dont wanna offend you, but the thing you ask gives me the clue you are new to this :)), since it might want some research before you do it...

  • 0
Posted

EnterWorld.java

 

Something like this (i am from phone atm, can't search for the exact methods and etc). Try to do it by yourself, wont be hard.

private boolean hasOverEnchantedItems(L2PcInstance player, int enchantLimit)
{
For (L2ItemInstance item : player.getInventory.getAllItems())
{
     if (item.getEnchantLevel() > enchantLimit)
        //player has over enchanted items
        return true;
}
return false;

Now return in main method of EnterWorld.java and add this somewhere

if (hasOverEnchantedItems(activeChar,20) //more than +20, banned
{
   //  JAIL - BAN
 //    Steal code from admin commands
}

Note: This is going to be kinda slow and add some weight to your server... So, there might be another method than getAllItems() which returns only the armors or the weapons (for example getWeapons()). Try to search a little bit...Also, i would give a try to search how an item is added into the game, aka the constructor of L2itemInstance, where and when it is called. You could add a check into this constructor, but this is going to be kinda hard for you (dont wanna offend you, but the thing you ask gives me the clue you are new to this :)), since it might want some research before you do it...

yep im new in java, that's why i ask help here cuz i know here have good dev's. Also thx for the suggestion i will search other method for checking the items.

P.S. - if someone have other method please post it here :D. Thanks!

  • 0
Posted

yep im new in java, that's why i ask help here cuz i know here have good dev's. Also thx for the suggestion i will search other method for checking the items.

P.S. - if someone have other method please post it here :D. Thanks!

Like @Lioy mentioned, it is impossible to have items enchanted more than the one set to configs. Of course if your pack is buggish as hell, you could see something like that, or with "backdoors".

 

However, if you want to add this kind of protection because you don't trust your GM team but at the same time you don't wanna to decrease their access level i suggest you something else.

Go to admin_enchant and add an if statement and do whatever u want with the char/item/log message

  • 0
Posted

Enterworld check isnt the best case.. i can store my +60 weap into wh , log out, log in , withdraw. Add a check in useItem method . You can do many things like in setEnchant method allow only < ur + . 

  • 0
Posted

If you can freely overenchant on a aCis server, that's the least of your fears, believe me. You probably can entirely wipe your server, because you got either a black sheep on administration, a backdoor, or a security breach related to connections (can be website or "crafted" queries where people can write input).

 

It's a totally pointless "protection" and - as said Solomun - a bigger burden than a gain.

  • 0
Posted

If you can freely overenchant on a aCis server, that's the least of your fears, believe me. You probably can entirely wipe your server, because you got either a black sheep on administration, a backdoor, or a security breach related to connections (can be website or "crafted" queries where people can write input).

 

It's a totally pointless "protection" and - as said Solomun - a bigger burden than a gain.

I know the acis have overenchant protection, but my point is if u have wep+++ for e.x. +100 you wont get kick, ban or etc. Also my server is still beta and im testing things ..

  • 0
Posted (edited)

We don't have specific overenchant protection, for the simple reason there is no needs. The chance is calculated server side, and the current enchant value is took from a valid ItemInstance ; it's impossible to trick the server feeding with fake values.

 

Your point is still invalid, for the simple reason it can't happen. Your only possibilities are :

  • you got a corrupted GM
  • you got a security flaw, where people can write their own queries (and it's easier to destroy your server TRUNCATE tables than to provide yourself enchant, believe me).
  • you don't use vanilla aCis, therefore the dude who shared it - shared it with backdoors (and I can only say him : "good job" and to you : "That'll teach you!").

In none of those cases, an overenchant protection will help you, because in any case if the guy can overenchant, he is part of admin crew, from one maneer or another and will probably harm your server more than a simple overenchant crap.

Edited by Tryskell
  • 0
Posted

We don't have specific overenchant protection, for the simple reason there is no needs. The chance is calculated server side, and the current enchant value is took from a valid ItemInstance ; it's impossible to trick the server feeding with fake values.

 

Your point is still invalid, for the simple reason it can't happen. Your only possibilities are :

  • you got a corrupted GM
  • you got a security flaw, where people can write their own queries (and it's easier to destroy your server TRUNCATE tables than to provide yourself enchant, believe me).
  • you don't use vanilla aCis, therefore the dude who shared it - shared it with backdoors (and I can only say him : "good job" and to you : "That'll teach you!").

In none of those cases, an overenchant protection will help you, because in any case if the guy can overenchant, he is part of admin crew, from one maneer or another and will probably harm your server more than a simple overenchant crap.

Okey, i understand. Thank you. And i wont have Gm's i will be the only one admin ;] Topic can be locked.

Guest
This topic is now closed to further replies.


  • Posts

    • Μάγκες καλησπέρα,   Παίζω Lineage 2 εδώ και χρόνια και πήρα απόφαση ότι θέλω επιτέλους να μάθω πώς δουλεύουν τα πράγματα πίσω από τις κάμερες. Δεν ψάχνομαι ούτε να ανοίξω τον επόμενο μεγάλο x5000 server ούτε να βγάλω λεφτά. Καθαρά από περιέργεια και για μένα θέλω να μάθω πώς στήνεται ένας server από το απόλυτο μηδέν. Το θέμα είναι ότι από development πλευρά είμαι τελείως άσχετος. Ξέρω τη βασική ιδέα, αλλά όταν βλέπω όλα αυτά που πρέπει να μάθω, ψιλοπελαγώνω. Από αυτά που έχω καταλάβει μέχρι στιγμής, πρέπει να μάθω πώς να στήνω το local περιβάλλον στο PC μου με Java, MySQL και κάποιο πρόγραμμα τύπου Navicat για να κουμαντάρω τη βάση δεδομένων. Μετά είναι το κομμάτι του compilation (με IntelliJ ή Eclipse), ή έστω το πώς να δουλεύω με έτοιμα datapacks και gameservers χωρίς να τα διαλύω όλα.   Εκτός από το server-side κομμάτι δηλαδή να αλλάζω stats σε items, να πειράζω spawns από NPCs, formulas για skills και custom μαγαζιά, πρέπει να μάθω και το client-side. Πράγματα όπως το να πειράζω τα .dat αρχεία με το L2FileEdit για να επικοινωνεί σωστά ο server με το παιχνίδι. Και για να είμαι ειλικρινής, το πιο ζόρικο κομμάτι θα είναι να μάθω να διαβάζω εκείνα τα τεράστια error logs όταν κρασάρει ο server, αντί να τα κοιτάω σαν χαζός. Ψάχνω λοιπόν κάποιον που να έχει μια εμπειρία και να γουστάρει να με καθοδηγήσει λίγο σαν μέντορας, ή ακόμα και κάποιον άλλον αρχάριο που θέλει να φάμε τα μούτρα μας παρέα μέχρι να το βρούμε.   Φράγκα δεν παίζουν μιας και το βλέπω καθαρά σαν χόμπι, αλλά έχω άπειρη υπομονή, δεν περιμένω από τον άλλον να κάνει τη δουλειά για μένα και είμαι διατεθειμένος να φάω ώρες για να μάθω. Απλά χρειάζομαι έναν άνθρωπο να ρωτάω μια γνώμη όταν αναπόφευκτα σκαλώνω σε κάποιο config αρχείο.   Αν βαριέστε και θέλετε να βοηθήσετε έναν παλιό παίκτη να μάθει τα βασικά, αφήστε ένα reply ή στείλτε μου PM με το Discord σας. Να 'στε καλά προκαταβολικά για οποιαδήποτε βοήθεια!
    • Hey guys 😃   I’ve been playing Lineage 2 for years, and I’ve finally decided I want to learn how the magic actually happens behind the scenes. I’m not trying to launch the next big x5000 server or make money. I literally just want to learn how to build one from absolute scratch for my own fun and curiosity. The issue is, I’m a total newbie when it comes to the dev side of things. I know the basic idea, but looking at everything I need to learn is getting pretty overwhelming. From what I've gathered so far, I need to figure out how to set up a local environment on my PC using Java, MySQL, and a tool like Navicat just to get the database running. Then there's compiling source code with IntelliJ or Eclipse, or at least figuring out how to work with a pre-compiled data pack and game server without breaking everything.   On top of the server side ike modifying item stats, editing NPC spawns, tweaking skill formulas, and setting up custom shops—I also need to learn the client-side stuff. Things like editing .dat files with L2FileEdit to make sure the server and client actually talk to each other correctly. And honestly, the scariest part is just learning how to read those massive error logs when the server crashes instead of just staring at them blankly.   I'm looking for someone who has some experience and wouldn't mind mentoring me a bit, or even another beginner who wants to team up so we can figure it out together. I can't pay anything since this is just a hobby project, but I’m super patient, I don't expect you to do the work for me, and I’m down to put in the hours to learn. I just need someone I can bounce questions off of when I inevitably mess up a config file.   If you’re bored and want to help a passionate player learn the ropes, drop a reply or shoot me a PM with your Discord. Appreciate any help I can get! ❤️
    • TG Support: https://t.me/buyingproxysup | Channel: https://t.me/buyingproxycom Discord support: #buyingproxy | Server: Join the BuyingProxy Discord Server!  Create your free account here
    • Season IV online in 3 hours 😄
    • Season IV online in 3 hours 😄
  • 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..