Jump to content
  • 0

Help with l2 starting location


maric32

Question

5 answers to this question

Recommended Posts

  • 0

In CharacterCreate find this:

 

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

 

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

Link to comment
Share on other sites

  • 0

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

Link to comment
Share on other sites

  • 0

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;

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


  • Posts

    • L2 Insignia High Five 20x MID SERVER FOCUSED ON OLYMPIAD | PVP | AUTOFARM       OPEN BETA TEST SERVER 3 MAY 2024   GRAND OPENING 10 MAY 2024    Rates: 📜 XP/SP 20x | Spoil 15x | Drop 10x | Adena 10x 📜     Server Features: 🔥 No Olf-T Shirt, No big over-enchant, No over-power Donate 🔥 🔥 VIP Gold Color Chat, Unique Olympiad Extra Points Engine, GvG Event 🔥 🔥 Auto-Farm, LoA and DV scheduled PvP Zone, Calendar Daily Reward 🔥 🔥 Castle Instance, Solo Instance, PvP Solo Rift, Dress me system, Adena Boxes 🔥        Website: https://www.l2insignia.com  Discord: https://discord.com/invite/yEgsrHn2hQ      
    • I am selling the essence project which includes versions 388 and 439 that have been running for over 2 years or (447 as custom PVP like Pride). I have a test server for you to test them out. If you are really interested in it then contact my seller at discord: kiwi7106. Price: 4000 Euro P/s: This is a project that I have spent a lot of money and time developing, so if you are not interested in it, please get out of this topic, thank you. P/s 2: If you find the price too expensive, it's best to skip this article and find another project and don't comment negatively on my topic, thank you.
    • Someone ask me for this, it should work on any client that has Kamael race, preview:     Installation - there are two ways to install depending on how you want to use it:   Method 1: If you want to completely replace the original, do:   Copy all lines from your armorgrp to Notepad++, press Ctrl+H, check the "match whole word" option and replace:   kamael.Mkamael_m000_w_ad00   by:   AvengersKamaelWings.Avengers_MKamael_m001_w_ad00   Then replace:   MKamael.Mkamael_m000_t00_w   by:   AvengersKamaelWings.MKamael_m001_t00_w   Now repeat the same process with the female, replace:   kamael.Fkamael_m000_w_ad00   by:   AvengersKamaelWings.Avengers_FKamael_m001_w_ad00   Then replace:   FKamael.Fkamael_m000_t00_w   by:   AvengersKamaelWings.FKamael_m001_t00_w   You're done, paste everything back into File Edit and save!   Method 2: If you only want to replace in specific sets, execute the above process only on the armorgrp of those sets.   Repack by: AvengersTeamBr Password: LadrãoDeFrango      
  • Topics

×
×
  • Create New...