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
User avatar
denser
Posts: 1392
Joined: Wed May 30, 2007 9:13 pm
Location: Russia
Contact:

Re: Pet Core NPC Buffer?

Post by denser »

share my rework of House's scheme buffer.
core - in attach - too big to POST )
dp:
default html of mu custom_npc

Code: Select all

<html><title>Колдун</title><body><br><br>Привет, тебе, странник! Хочешь бафнуться нахаляву? Ты правильно зашел! Хе-хе.<br>Но халаявы тут нет, не было и никогда не<br1>будет! Совсем обленились, сопляки!<br1>Буду работать только если у тебя есть<br1>деньги и уровень не ниже <font color="LEVEL">40</font>.<br><center><img src="L2UI_CH3.onscrmsg_pattern01_1" width=300 height=32 align=left><table border="0" cellspacing="0" width=256> 	<tr>	<td valign=top><img src=icon.skill1240 width=32 height=32 align=left></td>	<td valign=top><img src=icon.skill1087 width=32 height=32 align=left></td>	<td valign=top><img src=icon.skill1010 width=32 height=32 align=left></td>	<td valign=top><img src=icon.skill1036 width=32 height=32 align=left></td>	<td valign=top><img src=icon.skill1243 width=32 height=32 align=left></td>	<td valign=top><img src=icon.skill1033 width=32 height=32 align=left></td>	<td valign=top><img src=icon.skill1303 width=32 height=32 align=left></td>	<td valign=top><img src=icon.skill1035 width=32 height=32 align=left></td>	</tr> 	<tr>	<td valign=top><img src=icon.skill1032 width=32 height=32 align=left></td>	<td valign=top><img src=icon.skill1048 width=32 height=32 align=left></td>	<td valign=top><img src=icon.skill1078 width=32 height=32 align=left></td>	<td valign=top><img src=icon.skill1085 width=32 height=32 align=left></td>	<td valign=top><img src=icon.skill1059 width=32 height=32 align=left></td>	<td valign=top><img src=icon.skill1352 width=32 height=32 align=left></td>	<td valign=top><img src=icon.skill1259 width=32 height=32 align=left></td>	<td valign=top><img src=icon.skill1393 width=32 height=32 align=left></td>	</tr> </table><br><img src="L2UI_CH3.onscrmsg_pattern01_2" width=300 height=32 align=left><td><button value="Себя" action="bypass -h npc_%objectId%_Quest NPCBufferPlayer" width=80 height=20 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td><td><button value="Питомца" action="bypass -h npc_%objectId%_Quest NPCBufferPet" width=80 height=20 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td></body></center></html>
htmls to "mods" folder

Code: Select all

Index: buffer/menu.htm===================================================================--- buffer/menu.htm	(revision 0)+++ buffer/menu.htm	(revision 0)@@ -0,0 +1,50 @@+<html>+<title>Колдун</title>+<body>+<br>+Приветствую тебя, странник! Могу я чем-то помочь тебе или твоему питомцу в твоих странствиях?+<br><center>+<table border="0" cellspacing="0" width=256>++	<tr>+	<td valign=top><img src=icon.skill1240 width=32 height=32 align=left></td>+	<td valign=top><img src=icon.skill1087 width=32 height=32 align=left></td>+	<td valign=top><img src=icon.skill1010 width=32 height=32 align=left></td>+	<td valign=top><img src=icon.skill1036 width=32 height=32 align=left></td>+	<td valign=top><img src=icon.skill1243 width=32 height=32 align=left></td>+	<td valign=top><img src=icon.skill1033 width=32 height=32 align=left></td>+	<td valign=top><img src=icon.skill1303 width=32 height=32 align=left></td>+	<td valign=top><img src=icon.skill1035 width=32 height=32 align=left></td>+	</tr>++	<tr>+	<td valign=top><img src=icon.skill1032 width=32 height=32 align=left></td>+	<td valign=top><img src=icon.skill1048 width=32 height=32 align=left></td>+	<td valign=top><img src=icon.skill1078 width=32 height=32 align=left></td>+	<td valign=top><img src=icon.skill1085 width=32 height=32 align=left></td>+	<td valign=top><img src=icon.skill1059 width=32 height=32 align=left></td>+	<td valign=top><img src=icon.skill1352 width=32 height=32 align=left></td>+	<td valign=top><img src=icon.skill1259 width=32 height=32 align=left></td>+	<td valign=top><img src=icon.skill1393 width=32 height=32 align=left></td>+	</tr>+	+</table>+<br><br>    +<font color="LEVEL">Выбирайте кого бафать</font>+<table border="0" cellspacing="0">+  <tr>+    <td><button value="Себя" action="bypass -h npc_%objectId%_support player" width=80 height=20 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td>+    <td><button value="Питомца" action="bypass -h npc_%objectId%_support pet" width=80 height=20 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td>+  </tr>+</table>+<br><br><font color="LEVEL">Схемы Бафов</font>+<table border="0" cellspacing="0">+  <tr>+    <td><button value="Управление" action="bypass -h npc_%objectId%_manageschemes" width=80 height=20 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td>+    <td><button value="Настройка" action="bypass -h npc_%objectId%_editschemes unselected unselected" width=80 height=20 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td>+  </tr>+</table><br><br>+Чтобы получить поддержку, нужно создать схему в <font color="LEVEL">управлении</font>, затем настроить её в <font color="LEVEL">настройках</font>, и только псоле этого вы сможете воспользоваться магией!<br>+Вы всегда сможете изменить свои схемы, поэтому не бойтесь экспериментировать!</center>+</body>+</html>\ No newline at end of fileIndex: buffer/schememenu.htm===================================================================--- buffer/schememenu.htm	(revision 0)+++ buffer/schememenu.htm	(revision 0)@@ -0,0 +1,21 @@+<html>+<title>Колдун - Меню схем</title>+<body>+<br>+<center><font color="LEVEL">Группы</font></center>+<center><font color="00FF00">%typesframe%</font></center>+<br>+<center><font color="LEVEL">Схемы</font></center>+<center>%schemelistframe%</center>+<br>+<center><font color="LEVEL">Доступные скиллы</font></center>+<center>%skilllistframe%</center>+<br>+<center><font color="LEVEL">Ваша схема</font></center><br>+<center><font color="99FFFF">%myschemeframe%</font></center>+<br>+<br>+<a action="bypass -h npc_%objectId%_menu">Назад</a><br>++</body>+</html>\ No newline at end of file 
add this code to admin reload commands(do not forget solve problems with imports :P )

Code: Select all

				else if (type.startsWith("buffer"))				{					BufferSkillsTable.getInstance().reload();					activeChar.sendMessage("All Buffs have been reloaded");				}				else if (type.startsWith("buff_save"))				{					CharSchemesTable.getInstance().onServerShutdown();					activeChar.sendMessage("All schems have been stored in DB");				}
table for char schema

Code: Select all

---- Структура таблицы `mods_buffer_schemes`-- CREATE TABLE IF NOT EXISTS `mods_buffer_schemes` (  `ownerId` int(10) UNSIGNED NOT NULL DEFAULT '0',  `id` int(10) UNSIGNED NOT NULL DEFAULT '0',  `level` int(10) UNSIGNED NOT NULL DEFAULT '0',  `scheme` varchar(20) NOT NULL DEFAULT 'default',  KEY `id` (`id`)) ENGINE=MyISAM DEFAULT CHARSET=utf8; 
sql table for my buffs(use there have icons in client. and alo you can modify that table and reload by comand above)

Code: Select all

---- Структура таблицы `mods_buffer_skills`-- CREATE TABLE IF NOT EXISTS `mods_buffer_skills` (  `id` int(10) UNSIGNED NOT NULL DEFAULT '0',  `level` int(10) UNSIGNED NOT NULL DEFAULT '0',  `skill_group` varchar(20) NOT NULL DEFAULT 'default',  `adena` int(11) NOT NULL DEFAULT '0') ENGINE=MyISAM DEFAULT CHARSET=utf8; ---- Дамп данных таблицы `mods_buffer_skills`-- INSERT INTO `mods_buffer_skills` (`id`, `level`, `skill_group`, `adena`) VALUES(1354, 1, 'ШиленЕлдер', 0),(1519, 1, 'Амулеты', 0),(1397, 3, 'Элдер', 0),(1501, 1, 'Профет', 0),(1499, 1, 'Профет', 0),(1087, 3, 'Элдер', 0),(1503, 1, 'Элдер', 0),(1502, 1, 'ШиленЕлдер', 0),(1259, 4, 'Элдер', 0),(1257, 3, 'Элдер', 0),(1047, 4, 'Элдер', 0),(1323, 1, 'Дворянство', 0),(1304, 3, 'Элдер', 0),(1355, 1, 'Элдер', 0),(1047, 4, 'Элдер', 0),(1357, 1, 'ШиленЕлдер', 0),(1353, 1, 'Элдер', 0),(1303, 2, 'ШиленЕлдер', 0),(1059, 3, 'ШиленЕлдер', 0),(1268, 4, 'ШиленЕлдер', 0),(264, 1, 'Песни', 0),(265, 1, 'Песни', 0),(266, 1, 'Песни', 0),(267, 1, 'Песни', 0),(268, 1, 'Песни', 0),(269, 1, 'Песни', 0),(270, 1, 'Песни', 0),(304, 1, 'Песни', 0),(305, 1, 'Песни', 0),(306, 1, 'Песни', 0),(307, 1, 'Песни', 0),(308, 1, 'Песни', 0),(363, 1, 'Песни', 0),(364, 1, 'Песни', 0),(271, 1, 'Пляски', 0),(272, 1, 'Пляски', 0),(273, 1, 'Пляски', 0),(274, 1, 'Пляски', 0),(275, 1, 'Пляски', 0),(276, 1, 'Пляски', 0),(277, 1, 'Пляски', 0),(307, 1, 'Пляски', 0),(309, 1, 'Пляски', 0),(310, 1, 'Пляски', 0),(311, 1, 'Пляски', 0),(365, 1, 'Пляски', 0),(366, 1, 'Пляски', 0),(349, 1, 'Песни', 0),(1002, 3, 'Амулеты', 0),(1006, 3, 'Амулеты', 0),(1007, 3, 'Амулеты', 0),(1009, 3, 'Амулеты', 0),(1251, 2, 'Амулеты', 0),(1252, 3, 'Амулеты', 0),(1253, 3, 'Амулеты', 0),(1284, 3, 'Амулеты', 0),(1310, 4, 'Амулеты', 0),(1309, 3, 'Амулеты', 0),(1308, 3, 'Амулеты', 0),(1362, 1, 'Амулеты', 0),(1363, 1, 'Амулеты', 0),(1413, 1, 'Амулеты', 0),(1204, 2, 'Профет', 0),(1500, 1, 'ШиленЕлдер', 0),(1040, 3, 'Профет', 0),(1068, 3, 'Профет', 0),(1035, 4, 'Профет', 0),(1045, 6, 'Профет', 0),(1048, 6, 'Профет', 0),(1036, 2, 'Профет', 0),(1078, 6, 'Профет', 0),(1062, 2, 'Профет', 0),(1243, 6, 'Профет', 0),(1085, 3, 'Профет', 0),(1086, 2, 'Профет', 0),(1240, 3, 'Профет', 0),(1077, 3, 'Профет', 0),(1242, 3, 'Профет', 0),(1388, 3, 'Профет', 0),(1389, 3, 'Профет', 0),(1392, 3, 'Профет', 0),(1393, 3, 'Профет', 0),(1356, 1, 'Профет', 0),(1352, 1, 'Профет', 0); 
sql for custom npc

Code: Select all

---- Дамп данных таблицы `custom_npc`-- INSERT INTO `custom_npc` (`id`, `idTemplate`, `name`, `serverSideName`, `title`, `serverSideTitle`, `class`, `collision_radius`, `collision_height`, `level`, `sex`, `type`, `attackrange`, `hp`, `mp`, `hpreg`, `mpreg`, `str`, `con`, `dex`, `int`, `wit`, `men`, `exp`, `sp`, `patk`, `pdef`, `matk`, `mdef`, `atkspd`, `aggro`, `matkspd`, `rhand`, `lhand`, `armor`, `enchant`, `walkspd`, `runspd`, `faction_id`, `faction_range`, `isUndead`, `absorb_level`, `absorb_type`, `soulshot_count`, `spiritshot_count`, `ss_rate`, `AI`, `drop_herbs`) VALUES('50010', 32174, 'Жадный Колдун', 1, 'http://la2.a42.ru:8000/', 1, 'LineageNPC2.K_F1_guard', '13.00', '22.50', '70', 'female', 'L2Buffer', 40, '2444', '2444', '0.00', '0.00', '10', '10', '10', '10', '10', '10', '0', '0', '500', '500', '500', '500', '253', '0', '253', '9644', '0', NULL, 0, '80', '120', '', '0', 0, '0', 'LAST_HIT', 0, 0, 0, 'balanced', 'false'); 
big P.S.

so..i am to lazy to translate-back to english some aspects. point is: you get talk to npc and can choose who gets buffs you or your pet. NOT implemented different kind of price for you and your pet separately. NOT implemented diff than adena for buff(i.e. item id in mysql table). NOT implemented cost for revive and remove buff.
NOT - coz to lazy and insufficient time for this


feel free to modify it) btw. you can force scheme save by admin command(look above) or add it in action of player where he requests buff from his scheme list
You do not have the required permissions to view the files attached to this post.
Tiger, once tasted human flesh, will want to taste it again
L2J - the place where glad to see you any time!
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Pet Core NPC Buffer?

Post by jurchiks »

denser wrote:

Code: Select all

<html><title>Колдун</title><body><br><br>Привет, тебе, странник! Хочешь бафнуться нахаляву? Ты правильно зашел! Хе-хе.<br>Но халаявы тут нет, не было и никогда не<br1>будет! Совсем обленились, сопляки!<br1>Буду работать только если у тебя есть<br1>деньги и уровень не ниже <font color="LEVEL">40</font>.<br> 
rofl :D
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
User avatar
momo61
Posts: 1648
Joined: Fri Jun 06, 2008 2:05 pm
Location: Europe

Re: Pet Core NPC Buffer?

Post by momo61 »

this whole russian thing ... dunno what it is ....

We need a core pet buffer ^^ an efficient and good one :)

therefore: bump.

I tried out the patches, I reported their functionality andthey were working pretty fine. However, there seems to be some differences of opinions between the devs on what system is best.
gio
Posts: 186
Joined: Fri Apr 13, 2007 1:40 am
Contact:

Re: Pet Core NPC Buffer?

Post by gio »

Somebody translated it?
---
L2J = Convert.ToL2J(L2off);
---
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Pet Core NPC Buffer?

Post by jurchiks »

I don't think you can translate it into english while keeping the humor intact :D
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
User avatar
denser
Posts: 1392
Joined: Wed May 30, 2007 9:13 pm
Location: Russia
Contact:

Re: Pet Core NPC Buffer?

Post by denser »

Tiger, once tasted human flesh, will want to taste it again
L2J - the place where glad to see you any time!
gio
Posts: 186
Joined: Fri Apr 13, 2007 1:40 am
Contact:

Re: Pet Core NPC Buffer?

Post by gio »

You make me laugh :lol:
---
L2J = Convert.ToL2J(L2off);
---
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Pet Core NPC Buffer?

Post by jurchiks »

Agreed, google translator is awful, it's only good for the most simplest texts and for a good laugh.
I could translate it, but not going to because, as I already said, the humor won't stay intact...
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
gio
Posts: 186
Joined: Fri Apr 13, 2007 1:40 am
Contact:

Re: Pet Core NPC Buffer?

Post by gio »

Buffer works great for me ty!
---
L2J = Convert.ToL2J(L2off);
---
babyjason
Posts: 575
Joined: Wed Dec 02, 2009 7:59 pm

Re: Pet Core NPC Buffer?

Post by babyjason »

//recall house
User avatar
MetalBlack
Posts: 30
Joined: Wed May 23, 2007 6:43 am

Re: Pet Core NPC Buffer?

Post by MetalBlack »

Sorry guys,can somebody send me a full patch for last revision in english language?
thx a lot

Sorry for my bad english
gio
Posts: 186
Joined: Fri Apr 13, 2007 1:40 am
Contact:

Re: Pet Core NPC Buffer?

Post by gio »

Btw. i get this while compiling:

Code: Select all

    [javac] Note: C:\Users\gio\workspace\L2_GameServer\java\com\l2jserver\gameserver\model\actor\instance\L2BufferInstance.java uses or overrides a deprecated API.    [javac] Note: Recompile with -Xlint:deprecation for details.
Can I ignore this? because it seems to work with no problems..
---
L2J = Convert.ToL2J(L2off);
---
Crom
Posts: 191
Joined: Sun May 24, 2009 8:09 pm
Location: Spain

Re: Pet Core NPC Buffer?

Post by Crom »

With this you can't use it how a pet buffer, any idea of a solution?
hope
Posts: 1160
Joined: Thu Aug 30, 2007 5:17 pm

Re: Pet Core NPC Buffer?

Post by hope »

try this goes into custom
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 »

Crom wrote:With this you can't use it how a pet buffer, any idea of a solution?
<td><button value="Self" action="bypass -h npc_%objectId%_Quest NPCBufferPlayer" width=80 height=20 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td>
<td><button value="Pet" action="bypass -h npc_%objectId%_Quest NPCBufferPet" width=80 height=20 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td>
may be you wont be so lazy and look careful to bypasses?
later i post reworked to latest revision in separate contrib
Tiger, once tasted human flesh, will want to taste it again
L2J - the place where glad to see you any time!
Post Reply