-
Posts
1,472 -
Credits
0 -
Joined
-
Last visited
-
Days Won
4 -
Feedback
0%
Community Answers
-
Tessa's post in I Dont Know How To Build was marked as the answer
http://www.maxcheaters.com/topic/203773-free-help-small-code-fixes-request-small-codes/?p=2580299
-
Tessa's post in Java Error (Switch) was marked as the answer
Note that you should change the compiler version in the build.xml file too. :lol:
-
Tessa's post in From Where I Can Remove This Message was marked as the answer
In the MultiSellChoose client packet.
-
Tessa's post in After Death In Pvp Show Hp/cp was marked as the answer
1) Find this:
if (pk != null) 2) Put your code somewhere between the braces:
sendMessage("You have been slain by "+killer.getName()+", "+(int)killer.getCurrentHp()+" HP and "+(int)killer.getCurrentCp()+" CP remain."); 3) Don't even think about opening a live server! :lol:
-
Tessa's post in How To Remove Item Penalthy For Lvl was marked as the answer
You should have an option somewhere in the config files, there are already a check about that
if (!Config.EXPERTISE_PENALTY) return; -
Tessa's post in Peacefully Zone was marked as the answer
Let me show you how to create an Cuboid type zone:
First go to Town of Giran and get the coordinates of the first node http://prntscr.com/5vakf7
Then get the coordinates of the second node http://prntscr.com/5vaklr
Now you should put these coordinates in zone.xml
<zone name="Giran northern coridor west" type="PeaceZone" shape="Cuboid" minZ="-3400" maxZ="-3550"> <node X="81153" Y="147906" /> <node X="82706" Y="149306" /> </zone> Congratulations, you have set up a new Cuboid zone.
There are one more thing... if you use a pack that stores the zones in zone_vertices table, you should put the x and y coordinates in it:
INSERT INTO `zone_vertices` (`id`,`order`,`x`,`y`) VALUES (20000,0,81153,147906), (20000,1,82706,149306); Then in zone.xml
<zone id='20000' type='PeaceZone' shape='Cuboid' minZ='-3400' maxZ='-3550' /> The id in zone.xml equals to the id in zone_vertices
-
Tessa's post in Restricted Private Store! was marked as the answer
Well, I will guide you through the zone creation, but I will use a pack that I'm currently working on... so l2jhellas implementation might be little different.
First you should create the zone:
Index: java/net/sf/l2j/gameserver/model/zone/type/L2StoreZone.java =================================================================== --- java/net/sf/l2j/gameserver/model/zone/type/L2StoreZone.java (revision 0) +++ java/net/sf/l2j/gameserver/model/zone/type/L2StoreZone.java (working copy) @@ -0,0 +1,64 @@ +/* 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 2, 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, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. + * + * http://www.gnu.org/copyleft/gpl.html + */ +package net.sf.l2j.gameserver.model.zone.type; + +import net.sf.l2j.gameserver.model.L2Character; +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; +import net.sf.l2j.gameserver.model.zone.L2ZoneType; + +/** + * A scripted zone... + * Creation of such a zone should require somekind + * of jython script reference which can handle onEnter() / onExit() + * + * @author durgus + */ +public class L2StoreZone extends L2ZoneType +{ + public L2StoreZone(int id) + { + super(id); + } + + @Override + protected void onEnter(L2Character character) + { + if (character instanceof L2PcInstance) + { + character.setInsideZone(L2Character.ZONE_STORE, true); + ((L2PcInstance) character).sendMessage("You enter the private store zone!"); + } + } + + @Override + protected void onExit(L2Character character) + { + if (character instanceof L2PcInstance) + { + character.setInsideZone(L2Character.ZONE_STORE, false); + ((L2PcInstance) character).sendMessage("You left the private store zone!"); + } + } + + @Override + protected void onDieInside(L2Character character) {} + + @Override + protected void onReviveInside(L2Character character) {} + +} All of these methods SHOULD be here, because you extend the abstract class L2ZoneType which requires that.
Then you should add the new zone in L2Character:
Index: java/net/sf/l2j/gameserver/model/L2Character.java =================================================================== --- java/net/sf/l2j/gameserver/model/L2Character.java (revision 385) +++ java/net/sf/l2j/gameserver/model/L2Character.java (working copy) @@ -189,6 +189,7 @@ public static final int ZONE_WATER = 128; public static final int ZONE_JAIL = 256; public static final int ZONE_MONSTERTRACK = 512; + public static final int ZONE_STORE = 1024; private int _currentZones = 0; Currently I don't know how the zone system works, but it should be that way :lol:
In my pack I have to load the zone that way:
Index: java/net/sf/l2j/gameserver/datatables/ZoneData.java =================================================================== --- java/net/sf/l2j/gameserver/datatables/ZoneData.java (revision 385) +++ java/net/sf/l2j/gameserver/datatables/ZoneData.java (working copy) @@ -49,6 +49,7 @@ import net.sf.l2j.gameserver.model.zone.type.L2JailZone; import net.sf.l2j.gameserver.model.zone.type.L2MotherTreeZone; import net.sf.l2j.gameserver.model.zone.type.L2NoLandingZone; +import net.sf.l2j.gameserver.model.zone.type.L2StoreZone; import net.sf.l2j.gameserver.model.zone.type.L2OlympiadStadiumZone; import net.sf.l2j.gameserver.model.zone.type.L2PeaceZone; import net.sf.l2j.gameserver.model.zone.type.L2TownZone; @@ -171,6 +172,8 @@ temp = new L2BossZone(zoneId); else if (zoneType.equals("WaterZone")) temp = new L2WaterZone(zoneId); + else if (zoneType.equals("StoreZone")) + temp = new L2StoreZone(zoneId); // Check for unknown type I don't know if the zone should be registered in l2jhellas...
Finally you should check if the player is inside the zone:
Index: java/net/sf/l2j/gameserver/clientpackets/RequestPrivateStoreManageBuy.java =================================================================== --- java/net/sf/l2j/gameserver/clientpackets/RequestPrivateStoreManageBuy.java (revision 385) +++ java/net/sf/l2j/gameserver/clientpackets/RequestPrivateStoreManageBuy.java (working copy) @@ -18,7 +18,9 @@ */ package net.sf.l2j.gameserver.clientpackets; +import net.sf.l2j.gameserver.model.L2Character; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; +import net.sf.l2j.gameserver.serverpackets.ActionFailed; /** * This class ... @@ -42,6 +44,12 @@ L2PcInstance player = getClient().getActiveChar(); if (player != null) { + if (!player.isInsideZone(L2Character.ZONE_STORE)) + { + player.sendMessage("You cannot open a private store here!"); + sendPacket(ActionFailed.STATIC_PACKET); + return; + } player.tryOpenPrivateBuyStore(); } } Index: java/net/sf/l2j/gameserver/clientpackets/RequestPrivateStoreManageSell.java =================================================================== --- java/net/sf/l2j/gameserver/clientpackets/RequestPrivateStoreManageSell.java (revision 385) +++ java/net/sf/l2j/gameserver/clientpackets/RequestPrivateStoreManageSell.java (working copy) @@ -18,7 +18,9 @@ */ package net.sf.l2j.gameserver.clientpackets; +import net.sf.l2j.gameserver.model.L2Character; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; +import net.sf.l2j.gameserver.serverpackets.ActionFailed; /** * This class ... @@ -42,6 +44,12 @@ L2PcInstance player = getClient().getActiveChar(); if (player != null) { + if (!player.isInsideZone(L2Character.ZONE_STORE)) + { + player.sendMessage("You cannot open a private store here!"); + sendPacket(ActionFailed.STATIC_PACKET); + return; + } player.tryOpenPrivateSellStore(); } } Now you should set up the zone in data/xml/zone.xml
<!-- Store Zone --> <zone id='20000' type='StoreZone' shape='Cuboid' minZ='-3500' maxZ='-3400' /> And the zone_vertices:
INSERT INTO `zone_vertices` (`id`,`order`,`x`,`y`) VALUES (20000,0,81151,147905), (20000,1,82713,149312); Basically, that is all you need..
http://prntscr.com/5ull6v
http://prntscr.com/5ullrq
http://prntscr.com/5ulmbq
This may not be the best guide but... :lol:
-
Tessa's post in Hero Skills On Subclass was marked as the answer
No, please don't! :lol:
You should only remove the class check...
Here is what this check does:
public void setHero(boolean hero) { if (hero && (_baseClass == _activeClass)) // If the player is a hero and his current class is his base class { for (Skill skill : SkillTreesData.getInstance().getHeroSkillTree().values()) { addSkill(skill, false); // Don't persist hero skills into database } } else // If the player isn't a hero and his current class isn't his base class { for (Skill skill : SkillTreesData.getInstance().getHeroSkillTree().values()) { removeSkill(skill, false, true); // Just remove skills from non-hero players } } _hero = hero; sendSkillList(); } So the only thing you should do is:
public void setHero(boolean hero) { if (hero) // If the player is a hero { for (Skill skill : SkillTreesData.getInstance().getHeroSkillTree().values()) { addSkill(skill, false); // Don't persist hero skills into database } } else // If the player isn't a hero { for (Skill skill : SkillTreesData.getInstance().getHeroSkillTree().values()) { removeSkill(skill, false, true); // Just remove skills from non-hero players } } _hero = hero; sendSkillList(); } -
Tessa's post in Wtf Shit ? was marked as the answer
You have an extra space in pvp.properties, maybe near the pvp color system :lol:
Check the nickname color configs, especially where you want a green color (00FF00)!
-
Tessa's post in How To Apply .diff Patch To Soucres? was marked as the answer
Auto: Right click on the source Team->Apply Patch...
Manual: Find the source, delete the "-" and add the "+"... :lol:
-
Tessa's post in Buffet Won't Work was marked as the answer
Add it to scripts.cfg like the other scripts
-
Tessa's post in L2.ini Problem Wtf was marked as the answer
Get an clean system.. http://www.maxcheaters.com/topic/182405-c4-god-patched-systems-file-editors/
-
Tessa's post in Fear - Running Npc was marked as the answer
Find the EffectFear and set it to return false on your custom instance..
if(getEffected() instanceof L2YourCustomNpcInstance) { return false; } -
Tessa's post in Augmentation Trade Help was marked as the answer
Check in L2ItemInstance for this line
/** * Returns if item is tradeable. * @return boolean */ public boolean isTradeable() { return isAugmented() ? false : _item.isTradeable(); } Edit it and enjoy! :lol:
EDIT: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2ItemInstance.java ^^
-
Tessa's post in Enchant Armor Effects was marked as the answer
Try something like this:
Index: java/net/sf/l2j/gameserver/model/Inventory.java =================================================================== --- java/net/sf/l2j/gameserver/model/Inventory.java (revision 167) +++ java/net/sf/l2j/gameserver/model/Inventory.java (working copy) @@ -364,6 +364,10 @@ _log.warning("Inventory.ArmorSetListener: Incorrect skill: "+armorSet.getEnchant6skillId()+"."); } } + if (armorSet.isEnchanted16(player)) + { + player.startAbnormalEffect(L2Character.ABNORMAL_EFFECT_STEALTH); + } } } else if (armorSet.containShield(item.getItemId())) @@ -430,6 +434,8 @@ if(remove) { + player.stopAbnormalEffect(L2Character.ABNORMAL_EFFECT_STEALTH); + if(removeSkillId1 != 0) { L2Skill skill = SkillTable.getInstance().getInfo(removeSkillId1,1); Index: java/net/sf/l2j/gameserver/model/L2ArmorSet.java =================================================================== --- java/net/sf/l2j/gameserver/model/L2ArmorSet.java (revision 167) +++ java/net/sf/l2j/gameserver/model/L2ArmorSet.java (working copy) @@ -175,4 +175,32 @@ return true; } + + public boolean isEnchanted16(L2PcInstance player) + { + // Player don't have full set + if(!containAll(player)) + return false; + + Inventory inv = player.getInventory(); + + L2ItemInstance chestItem = inv.getPaperdollItem(Inventory.PAPERDOLL_CHEST); + L2ItemInstance legsItem = inv.getPaperdollItem(Inventory.PAPERDOLL_LEGS); + L2ItemInstance headItem = inv.getPaperdollItem(Inventory.PAPERDOLL_HEAD); + L2ItemInstance glovesItem = inv.getPaperdollItem(Inventory.PAPERDOLL_GLOVES); + L2ItemInstance feetItem = inv.getPaperdollItem(Inventory.PAPERDOLL_FEET); + + if(chestItem.getEnchantLevel() < 16) + return false; + if(_legs != 0 && legsItem.getEnchantLevel() < 16) + return false; + if(_gloves != 0 && glovesItem.getEnchantLevel() < 16) + return false; + if(_head != 0 && headItem.getEnchantLevel() < 16) + return false; + if(_feet != 0 && feetItem.getEnchantLevel() < 16) + return false; + + return true; + } } It will give you stealth effect (you can set different) if all parts are enchanted to +16 or above and all parts are equipped!
-
Tessa's post in Mob Panel View was marked as the answer
head-src/com/l2jfrozen/gameserver/model/actor/instance/L2NpcInstance.java
Search for this method "public void onActionShift(final L2GameClient client)".. everything inside the curly brackets belongs to this panel
-
Tessa's post in Please Check Here! was marked as the answer
Sure! ^^
Here is the patch:
The etcitem table was too big, so it has 5 parts... :lol:
Enjoy!
-
Tessa's post in Login Account was marked as the answer
Open gameserver/head-src/com/l2jfrozen/loginserver/LoginController.java and check for this line:
Then replace it with this: