-
Posts
1,403 -
Credits
0 -
Joined
-
Last visited
-
Days Won
32 -
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by melron
-
Help Grand boss quest
melron replied to Irrelevant's question in Request Server Development Help [L2J]
Your ex was probably right. You were not carried any 'quest item' for her. Thats why she is 'ex' ... sad ... I'm sorry... @onTopic In theory, by getting the Q item at your inventory you can teleport at the boss. In code theory now, the check is not only the quest item but the whole quest. Each one, have states. So with a quick glance: public void showQuestWindow(final L2PcInstance player, String questId) { String content = null; Quest q = null; if (!Config.ALT_DEV_NO_QUESTS) q = QuestManager.getInstance().getQuest(questId); // Get the state of the selected quest QuestState qs = player.getQuestState(questId); if (q == null) { // No quests found content = "<html><body>You are either not on a quest that involves this NPC, or you don't meet this NPC's minimum quest requirements.</body></html>"; } else { If the specific quest is null there, you will face this html . If not, the correct html will popup (probably a teleport link text) with the correct bypass inside will appear. So, either change generally the structure of this algorithm and checking for q items, or add your cases by npc id for example, or even Q.id . -
Code Restrict Healers and Other Classes in Events
melron replied to Irrelevant's topic in Server Shares & Files [L2J]
Create a local svn . It will help you to see your changes and export your diff files instead of adding + at every line. @onCode Your config should looks like TvTRestrictedClasses=1,2,3,4,5 CtFRestrictedClasses=10,20,30,40,50 DMRestrictedClasses=20,30,40,50 Lets parse it... Since we have in common the "RestrictedClasses" ... Arrays.asList("CTF", "TvT", "DM").forEach(ev -> { try { EVENT_RESTRICTED_CLASSES.put(Class.forName("com.l2jfrozen.gameserver.model.entity.event." + ev), Stream.of(MyEventSettings.getProperty(ev + "RestrictedClasses").split(",")).map(Integer::parseInt).collect(Collectors.toList())); } catch (ClassNotFoundException ex) { ex.printStackTrace(); } }); Your config should looks like: public static Map<Class<?>, List<Integer>> EVENT_RESTRICTED_CLASSES = new HashMap<>(); And as mentioned before... This check can be used everywhere at all your events if (Config.EVENT_RESTRICTED_CLASSES.getOrDefault(getClass(), Collections.emptyList()).contains(eventPlayer.getClassId().getId())) { eventPlayer.sendMessage("Your class is prohibited."); return false; } if you use this check inside of a static method, you have to use the name of the class directly. Config.EVENT_RESTRICTED_CLASSES.getOrDefault(TvT.class, Collections.emptyList()).contains(eventPlayer.getClassId().getId()) -
Dont be lazy...
-
There's a whole section called Marketplace
-
Help mass create per ip
melron replied to Irrelevant's question in Request Server Development Help [L2J]
That was it. No, create the next method private boolean isClientOk(L2PcInstance player) { try { player.getClient().getConnection().getInetAddress().getHostAddress(); } catch (Exception e) { return false; } return true; } and then, change this line final Collection<L2PcInstance> players = L2World.getInstance().getAllPlayers(); to final Collection<L2PcInstance> players = L2World.getInstance().getAllPlayers().stream().filter(p -> isClientOk(p)).collect(Collectors.toList()); -
Help mass create per ip
melron replied to Irrelevant's question in Request Server Development Help [L2J]
Strange, debug it .... before the current code, add this one. System.out.println("Players online " + L2World.getAllPlayersCount()); L2World.getInstance().getAllPlayers().forEach(p -> System.out.println(String.format("Player %s , ip %s", p.getName(), p.getClient().getConnection().getInetAddress().getHostAddress()))); and when you click mass create, check the console i need the output -
Help mass create per ip
melron replied to Irrelevant's question in Request Server Development Help [L2J]
Do you have bots? -
Help mass create per ip
melron replied to Irrelevant's question in Request Server Development Help [L2J]
final int id = 57; final int num = 5000000; final Collection<L2PcInstance> players = L2World.getInstance().getAllPlayers(); final HashSet<Object> seen = new HashSet<>(); players.removeIf(e -> !seen.add(e.getClient().getConnection().getInetAddress().getHostAddress())); players.forEach(player -> player.addItem("Admin-Reward", id, num, null, true)); activeChar.sendMessage(String.format("Mass-created items in the inventory of %s player(s)",players.size())); LOGGER.info(String.format("GM %s mass_created item Id: %s ( %s )",activeChar.getName(),id, num)); If you need the number of the players who did not get the reward, you can get them by "seen.getSize()" -
Help mass create per ip
melron replied to Irrelevant's question in Request Server Development Help [L2J]
Show us the whole code -
Did you open your ports?
-
Share L2 Gold Server Source+Patch
melron replied to HeadHunter's topic in Server Shares & Files [L2J]
Pick some sources to start with, (as you mentioned acis installed without any issue, thats good.) and start exploring every thing until you can create something by your own. A weapon , a code or something bigger. As a begginer, don't searching for the best sources arround (that cover your needs) because you will give up. There are hundreds of free sources out there, but most of them are outdated with probably different java version than you and with different structure about their static data. Start with something easy, learn, and go ahead. -
The problem is clearly the "Communication". Both sides are correct in this case. zemaitis wanted his problem to be solved with a cost of X E. At the end the problem wasn't full fixed by the dev's side. So he gave him 50% of the price that they agreed (fair move by my side) amarantthe92 made a deal to fix what exactly the customer requested which is the loginserver part based on the image https://imgbb.com/cQLLcK9 . He fixed the loginserver with the price they agreed (100E) and then he got the 50% of that. Another problem comes up but they didn't agree for GS too. Find the solution guys, you are both right
-
Discussion ACIS 382 Discussion about bugs!
melron replied to Daliuslt77's topic in General Discussion [English]
https://acis.i-live.eu/index.php?topic=30.0 spend some minutes and see the changesets from 382 until the current last. There are a lot of bug fixes. I think its worth to give 10 euro and get the latest ;) -
When you create a new database and open its tree data, at the last item you should see Backups item. Right click on it, and select Restore Backup from... then locate at your psc and then click restore
-
How are you trying to implement the file? Step by step.
-
Help P atk bug Mythras/Fandc
melron replied to Oedoardo's question in Request Server Development Help [L2J]
Do you expect an answer? -
Request Read inside
melron replied to Irrelevant's question in Request Server Development Help [L2J]
As kara said, you can create your own conditions to catch double ips but it is something that i wouldn't suggest you. Use HWID or any other information from the player's PC to detect 2nd window (it requires client modification) -
By clicking Restore Backup ? ....
-
Help prohibit dualbox IP or HWID onEnter zone
melron replied to scraw's question in Request Server Development Help [L2J]
To be honest, i didn't too... :P -
Help prohibit dualbox IP or HWID onEnter zone
melron replied to scraw's question in Request Server Development Help [L2J]
Doesn't frozen have getPlayersInside/getCharactersInside method? -
Client's responsibility is to show a name up on the creature texture. Server is sending the message by adding as holders the creature name,and the damage. So, the server have stored the name of the creature somewhere. Take a look in your database (if you are not using aCis, or check at your npcs xml by searching its npc id if you are using aCis). You should find the name field with the old npc name. Its all about what server files you are using.
-
You need to change the server side name too. not only the client part
-
Request Shift click on item [interlude]
melron replied to KouKou's topic in [Request] Client Dev Help
If you need just the item name (without the questionmark icon with all the description) to your chat, you should edit ToolTip.uc -
Code Lineage 2 Vote Reward System
melron replied to TGSLineage2's topic in Server Shares & Files [L2J]
Hello, i'm not sure if you still updating your codes at all your revisions, but you could (at least for acis) review the whole thing in order to achieve a better performance ... Seems like you haven't review it long time ago. Auto-closable classes like Connection are out of try-with-resources, executing new thread with Thread class while ThreadPool is there, xml needs to be edited aswell, repeatable switches just to return a different piece of the main value etc. I'm suggesting you, to think about interfaces and abstract classes since you have a lot of vote sites. You could even get the same results way faster, with even half of the lines of your diff and ofcourse with a better readability. Don't let people to judge you for these kind of mistakes... -
Καλά Χριστούγεννα και καλή χρονιά σε όλους. Με υγεία και αγάπη …. Και πολύ κώδικα...
-
- 2