Jump to content

Recommended Posts

Posted

 

Okay.. we are going to learn how to make our own NPC Buffer, you can add the buff you want, superhaste, chants, dances, hero buffs, noblesse buffs, songs, hierophant buffs, souls, etc... etc...

 

I have noted that all people is allways searching for a NPC Buffer, but the true is that you will never find a perfect one so that's the reason I'm making this guide for you.

 

First of all you need to be patient, this is not an easy guide, but if you follow everything I type, I know you will understand and you will get the skill to create your own

 

First of all, If you have an HTML editor like dreamweaver, use it, if not, use notepad, if you don't like notepad, download the notepad++ Is pretty cool, Don't know where to get it?? just click this link:http://notepad-plus.sourceforge.net/uk/download.php

 

If you want to make your own new NPC follow this little guide below, If you want to use an existing one just skip this step, but you have to enter the game and shift click the npc you wanna edit and see it's ID, then write it on a paper or in a place you will remember

 

STEP ONE:. CREATING THE NEW NPC

 

Enter Lineage II game, find a NPC you like, I don't know which, you can chose a granite golem. Antharas, Valakas, Baium, Gremlin, etc... etc.., in a few words just chose your favirite NPC template

 

Press the Shift key and click on it, there you will see the NPC ID like in image

 

guianpc1yk1.jpg

 

 

Enter your MySQL Database and create a new row there you put in the column ID the number you want but make sure is not in use, try using some number like 99999

The other columns just copy them from the original NPC, but make sure the aggro colunm is 0 and the type must be "L2Npc"

In name and tittle just put what you want

In serversidename and serversidetittle put 1

Save your database and that's all

 

STEP TWO:. EDITING YOUR NPC HTML (THE TEXT IT SAYS)

 

Open your HTML editor or the notepad, and paste this code

 

Code:

 

<html>

<body>

<center>

<tr><td><font color="FF44FF">L2 Antorni Buffer</font></tr></td><br>

<br>

Welcome

<br>

I can buff you

<br>

<button value="Buff Me please" action="bypass -h npc_%objectId%_Quest 9999_NPCBuffer" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal">

</body>

</html>

 

go to menu file/save as..

name it as "ID of your npc".html for example 1234.html

Don't forget the .html, is very important

YOU MUST SAVE THE FILE INSITDE THE FOLDER \GAMESERVER\DATA\HTML\DEFAULT\

 

Explanation of the code,

"<html>" & "</html>" are telling us that is an html document

"<body>" & "</body>" are telling us that everything inside them is the content of the html document

"<center>" tell us that the next line will be centered

"<tr><td>" & "</tr></td>" tell us that will create a table

"<font color="FF44FF">" & "</font>" defines the color of the text inside them (color must be in hex format)

"<br>" means a line jump

"<button value="Buff Me please" will create a buton with the text buff me please action="bypass -h npc_%objectId%_Quest 9999_NPCBuffer" this is the action of the button, in this case is get the quest with the name 9999_NPCBuffer width=75 width of the button height=21 height of the button back="L2UI_ch3.Btn1_normalOn" this is tha background of the button fore="L2UI_ch3.Btn1_normal" this is the foreground of the button>"

Note that the background and the foreground are clientside images

 

so so sorry this guide is incomplete cause I click on submit post instead of preview, I will finish soon just sorry for the mistake LoL

 

STEP THREE:. CREATING THE BUFF FILES

 

 

Because of in our html we type 9999_NPCBuffer, we have to create a folder with this name in the folder gameserver\data\jscript\custom, if you want other name just change it on your HTML file and then create a folder with the same name

 

Go to your new folder, in this case gameserver\data\jscript\custom\9999_NPCBuffer\

 

There create a file with a name "__init__.py" if you don't know how, just open your notepad and click save as and you paste it, don't forget that must have the .py, without that, that's just a simple txt file

 

Open your __init__.py there is wher you will put the buffs, I will just explain how to do it, I will not do all the buffer, that will be your homework

 

Inside the __init__.py you will paste this code

Code:

 

import sys

from net.sf.l2j.gameserver.model.actor.instance import L2PcInstance

from java.util import Iterator

from net.sf.l2j.gameserver             import SkillTable

from net.sf.l2j          import L2DatabaseFactory

from net.sf.l2j.gameserver.model.quest import State

from net.sf.l2j.gameserver.model.quest import QuestState

from net.sf.l2j.gameserver.model.quest.jython import QuestJython as JQuest

THE LINES AVOVE ARE JUST IMPORTING SOME DATA

NPC=[1234]                 HERE YOU PUT THE ID OF YOUR NPC

ADENA_ID=57               TIS IS JUST FOR TYPE ADENA_ID INSTEAD OF 57

MIN_LEVEL=40              THIS IS THE MINIMUM LEVEL TO GET BUFFED

QuestId     = 9999          THIS IS THE ID OF THE QUEST

QuestName   = "NPCBuffer" THE NAME OF THE QUEST

QuestDesc   = "custom"      THIS IS THE FOLDER OF THE QUEST

InitialHtml = "1.htm"          THIS IS THE FILE OF YOUR NPC THA WILL START

print "importing " + QuestDesc + ": " + str(QuestId) + ": " + QuestName + ": " + QuestName,

class Quest (JQuest) :

def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)

 

def onEvent(self,event,st):

  htmltext = event

  count=st.getQuestItemsCount(ADENA_ID)HERE THE NPC GET YOUR ADENA

  level=st.getPlayer().getLevel()                HERE THE NPC GET YOUR LEVEL

  if count < 200000 and level  < MIN_LEVEL :

   htmltext = "<html><head><body>You dont have enough adena or your level is lower than st.getPlayer().getLevel().</body></html>"

  else:

   st.getPlayer().setTarget(st.getPlayer())

 

I will explain this just a little cause is a lot of code, just remember things in red have to be deleted to make the code works,

This code is very easy, what it do is just check if you have adena and the minimum level

 

After that code you have to put the buffs in this format

Code:

 

if event == "2":    NEED TO START IN 2 AND MUST BE RAISING 1 EACH TIME

st.takeItems(ADENA_ID,15000)   CHANGE IT FOR THE PRIZE YOU WANT

st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4344,3),False,False) CHANGE IT FOR THE SKILL ID YOU WANT TO USE, CHANGE IT FOR THE LEVEL OF THE SKILL

st.getPlayer().restoreHPMP()  HERE IS JUST RESTORING PLAYERS MP CAUSE NPC USES PLAYER MP

return "1.htm"   HERE YOU RETURN TO THE CHOSE BUFFS SCREEN

st.setState(COMPLETED)

 

Note: for each buff you have to put this code, just change the ID of the buff, the level and the prize.. and of course the event number (if event == "2")

 

In that code you are chosing buff and prize, after that code you have to paste this

 

Code:

 

   if htmltext != event:

    st.setState(COMPLETED)

    st.exitQuest(1)

  return htmltext

 

        def onTalk (self,npc,st):

    htmltext = "<html><head><body>I have nothing to say to you</body></html>"

    st.setState(STARTED)

           return InitialHtml

 

QUEST       = Quest(QuestId,str(QuestId) + "_" + QuestName,QuestDesc)

CREATED=State('Start',QUEST)

STARTED=State('Started',QUEST)

COMPLETED=State('Completed',QUEST)

 

QUEST.setInitialState(CREATED)

for npcId in NPC:

QUEST.addStartNpc(npcId)

STARTED.addTalkId(npcId)

print "...done"

 

I will not explain that code, just paste it, there is nothing interesting

 

Note: Remember the event number of each skill, or better write them in some paper

 

Now once you have created the __int__.py you have to create a file with name 1.html that will be the buffer selection screen

 

Inside the 1.html you just have to paste this code (I will explain this one)

 

Code:

 

<html>

<body>

<center>

<font color="FF40FF">L2 Antorni Buffer</font><br>

<br>

<font color="00FFBB">Buff List:</font><br>

<tr><td></td><td><button value="HERE PUT THE TEXT OF THE BUTTON, IRECOMMEND YOU TO PUT THE NAME OF THE BUFF JEJE" action="bypass -h Quest 9999_NPCBuffer 2" THIS NUMBER IS VERY IMPORTANT, IS NE NUMBER OF THE EVENT THAT WILL CALL FROM __int__.py width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td></tr><br>

</center>

</body>

</html>

 

Pay a lot of attemption to this code and remember the number after 999_NPCBuffer is very important, to call the correct event, to add another buff just add this line to the code

Code:

 

<tr><td></td><td><button value="Heal" action="bypass -h Quest 9999_NPCBuffer 2" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td></tr><br>

 

Just change the number of event and the button value

 

For the last step you just need to add this line of code inside the __int__.py that is inside the folder gameserver\data\jscript\custom\

Code:

 

'9999_NPCBuffer',

 

STEP FOUR:. TESTING THE BUFFER

 

Enter the game and now type //spawn "ID of your NPC"

 

Posted

How about making STEP FOUR: ADDING LINE TO SCRIPTS.CFG

Open your scripts.cfg file located in your gameserver/data folder. Go to the 'custom' section (mostly at the end of the file) and add this line: custom/9999_NPCBuffer/__init__.py

 

You can also search a NPC you want to have in the 'npc' table in navicat (ctrl + f -> Antharas (example))

 

And this I didnt really understand:

For the last step you just need to add this line of code inside the __int__.py that is inside the folder gameserver\data\jscript\custom\

Code:

 

'9999_NPCBuffer',

 

For the rest is seems like a good guide, pretty big :p

  • 2 months later...
  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • L2 TARTARUS - HTML DESIGN       L2 KOMBAT - ANIMATED BORDER   L2 SERENITY - ANIMATED LOGO   L2 ARCANE - COMMUNITY BOARD     L2 AMERIKA - ADVERTISING BANNER   L2 ZERON - ADVERTISING BANNER  
    • SOCNET — 生日快乐! 感谢您一直陪伴我们! 为期一周的礼物、奖励和折扣盛宴! 今天我们庆祝SOCNET项目的生日——而礼物属于您! 我们为所有服务准备了超强优惠: ⭐ SOCNET STORE — 商店 (网站/Telegram) 1. 优惠码BIRTHDAY — 20%折扣 可用于购买任何商品! 2. 大额购买礼品 在任意商品上消费$200,即可任选一件价值不超过$10的商品——免费赠送! 3. 在我们商店主题帖中发表评论可获赠余额 "Happy Birthday, SOCNET. My username/email is":BHW、BFD、voided、nulled 和 patched 论坛。 ➡ 1个论坛 = $1余额! 通过下方提供的联系方式将帖子截图发送给客服,附上您的登录名/邮箱,即可领取奖励。 ⭐ SOCNET SMM 面板 1. 充值 = 奖励 充值$100并获得+$5余额。 充值后请在面板内创建工单。 2. 在我们的 SMM 面板主题帖中发表评论可获赠余额 "Happy Birthday, SOCNET. My username/email is":BHW、BFD、voided、nulled 和 patched 论坛。 ➡ 1个论坛 = $1余额! 通过下方提供的联系方式将帖子截图发送给客服,附上您的登录名/邮箱,即可领取奖励。 ⭐SOCNET STARS — Telegram Stars/Premium 购买机器人 1. 大额购买 = 巨额奖励 单笔购买>1000 Stars,即可获赠+100 Stars! 购买后请联系支持。 2. 在我们 Stars 购买机器人的主题帖中发表评论可获赠余额 "Happy Birthday, SOCNET. My username/email is":BHW、BFD、voided、nulled 和 patched 论坛。 发表评论: ➡ 1个论坛 = +50 Stars余额! 通过下方提供的联系方式将帖子截图发送给客服,附上您的登录名/邮箱,即可领取奖励。 ⭐SOCNET SMS 虚拟号码服务 1. 充值赠送奖励 充值$50即可获赠+$10。 充值后只需联系支持即可。 2. 在我们的 SMS 服务主题帖中发表评论可获赠余额 "Happy Birthday, SOCNET. My username/email is":BHW、BFD、voided、nulled 和 patched 论坛。 ➡ 1个论坛 = $1余额! 通过下方提供的联系方式将帖子截图发送给客服,附上您的登录名/邮箱,即可领取奖励。 让我们一起庆祝吧! 活动有效期为2025年12月02日至12月07日(含)。 不要错过——这是全年最优惠的条件! 新闻: ➡ Telegram 频道: https://t.me/accsforyou_shop ➡ WhatsApp 频道: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord 服务器: https://discord.gg/y9AStFFsrh 联系方式 & 支持: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • SOCNET — 生日快乐! 感谢您一直陪伴我们! 为期一周的礼物、奖励和折扣盛宴! 今天我们庆祝SOCNET项目的生日——而礼物属于您! 我们为所有服务准备了超强优惠: ⭐ SOCNET STORE — 商店 (网站/Telegram) 1. 优惠码BIRTHDAY — 20%折扣 可用于购买任何商品! 2. 大额购买礼品 在任意商品上消费$200,即可任选一件价值不超过$10的商品——免费赠送! 3. 在我们商店主题帖中发表评论可获赠余额 "Happy Birthday, SOCNET. My username/email is":BHW、BFD、voided、nulled 和 patched 论坛。 ➡ 1个论坛 = $1余额! 通过下方提供的联系方式将帖子截图发送给客服,附上您的登录名/邮箱,即可领取奖励。 ⭐ SOCNET SMM 面板 1. 充值 = 奖励 充值$100并获得+$5余额。 充值后请在面板内创建工单。 2. 在我们的 SMM 面板主题帖中发表评论可获赠余额 "Happy Birthday, SOCNET. My username/email is":BHW、BFD、voided、nulled 和 patched 论坛。 ➡ 1个论坛 = $1余额! 通过下方提供的联系方式将帖子截图发送给客服,附上您的登录名/邮箱,即可领取奖励。 ⭐SOCNET STARS — Telegram Stars/Premium 购买机器人 1. 大额购买 = 巨额奖励 单笔购买>1000 Stars,即可获赠+100 Stars! 购买后请联系支持。 2. 在我们 Stars 购买机器人的主题帖中发表评论可获赠余额 "Happy Birthday, SOCNET. My username/email is":BHW、BFD、voided、nulled 和 patched 论坛。 发表评论: ➡ 1个论坛 = +50 Stars余额! 通过下方提供的联系方式将帖子截图发送给客服,附上您的登录名/邮箱,即可领取奖励。 ⭐SOCNET SMS 虚拟号码服务 1. 充值赠送奖励 充值$50即可获赠+$10。 充值后只需联系支持即可。 2. 在我们的 SMS 服务主题帖中发表评论可获赠余额 "Happy Birthday, SOCNET. My username/email is":BHW、BFD、voided、nulled 和 patched 论坛。 ➡ 1个论坛 = $1余额! 通过下方提供的联系方式将帖子截图发送给客服,附上您的登录名/邮箱,即可领取奖励。 让我们一起庆祝吧! 活动有效期为2025年12月02日至12月07日(含)。 不要错过——这是全年最优惠的条件! 新闻: ➡ Telegram 频道: https://t.me/accsforyou_shop ➡ WhatsApp 频道: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord 服务器: https://discord.gg/y9AStFFsrh 联系方式 & 支持: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • SOCNET — 生日快乐! 感谢您一直陪伴我们! 为期一周的礼物、奖励和折扣盛宴! 今天我们庆祝SOCNET项目的生日——而礼物属于您! 我们为所有服务准备了超强优惠: ⭐ SOCNET STORE — 商店 (网站/Telegram) 1. 优惠码BIRTHDAY — 20%折扣 可用于购买任何商品! 2. 大额购买礼品 在任意商品上消费$200,即可任选一件价值不超过$10的商品——免费赠送! 3. 在我们商店主题帖中发表评论可获赠余额 "Happy Birthday, SOCNET. My username/email is":BHW、BFD、voided、nulled 和 patched 论坛。 ➡ 1个论坛 = $1余额! 通过下方提供的联系方式将帖子截图发送给客服,附上您的登录名/邮箱,即可领取奖励。 ⭐ SOCNET SMM 面板 1. 充值 = 奖励 充值$100并获得+$5余额。 充值后请在面板内创建工单。 2. 在我们的 SMM 面板主题帖中发表评论可获赠余额 "Happy Birthday, SOCNET. My username/email is":BHW、BFD、voided、nulled 和 patched 论坛。 ➡ 1个论坛 = $1余额! 通过下方提供的联系方式将帖子截图发送给客服,附上您的登录名/邮箱,即可领取奖励。 ⭐SOCNET STARS — Telegram Stars/Premium 购买机器人 1. 大额购买 = 巨额奖励 单笔购买>1000 Stars,即可获赠+100 Stars! 购买后请联系支持。 2. 在我们 Stars 购买机器人的主题帖中发表评论可获赠余额 "Happy Birthday, SOCNET. My username/email is":BHW、BFD、voided、nulled 和 patched 论坛。 发表评论: ➡ 1个论坛 = +50 Stars余额! 通过下方提供的联系方式将帖子截图发送给客服,附上您的登录名/邮箱,即可领取奖励。 ⭐SOCNET SMS 虚拟号码服务 1. 充值赠送奖励 充值$50即可获赠+$10。 充值后只需联系支持即可。 2. 在我们的 SMS 服务主题帖中发表评论可获赠余额 "Happy Birthday, SOCNET. My username/email is":BHW、BFD、voided、nulled 和 patched 论坛。 ➡ 1个论坛 = $1余额! 通过下方提供的联系方式将帖子截图发送给客服,附上您的登录名/邮箱,即可领取奖励。 让我们一起庆祝吧! 活动有效期为2025年12月02日至12月07日(含)。 不要错过——这是全年最优惠的条件! 新闻: ➡ Telegram 频道: https://t.me/accsforyou_shop ➡ WhatsApp 频道: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord 服务器: https://discord.gg/y9AStFFsrh 联系方式 & 支持: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • @Seamless  find this guy , is the best guy that u can find , plus is ULTRA trusted , rare to find trusted in maxcheaters
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock