-
Posts
5,365 -
Credits
0 -
Joined
-
Last visited
-
Days Won
67 -
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by Tryskell
-
[Request] Java code reconfig damage of Dwarf
Tryskell replied to lamle1112's question in Request Server Development Help [L2J]
No worries. I explain why your code still bug, like that you can use it for nay of your future problem. As I said getRace() is a method stored in L2PcInstance, when attacker is a L2Character. if (attacker instanceof L2PcInstance) { if (((L2PcInstance)attacker).getRace() == Race.Dwarf) damage *= 2; } The first line is a null check, to avoid NPE. About ((L2PcInstance)attacker), it modify the type of attacker to a L2PcInstance. If your different actions on the player were a lot, you could rewrite it like that for easy read : if (attacker instanceof L2PcInstance) { //Change attacker from character to L2PcInstance, and store it on player variable L2PcInstance player = ((L2PcInstance)attacker); if (player.getRace() == Race.Dwarf) { damage *= 2; player.sendMessage("Dwarves pown"); player.doSomething() } } As you can see, it is far easier to read like that. Well don't implement it, because sendMessage will be send to each hit lol. ---- About if (attacker instanceof L2PcInstance && attacker.getRace() == Race.Dwarf) damage *= 2; attacker is still a character type so your problem isn't changed. -
This is the point of this topic, share ideas and let developers code if it's possible (and when it's good).
-
[Request] Java code reconfig damage of Dwarf
Tryskell replied to lamle1112's question in Request Server Development Help [L2J]
I hope you joke, I have given solution higher. And no, what you have written isn't what I have written. -
[Request] Java code reconfig damage of Dwarf
Tryskell replied to lamle1112's question in Request Server Development Help [L2J]
attacker is a L2Character type, when getRace() method is applied to L2PcInstance (on IL, but I see you use higher chronicle as "Dwarf" should be written "dwarf", so it's only a supposition). Try that: if (attacker instanceof L2PcInstance) { if (((L2PcInstance)attacker).getRace() == Race.Dwarf) damage *= 2; } And post errors if there are. -
Server stuck problem.
Tryskell replied to leoadrian's question in Request Server Development Help [L2J]
L2JDot isn't supported. Ask on their forum. On topic you got a NPE (NullPointerException >> google it), basically at line 489 of L2GameClient.java, in onForcedDisconnection method. The funny thing is error can be anywhere else, as there mustn't have NPE check. The fact the mmocore is under L2J name doesn't mean it's the last one, or if it has been unmodified by Dot team. -
I have to agree with Matim, you're the sort of ppl doing a pack only to edit credits and put 10 commits to modify your pack name instead of l2j import name, after that you lack of ideas and the project is given up. Don't worry there are at least 10 projects before you which did the same. On the topic, use the search function of Eclipse and replace all "l2jxxxx" by "l2jroxxor". And correct errors after that.
-
[Help]Multisell Error!
Tryskell replied to skoupas's question in Request Server Development Help [L2J]
NPE error, and L2JEqual isn't supported on MxC forum. On the topic, you should check the MultiSellChoose packet, there is surely a missing check if (something != null) I invite you to check current L2J packets to find a fix. And if you're too lazy to do it, ask on their forum. -
I don't think you get it, test your damn links, when you got the error on logs you got a location to search. This will cut research time by 10 or more. If that can help you, someone got exactly the same error, so I dunno if he used the same script or if it's Freya bug. Anyway you're alone to fix it now, I don't come back on this topic.
-
[HELP]Freya GameServer Error
Tryskell replied to zlati's question in Request Server Development Help [L2J]
Funny, JoeDaFlow got the exact same problem with a python NPC. What chronicle, which NPC are you using ? It's a custom NPC you surely added which bug. Joe is making a Freya server, so this bug can come from Freya update aswell if you're using Freya. -
Do a search, this problem is recurrent and solution have been already posted.
-
I said to you higher to do some tests to define when errors come, I'm willing to help but I won't search your damn code for yourself. Your problem if you don't want help helpers.
-
Critical Error In game
Tryskell replied to ChaoticLegend's question in Request Server Development Help [L2J]
The 5th statement was about House serie I was watching and there is no more episodes with FR subtitles (season 7, number 8 ) :(. Give GS error if you have. And a link to gatekeeper (edit your first post), the only search result for fallenfalcon is your last post lol. -
[Help] GameServer error
Tryskell replied to pcalin's question in Request Server Development Help [L2J]
Gratz to commit back a code which was good in 2007 (and even before :P). Take care of commits next time, and thx pcalin to report it, I just helped him. -
Critical Error In game
Tryskell replied to ChaoticLegend's question in Request Server Development Help [L2J]
First = this is english section (in "[Request] Dev Help [L2J] En", it's why there is a "En"), second = what do you want we do with a client error, we're not Mary Poppins, post gameserver errors only third = post pack/chronicle/buffer, personally it's the last time I say that fourth = I understood gatekeeper, navicat, spawn... So wtf it goes with client error ? fifth = everybody lies. -
[Help] GameServer error
Tryskell replied to pcalin's question in Request Server Development Help [L2J]
I just pickuped the content and copypasted it on a clean IL L2J SiegeManager.java, and the files are 100% the same except imports. Anyway I'm stupid as this file can't in fault, as sieges tasks are launched from Siege.java. ---- PS : as I tought they focked up code. Ask them to correct Siege.java, at the "coded" line. Search public class ScheduleStartSiegeTask implements Runnable and replace the whole method by the ancient method (pick it from L2J IL pack). Why the heck they changed that, only Mulder & Scully know. There are like 0 reason to change this part of code, as it works since many years without problem lol. I got the L2J clean method under the hand, so enjoy... C/p the name of the method and when you found it, c/p the whole method below on the L2JBr one. public class ScheduleStartSiegeTask implements Runnable { private Castle _castleInst; public ScheduleStartSiegeTask(Castle pCastle) { _castleInst = pCastle; } public void run() { if (getIsInProgress()) return; try { long timeRemaining = getSiegeDate().getTimeInMillis() - Calendar.getInstance().getTimeInMillis(); if (timeRemaining > 86400000) { ThreadPoolManager.getInstance().scheduleGeneral(new ScheduleStartSiegeTask(_castleInst), timeRemaining - 86400000); // Prepare task for 24 before siege start to end registration } else if ((timeRemaining <= 86400000) && (timeRemaining > 13600000)) { announceToPlayer("The registration term for " + getCastle().getName() + " has ended.", false); _isRegistrationOver = true; clearSiegeWaitingClan(); ThreadPoolManager.getInstance().scheduleGeneral(new ScheduleStartSiegeTask(_castleInst), timeRemaining - 13600000); // Prepare task for 1 hr left before siege start. } else if ((timeRemaining <= 13600000) && (timeRemaining > 600000)) { announceToPlayer(Math.round(timeRemaining / 60000) + " minute(s) until " + getCastle().getName() + " siege begin.", false); ThreadPoolManager.getInstance().scheduleGeneral(new ScheduleStartSiegeTask(_castleInst), timeRemaining - 600000); // Prepare task for 10 minute left. } else if ((timeRemaining <= 600000) && (timeRemaining > 300000)) { announceToPlayer(Math.round(timeRemaining / 60000) + " minute(s) until " + getCastle().getName() + " siege begin.", false); ThreadPoolManager.getInstance().scheduleGeneral(new ScheduleStartSiegeTask(_castleInst), timeRemaining - 300000); // Prepare task for 5 minute left. } else if ((timeRemaining <= 300000) && (timeRemaining > 10000)) { announceToPlayer(Math.round(timeRemaining / 60000) + " minute(s) until " + getCastle().getName() + " siege begin.", false); ThreadPoolManager.getInstance().scheduleGeneral(new ScheduleStartSiegeTask(_castleInst), timeRemaining - 10000); // Prepare task for 10 seconds count down } else if ((timeRemaining <= 10000) && (timeRemaining > 0)) { announceToPlayer(getCastle().getName() + " siege " + Math.round(timeRemaining / 1000) + " second(s) to start!", false); ThreadPoolManager.getInstance().scheduleGeneral(new ScheduleStartSiegeTask(_castleInst), timeRemaining); // Prepare task for second count down } else { _castleInst.getSiege().startSiege(); } } catch (Throwable t) { } } } -
[solved]Save problem
Tryskell replied to kostantinosftw's question in Request Server Development Help [L2J]
Open an new topic instead of spam a resolved case. You surely got a problem in your gameserver logs, give more infos about pack too, what you tried, etc. It should be write in the damn rules, it's boring to ask the same thing over and over. -
DEDICATED MACHINE LOOK AND HELP...
Tryskell replied to ntelis1's question in Request Server Development Help [L2J]
I didn't understand one word, but yeah I think it's enough for 500-600 players. And the ram is really fine, even if you uses geodata. It depends of your distribution too. But I would be scared, because except if you pay really hard, I don't think this hoster can be trusted. Too many features. (I'm pro or not ?) -
[Help] GameServer error
Tryskell replied to pcalin's question in Request Server Development Help [L2J]
o_o You're welcomed, even if I haven't help lol. If that comes back, post on their forum to report, because I'm not far of the truth if I say they add as much bugs as good commits. You can too search about SiegeManager.java, comparing L2J one with your. -
[Help] GameServer error
Tryskell replied to pcalin's question in Request Server Development Help [L2J]
What did you do to correct it finally ? -
DEDICATED MACHINE LOOK AND HELP...
Tryskell replied to ntelis1's question in Request Server Development Help [L2J]
English perhaps after russian and greek ? What's the price of such host ? There's too much features lol, as a bad IL greek x5000 server. -
You can create a code inspired from flood protectors, but don't use them for this sort of purpose. Flood protectors are general, means even if he got a useItem flood protectors, it will be use for ANY use of item (soe, potion, etc). And if he put kick, all his players will be kicked one day or another lol :). So better inspire from floodprotectors than use to delay action.
-
You have to create an empty database named "l2jdb" before installing tables. The script install tables, but database must be created before.
-
[Help] Make Mask EXP
Tryskell replied to [Geo]Sky's question in Request Server Development Help [L2J]
And if you have problems I can help, but don't wait for a code-to-patch solution, because this isn't the goal of this section. -
Define it, your code is long and boring to read.