Jump to content
  • 0

Java Code To Village.


Question

Posted

Hello guys.. What i mean with Java Code to Village? I want a code that when i press to Village to teleport me to the main town and not to the nearest location..

 

if you didnt understand me tell me to explain it more.. thank kk bb qq

Recommended Posts

  • 0
Posted (edited)

           

	Index: java/com/l2jserver/gameserver/network/clientpackets/RequestRestartPoint.java
	===================================================================
	--- java/com/l2jserver/gameserver/network/clientpackets/RequestRestartPoint.java    (revision 4422)
	+++ java/com/l2jserver/gameserver/network/clientpackets/RequestRestartPoint.java    (working copy)
	@@ -178,7 +178,8 @@
	                    break;
	                   
	                default:
	-                   loc = MapRegionTable.getInstance().getTeleToLocation(activeChar, MapRegionTable.TeleportWhereType.Town);
	+                   loc = new Location(X, Y, Z);
	                    break;
	            }
	           
Edited by Ayami-
  • 0
Posted (edited)

Hello guys.. What i mean with Java Code to Village? I want a code that when i press to Village to teleport me to the main town and not to the nearest location..

 

if you didnt understand me tell me to explain it more.. thank kk bb qq

RequestRestartPoint.java
 
default:
if (Config.TOWN_REVIVE_ENABLED)loc = new Location(Config.LOCATIONX, Config.LOCATIONY, Config.LOCATIONZ);
else
loc = MapRegionTable.getInstance().getTeleToLocation(activeChar, MapRegionTable.TeleportWhereType.Town);
break;
 
Config.java
 
public static boolean TOWN_REVIVE_ENABLED;
public static int LOCATIONX;
public static int LOCATIONY;
public static int LOCATIONZ;
 
 
TOWN_REVIVE_ENABLED = Boolean.parseBoolean(Feature.getProperty("TownReviveEnabled", "False"));
LOCATIONX = Integer.parseInt(Feature.getProperty("LocationX", ""));
        LOCATIONY = Integer.parseInt(Feature.getProperty("LocationY", ""));
        LOCATIONZ = Integer.parseInt(Feature.getProperty("LocationZ", ""));
 
Feature.properties
 
#-----------------------------------------------------------------------------
# Custom Respawn After Die System
#-----------------------------------------------------------------------------
# Allow system respawn system to respawn the character in custom place?
TownReviveEnabled = True
# Put the location from character respawn ( TownReviveEnabled Must be True)
LocationX = 148972
 
LocationY = 172172
 
LocationZ = -955
 
 
 
 

 

    Index: java/com/l2jserver/gameserver/network/clientpackets/RequestRestartPoint.java

    ===================================================================

    --- java/com/l2jserver/gameserver/network/clientpackets/RequestRestartPoint.java    (revision 4422)

    +++ java/com/l2jserver/gameserver/network/clientpackets/RequestRestartPoint.java    (working copy)

    @@ -178,7 +178,8 @@

                        break;

                       

                    default:

    -                   loc = MapRegionTable.getInstance().getTeleToLocation(activeChar, MapRegionTable.TeleportWhereType.Town);

    +                   loc = new Location(X, Y, Z);

                        break;

                }

               

 

same but configurable

Edited by nikosdevil20
  • 0
Posted

i will test the nikosdevil one. but i need and one help more.. i took this java code http://www.maxcheaters.com/topic/139962-share-l2jquest-change-auto-equip-armors-weapons/ and i do all the classes but didnt work.. what need to change for l2jfrozen???

  • 0
Posted

sry for double post. but nothing from those 2 codes works.. :/ maybe i do something wrong..

Maybe? For sure.. There is no way it's not working. Set X, Y, Z compile and refresh the jar file. There were few ppl who did changes and they did not replace the jar, lol :D

  • 0
Posted (edited)

you got error or what? you have make this true? TownReviveEnabled = True

Yes. no errors or something at gameserver. the players press To Village and then teleport to nearest town.

 

sweets im not so stupid.. i have change all the jars. not only one :D all the lib i have change just to test it..

Edited by Nosti21
  • 0
Posted

im going to test the ayami's way. what about the absolutepower's code?? can anyone help? i put but didnt give me the items when i do the 3rd quest..

  • 0
Posted (edited)

Yes. no errors or something at gameserver. the players press To Village and then teleport to nearest town.

 

sweets im not so stupid.. i have change all the jars. not only one :D all the lib i have change just to test it..

it works on me. maybe you add the code at wrong place? because as i remember the same lines exist for sieges etc. what pack you use? 

 

 

in l2j freya thats the place of i have add the code and works:

 

 

case 5: // Fixed or Player is a festival participant
if (!activeChar.isGM() && !activeChar.isFestivalParticipant())
{
_log.warning("Player ["+activeChar.getName()+"] called RestartPointPacket - Fixed and he isn't festival participant!");
return;
}
instanceId = activeChar.getInstanceId();
loc = new Location(activeChar.getX(), activeChar.getY(), activeChar.getZ()); // spawn them where they died
break;
case 6: // TODO: agathion ress
break;
case 27: // to jail
if (!activeChar.isInJail()) return;
loc = new Location(-114356, -249645, -2984);
break;
default:
if (Config.TOWN_REVIVE_ENABLED)loc = new Location(Config.LOCATIONX, Config.LOCATIONY, Config.LOCATIONZ);
else
loc = MapRegionTable.getInstance().getTeleToLocation(activeChar, MapRegionTable.TeleportWhereType.Town);
break;
}
 
// Teleport and revive
activeChar.setInstanceId(instanceId);
activeChar.setIsIn7sDungeon(false);
activeChar.setIsPendingRevive(true);
activeChar.teleToLocation(loc, true);
noblesse.getEffects(activeChar, activeChar);
 
}
 
 
 
maybe that help you...
Edited by nikosdevil20
  • 0
Posted

ayami's work. but i want with config. because for me its a bit hard to go to java again and again to change it.. plus i want the 3rd quest code if possible :D

when you say 3rd quest what you exactly mean?

Guest
This topic is now closed to further replies.



  • Posts

    • 🔥 L2Pride Interlude by DVP is NOW LIVE! 🔥 📅 Opened on June 10, 2026 at 21:00 GMT+2 ⚔️ The server is currently in the Tier 1 stage, giving everyone a fair chance to gear up and compete. 🔓 Tier 2 Items will be unlocked on June 27, 2026! ✅ Active players ✅ Stable server ✅ Competitive PvP ✅ Growing community Whether you're a solo player, clan leader, or PvP enthusiast, now is the perfect time to join and prepare for the next stage of progression. See you in-game, warriors! ⚔️ WEB: www.l2pride.ddns.net DISCORD: https://discord.gg/JVdpESC5Ry
    • Stock updates constantly. Only top items are posted on the forum. For current availability and ordering, message us on Telegram.   G2G Business 🇪🇺 EU Fully verified seller's account.   Revolut Business 🇪🇺 EU | Multi-currency IBAN, Virtual & physical cards, Instant SEPA transfers, ₿ Crypto exchange & settlements.   SumUp Business 🇬🇧 GB | POS, 1 physical card, 2 virtual cards. Payouts time: 1 day even on weekends and bank holidays, Multi-user access.   Vivid Business | Merchant POS, DE IBAN, up to 50 IBANs, SEPA Instant, unlimited transfers, up to 25 virtual and 3 physical cards.
    • 🔎 Find us: 👉🏼 Website: L2Dexter.eu 👉🏼 Discord: discord.gg/dttX9FE23W 👉🏼 Facebook: facebook.com/L2Dexter
    • G Support: https://t.me/buyingproxysup | Channel: https://t.me/buyingproxycom Discord support: #buyingproxy | Server: Join the BuyingProxy Discord Server!  Create your free account here
    • REAL PHOTOS ALWAYS «BREAK» ▪ Think a high-quality photo should be perfect? Think again. In real shots, something is almost always “off”: ▪ Noise in the shadows — especially noticeable in low light ▪ Local overexposures on highlights and glossy surfaces ▪ Loss of fine details in the brightest and darkest areas ▪ Overall “dirt” and unevenness that no editor can fully remove ▪  It’s exactly these imperfections that make the frame look alive. Algorithms already know well: a sterile clean image without these “flaws” is almost always a fake. Reality is never perfect. A fake tries to be.  Want photos that look genuinely “broken,” like they were taken on a real phone? Write to us — we’ll make even the flaws work in your favor. › TG: @mustang_service_ms ( https:// t.me/ mustang_service_ms ) › Channel: Mustang Service ( https:// t.me/ +JPpJCETg-xM1NjNl ) #documents #drawing #photoshop #verication #fake
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..