Hello, again me, sorry for make a new Topic but i think this will be much different from other. So i will say thank you to everybody who can and could help me in 2 questions what I have bout scripting (i just started do my first server 1,5 weeks before so dont laugh alotif I have some errors :D). ok here I come:
1). First of all I would like to know how I can make my buffer remember and restore player's buff, I have a custom npc buffer but dont know how to make and option abous save/restore buffs.
2). I was tryin to make a NPC who enchant your Armor, Weapon, Jewel and so on +30 (while server max enchant is +25) to improve donations from people so I've done the code, tell me why doesn't work and what do I do bad? :
import sys
from com.l2jserver.gameserver.model.actor.instance import L2PcInstance
from java.util import Iterator
from com.l2jserver import L2DatabaseFactory
from com.l2jserver.gameserver.model.itemcontainer import Inventory
from com.l2jserver.gameserver.model.quest import State
from com.l2jserver.gameserver.model.quest import QuestState
from com.l2jserver.gameserver.model.quest.jython import QuestJython as JQuest
qn= "99991_NpcEnchant"
NPC=[99991]
ADENA_ID=57
QuestId = 99991
QuestName = "NpcEnchant"
QuestDesc = "custom"
InitialHtml = "1.htm"
print "ENCHANT NPC LOADED"
class Quest (JQuest) :
def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)
def onEvent(self,event,st):
htmltext = event
#Helmet
if event == "1":
st.getPlayer().setTarget(st.getPlayer())
ench = 30
armorType = Inventory.PAPERDOLL_HEAD;
st.setEnchant(activeTarget, ench, armorType);
QUEST = Quest(QuestId,str(QuestId) + "_" + QuestName,QuestDesc)
for npcId in NPC:
QUEST.addStartNpc(npcId)
QUEST.addTalkId(npcId)
This is only for a Helmet but dont even work correctly :< "Your character dont ...blablalba... minimal quest requirements" = this.
Thank you everyone — we're doing our best to deliver the highest quality experience!
⏳ Less than 2 days left until the L2Elixir Launch!
Our team is working nonstop, polishing every little detail to ensure a smooth and exciting opening. A huge thank you to everyone who participated in the Open Beta — your support and feedback have been invaluable.
Get ready… the adventure begins soon! ⚔️✨
Launch: November 28 & 21:00 UTC +2
Website: https://l2elixir.org/
Discord: https://discord.gg/5ydPHvhbxs
Question
fLx
Hello, again me, sorry for make a new Topic but i think this will be much different from other. So i will say thank you to everybody who can and could help me in 2 questions what I have bout scripting (i just started do my first server 1,5 weeks before so dont laugh alotif I have some errors :D). ok here I come:
1). First of all I would like to know how I can make my buffer remember and restore player's buff, I have a custom npc buffer but dont know how to make and option abous save/restore buffs.
2). I was tryin to make a NPC who enchant your Armor, Weapon, Jewel and so on +30 (while server max enchant is +25) to improve donations from people so I've done the code, tell me why doesn't work and what do I do bad? :
This is only for a Helmet but dont even work correctly :< "Your character dont ...blablalba... minimal quest requirements" = this.
Help me please and thanks all again!!
1 answer 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