Hi Everyone, i'am posting here because i need help whit this code from npcbuffer, well i need to know what i need to change in the code to make the NPC cast the buffs, or what I need to edit for see an animation when i press the buff button??
import sys
from net.sf.l2j.gameserver.model.actor.instance import L2PcInstance
from java.util import Iterator
from net.sf.l2j.gameserver.datatables 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
qn = "9977_NPCBuffer"
NPC=[7106]
ADENA_ID=57
QuestId = 9977
QuestName = "NPCBuffer"
QuestDesc = "custom"
InitialHtml = "1.htm"
print "importing custom: 9977: NPCBuffer"
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)
if count < 15000 or st.getPlayer().getLevel() < 2 :
htmltext = "<html><head><body>No Tienes Adena.<br></body></html>"
else:
st.takeItems(ADENA_ID,0)
st.getPlayer().setTarget(st.getPlayer())
if event == "1":
st.takeItems(ADENA_ID,1000)
st.getPlayer().useMagic(SkillTable.getInstance().getInfo(9951,5),False,False)
st.getPlayer().restoreHPMP()
return "1.htm"
st.setState(COMPLETED)
#Wind Walk
if event == "2":
st.takeItems(ADENA_ID,10000)
SkillTable.getInstance().getInfo(1204,2).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
return "2.htm"
st.setState(COMPLETED)
#Arcane Protection
if event == "3":
st.takeItems(ADENA_ID,10000)
SkillTable.getInstance().getInfo(1354,1).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
return "2.htm"
st.setState(COMPLETED)
#Shield
if event == "4":
st.takeItems(ADENA_ID,10000)
SkillTable.getInstance().getInfo(1040,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
return "2.htm"
st.setState(COMPLETED)
#Might
if event == "5":
st.takeItems(ADENA_ID,10000)
SkillTable.getInstance().getInfo(1068,3).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
return "2.htm"
st.setState(COMPLETED)
#Mental Shield
if event == "6":
st.takeItems(ADENA_ID,10000)
SkillTable.getInstance().getInfo(1035,4).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().restoreHPMP()
return "2.htm"
st.setState(COMPLETED)
if htmltext != event:
st.setState(COMPLETED)
st.exitQuest(1)
return htmltext
def onTalk (self,npc,player):
st = player.getQuestState(qn)
htmltext = "<html><head><body>No Tengo Nada que decirte.</body></html>"
st.setState(State.STARTED)
return InitialHtml
QUEST = Quest(QuestId,str(QuestId) + "_" + QuestName,QuestDesc)
for npcId in NPC:
QUEST.addStartNpc(npcId)
QUEST.addTalkId(npcId)
with nothing more to say, thank you very much for the help ....
Francisko ^^*!
PD: i just post a part of the code, because the other repeats
We will help you pass verification on any service or application you need!
Fast, reliable, and secure.
Pay for the first verification and get a 10% discount on the second one.
Learn more: Go to
Long-term rental of virtual numbers — maximum control and convenience.
No need to change numbers every time or worry about losing access anymore.
Now you can rent virtual numbers for hours, days, or months and use them as permanent ones:
— stable SMS reception from popular services
— permanent access to accounts
— an ideal solution for registration, verification, and repeated logins
— one number — full control for the entire rental period
This is the choice for those who value reliability, uninterrupted access, and predictable results.
Important: even many top SMS services are unable to offer such an exclusive long-term rental option.
Go to the SMS service
We are looking for partners and account suppliers for cooperation
We are open to partnerships with reliable account suppliers for the following dating services:
➡ Tinder
➡ Badoo
➡ Bumble
➡ Hinge
➡ Happn
➡ Meetic
➡ VK Dating
We are considering long-term cooperation, stable volumes, and mutually beneficial terms.
If you have any offers, we will be glad to discuss the details.
Contact us using the details below.
➡ Telegram: https://t.me/socnet_support
➡ WhatsApp: https://wa.me/79051904467
➡ Discord: socnet_support
➡ ✉ Email: solomonbog@socnet.store
We are looking for partners and account suppliers for cooperation
We are open to partnerships with reliable account suppliers for the following dating services:
➡ Tinder
➡ Badoo
➡ Bumble
➡ Hinge
➡ Happn
➡ Meetic
➡ VK Dating
We are considering long-term cooperation, stable volumes, and mutually beneficial terms.
If you have any offers, we will be glad to discuss the details.
Contact us using the details below.
➡ Telegram: https://t.me/socnet_support
➡ WhatsApp: https://wa.me/79051904467
➡ Discord: socnet_support
➡ ✉ Email: solomonbog@socnet.store
We are looking for partners and account suppliers for cooperation
We are open to partnerships with reliable account suppliers for the following dating services:
➡ Tinder
➡ Badoo
➡ Bumble
➡ Hinge
➡ Happn
➡ Meetic
➡ VK Dating
We are considering long-term cooperation, stable volumes, and mutually beneficial terms.
If you have any offers, we will be glad to discuss the details.
Contact us using the details below.
➡ Telegram: https://t.me/socnet_support
➡ WhatsApp: https://wa.me/79051904467
➡ Discord: socnet_support
➡ ✉ Email: solomonbog@socnet.store
Question
Francisko
Hi Everyone, i'am posting here because i need help whit this code from npcbuffer, well i need to know what i need to change in the code to make the NPC cast the buffs, or what I need to edit for see an animation when i press the buff button??
with nothing more to say, thank you very much for the help ....
Francisko ^^*!
PD: i just post a part of the code, because the other repeats
4 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now