Jump to content
  • 0

Help with l2 starting location


Question

5 answers to this question

Recommended Posts

  • 0
Posted

In CharacterCreate find this:

 

        newChar.setXYZInvisible(template.spawnX, template.spawnY, template.spawnZ);

 

replace the X, Y, Z with the coordinates you want.

  • 0
Posted

or you can use this code

 

### Eclipse Workspace Patch 1.0
#P gameserver
Index: java/net/sf/l2j/Config.java
===================================================================
--- java/net/sf/l2j/Config.java	(revision 125)
+++ java/net/sf/l2j/Config.java	(working copy)
@@ -294,6 +294,10 @@

     /** Misc */
     public static int STARTING_ADENA;
+    public static boolean SPAWN_CHAR;
+    public static int SPAWN_X;
+    public static int SPAWN_Y;
+    public static int SPAWN_Z;
     public static boolean EFFECT_CANCELING;
     public static double HP_REGEN_MULTIPLIER;
     public static double MP_REGEN_MULTIPLIER;
@@ -899,6 +903,10 @@
                 is.close();
                 
                 STARTING_ADENA = Integer.parseInt(players.getProperty("StartingAdena", "100"));
+                SPAWN_CHAR = Boolean.parseBoolean(players.getProperty("CustomSpawn", "false"));
+                SPAWN_X = Integer.parseInt(players.getProperty("SpawnX", ""));
+                SPAWN_Y = Integer.parseInt(players.getProperty("SpawnY", ""));
+                SPAWN_Z = Integer.parseInt(players.getProperty("SpawnZ", ""));
                 EFFECT_CANCELING = Boolean.valueOf(players.getProperty("CancelLesserEffect", "True"));
                 HP_REGEN_MULTIPLIER = Double.parseDouble(players.getProperty("HpRegenMultiplier", "100")) /100;
                 MP_REGEN_MULTIPLIER = Double.parseDouble(players.getProperty("MpRegenMultiplier", "100")) /100;
Index: java/net/sf/l2j/gameserver/network/clientpackets/CharacterCreate.java
===================================================================
--- java/net/sf/l2j/gameserver/network/clientpackets/CharacterCreate.java	(revision 125)
+++ java/net/sf/l2j/gameserver/network/clientpackets/CharacterCreate.java	(working copy)
@@ -192,7 +192,10 @@
		L2PcTemplate template = newChar.getTemplate();

		newChar.addAdena("Init", Config.STARTING_ADENA, null, false);
-		newChar.setXYZInvisible(template.spawnX, template.spawnY, template.spawnZ);
+		if (Config.SPAWN_CHAR)
+			newChar.setXYZInvisible(Config.SPAWN_X, Config.SPAWN_Y, Config.SPAWN_Z);
+		else
+			newChar.setXYZInvisible(template.spawnX, template.spawnY, template.spawnZ);
		newChar.setTitle("");

		newChar.registerShortCut(new L2ShortCut(0,0,3,2,-1,1)); 	// attack shortcut

Players.properties
# Set true for custom spawn location.
CustomSpawn = True
SpawnX = 83414
SpawnY = 148628
SpawnZ = -3410

  • 0
Posted

How can i change new characters starting location??

 

 

Here is one easy code for you, doesnt need core modifications

just c/p this and save it as .sql file

execute it to database and done...

fill the "yourXcoordinate" with yours [using /loc ingame]

UPDATE char_templates SET x=yourXcoordinate;
UPDATE char_templates SET y=yourYcoordinate;
UPDATE char_templates SET z=yourZcoordinate;

Guest
This topic is now closed to further replies.


  • Posts

    • Acabei de liberar no TopL2.com o nosso MOD Oficial de VoteSystem, criado para servidores Lineage 2 que querem parar de sofrer com voto “fake” e reward entregue sem controle.   O que ele faz? O mod integra seu GameServer com o site TopL2, valida o voto do jogador e só então libera a recompensa — tudo com mais segurança, rastreio e controle.   Principais vantagens Voto verificado: o servidor confirma o voto registrado no site Reward mais seguro: evita abuso/duplicação e reduz exploit Cooldown configurável por jogador Logs e rastreio para auditoria e suporte   Instalação rápida, com arquivos organizados e prontos para copiar/aplicar   Disponível para download no https://TopL2.com   Se você é admin e quer profissionalizar seu sistema de votos e entregar reward com segurança, esse mod é pra você.  
    • Geia sas paidia eimai new edw mesa kai tha ithela na kanw mia erwtisi an kapoios mporei na me voithisei! Exw highfive (L2JMobius) kai thelw na valw custom weapons alla den exw sql file mporw na ta perasw xwris sql file kai na exw mono ta xml arxeia gia na ta valw stats/items?
    • ## [1.4.0] - 2026-01-28   ### ✨ New Features - **Vote System**: Lineage 2 servers can now use our vote–reward system. Players vote on the website and claim rewards in-game (1 vote = 1 claim) - **Vote Page**: On each server’s page (`/servers/<server>`), a **“Vote for Server”** button opens a dedicated vote page with cooldown info and optional Turnstile verification - **By Votes View**: The **“By Votes”** tab on the main page shows **actual vote counts** per server - **API Documentation**: New **API Docs** page at `/docs` (and footer link) with HMAC auth, endpoints, and examples for game server integration - **Vote API (My Servers)**: Server owners can open **“Vote API”** in My Servers to manage credentials, cooldown, allowed IPs, and open the docs   ### 🔄 Improvements - **Server Pages**: Single-server data is cached and loads faster; server pages can be opened by ID or by name (e.g. `/servers/my-server-name`) - **API Root**: Visiting the API root redirects to the docs URL configured in admin (default: site docs page) - **Admin Panel**: New **“Vote System”** tab for global settings (Turnstile, API security, default cooldown, docs URL)   ### 🔐 Security & Reliability - Turnstile (CAPTCHA) support for vote submissions to reduce abuse - HMAC-protected game server API for secure vote check/claim and stats
  • 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..