04-28-2011, 01:31 AM
Имеется баффер
Как сделать анимацию баффу?
Читал что с помощью doCast можно. Приведите пример пожалуйста.
[сам баффер]
import sys
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
############################################################################
qn = "99999_NpcBuffer"
NPC = [99999]
ADENA_ID = 57
Val_Buff_Ind = 25000
Val_Buff_All = 250000
Val_Nobless = 750000
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 < 10 or st.getPlayer().getLevel() < 1 :
htmltext = "<html><body><br><center>You Do Not Have Adena!<br>Voce nao tem Adenas suficiente para se buffar!</center></body></html>"
else:
st.takeItems(ADENA_ID,0)
st.getPlayer().setTarget(st.getPlayer())
#===============NORMAL BUFFS====================
#Shield
if event == "1":
st.takeItems(ADENA_ID,Val_Buff_Ind)
SkillTable.getInstance().getInfo(1040,2).getEffects(st.getPlayer(),st.getPlayer())
return "2.htm"
st.setState(COMPLETED)
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
############################################################################
qn = "99999_NpcBuffer"
NPC = [99999]
ADENA_ID = 57
Val_Buff_Ind = 25000
Val_Buff_All = 250000
Val_Nobless = 750000
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 < 10 or st.getPlayer().getLevel() < 1 :
htmltext = "<html><body><br><center>You Do Not Have Adena!<br>Voce nao tem Adenas suficiente para se buffar!</center></body></html>"
else:
st.takeItems(ADENA_ID,0)
st.getPlayer().setTarget(st.getPlayer())
#===============NORMAL BUFFS====================
#Shield
if event == "1":
st.takeItems(ADENA_ID,Val_Buff_Ind)
SkillTable.getInstance().getInfo(1040,2).getEffects(st.getPlayer(),st.getPlayer())
return "2.htm"
st.setState(COMPLETED)
Читал что с помощью doCast можно. Приведите пример пожалуйста.