-
Posts
5,360 -
Credits
0 -
Joined
-
Last visited
-
Days Won
62 -
Feedback
0%
Community Answers
-
Tryskell's post in How Increase Speed On Packet? was marked as the answer
If you terribly configured your server, the GC can potentially burn your ressources. Using vanilla aCis, and since aCis exist, what you refer never happened on my own setup, even during the middle of any revision.
The only known "lag" is the GC while STW action, and the behavior is amplified if you raised settings or is still using the vanilla GC type. Next revision of aCis is already setted to use CMS GC to avoid those lag spikes (and I hope G1GC will be improved on next Java revision). But it got nothing to do with permalag - it's more like a one second lag every 10min where absolutely everything freezes - until your GC empty itself every second, which means you fucked up hard on something.
About STW effect :
http://stackoverflow.com/questions/16695874/why-does-the-jvm-full-gc-need-to-stop-the-world
Use VisualVM to see how your server reacts, to exclude (or confirm) GC issues out of the list of possible troubles.
-
Tryskell's post in No Heal Raid Boss was marked as the answer
if (target == null || target instanceof L2RaidBossInstance)
-
Tryskell's post in Not Visible Static Object was marked as the answer
It is knownlist related issue, that's why you don't see it.
About why you don't see it... Most probably player's knownlist ignores that type of instance.
@Tessa, sendInfo is used when a object is added to another object's knownlist. It sends object related packets to the client in order it shows the correct infos. Even if it's an old implementation, it is supposed to work as it was shared (Trance implementation ?). It if isn't, then your pack knownlist system must be edited.
-
Tryskell's post in Multisell Bug was marked as the answer
Lel. That's a 4€ / line, counting "{", "}", "return;" as a line.
Can you make a price of 8€ for cheap version ? Like check / return; directly. You will have BRs, RUs and many GRs kids who can't afford the full version.
-
Tryskell's post in Where Can I Find Acis Admin Commands? was marked as the answer
"Help" button on admin panel. Located near the parameters box on every main panels, normally.
I cleanup when I think about it but normally it's pretty much up-to-date.
Overall "real" list is on data/xml/admin_commands_rights.xml.
-
Tryskell's post in Autorestartat was marked as the answer
Strictly no use to do that. Even basic autorestart got no use, except for specific timed maintenance. You can litteraly leave the server for weeks without any maintenance or any need to reboot.
Easiest and effortless is to make 2 tasks, simply copy paste existing task and edit the time. Even with 2 tasks running the same thing, as the server restarts the older task which just runned won't be run before second is triggered.
-
Tryskell's post in Fastmap -> Hashmap was marked as the answer
Use merge or compute methods for first cases. You can replace the whole for loop content for merge (!containsKey part included)
http://java.boot.by/ocpjp8-upgrade-guide/ch06s03.html
http://codereview.stackexchange.com/questions/57078/more-elegant-way-to-increment-integers-in-map
entries.merge(vote, 1, (oldValue, one) -> oldValue + one); About max and result, simply = 0. It iterates over whole map to find values anyway...
-
Tryskell's post in Char_Template Acis was marked as the answer
It got nothing related to chars templates, this info is stored on characters.sql
`classid` TINYINT UNSIGNED DEFAULT NULL, `base_class` TINYINT UNSIGNED NOT NULL DEFAULT 0, baseClass being the initial class, and classId the current class (can be subclass). To retrieve class name :
CharTemplateTable.getInstance().getClassNameById(player.getBaseClass()) or more simply
player.getTemplate().getClassName() You can build a simple array on your website with id<>name and retrieve classid the same way you retrieve pvpkills.
-
Tryskell's post in Bypass Value Is Devided ? was marked as the answer
else if (command.startsWith("Link")) { String path = command.substring(5).trim(); if (path.indexOf("..") != -1) return; final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); html.setFile("data/html/" + path); html.replace("%objectId%", getObjectId()); player.sendPacket(html); } Used as a single file, pointing on an existing data directory.
-
Tryskell's post in If Item.getitemid() <=9208 Disable Enchant was marked as the answer
// normal scrolls else { if (item.getItemId() >= 9208) { activeChar.sendPacket(new SystemMessage(SystemMessageId.INAPPROPRIATE_ENCHANT_CONDITION)); return; } for (final int normalweaponscroll : NORMAL_WEAPON_SCROLLS) { if (scroll.getItemId() == normalweaponscroll) { if (item.getEnchantLevel() >= Config.NORMAL_WEAPON_ENCHANT_LEVEL.size()) chance = Config.NORMAL_WEAPON_ENCHANT_LEVEL.get(Config.NORMAL_WEAPON_ENCHANT_LEVEL.size()); else chance = Config.NORMAL_WEAPON_ENCHANT_LEVEL.get(item.getEnchantLevel() + 1); maxEnchantLevel = Config.ENCHANT_WEAPON_MAX; break; } } } Or use whatever check id or condition.
-
Tryskell's post in Acis 340 Rev. No Icon Skill At Buffer was marked as the answer
Hello, the buffer uses routines based on skill id to find the correct related image. Unfortunately, Interlude client doesn't handle those last skills the same way than regular. You have to hardcode those on the "pick image" part.
-
Tryskell's post in Gk Teleport Countdown was marked as the answer
Exemple of ConfirmDlg packet use with timer.
sendPacket(new ConfirmDlg(SystemMessageId.DO_YOU_WANT_TO_BE_RESTORED).addTime(60000)); -
Tryskell's post in Custom Skills Problem. was marked as the answer
L2PcInstance.restoreSkills() edit
if (id > 9000) continue; // fake skills for base stats for
if (id > 9000 && id < 9007) continue; // fake skills for base stats Tell me if it fixes it, and also if it fixes the SQL issue.
-
Tryskell's post in Announce Before Spawn Npc (Raidboss, Custom Monsters) was marked as the answer
Without core edit, you have to rely on server getMemos(). If your core doesn't handle getMemos(), or hasn't any control over global type variables (ServerVariable or whatever), you can't do it *properly* for the simple reason you gonna lose all infos on server reload.
Whatever, "only script" method isn't clean way to do it.
About spawn time, as it is handled internally, you can't retrieve it anyway on onKill.
-
Tryskell's post in Vulnerability Buffs was marked as the answer
case MUTE: case FEAR: case BETRAY: case AGGDEBUFF: case AGGREDUCE_CHAR: case ERASE: case CONFUSION: multiplier = target.calcStat(Stats.DERANGEMENT_VULN, multiplier, target, null); break; And for first question, you are right.
-
Tryskell's post in Tutorial To Find Backdoors was marked as the answer
About "backdoors" you got only 2 ways so far : SQL injection (which is supposed to be countered by the use of PreparedStatement) and a chat command (anything related to Say2 packet, chathandlers included).
But the easiest stays to use a pack with a legit author. Which means, stick to vanilla packs/projects and avoid children by any mean.
-
Tryskell's post in Thug Zone Help was marked as the answer
Add zone checks on UserInfo (for player) and CharInfo (for others)
writeD(_activeChar.getClanId()); writeD(_activeChar.getClanCrestId()); writeD(_activeChar.getAllyId()); writeD(_activeChar.getAllyCrestId()); // ally crest id >
if (_activeChar.isInsideZone(ZoneId.THUG)) { writeD(0); writeD(0); writeD(0); writeD(0); // ally crest id } else { writeD(_activeChar.getClanId()); writeD(_activeChar.getClanCrestId()); writeD(_activeChar.getAllyId()); writeD(_activeChar.getAllyCrestId()); // ally crest id } You must edit both packets.
-
Tryskell's post in Custom Buffer was marked as the answer
When you compile it only refreshes build folder from your sources, if you use another folder when you bring your server (and normally you did) then you have to SHUTDOWN your server (properly if possible) replace the jar and launch your server.
Editing the jar while server is active will break classes link, leading to numerous issues (ClassCastException). So close your server before and replace the jar after.
-
Tryskell's post in Gs And Ls .jar Files was marked as the answer
Executable Jar, means you can use it as an .exe...
-
Tryskell's post in Respawn Raidboss was marked as the answer
What's the problem with my previous post ?
-
Tryskell's post in Custom Scripts In Last Acis Rev was marked as the answer
Drop "main" method, edit constructor to remove parameters, edit package, add on scripts.xml and voila.
Finally your for loop is pointless on onSpawn, because possible ids are already managed inside constructor via addSpawnId.
@Override public String onSpawn(L2Npc raidboss) { Broadcast.announceToOnlinePlayers("RaidBoss : " + raidboss.getName() + " spawn in the world!"); return super.onSpawn(raidboss); } -
Tryskell's post in Siege Reward In Cwh was marked as the answer
clan.getWarehouse()
Warehouse being an ItemContainer, it can call numerous methods (addItem, etc). Each clan got a warehouse, it can't be null.
-
Tryskell's post in Problem Code Java was marked as the answer
From what I understand, you want to set 2 configs as a replacement name ?
If it's 2 strings, use
+ " " +