m4s4cru Posted February 21, 2011 Posted February 21, 2011 hi all how to block shop in zone?? i have a zone for shop Giran Harbor and i need block all other town !! Quote
0 Matim Posted February 22, 2011 Posted February 22, 2011 You will have to create new Zone Type (if there isn't one already created) Take a look for example how does Peace Zone type works (check chode from gamserver/model/zones/type) Quote
0 Tryskell Posted February 26, 2011 Posted February 26, 2011 The most simplest && efficient way to block all towns without condition is to change in core the TownZone. In gameserver.model.zone.type, find L2TownZone.java Replace onEnter/onExit methods with that code : @Override protected void onEnter(L2Character character) { if (character instanceof L2PcInstance) { // PVP possible during siege, now for siege participants only // Could also check if this town is in siege, or if any siege is going on if (((L2PcInstance) character).getSiegeState() != 0 && Config.ZONE_TOWN == 1) return; //((L2PcInstance)character).sendMessage("You entered "+_townName); } if (_isPeaceZone && Config.ZONE_TOWN != 2) character.setInsideZone(L2Character.ZONE_PEACE, true); character.setInsideZone(L2Character.ZONE_TOWN, true); character.setInsideZone(L2Character.ZONE_NOSTORE, true); } @Override protected void onExit(L2Character character) { // TODO: there should be no exit if there was possibly no enter if (_isPeaceZone) character.setInsideZone(L2Character.ZONE_PEACE, false); character.setInsideZone(L2Character.ZONE_TOWN, false); character.setInsideZone(L2Character.ZONE_NOSTORE, false); } If you want to make special little zones inside town, and not all the superficy of the town, just do as Matim said. Quote
Question
m4s4cru
hi all
how to block shop in zone?? i have a zone for shop Giran Harbor and i need block all other town !!
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.