Jump to content

Recommended Posts

Posted

hope useful for some server :

 

when character enter peace zone speed to be x2 , favorable for gamer to shoping or changeclass or learn skill with faster speed . Dont waste time for gamer.

 

/L2_GameServer/java/com/l2jserver/gameserver/model/actor/stat/PlayableStat.java

 

find

if (getActiveChar().isInsideZone(L2Character.ZONE_WATER))
            val /= 2;

 

after this insert:

 

if (getActiveChar().isInsideZone(L2Character.ZONE_PEACE))
            val *= 2;

 

Good luck for all.

Posted

Cool, but i think that you could add smth like an icon at buff's section that will inform the player. I mean, when he is x2 boosted the icon appears and when the boost is over the icon desappears.

 

Btw,at

val *= 2;

what does * stands for?

Posted

Smart code.You could add something like

player.sendMessage("You can feel the x2 speed boost as you enter peace zone");

right after your code,just to let the player know where did this come from.But that's just to be eye-appealing:)

Good simple but smart job

Posted

smart job my ass:), when he will exit the peace zone the  val*2 will remain :) and when he will enter again val*2*2 will ocur and so on;).He just created a bug:)

Posted

smart job my ass:), when he will exit the peace zone the  val*2 will remain :) and when he will enter again val*2*2 will ocur and so on;).He just created a bug:)

if (getActiveChar().isInsideZone(L2Character.ZONE_WATER))

val /= 2;

so this one won't return back to normal speed.and will keep divide your speed by 2."bug my ass".

Posted

Anyway here is the working one without bugs i think..:

 

### Eclipse Workspace Patch 1.0
#P TEST_GAMESERVER
Index: java/net/sf/l2j/gameserver/model/zone/type/L2PeaceZone.java
===================================================================
--- java/net/sf/l2j/gameserver/model/zone/type/L2PeaceZone.java	(revision 4699)
+++ java/net/sf/l2j/gameserver/model/zone/type/L2PeaceZone.java	(working copy)
@@ -18,6 +18,7 @@
package net.sf.l2j.gameserver.model.zone.type;

import net.sf.l2j.gameserver.model.L2Character;
+import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.model.zone.L2ZoneType;

/**
@@ -37,6 +38,11 @@
	{
		character.setInsideZone(L2Character.ZONE_PEACE, true);

+		if(character instanceof L2PcInstance)
+		{
+			int speed = character.getWalkSpeed();
+			character.getWalkSpeed() = speed * 2;
+		}
		/*if (character instanceof L2PcInstance)
		{
			((L2PcInstance)character).sendMessage("You entered a peace zone!");
@@ -48,6 +54,11 @@
	{
		character.setInsideZone(L2Character.ZONE_PEACE, false);

+		if(character instanceof L2PcInstance)
+		{
+			int speed = character.getWalkSpeed();
+			character.getWalkSpeed() = speed / 2;
+		}
		/*if (character instanceof L2PcInstance)
		{
			((L2PcInstance)character).sendMessage("You exited a peace zone!");

 

Posted

@aλonε™ you just make a variable named speed,you don't set it as player speed.

@hoangnhan no problem,just forgot to mention you have to add it on L2PeaceZone.java and not in PlayableStat.java cuz you will get spammed with this message :)

Posted

Anyway here is the working one without bugs i think..:

 

### Eclipse Workspace Patch 1.0
#P TEST_GAMESERVER
Index: java/net/sf/l2j/gameserver/model/zone/type/L2PeaceZone.java
===================================================================
--- java/net/sf/l2j/gameserver/model/zone/type/L2PeaceZone.java	(revision 4699)
+++ java/net/sf/l2j/gameserver/model/zone/type/L2PeaceZone.java	(working copy)
@@ -18,6 +18,7 @@
package net.sf.l2j.gameserver.model.zone.type;

import net.sf.l2j.gameserver.model.L2Character;
+import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.model.zone.L2ZoneType;

/**
@@ -37,6 +38,11 @@
	{
		character.setInsideZone(L2Character.ZONE_PEACE, true);

+		if(character instanceof L2PcInstance)
+		{
+			int speed = character.getWalkSpeed();
+			speed *= 2;
+		}
		/*if (character instanceof L2PcInstance)
		{
			((L2PcInstance)character).sendMessage("You entered a peace zone!");
@@ -48,6 +54,11 @@
	{
		character.setInsideZone(L2Character.ZONE_PEACE, false);

+		if(character instanceof L2PcInstance)
+		{
+			int speed = character.getWalkSpeed();
+			speed /= 2;
+		}
		/*if (character instanceof L2PcInstance)
		{
			((L2PcInstance)character).sendMessage("You exited a peace zone!");

 

 

Stop trying to be a coder please. You can sell icecream and have a nice life.

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • Hello. WTS Adena on Reborn signature x1 and Items: have: DC robe set/Som+3 Acumen.   
    • Αν σε ενδιαφέρει ο κόσμος των κρυπτονομισμάτων και θέλεις να συζητάς, να μαθαίνεις, αλλά και να μοιράζεσαι γνώσεις με άλλους Έλληνες χρήστες, τότε σε προσκαλούμε στο νέο μας Telegram forum αποκλειστικά για την ελληνική crypto κοινότητα!   Συζητάμε για Bitcoin, altcoins, DeFi, trading, νέες τάσεις, NFTs, τεχνική ανάλυση και ό,τι άλλο αφορά τον κόσμο των crypto. Είτε είσαι αρχάριος είτε προχωρημένος, θα βρεις κάτι που σε ενδιαφέρει και μια παρέα που μιλάει τη γλώσσα σου – κυριολεκτικά!     Σύνδεσμος πρόσβασης:    https://t.me/investfuture_crypto_gr    ή   Scan QR Code:       Έλα να γίνουμε η πιο ενεργή ελληνική κοινότητα στο χώρο των crypto!
    • Αν σε ενδιαφέρει ο κόσμος των κρυπτονομισμάτων και θέλεις να συζητάς, να μαθαίνεις, αλλά και να μοιράζεσαι γνώσεις με άλλους Έλληνες χρήστες, τότε σε προσκαλούμε στο νέο μας Telegram forum αποκλειστικά για την ελληνική crypto κοινότητα!   Συζητάμε για Bitcoin, altcoins, DeFi, trading, νέες τάσεις, NFTs, τεχνική ανάλυση και ό,τι άλλο αφορά τον κόσμο των crypto. Είτε είσαι αρχάριος είτε προχωρημένος, θα βρεις κάτι που σε ενδιαφέρει και μια παρέα που μιλάει τη γλώσσα σου – κυριολεκτικά!     Σύνδεσμος πρόσβασης:    https://t.me/investfuture_crypto_gr    ή   Scan QR Code:       Έλα να γίνουμε η πιο ενεργή ελληνική κοινότητα στο χώρο των crypto!
    • ➡ Discount for your purchase: APRIL (10% discount) ➡ Our Online Shop: https://socnet.store  ➡ Our SMM-Boosting Panel: https://socnet.pro  ➡ Telegram Shop Bot: https://socnet.shop  ➡ Telegram Support: https://t.me/solomon_bog  ➡ Telegram Channel: https://t.me/accsforyou_shop  ➡ Discord Support: @AllSocialNetworksShop  ➡ Discord Server: https://discord.gg/y9AStFFsrh  ➡ WhatsApp Support: https://wa.me/79051904467 ➡ WhatsApp Channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n  ➡ Email Support: solomonbog@socnet.store 
    • ➡ Discount for your purchase: APRIL (10% discount) ➡ Our Online Shop: https://socnet.store  ➡ Our SMM-Boosting Panel: https://socnet.pro  ➡ Telegram Shop Bot: https://socnet.shop  ➡ Telegram Support: https://t.me/solomon_bog  ➡ Telegram Channel: https://t.me/accsforyou_shop  ➡ Discord Support: @AllSocialNetworksShop  ➡ Discord Server: https://discord.gg/y9AStFFsrh  ➡ WhatsApp Support: https://wa.me/79051904467 ➡ WhatsApp Channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n  ➡ Email Support: solomonbog@socnet.store 
  • Topics

×
×
  • Create New...