Pet Core NPC Buffer?

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
certa
Posts: 10
Joined: Mon Mar 15, 2010 5:38 am

Re: Pet Core NPC Buffer?

Post by certa »

Denser I am pretty sure I compiled this corrently, I manually input the info into custom_npc but when I try to spawn using the number I put in sql it says target not found. same if I try putting it into npc sql
User avatar
denser
Posts: 1392
Joined: Wed May 30, 2007 9:13 pm
Location: Russia
Contact:

Re: Pet Core NPC Buffer?

Post by denser »

i redo it buffer to current revision.and make some wxpanshion to show icons properly. later i create separate thread and share my work(actually it House's idea and basis 8) thx House for it )
Tiger, once tasted human flesh, will want to taste it again
L2J - the place where glad to see you any time!
User avatar
NOOR
Posts: 12
Joined: Sat Dec 26, 2009 8:13 pm
Location: Russia

Re: Pet Core NPC Buffer?

Post by NOOR »

denser,

RU использую ревизию 4035. можно исправить эту ошибку?
EN use rev.4035. you can fix this?

Code: Select all

compile:    [javac] D:\L2jserver\core\build.xml:62: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds    [javac] Compiling 1456 source files to D:\L2jserver\core\build\classes    [javac] D:\L2jserver\core\java\com\l2jserver\gameserver\model\actor\instance\L2BufferInstance.java:74: setFile(java.lang.String,java.lang.String) in com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage cannot be applied to (java.lang.String)    [javac] 			html.setFile(PARENT_DIR+"menu.htm");    [javac] 			    ^    [javac] D:\L2jserver\core\java\com\l2jserver\gameserver\model\actor\instance\L2BufferInstance.java:132: setFile(java.lang.String,java.lang.String) in com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage cannot be applied to (java.lang.String)    [javac] 					html.setFile(PARENT_DIR+"menu.htm");    [javac] 					    ^    [javac] D:\L2jserver\core\java\com\l2jserver\gameserver\model\actor\instance\L2BufferInstance.java:285: setFile(java.lang.String,java.lang.String) in com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage cannot be applied to (java.lang.String)    [javac] 				html.setFile(PARENT_DIR+"menu.htm");    [javac] 				    ^    [javac] D:\L2jserver\core\java\com\l2jserver\gameserver\model\actor\instance\L2BufferInstance.java:293: method does not override or implement a method from a supertype    [javac] 	@Override    [javac] 	^    [javac] D:\L2jserver\core\java\com\l2jserver\gameserver\model\actor\instance\L2BufferInstance.java:432: setFile(java.lang.String,java.lang.String) in com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage cannot be applied to (java.lang.String)    [javac] 		html.setFile(PARENT_DIR+"schememenu.htm");    [javac] 		    ^    [javac] 5 errors 
User avatar
denser
Posts: 1392
Joined: Wed May 30, 2007 9:13 pm
Location: Russia
Contact:

Re: Pet Core NPC Buffer?

Post by denser »

yes this error can be fixed =)
use brain and eclipse.
Tiger, once tasted human flesh, will want to taste it again
L2J - the place where glad to see you any time!
Crom
Posts: 191
Joined: Sun May 24, 2009 8:09 pm
Location: Spain

Re: Pet Core NPC Buffer?

Post by Crom »

Delete @override
Change html.setFile( for msg.setFile(player.getHtmlPrefix(),
Change html in the superior line of html.setFile( for msg
Change html.replace for msg.replace


Anyone understand that everyone don't have to know java? Someone like me only know the logical escheme.

Please use the brain and you won't answer with questions or triks.
wiseelf
Posts: 62
Joined: Thu May 07, 2009 7:11 pm

Re: Pet Core NPC Buffer?

Post by wiseelf »

janiii wrote:I dont like the target thingie. I would be more for new own bypass for pet buff/heal/remove.

Code: Select all

Index: java/com/l2jserver/gameserver/model/actor/instance/L2NpcBufferInstance.java===================================================================--- java/com/l2jserver/gameserver/model/actor/instance/L2NpcBufferInstance.java	(revision 3822)+++ java/com/l2jserver/gameserver/model/actor/instance/L2NpcBufferInstance.java	(working copy)@@ -23,7 +23,9 @@ import com.l2jserver.gameserver.datatables.SkillTable; import com.l2jserver.gameserver.model.L2ItemInstance; import com.l2jserver.gameserver.model.L2Skill;+import com.l2jserver.gameserver.model.actor.L2Character; import com.l2jserver.gameserver.model.actor.L2Npc;+import com.l2jserver.gameserver.model.actor.L2Summon; import com.l2jserver.gameserver.network.SystemMessageId; import com.l2jserver.gameserver.network.serverpackets.ActionFailed; import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;@@ -73,6 +75,17 @@ 		if (player == null || player.getLastFolkNPC() == null || player.getLastFolkNPC().getObjectId() != this.getObjectId()) 			return; +		L2Character target = player;+		+		if (command.startsWith("Pet"))+		{+			L2Summon pet = player.getPet();+			if (pet != null)+				target = pet;+			else+				return;+		}+		 		int npcId = getNpcId();  		if (command.startsWith("Chat"))@@ -83,7 +96,7 @@  			showChatWindow(player, val); 		}-		else if (command.startsWith("Buff"))+		else if (command.startsWith("Buff") || command.startsWith("PetBuff")) 		{ 			String[] buffGroupArray = command.substring(5).split(" "); @@ -143,14 +156,14 @@ 				skill = SkillTable.getInstance().getInfo(skillId, skillLevel);  				if (skill != null)-					skill.getEffects(player, player);+					skill.getEffects(player, target); 			}  			showChatWindow(player, pageVal.get(player.getObjectId())); 		}-		else if (command.startsWith("Heal"))+		else if (command.startsWith("Heal") || command.startsWith("PetHeal")) 		{-			if (!player.isInCombat() && !AttackStanceTaskManager.getInstance().getAttackStanceTask(player))+			if (!target.isInCombat() && !AttackStanceTaskManager.getInstance().getAttackStanceTask(target)) 			{ 				String[] healArray = command.substring(5).split(" "); @@ -158,23 +171,23 @@ 				{ 					if (healType.equalsIgnoreCase("HP")) 					{-						player.setCurrentHp(player.getMaxHp());+						target.setCurrentHp(target.getMaxHp()); 					} 					else if (healType.equalsIgnoreCase("MP")) 					{-						player.setCurrentMp(player.getMaxMp());+						target.setCurrentMp(target.getMaxMp()); 					} 					else if (healType.equalsIgnoreCase("CP")) 					{-						player.setCurrentCp(player.getMaxCp());+						target.setCurrentCp(target.getMaxCp()); 					} 				} 			} 			showChatWindow(player, 0); // 0 = main window 		}-		else if (command.startsWith("RemoveBuffs"))+		else if (command.startsWith("RemoveBuffs") || command.startsWith("PetRemoveBuffs")) 		{-			player.stopAllEffectsExceptThoseThatLastThroughDeath();+			target.stopAllEffectsExceptThoseThatLastThroughDeath(); 			showChatWindow(player, 0); // 0 = main window 		} 		else
Not work for me :(

Code: Select all

<button action="bypass -h npc_%objectId%_PetBuff 1204 1036 1040 1068 1077 1045 1044 1240 1087 1242 1268 1303 1048 1078 1085 1059" value="Pet Buffs" width=120 height=22 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df">
What's wrong?
I use google translate.
hope
Posts: 1160
Joined: Thu Aug 30, 2007 5:17 pm

Re: Pet Core NPC Buffer?

Post by hope »

wiseelf wrote:
janiii wrote:I dont like the target thingie. I would be more for new own bypass for pet buff/heal/remove.

Code: Select all

Index: java/com/l2jserver/gameserver/model/actor/instance/L2NpcBufferInstance.java===================================================================--- java/com/l2jserver/gameserver/model/actor/instance/L2NpcBufferInstance.java	(revision 3822)+++ java/com/l2jserver/gameserver/model/actor/instance/L2NpcBufferInstance.java	(working copy)@@ -23,7 +23,9 @@ import com.l2jserver.gameserver.datatables.SkillTable; import com.l2jserver.gameserver.model.L2ItemInstance; import com.l2jserver.gameserver.model.L2Skill;+import com.l2jserver.gameserver.model.actor.L2Character; import com.l2jserver.gameserver.model.actor.L2Npc;+import com.l2jserver.gameserver.model.actor.L2Summon; import com.l2jserver.gameserver.network.SystemMessageId; import com.l2jserver.gameserver.network.serverpackets.ActionFailed; import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;@@ -73,6 +75,17 @@ 		if (player == null || player.getLastFolkNPC() == null || player.getLastFolkNPC().getObjectId() != this.getObjectId()) 			return; +		L2Character target = player;+		+		if (command.startsWith("Pet"))+		{+			L2Summon pet = player.getPet();+			if (pet != null)+				target = pet;+			else+				return;+		}+		 		int npcId = getNpcId();  		if (command.startsWith("Chat"))@@ -83,7 +96,7 @@  			showChatWindow(player, val); 		}-		else if (command.startsWith("Buff"))+		else if (command.startsWith("Buff") || command.startsWith("PetBuff")) 		{ 			String[] buffGroupArray = command.substring(5).split(" "); @@ -143,14 +156,14 @@ 				skill = SkillTable.getInstance().getInfo(skillId, skillLevel);  				if (skill != null)-					skill.getEffects(player, player);+					skill.getEffects(player, target); 			}  			showChatWindow(player, pageVal.get(player.getObjectId())); 		}-		else if (command.startsWith("Heal"))+		else if (command.startsWith("Heal") || command.startsWith("PetHeal")) 		{-			if (!player.isInCombat() && !AttackStanceTaskManager.getInstance().getAttackStanceTask(player))+			if (!target.isInCombat() && !AttackStanceTaskManager.getInstance().getAttackStanceTask(target)) 			{ 				String[] healArray = command.substring(5).split(" "); @@ -158,23 +171,23 @@ 				{ 					if (healType.equalsIgnoreCase("HP")) 					{-						player.setCurrentHp(player.getMaxHp());+						target.setCurrentHp(target.getMaxHp()); 					} 					else if (healType.equalsIgnoreCase("MP")) 					{-						player.setCurrentMp(player.getMaxMp());+						target.setCurrentMp(target.getMaxMp()); 					} 					else if (healType.equalsIgnoreCase("CP")) 					{-						player.setCurrentCp(player.getMaxCp());+						target.setCurrentCp(target.getMaxCp()); 					} 				} 			} 			showChatWindow(player, 0); // 0 = main window 		}-		else if (command.startsWith("RemoveBuffs"))+		else if (command.startsWith("RemoveBuffs") || command.startsWith("PetRemoveBuffs")) 		{-			player.stopAllEffectsExceptThoseThatLastThroughDeath();+			target.stopAllEffectsExceptThoseThatLastThroughDeath(); 			showChatWindow(player, 0); // 0 = main window 		} 		else
Not work for me :(

Code: Select all

<button action="bypass -h npc_%objectId%_PetBuff 1204 1036 1040 1068 1077 1045 1044 1240 1087 1242 1268 1303 1048 1078 1085 1059" value="Pet Buffs" width=120 height=22 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df">
What's wrong?
use the one i posted and you will not have any more problems back one page
wiseelf
Posts: 62
Joined: Thu May 07, 2009 7:11 pm

Re: Pet Core NPC Buffer?

Post by wiseelf »

did you see the topic name?
I use google translate.
hope
Posts: 1160
Joined: Thu Aug 30, 2007 5:17 pm

Re: Pet Core NPC Buffer?

Post by hope »

dont use it if you dont want to hope you enjoy fixing your java
User avatar
NOOR
Posts: 12
Joined: Sat Dec 26, 2009 8:13 pm
Location: Russia

Re: Pet Core NPC Buffer?

Post by NOOR »

RU: выкладываю измененный L2BufferInstance.java с ним компиляция проходит успешно и вроде всё работает, но при использовании созданной схемы ничего не происходит, хотя схема настроена и все бафы корректно добавились в таблицу (после рестарта). есть идеи по исправлению?

EN: post the edit L2BufferInstance.java with compilation is successful and apparently it works, but when used to create a scheme, nothing happens, although the scheme is set up correctly and all the Buffs were added to the table (after restart). any ideas to fix?

original

P.S. language barier lv.3 :(
You do not have the required permissions to view the files attached to this post.
User avatar
denser
Posts: 1392
Joined: Wed May 30, 2007 9:13 pm
Location: Russia
Contact:

Re: Pet Core NPC Buffer?

Post by denser »

check your gm status of INVUL :) may be thats problem
Tiger, once tasted human flesh, will want to taste it again
L2J - the place where glad to see you any time!
User avatar
NOOR
Posts: 12
Joined: Sat Dec 26, 2009 8:13 pm
Location: Russia

Re: Pet Core NPC Buffer?

Post by NOOR »

denser wrote:check your gm status of INVUL :) may be thats problem
i'm an idiot :(
thanks denser! works!
Kingzor
Posts: 57
Joined: Sun Oct 18, 2009 6:12 pm
Contact:

Re: Pet Core NPC Buffer?

Post by Kingzor »

wiseelf wrote:
janiii wrote:I dont like the target thingie. I would be more for new own bypass for pet buff/heal/remove.

Code: Select all

Index: java/com/l2jserver/gameserver/model/actor/instance/L2NpcBufferInstance.java===================================================================--- java/com/l2jserver/gameserver/model/actor/instance/L2NpcBufferInstance.java	(revision 3822)+++ java/com/l2jserver/gameserver/model/actor/instance/L2NpcBufferInstance.java	(working copy)@@ -23,7 +23,9 @@ import com.l2jserver.gameserver.datatables.SkillTable; import com.l2jserver.gameserver.model.L2ItemInstance; import com.l2jserver.gameserver.model.L2Skill;+import com.l2jserver.gameserver.model.actor.L2Character; import com.l2jserver.gameserver.model.actor.L2Npc;+import com.l2jserver.gameserver.model.actor.L2Summon; import com.l2jserver.gameserver.network.SystemMessageId; import com.l2jserver.gameserver.network.serverpackets.ActionFailed; import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;@@ -73,6 +75,17 @@ 		if (player == null || player.getLastFolkNPC() == null || player.getLastFolkNPC().getObjectId() != this.getObjectId()) 			return; +		L2Character target = player;+		+		if (command.startsWith("Pet"))+		{+			L2Summon pet = player.getPet();+			if (pet != null)+				target = pet;+			else+				return;+		}+		 		int npcId = getNpcId();  		if (command.startsWith("Chat"))@@ -83,7 +96,7 @@  			showChatWindow(player, val); 		}-		else if (command.startsWith("Buff"))+		else if (command.startsWith("Buff") || command.startsWith("PetBuff")) 		{ 			String[] buffGroupArray = command.substring(5).split(" "); @@ -143,14 +156,14 @@ 				skill = SkillTable.getInstance().getInfo(skillId, skillLevel);  				if (skill != null)-					skill.getEffects(player, player);+					skill.getEffects(player, target); 			}  			showChatWindow(player, pageVal.get(player.getObjectId())); 		}-		else if (command.startsWith("Heal"))+		else if (command.startsWith("Heal") || command.startsWith("PetHeal")) 		{-			if (!player.isInCombat() && !AttackStanceTaskManager.getInstance().getAttackStanceTask(player))+			if (!target.isInCombat() && !AttackStanceTaskManager.getInstance().getAttackStanceTask(target)) 			{ 				String[] healArray = command.substring(5).split(" "); @@ -158,23 +171,23 @@ 				{ 					if (healType.equalsIgnoreCase("HP")) 					{-						player.setCurrentHp(player.getMaxHp());+						target.setCurrentHp(target.getMaxHp()); 					} 					else if (healType.equalsIgnoreCase("MP")) 					{-						player.setCurrentMp(player.getMaxMp());+						target.setCurrentMp(target.getMaxMp()); 					} 					else if (healType.equalsIgnoreCase("CP")) 					{-						player.setCurrentCp(player.getMaxCp());+						target.setCurrentCp(target.getMaxCp()); 					} 				} 			} 			showChatWindow(player, 0); // 0 = main window 		}-		else if (command.startsWith("RemoveBuffs"))+		else if (command.startsWith("RemoveBuffs") || command.startsWith("PetRemoveBuffs")) 		{-			player.stopAllEffectsExceptThoseThatLastThroughDeath();+			target.stopAllEffectsExceptThoseThatLastThroughDeath(); 			showChatWindow(player, 0); // 0 = main window 		} 		else
Not work for me :(

Code: Select all

<button action="bypass -h npc_%objectId%_PetBuff 1204 1036 1040 1068 1077 1045 1044 1240 1087 1242 1268 1303 1048 1078 1085 1059" value="Pet Buffs" width=120 height=22 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df">
What's wrong?
For me too does not work
Please make who can
Odino
Posts: 4
Joined: Mon Aug 02, 2010 12:58 am

Re: Pet Core NPC Buffer?

Post by Odino »

I tryed many times and in all ways (like 1 week only for this npc and now I'm really tired :cry: ) to get it but when I restart server every time I get this error on Game Server Console:

Class not found L2BufferInstance

Please, if anyone can help me, I tryed like 10-12 hours every day for 1 week only for this NPC (It's true, I'm not joke and I'm really desperate)... With my server I fixed all problems (appeared for now) and the last thing to insert before launch my server is this NPC (I tryed many buffers with schemes shared on web but all give me the same error).

L2j Server Version 4407
L2j Datapack Version 7664

Thanks for all that will help me... or at least who will try. :wink:
Post Reply