Στην διαδρομή game\data\scripts\custom έχω περάσει το Quest με όνομα φακέλου 99999_NPCBuffer μέσα στο πιο έχω to __init__.py kai to 1.html me Code
__init__.py:
import sys
from com.l2jserver.gameserver.model.actor.instance import L2PcInstance
from java.util import Iterator
from com.l2jserver.gameserver.datatables import SkillTable
from com.l2jserver import L2DatabaseFactory
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
NPC=[1000003]
ADENA_ID=57
QuestId = 99999
QuestName = "NPCBuffer"
QuestDesc = "custom"
InitialHtml = "1.htm"
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 < 0 or st.getPlayer().getLevel() < 1 :
htmltext = "<html><head><body>You not a donator!!! Come back later.<br></body></html>"
else:
st.takeItems(ADENA_ID,0)
st.getPlayer().setTarget(st.getPlayer())
#Cancellation
if event == "1":
st.takeItems(ADENA_ID,0)
SkillTable.getInstance().getInfo(4094,12).getEffects(st.getPlayer(),st.getPlayer())
st.getPlayer().stopAllEffects()
return "1.htm"
st.setState(State.COMPLETED)
#Restore
if event == "2":
st.takeItems(ADENA_ID,0)
st.getPlayer().setCurrentHpMp(st.getPlayer().getMaxHp(),st.getPlayer().getMaxMp())
st.getPlayer().setCurrentCp(st.getPlayer().getMaxCp())
return "1.htm"
st.setState(COMPLETED)
#Dagger buffs
if event == "3":
st.takeItems(ADENA_ID,0)
st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4342,2),False,False)
st.getPlayer().setCurrentHpMp(st.getPlayer().getMaxHp(),st.getPlayer().getMaxMp())
st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4344,3),False,False)
st.getPlayer().setCurrentHpMp(st.getPlayer().getMaxHp(),st.getPlayer().getMaxMp())
st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4345,3),False,False)
st.getPlayer().setCurrentHpMp(st.getPlayer().getMaxHp(),st.getPlayer().getMaxMp())
st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4346,4),False,False)
st.getPlayer().setCurrentHpMp(st.getPlayer().getMaxHp(),st.getPlayer().getMaxMp())
st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4347,6),False,False)
st.getPlayer().setCurrentHpMp(st.getPlayer().getMaxHp(),st.getPlayer().getMaxMp())
st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4348,6),False,False)
st.getPlayer().setCurrentHpMp(st.getPlayer().getMaxHp(),st.getPlayer().getMaxMp())
st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4349,2),False,False)
st.getPlayer().setCurrentHpMp(st.getPlayer().getMaxHp(),st.getPlayer().getMaxMp())
st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4350,4),False,False)
st.getPlayer().setCurrentHpMp(st.getPlayer().getMaxHp(),st.getPlayer().getMaxMp())
st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4352,2),False,False)
st.getPlayer().setCurrentHpMp(st.getPlayer().getMaxHp(),st.getPlayer().getMaxMp())
st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4357,2),False,False)
st.getPlayer().setCurrentHpMp(st.getPlayer().getMaxHp(),st.getPlayer().getMaxMp())
st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4359,3),False,False)
st.getPlayer().setCurrentHpMp(st.getPlayer().getMaxHp(),st.getPlayer().getMaxMp())
st.getPlayer().useMagic(SkillTable.getInstance().getInfo(4360,3),False,False)
st.getPlayer().setCurrentHpMp(st.getPlayer().getMaxHp(),st.getPlayer().getMaxMp())
st.getPlayer().useMagic(SkillTable.getInstance().getInfo(1363,1),False,False)
st.getPlayer().setCurrentHpMp(st.getPlayer().getMaxHp(),st.getPlayer().getMaxMp())
st.getPlayer().useMagic(SkillTable.getInstance().getInfo(1389,3),False,False)
st.getPlayer().setCurrentHpMp(st.getPlayer().getMaxHp(),st.getPlayer().getMaxMp())
return "2.htm"
st.setState(COMPLETED)
if htmltext != event:
st.setState(State.COMPLETED)
st.exitQuest(1)
return htmltext
def onTalk (self,npc,player):
return "1.htm"
QUEST = Quest(QuestId,str(QuestId) + "_" + QuestName,QuestDesc)
for npcId in NPCS:
QUEST.addStartNpc(npcId)
QUEST.addTalkId(npcId)
1.html:
<html>
<body>
<title>Ultra Buffer</title>
<br>
<center>
Ok, I will help you once more !
<br>
Here are some of my custom functions ,but in order to use them you should pay me some adena!
</center>
<br>
<br>
<br>
<center>
<table width=125 border=0 bgcolor=444444>
<tr>
<td>
<button action="bypass -h Quest 99999_NPCBuffer 2" value="Restore Hp/Mp/Cp" width=120 height=22 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df">
</td>
<td>
<button action="bypass -h Quest 99999_NPCBuffer 1" value="Remove Buffs" width=120 height=22 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df">
</td>
</tr>
</table>
<br>
<center>
<button action="bypass -h npc_%objectId%_Chat 0" value="Back" width=150 height=22 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df" fore="L2UI_ct1.button_df">
</center>
</center>
<br>
<center>
<center>
<img src="l2font-e.mini_logo-e" width=250 height=120>
</center>
</body>
</html>
Παρ ολ αυτά όταν πάω να χρησιμοποιήσω το heal/cancel μου βγάζει αυτό:
"You are either not on a quest that involves this NPC,or you don't meet this NPC's minimum quest requirements"
Μπορεί κανεις να μου δώσει καμια ιδέα η να μου πει που είναι το λάθος?
Hello. You may encounter the Push item fail error when trying to pick up an item dropped on the ground by a mob.
or
You can throw something out of your inventory and pick it up again, several times.
Probably this is a quantum dependency) I don't understand at what point this happens, sometimes two items one after another experience push item errors, and sometimes I don't have enough thousands of attempts to repeat this trick)
In any case, this is just a visual error and after the relog, the item appears in the inventory. I think first i need to disconnect the extender and check it on a bare server. I still need time to check this, maybe it's not even about the autoloot function.
https://youtu.be/6mcfmdImofE
-----------
In general, I would like to thank our wonderful Emca Eressea for her deep knowledge in programming and reverse engineering. And for the fact that her work is open to everyone, this is very amazing, and incredibly valuable.
ADENA
500 K = 40e
1kk = 70e
3kk = 190e
ITEMS
staff of life = 150e
karmian set = 90e
elven jewls top D = 30e
Orcish Poleaxe+1 best C pole = 680e
any D grade armor on demand
discord
wiz0642_81242
Question
Neoo1
Καλησπέρα!
Έχω μια μικρή απορία!
Καταρχήν χρησιμοποιώ L2J project Η5 Pack!
Χρησιμοποιώ την buffer που έχει ήδη περασμένη μέσα με κάποιες μικρές αλλαγές για να την φέρω στα μετρα μου!
Αυτό που θέλω να κάνω,είναι ότι θέλω να προσθέσω στην Buffer:Heal(HP.CP,MP) και Cancel Buffs.
Έχω δοκιμάσει μερικά πράγματα τα οποια δεν λειτουργούσαν.
Έχεις κανεις καμια ιδέα τι θα μπορούσα να κάνω?
Πιο συγκεκριμένα!
Στο HTML τις buffer έχω περάσει αυτό:
Στην διαδρομή game\data\scripts\custom έχω περάσει το Quest με όνομα φακέλου 99999_NPCBuffer μέσα στο πιο έχω to __init__.py kai to 1.html me Code
__init__.py:
1.html:
Παρ ολ αυτά όταν πάω να χρησιμοποιήσω το heal/cancel μου βγάζει αυτό:
"You are either not on a quest that involves this NPC,or you don't meet this NPC's minimum quest requirements"
Μπορεί κανεις να μου δώσει καμια ιδέα η να μου πει που είναι το λάθος?
Ευχαριστώ εκ τον προτερων!
2 answers to this question
Recommended Posts