-
Posts
5,360 -
Credits
0 -
Joined
-
Last visited
-
Days Won
62 -
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by Tryskell
-
[Help] Pvp points from Mobs
Tryskell replied to dymek1984's question in Request Server Development Help [L2J]
Never initialize a variable inside a (for, while) loop. if (player != null) { int numberToAdd = 500; broadcastPacket(new SystemMessage(SystemMessageId.RAID_WAS_SUCCESSFUL)); if (player.getParty() != null) { for (L2PcInstance member : player.getParty().getPartyMembers()) { member.setPvpPoints(member.getPvpPoints() + numberToAdd ); member.sendMessage("You have earned " + numberToAdd + " PvP Points"); RaidBossPointsManager.addPoints(member, this.getNpcId(), (this.getLevel() / 2) + Rnd.get(-5, 5)); if(member.isNoble()) Hero.getInstance().setRBkilled(member.getObjectId(), this.getNpcId()); } } else { player.setPvpPoints(player.getPvpPoints() + numberToAdd ); player.sendMessage("You have earned " + numberToAdd + " PvP Points"); RaidBossPointsManager.addPoints(player, this.getNpcId(), (this.getLevel() / 2) + Rnd.get(-5, 5)); if(player.isNoble()) Hero.getInstance().setRBkilled(player.getObjectId(), this.getNpcId()); } } And don't say "I got an error", send the error :p. I'm not 3 years old indian programmer genius. I want to add your code give 500 pvppoints to each member. It's not 500 points in total splitted in "x" party members. Well perhaps you know it, but better to say. PS :I reread your message, and it's what you were asking lol :). Check the xp/sp sharing system for party members, you have your answer here. -
Adminkick - AdminBan commands doesnt work.
Tryskell replied to sτrίkε-'s question in Request Server Development Help [L2J]
I invite you to check L2JFree actual adminhandlers. It's stupid to answer you, as IL have never been finished. If you ask help for "that", what about geodata, zonemanager, punishement system, missing skills,... If you haven't the logic to think "L2J/Free actual code must be corrected nowadays, so I will pick an eye on it", well... I don't give a lot about the survivability of your project. Well your problem if you want post more errors bugs on this forum than try to correct it by yourself. And for eventual haters, he asks for "fix". This is "help" section, not "make my own pack" one. Give a man a polefish, blablabla... -
You're welcomed, post errors logs / actual code if you got problems :).
-
[Help] Action Shift for L2PcInstance
Tryskell replied to Howl3r's question in Request Server Development Help [L2J]
On L2PcInstanceActionShift : public boolean action(L2PcInstance activeChar, L2Object target, boolean interact) { // Check if the player already target this l2pcinstance if (activeChar.getTarget() != target) { // Set the target of the L2PcInstance activeChar activeChar.setTarget(target); // Send a Server->Client packet MyTargetSelected to the L2PcInstance activeChar activeChar.sendPacket(new MyTargetSelected(target.getObjectId(), 0)); } // Send a Server->Client packet ValidateLocation to correct the L2PcInstance position and heading on the client if (activeChar != target) activeChar.sendPacket(new ValidateLocation((L2Character)target)); if (activeChar.isGM()) { IAdminCommandHandler ach = AdminCommandHandler.getInstance().getAdminCommandHandler("admin_character_info"); if (ach != null) ach.useAdminCommand("admin_character_info " + target.getName(), activeChar); } else activeChar.sendMessage(target.getName() + " is a noob."); return true; } If that compile fine but don't work, consider there are somewhere restrictions. I moved the target check out of the GM one, because shift is both for players and GMs now. So keeping old structure will be redundant (must add x2 the same check both for players and GMs). If you can see a message with the target name, replace the message by your html. Btw, your html format is really strange. Check the NPC action shift one to see how they form it. Wel it's fine it if works like you did, but just use conventions they use :p. -
[Help] Action Shift for L2PcInstance
Tryskell replied to Howl3r's question in Request Server Development Help [L2J]
I have misread factionholder, my bad. Try replace the gm stuff in L2PcInstance for your html part. As Gm is working you will know if it comes form the structure of handler itself OR about what you try to call. So basically try as a GM to call the faction window. If it works, it's because of missing "targetting stuff" in your factionholder. -
[Help] Action Shift for L2PcInstance
Tryskell replied to Howl3r's question in Request Server Development Help [L2J]
I don't get why you delete the GM stuff, because it will make your code FAR simplier. if GM GM code else others guys After that, you recopy in the "other guys" this part of code about target check // Check if the guy already target this l2pcinstance if (activeChar.getTarget() != target) { // Set the target of the L2PcInstance activeChar activeChar.setTarget(target); // Send a Server->Client packet MyTargetSelected to the L2PcInstance activeChar activeChar.sendPacket(new MyTargetSelected(target.getObjectId(), 0)); } // Send a Server->Client packet ValidateLocation to correct the L2PcInstance position and heading on the client if (activeChar != target) activeChar.sendPacket(new ValidateLocation((L2Character)target)); And you complete with your code below... -
Well, dunno why people are so busy with ddos, because from the moment you include L2J securities (like IPv4 filter etc), you're secured of 80% of noobs. About real ddos, if someone want to fock your server (and the entire company which host your damn server), he will do for sure. But do you know why it will never happens ? Simply because it don't worth it. If you think your 80 players server will aggro russian mafia, you're paranoid type and I can nothing for you. About MxC "jokers" shutdowning servers, it have nothing to do with ddos. They just exploit errors than L2J correct one after one. Update your server with last security and you won't have any problem. And check the "exploit" section to find/test bugs aswell. The real fact, and it's sure you will have problems, it's IL securities itself, which are non-existant from a fresh L2J IL repo checkout. So you have to hardwork. Linux/windows have nothing to see about ddos. Go check google to understand what is a DDoS. This is connection flood. So basically, what is behind the router have totally non-incidence. Could be Mac, Iphone or microwave, same shit. The choice of Linux or windows is the eternal war between the light and the dark, each side is right so... Pro-linux say "linux", pro-windows say "windows"... As linux is surely free on your host, I suppose this will be the main argument.
-
In IL, and from what I know, buffs and debuffs are the same thing. There are no differences between a buff and a debuff. So except taking IDs of skills one by one and putting in a big "if" statement, I don't see. About where to change that, and as all buff/debuffs are magic type, I think useMagic() method (L2PcInstance) would be fine. Do your check around this section (just after or before, don't matter, but do it here) // Check if the target is attackable if (!target.isAttackable() && (getAccessLevel() < Config.GM_PEACEATTACK)) { // If target is not attackable, send a Server->Client packet ActionFailed sendPacket(new ActionFailed()); return; } So basically your check : - is a return type (with a custom sendMessage if you want) ; - must have any ID skill you want to ; - must verify if the target is party/member. In the isAutoAttackable() method, you got the "party" part. The complete structure of code : if ((skill || skill || skill) && (differentOfParty || differentOfClan)) { // If target is not attackable, send a Server->Client packet ActionFailed sendPacket(new ActionFailed()); return; } As "target" isn't surely a L2PcInstance you have to do a check too to see if it's a L2PcInstance or not, else it could bug if you hit a different type (except if you already saw a monster with a clan).
-
I don't think it will fix your problem anyway. And in a piece zone, you can't attack at all. Correct your engine or create a custom area which "freeze" pvp state. It's sad to say, but seriously, the first one is far easier & less stupid.
-
[Problem L2J]Update to 1st,2nd and 3rd quest
Tryskell replied to sτrίkε-'s question in Request Server Development Help [L2J]
rewardSkills() is your fix. Do a search with this method name on the newest L2J, you will find all occurences and can change accordingly. -
[Help] MaxPCritRate & MaxMCritRate
Tryskell replied to 4fun's question in Request Server Development Help [L2J]
If my yellow sentence was in yellow, it was to avoid your answer. Guess what, I failed. Re-read my past post correctly. And this is "help" section, not "build my server" one. Believe me, you will be more thankful once you know how to do it than simply c/p a code. Perhaps not now, but in future. -
What's wrong with "modify the path where mySQL is" ? So according to you : you can only create a database named l2jdb, with admin root and no password too :P ? Come on, it's textpad file, use your brain. Right click, edit with textpad : set mysqlBinPath=%ProgramFiles%\MySQL\MySQL Server 5.0\bin set lsuser=root set lspass= set lsdb=l2jdb set lshost=localhost set gsuser=root set gspass= set gsdb=l2jdb set gshost=localhost And modify it according.
-
add a zone them. Btw if your tvt engine make you flagged or pk, i suppose this is the engine itself which is the problem lol.
-
Why do you need 5.0 ? L2J doesn't "need" a special version. Pickup the last one, and modify the path where mySQL is. My own mySQL server is under wamp, so it's C:\wamp\bin\mysql\mysql5.1.30\bin. As you can see it's totally different of your "program files" thing...
-
[Help] MaxPCritRate & MaxMCritRate
Tryskell replied to 4fun's question in Request Server Development Help [L2J]
Use eclipse search tool on the chronicle you saw those settings. In the Config.java, search for "MaxPcritRate", which will be in the same line than a variable (perhaps MAX_PCRIT_RATE, i don't know). After that scan the whole gameserver folder about the variable, you got your answer. To finish copy paste lines and adapt if needed. Around 6 lines fix. -
[Help]Multisell Error!
Tryskell replied to skoupas's question in Request Server Development Help [L2J]
From the stickied topics in this section And secondly, i already answered in a post past about it, about solution and about how to resolve. If you're lazy, just forget to develop your own server. And if it wasn't you (which would be exceptional, as error is the same), go search the guy topic about mutlsell bug. -
Or "how to nerf the imagination of your players". I mean those are good players, except if you got a OL server I don't get the problem. The best idea is to remove mobs in your server if you fear it breaks pvp... And you can have more players like that. Or as others said you can begin to unbalance things, which fock classes, so you have to find another nerfs for others classes, blablabla.
-
[Guide]GameServerError
Tryskell replied to nikarasprotos's question in Request Server Development Help [L2J]
Some of the common errors (like this one, database connection, etc) should be pinned off. Have you already checked problems 4 years ago in this section (I did for fun, reading "Interlude new version" made me smile) ? This is all time the same problems. That will avoid problems AND those sort of guides. -
a void is a type of method. And it's the type of method used to call those sorts of "extras". Like (public/private) void, (public/private) boolean, etc etc.
-
There's like 0 reason to make a config for mmocore. And L2JTeon is perhaps the last pack to copy things from. Basically you have to mod the mmocore itself (SelectorConfig), gameserver.java, config.java, and surely others things in mmocore. --- About the guy calling me stupid, I don't know what you get in I have no idea where the project can be found (didn't search) , perhaps the "didn't search" part.
-
[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.