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

    • TG Support: https://t.me/buyingproxysup | Channel: https://t.me/buyingproxycom Discord support: #buyingproxy | Server: Join the BuyingProxy Discord Server!  Create your free account here
    • 🚀 IronLock Shield - Closed Beta Update Hello everyone, Since our first announcement, IronLock Shield has received several major protection upgrades. IronLock Shield is a security platform developed specifically for Lineage II Interlude servers, focused on launcher integrity, runtime protection, session security, and anti-bot hardening. Current protection features: ✓ Secure Launcher Architecture ✓ HWID-Based Licensing ✓ Signed Launcher Session System ✓ Gateway Session Verification ✓ Automatic Session Revoke on Critical Detection ✓ Replay Protection with Nonce Validation ✓ Runtime Integrity Verification ✓ Secure Update System Client-side protections: ✓ Anti-Debug Protection ✓ Anti-Dump Protection ✓ DLL Injection Detection ✓ Manual Map Detection ✓ Remote Thread Detection ✓ Runtime Patch Detection ✓ Suspicious Handle Detection ✓ Memory Read / Write Guard ✓ Strict DLL Hash / Allowlist Control ✓ Launcher Self-Protection ✓ Watchdog Protection Bot and automation hardening: ✓ Adrenaline / Memory Reader Hardening ✓ Runtime Decoy Memory Regions ✓ Fake Pointer-Chain / Offset Noise ✓ Per-Build Mutation System ✓ Pointer Scan Disruption ✓ Virtual Keyboard Input Detection ✓ Hookless Virtual Mouse Click Detection ✓ Raw Input Based Mouse Verification Server and gateway security: ✓ Signed Launcher-to-Server Requests ✓ Build ID Binding ✓ HWID Binding ✓ IP / Session Binding ✓ Expired Session Blocking ✓ Revoked Session Blocking ✓ Gateway Runtime Session Checks ✓ Critical Detection Reporting Panel Recent improvements: ✓ Improved protection against memory-reading bots ✓ Added decoy pointer-chain memory traps ✓ Added per-build mutation data ✓ Added stricter process handle policy ✓ Added hookless virtual mouse click detection ✓ Improved watchdog stability to reduce false positives ✓ Improved session revoke logic for critical detections ✓ Updated website and protection feature list IronLock Shield is currently in closed beta. Selected Lineage II Interlude server owners can receive 1 month of free access in exchange for testing and feedback. Website: https://ilshield.com If you are interested, feel free to send me a private message or contact me through Discord. Thank you.
    • Contacts for communication. Telegram https://t.me/a_dvertising_man Telegram short link @a_dvertising_man   Delta Chat https://i.delta.chat/#11D46642C67CF6BDD4BD6430EB8AE99106CC54D7&v=3&i=u1npSLMZpUfcnWi5FGHNBn-1&s=GjBgI7oXKcuCXGl1acvt0tcp&a=p2norrc0e%40nine.testrun.org&n=advertisingman Hello. I participate in "forum deal" in role middleman. Paid services in graphic design,garant service(https link to profile) is provided only from buyer. Please write me in messenger for contact who are you by nationality and in which country you live.   I will not conduct deals with buyers and sellers from Ukraine. I do not cooperate with country Ukraine. If you Ukrainian by nationality or live in Ukraine,ignore this topic. If you other nationality: paid service from garant service buyer pays using own money.   Garant service(https link to profile) provided only from buyer. Buyer provides address guarantor service(https link to profile) or multiple addresses guarantors services. If seller don't like this garant service address(seller may doubt whether he will receive money from this garant service),then buyer offers another address garant service or multiple addresses guarantors services. If neither address seller doesn't like,then buyer is leaving from me.   Buyer deposits full amount to payment details guarantor service, plus my commission(my percent above amount for service in graphic design). In "forum questionnaire" buyer writes: payment details from seller,payment details seller i will send to buyer in advance via messenger.   Paid creation avatar and banner(price depends from complexity work). Paid creation visuals for music releases,for promo art(price depends from complexity work). Original posters using stock images(price depends from complexity work). Design for social media:covers,previews(price depends from complexity work). Other paid services in graphic design(price depends from complexity work).  
  • 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..