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.
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
DISCORD :
https://discord.com/users/325653525793210378
utchiha_market
telegram :
https://t.me/utchiha_market
SELLIX STORE :
https://utchihamkt.mysellix.io/
Join our server for more products :
https://discord.gg/uthciha-services
https://campsite.bio/utchihaamkt
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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.