Jump to content

Search the Community

Showing results for tags 'code'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Categories

  • Lineage II Development [L2J]
    • Sources
    • Addons & Mods
    • Tools
  • Lineage II Development [L2OFF]
    • Package Files
    • Mods & Extenders
    • Tools
  • Lineage II Client Development
    • Equipments
    • Npcs
    • Maps
    • Tools
  • Lineage II Bots & Tools
    • Bot Systems
    • Bot Scripts
    • Tools
  • Website Templates
  • DenArt Designs's Demo Updater

Forums

  • General Zone
    • Announcements and News
    • Newbies Introduce Urself
    • Maxcheaters Competitions & Events
    • Votes/Polls Area
    • Report Section
    • Downloads Section
  • Lineage II General Section
    • General Discussion [English]
    • Request Support [English]
  • Lineage II Hacks,Cheats and Bots
    • Hacks & Cheats [English]
    • Request Hacks & Cheats [English]
    • Botting [English]
    • Request Botting [English]
  • Lineage II Private Servers
    • Buy Advertising Link #1
    • Private Servers
    • Buy Advertising Link #2
    • [Previews] L2 Private Servers
    • Clans and Alliances
  • Lineage II Marketplace
    • Marketplace [Items & Chars]
    • Marketplace [L2Packs & Files]
    • Marketplace [Powerlvl & Support]
  • Lineage II OFF Server Development
    • Server Development Discussion [L2OFF]
    • Request Server Development Help [L2OFF]
    • Server Shares & Files [L2OFF]
  • Lineage II Java Server Development
    • Server Development Discussion [L2J]
    • Request Server Development Help [L2J]
    • Server Shares & Files [L2J]
    • Private Projects [L2J]
  • Lineage II Client Development
    • Client Development Discussion
  • MMO Games
    • League of Legends
    • World Of Warcraft Area
    • Other Multiplayer Games
  • General Section
  • Graphics/GFX Zone
  • VIP/SVIP/Donators Zone
  • MaxCheaters Corner
  • TEST's Topics
  • L2Classic Club's Just trying this thing out
  • Lineage 2 Revolution Club's Discussions
  • Lineage 2 Revolution Club's Tutorials
  • Lineage 2 Revolution Club's Request Help
  • DenArt Designs's Hello and welcome to my club!
  • DenArt Designs's News
  • `Kara for staff's Topics
  • `Kara for staff's Kara`

Product Groups

  • Advertisements
  • Special Groups

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 19 results

  1. Hello I'm sharing something that made some simple changes and build some parts of a clean and well written system of an event. Initial Messages: Search for commandname-e in your system and add at the end of it 115 114 register 116 115 unregister Code : https://pastebin.com/YRaCbU9T Author for the new event Williams Author of the original code DnR
  2. Currently using L2j Acis and I saw ppl trying to find out how to put the starting adena code back in . So what i did was , take the code from an another project and put it back on L2jAcis . Simple , yet some ppl still searching for it ... so go to net.sf.l2j.gameserver.network.clientpackets open CharacterCreate.java Use crtl+F and search for the line without the + then paste the code and remove the +. newChar.setCurrentMp(newChar.getMaxMp()); + +// Starting Items +if (Config.STARTING_ADENA > 0) + newChar.addAdena("Init", Config.STARTING_ADENA, null, false); + Then Go to net.sf.l2j Open Config.java and as above , search for " public static int DEATH_PENALTY_CHANCE;" and add the Code with the + in front of it . Then remove the +. public static int DEATH_PENALTY_CHANCE; +public static int STARTING_ADENA; + Then in the Config.java again search for " DEATH_PENALTY_CHANCE = players.getProperty("DeathPenaltyChance", 20);" and as done above do the same. DEATH_PENALTY_CHANCE = players.getProperty("DeathPenaltyChance", 20); +STARTING_ADENA = players.getProperty("StartingAdena", 100); + We're done with the codes. Now go to Players.properties in the Configs and add the text as shown. Delevel = True # Death Penalty chance if killed by mob (in %), 20 by default DeathPenaltyChance = 20 +#Amount of adena that a new character is given +StartingAdena = 0 + #============================================================= # Inventory / Warehouse #============================================================= aaaand we are done! All you have to do is to put the value you want where it is now 0. That's it .
  3. Hello again cheaters. - An simple limit zone for the raidbosses. (Works as "Anti-Take-Away" the Raidbosses) - You can use the @melron code to create easy that zones (Code Here ). - I know can be done with just the boss spawn location and threadpool but i prefer use zone for it. Code : [Hidden Content]
  4. Hello, cheaters. - Nothing really new or unique, an simple panel that create list with pages for the droplist of Monster/Raidboss. - Simple addon : Player can choose to avoid specific item from the droplist. - Code not include part of "item.getIcon()" you can find many shared ways to get icon for each item. Preview : Code : [Hidden Content]
  5. Color name - title system + Skill Reward coded on 374 acis , im not author of this , i decompiled and adapted . cheers package net.sf.l2j.gameserver.datatables; import net.sf.l2j.gameserver.templates.L2Pvp; import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.logging.Logger; import net.sf.l2j.gameserver.model.holder.IntIntHolder; import net.sf.l2j.gameserver.templates.StatsSet; import net.sf.l2j.gameserver.xmlfactory.XMLDocumentFactory; import org.w3c.dom.*; public class PvpTable { public PvpTable() { } public static void load() { try { File f = new File("./data/xml/pvp.xml"); Document doc = XMLDocumentFactory.getInstance().loadDocument(f); Node n = doc.getFirstChild(); for(Node d = n.getFirstChild(); d != null; d = d.getNextSibling()) if(d.getNodeName().equalsIgnoreCase("template")) { NamedNodeMap attrs = d.getAttributes(); int pvpAmount = Integer.valueOf(attrs.getNamedItem("pvp_amount").getNodeValue()).intValue(); int nameColor = Integer.decode((new StringBuilder()).append("0x").append(attrs.getNamedItem("name_color").getNodeValue()).toString()).intValue(); int titleColor = Integer.decode((new StringBuilder()).append("0x").append(attrs.getNamedItem("title_color").getNodeValue()).toString()).intValue(); String learnSkill = attrs.getNamedItem("learn_skill").getNodeValue().trim(); StatsSet set = new StatsSet(); set.set("pvp_amount", pvpAmount); set.set("name_color", nameColor); set.set("title_color", titleColor); L2Pvp template = new L2Pvp(set); if(learnSkill != null) { String property[] = learnSkill.split(";"); String as[] = property; int i = as.length; for(int j = 0; j < i; j++) { String data = as[j]; String holder[] = data.split(","); template.addLearnSkill(new IntIntHolder(Integer.parseInt(holder[0]), Integer.parseInt(holder[1]))); } } _templates.add(template); } } catch(Exception e) { _log.severe((new StringBuilder()).append("Exception: PvpTable load: ").append(e).toString()); } _log.info((new StringBuilder()).append("PvpTable: Loaded ").append(_templates.size()).append(" template(s).").toString()); } public static List<L2Pvp> getTemplate() { return _templates; } private static final Logger _log = Logger.getLogger(PvpTable.class.getName()); private static final List<L2Pvp> _templates = new ArrayList<>(); } package net.sf.l2j.gameserver.templates; import java.util.ArrayList; import java.util.List; import net.sf.l2j.gameserver.model.holder.IntIntHolder; import net.sf.l2j.gameserver.templates.StatsSet; public class L2Pvp { public L2Pvp(StatsSet set) { _pvpAmount = set.getInteger("pvp_amount"); _nameColor = set.getInteger("name_color"); _titleColor = set.getInteger("title_color"); } public int getPvpAmount() { return _pvpAmount; } public int getNameColor() { return _nameColor; } public int getTitleColor() { return _titleColor; } public List<IntIntHolder> getLearnSkills() { return _learnSkill; } public void addLearnSkill(IntIntHolder holder) { _learnSkill.add(holder); } private final int _pvpAmount; private final int _nameColor; private final int _titleColor; private final List<IntIntHolder> _learnSkill = new ArrayList<>(); } Open : Gameserver.java add somewhere this : PvpTable.load(); Open : Player.java add somewhere this : public static void updatePvp(Player player) { for(Iterator<L2Pvp> iterator = PvpTable.getTemplate().iterator(); iterator.hasNext();) { L2Pvp template = iterator.next(); if(template.getPvpAmount() <= player.getPvpKills()) { player.getAppearance().setNameColor(template.getNameColor()); player.getAppearance().setTitleColor(template.getTitleColor()); Iterator<IntIntHolder> iterator1 = template.getLearnSkills().iterator(); while(iterator1.hasNext()) { IntIntHolder holder = iterator1.next(); net.sf.l2j.gameserver.model.L2Skill skill = SkillTable.getInstance().getInfo(holder.getId(), holder.getValue()); if(skill != null) player.addSkill(skill, false); } } } player.broadcastUserInfo(); } find in Player.java below this line setPvpKills(getPvpKills() + 1); add -> updatePvp(this); find : public boolean setActiveClass(int classIndex) under this line restoreSkills(); add - > updatePvp(this); find : public void onPlayerEnter() add somewhere under : updatePvp(this); XML : loc : data/xml/pvp.xml <?xml version='1.0' encoding='utf-8'?> <list> <!-- <template pvp_amount="100" name_color="FFAA00" title_color="FFFF77" learn_skill="0,0;" /> --> <template pvp_amount="5" name_color="FFAA00" title_color="FFFF77" learn_skill="0,0;" /> </list>
  6. As the title say i will share with you one password manager for Acis 370. Credits: Sweets( Ive just made the imports right and the necessary changes in case that someone didnt know and have problem). Go to : net.sf.l2j.gameserver.model.actor.instance and create a new class with name: L2PasswordInstance /* * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * this program. If not, see <http://www.gnu.org/licenses/>. */ package net.sf.l2j.gameserver.model.actor.instance; import java.security.MessageDigest; import java.sql.Connection; import java.sql.PreparedStatement; import java.util.Base64; import java.util.StringTokenizer; import net.sf.l2j.commons.concurrent.ThreadPool; import net.sf.l2j.L2DatabaseFactory; import net.sf.l2j.gameserver.model.actor.template.NpcTemplate; import net.sf.l2j.gameserver.network.SystemMessageId; import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage; import net.sf.l2j.gameserver.network.serverpackets.SystemMessage; /** * @author SweeTs */ public class L2PasswordInstance extends Folk { public L2PasswordInstance(int objectId, NpcTemplate template) { super(objectId, template); } @Override public void onBypassFeedback(Player player, String command) { if (command.startsWith("change_password")) { StringTokenizer st = new StringTokenizer(command); st.nextToken(); String newPass = ""; String repeatNewPass = ""; try { if (st.hasMoreTokens()) { newPass = st.nextToken(); repeatNewPass = st.nextToken(); } } catch (Exception e) { player.sendMessage("Please fill all the blanks before requesting for a password change."); return; } if (!conditions(newPass, repeatNewPass, player)) return; changePassword(newPass, repeatNewPass, player); } } private static boolean conditions(String newPass, String repeatNewPass, Player player) { if (newPass.length() < 3) { player.sendMessage("The new password is too short!"); return false; } else if (newPass.length() > 45) { player.sendMessage("The new password is too long!"); return false; } else if (!newPass.equals(repeatNewPass)) { player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.PASSWORD_ENTERED_INCORRECT2)); return false; } return true; } @Override public void showChatWindow(Player activeChar) { final NpcHtmlMessage html = new NpcHtmlMessage(0); final StringBuilder sb = new StringBuilder(); sb.append("<html><title>Account Manager</title>"); sb.append("<body><center>"); sb.append("<img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br>"); sb.append("New password: <edit var=\"new\" width=100 height=15><br>"); sb.append("Repeat: <edit var=\"repeatnew\" width=100 height=15><br>"); sb.append("<img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><br>"); sb.append("<a action=\"bypass -h npc_%objectId%_change_password $new $repeatnew\">Change password</a>"); sb.append("</center></body></html>"); html.setHtml(sb.toString()); html.replace("%objectId%", getObjectId()); activeChar.sendPacket(html); } private static void changePassword(String newPass, String repeatNewPass, Player activeChar) { try (Connection con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement ps = con.prepareStatement("UPDATE accounts SET password=? WHERE login=?")) { byte[] newPassword = MessageDigest.getInstance("SHA").digest(newPass.getBytes("UTF-8")); ps.setString(1, Base64.getEncoder().encodeToString(newPassword)); ps.setString(2, activeChar.getAccountName()); ps.executeUpdate(); activeChar.sendMessage("Congratulations! Your password has been changed. You will now be disconnected for security reasons. Please login again."); ThreadPool.schedule(() -> activeChar.logout(false), 3000); } catch (Exception e) { _log.warning("There was an error while updating account:" + e); } } } After you are passing this the only thing that you have to do is create a new npc with type: L2Password. HAVE A NICE DAY GUYS :)
  7. Hello guys, nothing special, just a guy ask me for that and maybe more peoples looking for it. You select enchant aura for all weapons on character selection. Diff Created on aCis 378: Index: config/server.properties =================================================================== --- config/server.properties (revision 9) +++ config/server.properties (working copy) @@ -59,6 +59,10 @@ # Clients related options # ================================================================ +# Visual Enchant for weapons on character selection +# Disable : 0 +VisualEnchant = 16 + # Allow delete chars after D days, 0 = feature disabled. DeleteCharAfterDays = 7 Index: java/net/sf/l2j/Config.java =================================================================== --- java/net/sf/l2j/Config.java (revision 9) +++ java/net/sf/l2j/Config.java (working copy) @@ -497,6 +497,7 @@ public static boolean SERVER_GMONLY; /** clients related */ + public static int VISUAL_ENCHANT; public static int DELETE_DAYS; public static int MAXIMUM_ONLINE_USERS; @@ -1210,6 +1211,7 @@ SERVER_LIST_TESTSERVER = server.getProperty("TestServer", false); SERVER_LIST_PVPSERVER = server.getProperty("PvpServer", true); + VISUAL_ENCHANT = server.getProperty("VisualEnchant", 0); DELETE_DAYS = server.getProperty("DeleteCharAfterDays", 7); MAXIMUM_ONLINE_USERS = server.getProperty("MaximumOnlineUsers", 100); Index: java/net/sf/l2j/gameserver/network/serverpackets/CharSelectInfo.java =================================================================== --- java/net/sf/l2j/gameserver/network/serverpackets/CharSelectInfo.java (revision 9) +++ java/net/sf/l2j/gameserver/network/serverpackets/CharSelectInfo.java (working copy) @@ -6,6 +6,7 @@ import java.util.ArrayList; import java.util.List; +import net.sf.l2j.Config; import net.sf.l2j.L2DatabaseFactory; import net.sf.l2j.gameserver.data.sql.ClanTable; import net.sf.l2j.gameserver.model.CharSelectSlot; @@ -149,7 +150,7 @@ writeD((slot.getAccessLevel() > -1) ? ((slot.getDeleteTimer() > 0) ? (int) ((slot.getDeleteTimer() - System.currentTimeMillis()) / 1000) : 0) : -1); writeD(slot.getClassId()); writeD((i == _activeId) ? 0x01 : 0x00); - writeC(Math.min(127, slot.getEnchantEffect())); + writeC(Config.VISUAL_ENCHANT > 0 ? Config.VISUAL_ENCHANT : Math.min(127, slot.getEnchantEffect())); writeD(slot.getAugmentationId()); } getClient().setCharSelectSlot(_slots);
  8. Hello chaters, - With currect code you can setup and event with spawning raidbosses on specific times. - You can use the @melron code to create easy that zones (Code Here ). Code (Updated 03/01/2019) : [Hidden Content] Credits : StinkyMadness
  9. Hello i want to share this ingame balancer its for acis 372 its useless for me now. Files/Code: https://www101.zippyshare.com/v/nMPZpOej/file.html
  10. Hello there.. Here is my Epic Boss Manager from my old server. Nothing special, but some of you may need it. What's inside? Works only with retail Grandbosses. [No retail zaken id] Inform you about the status of Grandboss. Inform you about respawn time. Date/Time. Enable/Disable it on configs. # Announce Grandboss status. # Ex: If status for Antharas/Valakas/Frintezza change to 2 player get announce: # Grandboss>name is engaged in battle. # If status changed to 3: Grandbossname has been killed. Type .epic for details! # For Baium if status change to 1 - Baium is awake and fighting. # All Grandboses respawned - Grandbossname is spawned in the world! AnnounceGrandBossStatus = True [Hidden Content]
  11. Hello there.. Here is my buffer from my old server.. (Main html made by prwtoftw) What's inside? Mage | Fighter set [config] Buffs/Dance/Song/Extra etc one by one Special buffs + Malaria Vote buff [If you want it, you can enable it, config] Scheme Buffer Code Preview > [Hidden Content] Code/HTML/XML > [Hidden Content]
  12. Hello guys, Before 4-5 months i created a script for a new raid in order to avoid all classic raids that are really boring... It isn't something special, but i always like different and unusual things... Plagueseeker Raid Starting with some special cameras while all players are paralyzed. When the broadcast end, the following features stands there: action task every 2 seconds: There is 20% chance to 'debuff' a random player if is healer class Debuffs: 20% chance for 15% chance for 10% chance for 50% chance for There is 5% chance to 1) Spawn some minions when the hp of the raid is lower than 40% in order to protect the raid boss (can be happened unlimited times with chance 5%). Minions will suicide after 10 seconds after the spawn time if not get killed. 2) Pick a random target and kill him instant. When the hp of the raid is lower than 50% Broadcast again some special cameras (while players are paralyzed again), an earthquake for 5 seconds and instant kill 10 random players around the raid in 700 radius (can be happened only 1 time). inactivity task If the raid boss not attacked for more than 15 minutes, all players are going back and raid will be deleted. * All the above features are meant to be used in a boss zone ( i used 150000 as a custom one in my pack). Any feature wont work outside of the zone, I wont share any thing like that since its just c/p. * Its your responsibility to use the necessary checks in order to avoid bugs like move the raid out of zone. I coded for me at coliseum with doors closed. Also you have to set by urself how the raid will be spawned (i was about to code the spawn thing but i dont remember why i didnt). I used //spawn just for the video . Code: [Hidden Content] Coded (if i remember well) in acis 370. Note: If you want to expand it or understand how a script can be coded, check this topic (if any other post is related to scripts and have informations post it)
  13. https://pastebin.com/epSa6FQw credits : Williams
  14. +++ java/net/sf/l2j/gameserver/network/clientpackets/RequestRecipeShopListSet.java +import net.sf.l2j.gameserver.model.zone.type.L2MultiFunctionZone; @@ -62,6 +63,12 @@ return; } + if (player.isInsideZone(ZoneId.MULTI_FUNCTION) && !L2MultiFunctionZone.store_zone) + { + player.sendMessage("You cannot craft while inside Multifunction zone."); + return; + } + if (!player.isInsideZone(ZoneId.NO_STORE)) { player.sendPacket(SystemMessageId.NO_PRIVATE_WORKSHOP_HERE); +++ java/net/sf/l2j/gameserver/network/clientpackets/Logout.java +import net.sf.l2j.gameserver.model.zone.type.L2MultiFunctionZone; @@ -56,6 +57,13 @@ return; } + if (player.isInsideZone(ZoneId.MULTI_FUNCTION) && !L2MultiFunctionZone.logout_zone) + { + player.sendMessage("You cannot Logout while inside a Multifunction zone."); + player.sendPacket(ActionFailed.STATIC_PACKET); + return; + } + if (player.isInsideZone(ZoneId.NO_RESTART)) { player.sendPacket(SystemMessageId.NO_LOGOUT_HERE); +++java/net/sf/l2j/gameserver/model/zone/ZoneId.java DANGER_AREA(15), CAST_ON_ARTIFACT(16), NO_RESTART(17), - SCRIPT(18); + SCRIPT(18), + MULTI_FUNCTION(19); private final int _id; +++java/net/sf/l2j/gameserver/network/clientpackets/SetPrivateStoreListBuy.java +import net.sf.l2j.gameserver.model.zone.type.L2MultiFunctionZone; @@ -83,6 +84,13 @@ return; } + if (player.isInsideZone(ZoneId.MULTI_FUNCTION) && !L2MultiFunctionZone.store_zone) + { + player.sendPacket(new PrivateStoreManageListBuy(player)); + player.sendMessage("You cannot start store while inside Multifunction zone."); + return; + } + if (!player.isInsideZone(ZoneId.NO_STORE)) { player.sendPacket(SystemMessageId.NO_PRIVATE_STORE_HERE); +++java/net/sf/l2j/gameserver/network/clientpackets/SetPrivateStoreListSell.java +import net.sf.l2j.gameserver.model.zone.type.L2MultiFunctionZone; @@ -71,6 +72,13 @@ return; } + if (player.isInsideZone(ZoneId.MULTI_FUNCTION) && !L2MultiFunctionZone.store_zone) + { + player.sendPacket(new PrivateStoreManageListSell(player, _packageSale)); + player.sendMessage("You cannot start store while inside Multifunction zone."); + return; + } + if (!player.getAccessLevel().allowTransaction()) { player.sendPacket(SystemMessageId.YOU_ARE_NOT_AUTHORIZED_TO_DO_THAT); +++java/net/sf/l2j/gameserver/network/serverpackets/Die.java. +import net.sf.l2j.gameserver.model.zone.ZoneId; +import net.sf.l2j.gameserver.model.zone.type.L2MultiFunctionZone; public class Die extends L2GameServerPacket { private final int _charObjId; private final boolean _fake; private boolean _sweepable; + private boolean _canTeleport; private L2AccessLevel _access = AccessLevels._userAccessLevel; @@ -47,6 +50,7 @@ Player player = (Player) cha; _access = player.getAccessLevel(); _clan = player.getClan(); + _canTeleport = !(player.isInsideZone(ZoneId.MULTI_FUNCTION) && L2MultiFunctionZone.revive); @@ -86,7 +90,7 @@ } else { - writeD(0x01); // to nearest village + writeD(_canTeleport ? 0x01 : 0); // to nearest village @@ -96,7 +100,7 @@ - if (_clan != null) + if (_canTeleport && _clan != null) { ++++java/net/sf/l2j/gameserver/model/actor/instance/Player.java +import net.sf.l2j.gameserver.model.zone.type.L2MultiFunctionZone; @@ -4384,6 +4385,8 @@ // Add PvP point to attacker. setPvpKills(getPvpKills() + 1); + L2MultiFunctionZone.givereward(this); + // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter sendPacket(new UserInfo(this)); } ++++java/net/sf/l2j/gameserver/model/itemcontainer/ItemContainer.java { protected static final Logger _log = Logger.getLogger(ItemContainer.class.getName()); - protected final List<ItemInstance> _items; + public final List<ItemInstance> _items; protected ItemContainer() { +++java/net/sf/l2j/gameserver/model/zone/type/L2MultiFunctionZone.java CREATE NEW THIS FILE DOES NOT EXIST! package net.sf.l2j.gameserver.model.zone.type; import java.io.File; import java.io.FileInputStream; import java.util.ArrayList; import java.util.List; import java.util.Properties; import net.sf.l2j.commons.concurrent.ThreadPool; import net.sf.l2j.commons.random.Rnd; import net.sf.l2j.gameserver.datatables.SkillTable; import net.sf.l2j.gameserver.model.L2Skill; import net.sf.l2j.gameserver.model.actor.Creature; import net.sf.l2j.gameserver.model.actor.Summon; import net.sf.l2j.gameserver.model.actor.instance.Player; import net.sf.l2j.gameserver.model.item.instance.ItemInstance; import net.sf.l2j.gameserver.model.itemcontainer.PcInventory; import net.sf.l2j.gameserver.model.zone.L2ZoneType; import net.sf.l2j.gameserver.model.zone.ZoneId; public class L2MultiFunctionZone extends L2ZoneType { public L2MultiFunctionZone(int id) { super(id); loadConfigs(); } public static boolean pvp_enabled, restart_zone, store_zone, logout_zone, revive_noblesse, revive_heal, revive, remove_buffs, remove_pets, give_noblesse; static int radius, enchant, revive_delay; static int[][] spawn_loc; L2Skill noblesse = SkillTable.getInstance().getInfo(1323, 1); private static List<String> items = new ArrayList<>(), classes = new ArrayList<>(), grades = new ArrayList<>(); public static List<int[]> rewards = new ArrayList<>(); static String[] gradeNames = { "", "D", "C", "B", "A", "S" }; @Override protected void onEnter(Creature character) { character.setInsideZone(ZoneId.NO_SUMMON_FRIEND, true); character.setInsideZone(ZoneId.MULTI_FUNCTION, true); if (character instanceof Player) { Player activeChar = ((Player) character); if (classes != null && classes.contains("" + activeChar.getClassId().getId())) { activeChar.teleToLocation(83597, 147888, -3405, 0); activeChar.sendMessage("Your class is not allowed in the MultiFunction zone."); return; } for (ItemInstance o : activeChar.getInventory()._items) { if (o.isEquipable() && o.isEquipped() && !checkItem(o)) { int slot = activeChar.getInventory().getSlotFromItem(o); activeChar.getInventory().unEquipItemInBodySlotAndRecord(slot); activeChar.sendMessage(o.getItemName() + " unequiped because is not allowed inside this zone."); } } if (give_noblesse) noblesse.getEffects(activeChar, activeChar); if (pvp_enabled) activeChar.updatePvPFlag(1); activeChar.sendMessage("You entered in a MultiFunction zone."); clear(activeChar); } } @Override protected void onExit(Creature character) { character.setInsideZone(ZoneId.NO_SUMMON_FRIEND, false); character.setInsideZone(ZoneId.MULTI_FUNCTION, false); if (character instanceof Player) { Player activeChar = ((Player) character); activeChar.sendMessage("You left from a MultiFunction zone."); if (pvp_enabled) activeChar.updatePvPFlag(0); } } @Override public void onDieInside(final Creature character) { if (character instanceof Player) { final Player activeChar = ((Player) character); if (revive) { ThreadPool.schedule(new Runnable() { @Override public void run() { activeChar.doRevive(); heal(activeChar); int[] loc = spawn_loc[Rnd.get(spawn_loc.length)]; activeChar.teleToLocation(loc[0] + Rnd.get(-radius, radius), loc[1] + Rnd.get(-radius, radius), loc[2], 0); } }, revive_delay * 1000); } } } @Override public void onReviveInside(Creature character) { if (character instanceof Player) { Player activeChar = ((Player) character); if (revive_noblesse) noblesse.getEffects(activeChar, activeChar); if (revive_heal) heal(activeChar); } } static void heal(Player activeChar) { activeChar.setCurrentHp(activeChar.getMaxHp()); activeChar.setCurrentCp(activeChar.getMaxCp()); activeChar.setCurrentMp(activeChar.getMaxMp()); } private static void clear(Player player) { if (remove_buffs) { player.stopAllEffects(); if (remove_pets) { Summon pet = player.getPet(); if (pet != null) { pet.stopAllEffects(); pet.unSummon(player); } } } else { if (remove_pets) { Summon pet = player.getPet(); if (pet != null) pet.unSummon(player); } } } public static void givereward(Player player) { if (player.isInsideZone(ZoneId.MULTI_FUNCTION)) { for (int[] reward : rewards) { PcInventory inv = player.getInventory(); inv.addItem("Custom Reward", reward[0], reward[1], player, player); } } } public static boolean checkItem(ItemInstance item) { int o = item.getItem().getCrystalType().ordinal(); int e = item.getEnchantLevel(); if (enchant != 0 && e >= enchant) return false; if (grades.contains(gradeNames[o])) return false; if (items != null && items.contains("" + item.getItemId())) return false; return true; } private static void loadConfigs() { try { Properties prop = new Properties(); prop.load(new FileInputStream(new File("./config/MultiFunctionZone.properties"))); pvp_enabled = Boolean.parseBoolean(prop.getProperty("EnablePvP", "False")); spawn_loc = parseItemsList(prop.getProperty("SpawnLoc", "150111,144740,-12248")); revive_delay = Integer.parseInt(prop.getProperty("ReviveDelay", "10")); if (revive_delay != 0) revive = true; give_noblesse = Boolean.parseBoolean(prop.getProperty("GiveNoblesse", "False")); String[] propertySplit = prop.getProperty("Items", "").split(","); if (propertySplit.length != 0) for (String i : propertySplit) items.add(i); propertySplit = prop.getProperty("Grades", "").split(","); if (propertySplit.length != 0) for (String i : propertySplit) if (i.equals("D") || i.equals("C") || i.equals("B") || i.equals("A") || i.equals("S")) grades.add(i); propertySplit = prop.getProperty("Classes", "").split(","); if (propertySplit.length != 0) for (String i : propertySplit) classes.add(i); radius = Integer.parseInt(prop.getProperty("RespawnRadius", "500")); enchant = Integer.parseInt(prop.getProperty("Enchant", "0")); remove_buffs = Boolean.parseBoolean(prop.getProperty("RemoveBuffs", "False")); remove_pets = Boolean.parseBoolean(prop.getProperty("RemovePets", "False")); restart_zone = Boolean.parseBoolean(prop.getProperty("NoRestartZone", "False")); store_zone = Boolean.parseBoolean(prop.getProperty("NoStoreZone", "False")); logout_zone = Boolean.parseBoolean(prop.getProperty("NoLogoutZone", "False")); revive_noblesse = Boolean.parseBoolean(prop.getProperty("ReviveNoblesse", "False")); revive_heal = Boolean.parseBoolean(prop.getProperty("ReviveHeal", "False")); propertySplit = prop.getProperty("Rewards", "57,100000").split(";"); for (String reward : propertySplit) { String[] rewardSplit = reward.split(","); if (rewardSplit.length == 2) { try { rewards.add(new int[] { Integer.parseInt(rewardSplit[0]), Integer.parseInt(rewardSplit[1]) }); } catch (NumberFormatException nfe) { } } } } catch (Exception e) { e.printStackTrace(); } } private static int[][] parseItemsList(String line) { final String[] propertySplit = line.split(";"); if (propertySplit.length == 0) return null; int i = 0; String[] valueSplit; final int[][] result = new int[propertySplit.length][]; for (String value : propertySplit) { valueSplit = value.split(","); if (valueSplit.length != 3) return null; result[i] = new int[3]; try { result[i][0] = Integer.parseInt(valueSplit[0]); } catch (NumberFormatException e) { return null; } try { result[i][1] = Integer.parseInt(valueSplit[1]); } catch (NumberFormatException e) { return null; } try { result[i][2] = Integer.parseInt(valueSplit[2]); } catch (NumberFormatException e) { return null; } i++; } return result; } } ++++java/net/sf/l2j/gameserver/network/clientpackets/UseItem.java +import net.sf.l2j.gameserver.model.zone.ZoneId; +import net.sf.l2j.gameserver.model.zone.type.L2MultiFunctionZone; @@ -96,6 +98,12 @@ if (item == null) return; + if (getClient().getActiveChar().isInsideZone(ZoneId.MULTI_FUNCTION) && !L2MultiFunctionZone.checkItem(item)) + { + getClient().getActiveChar().sendMessage("You cannot use " +item.getName()+ " inside this zone."); + return; + } + +++java/net/sf/l2j/gameserver/network/clientpackets/RequestRestart.java +import net.sf.l2j.gameserver.model.zone.type.L2MultiFunctionZone; @@ -54,6 +55,13 @@ return; } + if (player.isInsideZone(ZoneId.MULTI_FUNCTION) && !L2MultiFunctionZone.restart_zone) + { + player.sendMessage("You cannot restart while inside a Multifunction zone."); + sendPacket(RestartResponse.valueOf(false)); + return; + } + if (player.isInsideZone(ZoneId.NO_RESTART)) { player.sendPacket(SystemMessageId.NO_RESTART_HERE); +++config/MultiFunctionZone.properties # --------------------------------------------------------------------------- # MultiFunctionZone # --------------------------------------------------------------------------- # This option will turn on PvP flag to all people when entering to the zone EnablePvP = True # If set to false, zone will be no-restart zone NoRestartZone = False # If set to false, zone will be no-logout zone NoLogoutZone = False # If set to false, zone will be no-store zone NoStoreZone = False # Give noblesse after revive? ReviveNoblesse = False # Heal after revive? ReviveHeal = False # Delay, in seconds, to wait before revive # 0 to disable ReviveDelay = 10 # Set the spawn points where players will be teleported on revive, if enabled # example:150111,144740,-12248;143665,144418,-12022;144443,147685,-12139 SpawnLoc = 150111,144740,-12248;143665,144418,-12022;144443,147685,-12139 # Random respawn radius RespawnRadius = 500 # If set to true, players will take noblesse blessing when entering GiveNoblesse = True # Remove buffs when entering to the zone RemoveBuffs = False # Remove pets when entering to the zone RemovePets = False # Special rewards when hunting inside this zone # example: 57,100000;14720,1 Rewards = 57,100000;14720,1 # List of Items(id's) that won't be usable inside this area and also will be unequiped when entering # (armor, weapons, scrolls, potions, etc), example: 728,7575, 6383, 1538 Items = 728,7575,6383,1538 # List of Grades that won't be usable inside this area and also will be unequiped when entering # example: D,C,B,A,S Grades = C,B,A # Items with this enchant or more won't be usable inside this area and also will be unequiped when entering # 0 to disable Enchant = 0 # Players with one of that classes won't be able to enter to the zone # example: 93,85,12 Classes = 92 \ No newline at end of file +++ data/xml/zones/MultiFunctionZone.xml <?xml version="1.0" encoding="UTF-8"?> <list> <zone type="MultiFunctionZone" shape="Cuboid" minZ="-3752" maxZ="-352"><!-- gludin_pvp --> <node X="-88411" Y="141732" /> <node X="-87429" Y="142708" /> <spawn X="-86979" Y="142402" Z="-3643" /> </zone> </list> CREDITS: ^Wyatt
  15. Version 1.0.0

    this is script for arabic chat in game like " السلام عليكم - اخبارك - يسلمو " it's for h5 only >> i think arabic ppl will try to find it .

    5.00 EUR

  16. Pretty self explanatory. This is a new Packet in order to open any url that you want to the user's pc. Can be used in vote rewards and shit like that. It is for Interlude. package net.sf.l2j.gameserver.network.serverpackets; /** * @author Elfocrash * */ public class OpenUrl extends L2GameServerPacket { private final String _url; public OpenUrl(String url) { _url = url; } @Override protected final void writeImpl() { writeC(0x70); writeS(_url); } } Usage: activeChar.sendPacket(new OpenUrl("https://www.google.co.uk/")); Client side: entry.dll Engine.dll in case just the entry file doens't work: engine.dll If the two things above don't work either here is the whole vanilla system: system Thanks to Szaka for helping me understand how this shit works btw.
  17. My first code 2 days work. so this is a L2Chaotic zone with change map, The maps is change random and he teleport players in town before change map he can't go or stay in old map becuase he teleport him in change map maybe need more work. but i try ;D So get it! @author L2jLuna Dev. Base: L2jFrozen http://pastebin.com/HdZFXE8b
  18. How does it works? our system automatically pop-up validation window to characters oscillating around specified number of killed monsters, in order to verify possible bots use. player have to match randomly generated colours within <also> randomly chosen patterns (time is limited). forgive me guys, but since now any instant changes or system updates will be available only for acis customers. authors: credits: @Agent @Rootware @Caparso @Hasha @SweeTs @Tryskell our main provisions: does not require to be fluent in a foreign language, as simple as possible. insurmountable by nowadays programs used to inject bots. does not affecting existing source (just few necessary lines), no external libs are needed. punishment selection (move to nearest town, kick from the server, put to the jail or ban character). configurable validation time. code preview? check it out on pastebin. bots_prevention_v1.1.diff html/mods/necessary images How does software see content? <html><title>Bots prevention</title><body><center><br><br><img src="L2UI_CH3.herotower_deco" width="256" height="32"><br><br><font color="a2a0a2">in order to prove you are a human being<br1>you've to</font> <font color="b09979">match colours within generated pattern:</font><br><br><img src="Crest.crest_1_9903795" width="32" height="32"></td></tr><br><br><font color=b09979>click-on pattern of your choice beneath:</font><table><tr><td><button action="bypass -h report_0" width=32 height=32 back="Crest.crest_1_1978" fore="Crest.crest_1_1978"></td><td><button action="bypass -h report_1" width=32 height=32 back="Crest.crest_1_1970" fore="Crest.crest_1_1970"></td><td><button action="bypass -h report_2" width=32 height=32 back="Crest.crest_1_1975" fore="Crest.crest_1_1975"></td><td><button action="bypass -h report_3" width=32 height=32 back="Crest.crest_1_1971" fore="Crest.crest_1_1971"></td></tr></table></center></body></html>
  19. Hello, i was searching for this command but i didnt found it in our forum so i decided to share it, below you can preview the html's How to install it? EASY: 1. GameServer\data\html\mods (add here the repair FOLDER not only the files) 2. GameServer\data\scripts\handlers\voicedcommandhandlers (only the file Repair.java) (dont forget to edit your masterhandler.java script) [Hidden Content] Credits: Szponiasty
×