-
Posts
248 -
Joined
-
Last visited
-
Days Won
2 -
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by Williams
-
vorpal armor with interlude shoulder pads
Williams posted a question in Request Server Development Help [L2J]
would anyone have vorpal armor for interlude? The ones I found are all with textural errors. -
Share Lineage 2 Ultimate Client Collection
Williams replied to Finn's topic in Client Development Discussion
nice share -
Source 2-Factor Authentication for Lineage 2 Accounts
Williams replied to Elfo's topic in Server Shares & Files [L2J]
innovative and great sharing. -
level at the interlude
Williams replied to Williams's question in Request Server Development Help [L2J]
adjusted. -
level at the interlude
Williams replied to Williams's question in Request Server Development Help [L2J]
I did not find it. is it shared? -
I would like to know where I change the level and the amount of exp on the client. level 81: level 85: I want to leave the bar 100% at lvl 85 where do I change the client?
-
does not work here
-
Hello cheaters, Well, I'm implementing my Capture the Flag (CTF) event, I want to put it on when a player picks up a flag and delivers the weapon he was equipped to return without needing to do it himself. can you give me examples how can i do this? because I tried creating an array but it didn't work if (_flags.keySet().contains(npc)) { if (getState() != EventState.RUNNING) return true; if (_flags.get(npc) == getTeam(player) && _flagWielders.values().contains(player)) { player.destroyItemByItemId("Event flag.", 6718, 1, null, false); player.broadcastUserInfo(); announce(player.getName()+" has scored for "+_flags.get(npc).getName()+"!", false); increaseScore(player, 1); for (Npc flag : _flagWielders.keySet()) { if (_flagWielders.get(flag) == player) { _removeFlags = flag; break; } } _flagWielders.remove(_removeFlags); return true; } if (_flags.get(npc) != getTeam(player) && !_flagWielders.keySet().contains(npc)) { ItemInstance flag = player.addItem("Event flag.", 6718, 1, null, false); player.useEquippableItem(flag, true); player.broadcastUserInfo(); announce(player.getName()+" has got the "+_flags.get(npc).getName()+" flag!", false); player.broadcastPacket(new SocialAction(player, 16)); _flagWielders.put(npc, player); return true; } }
-
yes it was a mistake so it rewards all players but it has already been fixed. the correct thing would be like this for (Player player : clan.getOnlineMembers())
-
code removed from L2j-One the credits are not his https://raw.githubusercontent.com/L2jOne/New-L2jOne/master/aCis_gameserver/java/net/sf/l2j/gameserver/model/entity/Siege.java
-
Help What is this error? in JAVA
Williams posted a question in Request Server Development Help [L2J]
the error line. I removed this code from a java 8 project I have no error on my Eclipse would it be a java 8 to 11 compatibility error? -
Help restriction for TVT aCis
Williams replied to Williams's question in Request Server Development Help [L2J]
You are right, I did as you say more, the players use the CTRL to attack the same team. And yet non-participating players attack participating players. what you told me to do ? diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/model/L2Skill.java b/aCis_gameserver/java/net/sf/l2j/gameserver/model/L2Skill.java index 224fed7..747e01d 100644 --- a/aCis_gameserver/java/net/sf/l2j/gameserver/model/L2Skill.java +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/model/L2Skill.java @@ -1633,12 +1633,6 @@ if ((obj.getAllyId() == 0 || obj.getAllyId() != player.getAllyId()) && (obj.getClan() == null || obj.getClanId() != player.getClanId())) continue; + if (obj.getTeam().getId() > 0) + { + if (player.getTeam() != obj.getTeam()) + continue; + } + if (player.isInDuel()) { if (player.getDuelId() != obj.getDuelId()) @@ -1744,12 +1738,6 @@ if (obj == null || obj == player) continue; - if (obj .getTeam().getId() > 0) - { - if (player.getTeam() != obj.getTeam()) - continue; - } - if (player.isInDuel()) { if (player.getDuelId() != obj.getDuelId()) @@ -2068,12 +2056,6 @@ if (player.getParty().getCommandChannel() != null && player.getParty().getCommandChannel() == targetPlayer.getParty().getCommandChannel()) return false; } + + if (player.getTeam().getId() > 0) + { + if (player.getTeam() == targetPlayer.getTeam()) + return false; + } if (!sourceInArena && !(targetPlayer.isInsideZone(ZoneId.PVP) && !targetPlayer.isInsideZone(ZoneId.SIEGE))) { diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/Player.java b/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/Player.java index fc8ae4e..b061496 100644 --- a/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/Player.java +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/Player.java @@ -6241,15 +6241,6 @@ return false; } + // Check if attacker is in event + if (cha.getEvent() != null && cha.getEvent() == getEvent()) + { + if (cha.getTeam().getId() > 0 && cha.getTeam() == getTeam()) + return false; + + return true; + } + // is AutoAttackable if both players are in the same duel and the duel is still going on if (getDuelState() == DuelState.DUELLING && getDuelId() == cha.getDuelId()) return true; @@ -2901,12 +2901,6 @@ @Override public void onAction(Player player) { - if (!TvTEvent.getInstance().canTarget(this, player)) - { - player.sendPacket(ActionFailed.STATIC_PACKET); - return; - } - // Set the target of the player if (player.getTarget() != this) player.setTarget(this); @@ -2949,12 +2943,6 @@ @Override public void onActionShift(Player player) { - if (!TvTEvent.getInstance().canTarget(this, player)) - { - player.sendPacket(ActionFailed.STATIC_PACKET); - return; - } - if (player.isGM()) AdminEditChar.showCharacterInfo(player, this); diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/Cubic.java b/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/Cubic.java index 524e44a..f3bcb7f 100644 --- a/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/Cubic.java +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/Cubic.java @@ -23,7 +23,6 @@ import net.sf.l2j.gameserver.model.actor.Playable; import net.sf.l2j.gameserver.model.actor.Player; import net.sf.l2j.gameserver.model.actor.Summon; -import net.sf.l2j.gameserver.model.entity.events.Event; import net.sf.l2j.gameserver.model.group.Party; import net.sf.l2j.gameserver.network.SystemMessageId; import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse; @@ -257,21 +256,6 @@ return; } + // Events + Event event = _owner.getEvent(); + if (event != null && event.isStarted()) + { + final Player target = ownerTarget.getActingPlayer(); + if (target != null && target.getEvent() == event && (_owner.getTeam().getId() == 0 || _owner.getTeam() != target.getTeam())) + { + _target = (Creature)ownerTarget; + // Dead target + if (_target.isDead()) + _target = null; + } + return; + } + // Olympiad targeting if (_owner.isInOlympiadMode()) { -
Help restriction for TVT aCis
Williams replied to Williams's question in Request Server Development Help [L2J]
already tried it does not work -
Hello, I would like help because I do not understand very well, I made a restriction so that players of the same team do not kill themselves more players who do not participate can kill the participants. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/Player.java b/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/Player.java index 70589d9..ba98048 100644 --- a/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/Player.java +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/Player.java @@ -133,6 +133,7 @@ import net.sf.l2j.gameserver.model.entity.Castle; import net.sf.l2j.gameserver.model.entity.Duel.DuelState; import net.sf.l2j.gameserver.model.entity.events.Event; +import net.sf.l2j.gameserver.model.entity.events.TvTEvent; import net.sf.l2j.gameserver.model.entity.Siege; import net.sf.l2j.gameserver.model.group.CommandChannel; import net.sf.l2j.gameserver.model.group.Party; @@ -2899,6 +2900,12 @@ @Override public void onAction(Player player) { + if (!TvTEvent.getInstance().canTarget(this, player)) + { + player.sendPacket(ActionFailed.STATIC_PACKET); + return; + } + // Set the target of the player if (player.getTarget() != this) player.setTarget(this); diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/model/entity/events/TvTEvent.java b/aCis_gameserver/java/net/sf/l2j/gameserver/model/entity/events/TvTEvent.java index 017c0d5..70c66e4 100644 --- a/aCis_gameserver/java/net/sf/l2j/gameserver/model/entity/events/TvTEvent.java +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/model/entity/events/TvTEvent.java @@ -523,6 +523,18 @@ } @Override + public boolean canTarget(Player player, Player target) + { + if (player.getTeam() == TeamType.BLUE && target.getTeam() == TeamType.BLUE) + return false; + + if (player.getTeam() == TeamType.RED && target.getTeam() == TeamType.RED) + return false; + + return true; + } + + @Override public void onRevive(Creature killer) { if (killer == null) I define my teams by TeamType, BLUE and RED I added this check for players without a team it works, unregistered players can't kill registered players and RED and Azul team players can't kill themselves what did I do wrong? @Override public boolean canTarget(Player player, Player target) { + if (player.getTeam().getId() > 0 && player.getTeam() == target.getTeam()) + return false; + if (player.getTeam() == TeamType.BLUE && target.getTeam() == TeamType.BLUE) return false; if (player.getTeam() == TeamType.RED && target.getTeam() == TeamType.RED) return false; return true; }
-
Hello what can I improve my script? https://pastebin.com/raw/FXFZVPaF
-
Hello I already did everything and can not solve what I did wrong? Code : private void showRaidBossDrop(Player player, int bossId, int pageId) { final NpcTemplate npc = NpcData.getInstance().getTemplate(bossId); if (npc == null) return; final List<DropCategory> list = new ArrayList<>(); npc.getDropData().forEach(c -> list.add(c)); Collections.reverse(list); final int limit = Config.RAID_BOSS_DROP_PAGE_LIMIT; final int max = list.size() / limit + (list.size() % limit == 0 ? 0 : 1); list.subList((pageId - 1) * limit, Math.min(pageId * limit, list.size())); final StringBuilder sb = new StringBuilder(); for (DropCategory cat : list) { for (DropData drop : cat.getAllDrops()) { sb.append("<html>"); sb.append("<center>"); sb.append("<body>"); sb.append("<table width=\"256\">"); sb.append("<tr><td width=\"256\" align=\"center\">%name%</td></tr>"); sb.append("</table>"); sb.append("<br>"); sb.append("<table width=\"256\">"); sb.append("<tr><td width=\"256\" align=\"left\">" + _messages[1][Rnd.get(_messages.length)].replace("%boss%", npc.getName()) + "</td></tr>"); sb.append("</table>"); sb.append("<br>"); sb.append("<table width=\"224\" bgcolor=\"000000\">"); sb.append("<tr><td width=\"224\" align=\"center\">Raid Boss Drops</td></tr>"); sb.append("</table>"); sb.append("<br>"); final Item item = ItemTable.getInstance().getTemplate(drop.getItemId()); String name = item.getName(); if (name.length() >= 43) name = name.substring(0, 40) + "..."; sb.append("<table width=280 bgcolor=000000><tr>"); sb.append("<td width=44 height=41 align=center><table bgcolor=FFFFFF cellpadding=6 cellspacing=\"-5\"><tr><td><button width=32 height=32 back=" + item.getIcon() + " fore=" + item.getIcon() + "></td></tr></table></td>"); sb.append("<td width=236>" + name + "</td>"); sb.append("</tr></table><img src=L2UI.SquareGray width=280 height=1>"); sb.append("<br>"); sb.append("<table width=\"64\" cellspacing=\"2\">"); sb.append("<tr>"); for (int x = 0; x < max; x++) { final int pageNr = x + 1; if (pageId == pageNr) sb.append("<td align=\"center\">" + pageNr + "</td>"); else sb.append("<td align=\"center\"><a action=\"bypass -h npc_%objectId%_RaidBossDrop " + bossId + " " + pageNr + "\">" + pageNr + "</a></td>"); } sb.append("</tr>"); sb.append("</table>"); sb.append("<br>"); sb.append("<table width=\"160\" cellspacing=\"2\">"); sb.append("<tr>"); sb.append("<td width=\"160\" align=\"center\"><a action=\"bypass -h npc_%objectId%_RaidBossInfo " + _lastPage.get(player.getObjectId()) + "\">Return</a></td>"); sb.append("</tr>"); sb.append("</table>"); sb.append("<br>"); sb.append("<table width=\"256\">"); sb.append("<tr><td width=\"256\" align=\"center\">L2EUA</td></tr>"); sb.append("</table>"); sb.append("</center>"); sb.append("</body>"); sb.append("</html>"); final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); html.setHtml(sb.toString()); html.replace("%name%", getName()); html.replace("%objectId%", getObjectId()); player.sendPacket(html); } } }
-
Code FEATURE - Droplist Dashboard (Shift + Click)
Williams replied to StinkyMadness's topic in Server Shares & Files [L2J]
nice share -
hello would you like help with this for (ItemTemplateHolder holder : template.getItems()) html.replace("%items%", ItemTable.getInstance().getTemplate(holder.getId()).getIcon()); I want that whenever I add items in the class xml generate the icon of the item in an html
-
Code TOOL - ClassBalancer XML
Williams replied to StinkyMadness's topic in Server Shares & Files [L2J]
agradável -
Code command for admin Recall all aCis 384
Williams replied to Williams's topic in Server Shares & Files [L2J]
Main topic updated with corrections and restrictions. -
I come to share something I did for my server. improvements please can comment, please remove the part of Event code : https://pastebin.com/raw/Xa9dU7zd
-
topic updated with version 2 at a glance now written in xml
-
Good night, I come to share a code that I made for my project, I will give a simple tutorial how to use the music part of it. Code: https://pastebin.com/raw/ezfEX1kJ Well I made the code simple and very easy to edit, you only need to edit in one place to add messages, music, PVP amount !! The format is PVP, Message and Music quantity. PVP amount = 2 Generated Message = Double Kill Music = "" here the music. DOUBLE_KILL (2, "Double Kill", "YOUR MUSIC"), The song is on you, I hope you like it and don't forget to like it. here is version 2 in xml and totally redone by Tryskell's tips thanks to @StinkyMadness for the idea of creating in xml Version 2 : https://pastebin.com/raw/5cwXuTTc Credits for the idea @Kara` Unfinished credits @Williams ATTENTION : I'm sorry for some BR messages
-
Help Summon Buff aCis
Williams replied to Williams's question in Request Server Development Help [L2J]
Perfect! -
Help Summon Buff aCis
Williams replied to Williams's question in Request Server Development Help [L2J]
did not work if (schemeSkills.contains(skillId)) StringUtil.append(sb, (skillId == 4699 || skillId == 4700 ? "icon.skill1331" : skillId == 4702 || skillId == 4703 ? "icon.skill1332" : skillId < 100 ? "icon.skill00" + skillId : skillId < 1000 ? "icon.skill0" + skillId : "icon.skill" + skillId));
