Ir para conteúdo
  • Anúncios

    • AiroN

      Anuncie no L2JBrasil

      Deseja anunciar aqui no fórum, no Top L2JBrasil ou em nossa página no Facebook? Confira: www.l2jbrasil.com/anunciar
    • Grundor

      Método de login alterado   08-10-2017

      Com a atualização do fórum para versão  IPB 4.2 não é mais possível fazer login usando username, ao invés disso você deve usar e-mail ou seu Display Name (nome como é exibido no forum).      
    • AiroN

      Tenha seu clube formalmente no L2JBrasil!   18-10-2017

      Você tem amigos que estão sempre juntos contigo na alegria e na tristeza, na saúde e na doença, em todos os desenvolvimentos de suas vida, no pvp, nas quests? rsrs   Monte seu clube formalmente na L2J Brasil!
      Criar um clube é muito fácil, basta você entrar nesse tópico e se interar do assunto:    Dominem o mundo!


      Atenciosamente,
      Administração L2jBrasil.
KhayrusS

[Tutorial] NPC BUFFER

Posts recomendados

Kayrus Meu Brother Como Ve O Meu Perfil Sou Aprendiz Mas Ai Buffer Funfanfo Com Sucesso ...

Agora Gostaria De Saber Como Faço Para Cortar Aquelas Açoes Do Buffer Tipo Açoes Como Zerk essas Paradas Que O ChrSimula Os Buffs

E Tambem Como Faria Para Que Quando se buffar com dance naum ter que usar Dual Valew

AguardO respostas

Compartilhar este post


Link para o post
Compartilhar em outros sites

Essa é Minha Script

 

Obs: Dances so se usa com Dual No Npc Buffer, e As Apresentaçoes Gostaria de ter um mold emcima desse pra tirar as apresentações

e Buffar sem ter que ficar trocando de arma toda hora como segue no post acima

=================================================================================================================================================

import sys

from com.l2jserver.gameserver.model.actor.instance import L2PcInstance

from com.l2jserver.gameserver.model.actor.instance import L2PetInstance#Add Pet Buffer

from com.l2jserver.gameserver.model.actor.instance import L2SummonInstance#Add Pet Buffer

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

 

qn = "75000_NPCBuffer"

 

NPC=[71000]

ADENA_ID=57

QuestId = 75000

QuestName = "NPCBuffer"

QuestDesc = "custom"

InitialHtml = "75000-1.htm"

 

 

print "L2 Mr.Bison NPCBuffer Version : Epilogue"

 

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 < 100 or st.getPlayer().getLevel() < 1 :

htmltext = "<html><head><body>Precisa de mais adenas<br></body></html>"

else:

st.takeItems(ADENA_ID,0)

st.getPlayer().setTarget(st.getPlayer())

 

#Script Begins for the Buffs

 

#inicio Dark 5 Skills

# Dance of Fire

if event == '1':

st.getPlayer().useMagic(SkillTable.getInstance().getInfo(274,1),False,False)

st.getPlayer().setCurrentMp(st.getPlayer().getMaxMp())

st.takeItems(ADENA_ID,100)

return '75000-3.htm'

st.setState(COMPLETED)

 

# Dance od the Warrior

if event == '2':

st.getPlayer().useMagic(SkillTable.getInstance().getInfo(271,1),False,False)

st.getPlayer().setCurrentMp(st.getPlayer().getMaxMp())

st.takeItems(ADENA_ID,100)

return '75000-3.htm'

st.setState(COMPLETED)

 

=================================================================================================================================================

Kayrus Agradeço Desde Jah Voce Esta me Ajudando E Muito

Compartilhar este post


Link para o post
Compartilhar em outros sites

O que você pode fazer pra não precisar usar Dual é trocar essas linha

 

st.getPlayer().useMagic(SkillTable.getInstance().getInfo(271,1),False,False)

 

por essa:

SkillTable.getInstance().getInfo(271,1).getEffects(st.getPlayer(),st.getPlayer())

 

mas aí não terá mais a animação do npc

Compartilhar este post


Link para o post
Compartilhar em outros sites

Só trocar esse:

SkillTable.getInstance().getInfo(271,1).getEffects(st.getPlayer(),st.getPlayer())

 

por esse outro

SkillTable.getInstance().getInfo(271,1).getEffects(st.getPlayer().getPet(),st.getPlayer().getPet())

 

Compartilhar este post


Link para o post
Compartilhar em outros sites

Funcionou perfeitamente para esse tipo de buff, mais mudando sobre este buff de quest_9999 para o outro tipo de buffer aquele que os skil estão em Buff_templates no banco de dados... Onde altero, para que esse npc solte buff nos pet?

Compartilhar este post


Link para o post
Compartilhar em outros sites

Ola Kairuss Ta DandO UM Erro Aqui Num Script Pode Me Ajudar ?

 

O Erro E Esse Aqui....

----------------------------------------------------------------------------------------------------------------------------------------------

Error on: C:\Documents and Settings\Usuario\Desktop\Server\gameserver\data\scripts\custom\75000_NPCBuffer\__init__.py.error.log

Line: -1 - Column: -1

 

Traceback (innermost last):

(no code object) at line 0

SyntaxError: ('invalid syntax', ('__init__.py', 46, 33, '\t\t\t\treturn "dance.htm"\t\t'))

-----------------------------------------------------------------------------------------------------------------------------------------------

AquI Estou Postando o Pedaço da Minha Script Dance

--------------------------------------------------------------------------------------------------

import sys

from com.l2jserver.gameserver.model.actor.instance import L2PcInstance

from com.l2jserver.gameserver.model.actor.instance import L2PetInstance#Add Pet Buffer

from com.l2jserver.gameserver.model.actor.instance import L2SummonInstance#Add Pet Buffer

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

 

qn = "75000_NPCBuffer"

 

NPC=[71000]

ADENA_ID=57

QuestId = 75000

QuestName = "NPCBuffer"

QuestDesc = "custom"

InitialHtml = "inicial.htm"

 

 

print "importing custom: 75000: NPCBuffer: Epilogue"

 

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 < 100 or st.getPlayer().getLevel() < 1 :

htmltext = "<html><head><body>Precisa de mais adenas<br></body></html>"

else:

st.takeItems(ADENA_ID,0)

st.getPlayer().setTarget(st.getPlayer())

 

# Dance of Fire

if event == '1':

st.takeItems(ADENA_ID,35000)

SkillTable.getInstance().getInfo(274,1).getEffects(st.getPlayer(),st.getPlayer())

st.getPlayer().setCurrentMp(st.getPlayer().getMaxMp()

return "dance.htm"

st.setState(COMPLETED)

 

# Dance od the Warrior

if event == '2':

st.takeItems(ADENA_ID,35000)

SkillTable.getInstance().getInfo(271,1).getEffects(st.getPlayer(),st.getPlayer())

st.getPlayer().setCurrentMp(st.getPlayer().getMaxMp()

return "dance.htm"

st.setState(COMPLETED)

 

# Dance of Inspiration

if event == '3':

st.takeItems(ADENA_ID,35000)

SkillTable.getInstance().getInfo(272,1).getEffects(st.getPlayer(),st.getPlayer())

st.getPlayer().setCurrentMp(st.getPlayer().getMaxMp()

return "dance.htm"

st.setState(COMPLETED)

 

# Dance of Fury

if event == '4':

st.takeItems(ADENA_ID,35000)

SkillTable.getInstance().getInfo(275,1).getEffects(st.getPlayer(),st.getPlayer())

st.getPlayer().setCurrentMp(st.getPlayer().getMaxMp()

return "dance.htm"

st.setState(COMPLETED)

 

# Dance of Protection

if event == '5':

st.takeItems(ADENA_ID,35000)

SkillTable.getInstance().getInfo(311,1).getEffects(st.getPlayer(),st.getPlayer())

st.getPlayer().setCurrentMp(st.getPlayer().getMaxMp()

return "dance.htm"

st.setState(COMPLETED)

 

# Dance of the Vampire

if event == '6':

st.takeItems(ADENA_ID,35000)

SkillTable.getInstance().getInfo(310,1).getEffects(st.getPlayer(),st.getPlayer())

st.getPlayer().setCurrentMp(st.getPlayer().getMaxMp()

return "dance.htm"

st.setState(COMPLETED)

 

# Dance of Alignment

if event == '7':

st.takeItems(ADENA_ID,35000)

SkillTable.getInstance().getInfo(530,1).getEffects(st.getPlayer(),st.getPlayer())

st.getPlayer().setCurrentMp(st.getPlayer().getMaxMp()

return "dance.htm"

st.setState(COMPLETED)

 

# Dance of Blade Storn

if event == '8':

st.takeItems(ADENA_ID,35000)

SkillTable.getInstance().getInfo(765,1).getEffects(st.getPlayer(),st.getPlayer())

st.getPlayer().setCurrentMp(st.getPlayer().getMaxMp()

return "dance.htm"

st.setState(COMPLETED)

 

# Dance of the Mystic

if event == '9':

st.takeItems(ADENA_ID,35000)

SkillTable.getInstance().getInfo(273,1).getEffects(st.getPlayer(),st.getPlayer())

st.getPlayer().setCurrentMp(st.getPlayer().getMaxMp()

return "dance.htm"

st.setState(COMPLETED)

 

# Dance of Concentration

if event == '10':

st.takeItems(ADENA_ID,35000)

SkillTable.getInstance().getInfo(276,1).getEffects(st.getPlayer(),st.getPlayer())

st.getPlayer().setCurrentMp(st.getPlayer().getMaxMp()

return "dance.htm"

st.setState(COMPLETED)

 

# Dance of Aqua Guard

if event == '11':

st.takeItems(ADENA_ID,35000)

SkillTable.getInstance().getInfo(307,1).getEffects(st.getPlayer(),st.getPlayer())

st.getPlayer().setCurrentMp(st.getPlayer().getMaxMp()

return "dance.htm"

st.setState(COMPLETED)

 

# Siren´s Dance

if event == '12':

st.takeItems(ADENA_ID,35000)

SkillTable.getInstance().getInfo(365,1).getEffects(st.getPlayer(),st.getPlayer())

st.getPlayer().setCurrentMp(st.getPlayer().getMaxMp()

return "dance.htm"

st.setState(COMPLETED)

 

# Dance of Light

if event == '13':

st.takeItems(ADENA_ID,35000)

SkillTable.getInstance().getInfo(277,1).getEffects(st.getPlayer(),st.getPlayer())

st.getPlayer().setCurrentMp(st.getPlayer().getMaxMp()

return "dance.htm"

st.setState(COMPLETED)

 

# Dance of Earth Guard

if event == '14':

st.takeItems(ADENA_ID,35000)

SkillTable.getInstance().getInfo(309,1).getEffects(st.getPlayer(),st.getPlayer())

st.getPlayer().setCurrentMp(st.getPlayer().getMaxMp()

return "dance.htm"

st.setState(COMPLETED)

 

# Dance of Shadowns

if event == '15':

st.takeItems(ADENA_ID,35000)

SkillTable.getInstance().getInfo(366,1).getEffects(st.getPlayer(),st.getPlayer())

st.getPlayer().setCurrentMp(st.getPlayer().getMaxMp()

return "dance.htm"

st.setState(COMPLETED)

-------------------------------------------------------------------------------------------------------------------------------------------------

Agradeço Desde Ja

Compartilhar este post


Link para o post
Compartilhar em outros sites

Erro de sintese:

faltando fechar o parenteses

 

st.getPlayer().setCurrentMp(st.getPlayer().getMaxMp()
			return "dance.htm"		

 

tem que ficar assim:

 

st.getPlayer().setCurrentMp(st.getPlayer().getMaxMp())

return "dance.htm"

Compartilhar este post


Link para o post
Compartilhar em outros sites

KhayrusS estou com esse erro aki pode me ajudar:

 

 

 

 

Error on: C:\Documents and Settings\Felipe Fortunato\Desktop\Project 100x\Project 100x\data\scripts\custom\9999_NPCBuffer\__init__.py.error.log

Line: -1 - Column: -1

 

Traceback (innermost last):

File "__init__.py", line 502, in ?

TypeError: net.sf.l2j.gameserver.model.quest.State(): expected 0 args; got 2

 

 

 

essa é minha __init__.py :

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 = "9999_NPCBuffer"

NPC=[102030]
ADENA_ID=57
QuestId     = 9999
QuestName   = "NPCBuffer"
QuestDesc   = "custom"
InitialHtml = "1.htm"

print "importing custom: 9999: 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 < 10000  or st.getPlayer().getLevel() < 0 :
		htmltext = "<html><head><body>You dont have enought Adena</body></html>"
	else:
		st.takeItems(ADENA_ID,10000)
		st.getPlayer().setTarget(st.getPlayer())

		#Wind Walk
		if event == "1":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(1204,1),False,False)
			st.getPlayer().restoreHPMP()				
			return "1.htm"
			st.setState(COMPLETED)

		#Acumen
		if event == "2":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(1085,1),False,False)
			st.getPlayer().restoreHPMP()				
			return "1.htm"
			st.setState(COMPLETED)

		#Agility
		if event == "3": 
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(1087,1),False,False)
			st.getPlayer().restoreHPMP()				
			return "1.htm"
			st.setState(COMPLETED)

		#Berserker Spirit
		if event == "4":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(1062,1),False,False)
			st.getPlayer().restoreHPMP()				
			return "1.htm"
			st.setState(COMPLETED)

                      		#Bless Shield
		if event == "5":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(1243,1),False,False)	
			st.getPlayer().restoreHPMP()
			return "1.htm"			
			st.setState(COMPLETED)

		#Blessed Body
		if event == "6":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(1045,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"		
			st.setState(COMPLETED)

		#Blessed Soul
		if event == "7":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(1048,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"		
			st.setState(COMPLETED)

		#Concentration
		if event == "8":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(1078,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"		
			st.setState(COMPLETED)

		#Death Whisper
		if event == "9":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(1242,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"		
			st.setState(COMPLETED)

		#Empower
		if event == "10":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(1059,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"		
			st.setState(COMPLETED)

		#Focus
		if event == "11":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(1077,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"		
			st.setState(COMPLETED)

		#Guidance
		if event == "12":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(1240,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"		
			st.setState(COMPLETED)

		#Haste
		if event == "13":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(1086,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"		
			st.setState(COMPLETED)

		#Magic Barrier
		if event == "14":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(1036,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"		
			st.setState(COMPLETED)

		#Mental Shield
		if event == "15":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(1035,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"		
			st.setState(COMPLETED)

		#Might
		if event == "16":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(1068,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"		
			st.setState(COMPLETED)

		#Resist Shock
		if event == "17":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(1259,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"		
			st.setState(COMPLETED)

		#Shield
		if event == "18":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(1040,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"		
			st.setState(COMPLETED)

		#Vampiric Rage
		if event == "19":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(1268,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"		
			st.setState(COMPLETED)

		#Dance of Aqua Guard
		if event == "30":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(307,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"
			st.setState(COMPLETED)

		#Dance of Concentration
		if event == "31":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(276,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"
			st.setState(COMPLETED)

		#Dance of Earth Guard
		if event == "32":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(309,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"
			st.setState(COMPLETED)

		#Dance of Fire
		if event == "33":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(274,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"
			st.setState(COMPLETED)

		#Dance of Fury
		if event == "34":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(275,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"
			st.setState(COMPLETED)

		#Dance of Inspiration
		if event == "35":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(272,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"
			st.setState(COMPLETED)

		#Dance of Light
		if event == "36":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(277,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"
			st.setState(COMPLETED)

		#Dance of the Mystic
		if event == "37":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(273,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"
			st.setState(COMPLETED)

		#Dance of Protection
		if event == "38":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(311,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"
			st.setState(COMPLETED)

		#Siren's Dance
		if event == "39":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(365,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"
			st.setState(COMPLETED)

		#Dance of the Vampire
		if event == "40":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(310,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"
			st.setState(COMPLETED)

		#Dance of the Warrior
		if event == "41":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(271,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"
			st.setState(COMPLETED)

		#Song of Champion
		if event == "50":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(364,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"
			st.setState(COMPLETED)

		#Song of Earth
		if event == "51":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(264,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"
			st.setState(COMPLETED)

		#Song of Flame Guard
		if event == "52":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(306,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"
			st.setState(COMPLETED)

		#Song of Hunter
		if event == "53":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(269,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"
			st.setState(COMPLETED)

		#Song of Invocation
		if event == "54":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(270,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"
			st.setState(COMPLETED)

		#Song of Life
		if event == "55":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(265,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"
			st.setState(COMPLETED)

		#Song of Meditation
		if event == "56":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(363,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"
			st.setState(COMPLETED)

		#Song of Renewal
		if event == "57":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(349,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"
			st.setState(COMPLETED)

		#Song of Storm Guard
		if event == "58":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(308,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"
			st.setState(COMPLETED)

		#Song of Vengeance
		if event == "59":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(305,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"
			st.setState(COMPLETED)

		#Song of Vitality
		if event == "60":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(304,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"
			st.setState(COMPLETED)

		#Song of Warding
		if event == "61":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(267,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"
			st.setState(COMPLETED)

		#Song of Water
		if event == "62":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(266,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"
			st.setState(COMPLETED)

		#Song of Wind
		if event == "63":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(268,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"
			st.setState(COMPLETED)

		#Greater Might
		if event == "64":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(1388,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"
			st.setState(COMPLETED)

		#Greater Shield
		if event == "65":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(1389,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"
			st.setState(COMPLETED)

		#Chant of Victory
		if event == "66":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(1363,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"
			st.setState(COMPLETED)

		#Prophecy of Fire
		if event == "67":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(1356,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"
			st.setState(COMPLETED)

		#Prophecy of Water
		if event == "68":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(1355,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"
			st.setState(COMPLETED)

		#Prophecy of Wind
		if event == "69":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(1357,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"
			st.setState(COMPLETED)

		#Cancellation
		if event == "70":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(1056,1),False,False)
			st.getPlayer().restoreHPMP()
			return "1.htm"
			st.setState(COMPLETED)

		#MPreg
		if event == "71":
			st.takeItems
			st.getPlayer().restoreHPMP()
			return "1.htm"		
			st.setState(COMPLETED)	

		if event == "73":
			st.takeItems
			st.getPlayer().restoreHPMP()
			return "1.htm"		
			st.setState(COMPLETED)

       		#Chant of Magnus
		if event == "74":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(9952,1),False,False)
			st.getPlayer().restoreHPMP()				
			return "1.htm"
			st.setState(COMPLETED)

      		#Wild Magic
		if event == "75":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(1303,1),False,False)
			st.getPlayer().restoreHPMP()				
			return "1.htm"
			st.setState(COMPLETED)

      		#Vampiric Rage
		if event == "76":
			st.takeItems
			st.getPlayer().getEffects(SkillTable.getInstance().getInfo(1268,1),False,False)
			st.getPlayer().restoreHPMP()				
			return "1.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>I have nothing to say to you</body></html>"
   st.setState(STARTED)
   return InitialHtml

QUEST       = Quest(QuestId,str(QuestId) + "_" + QuestName,QuestDesc)
CREATED=State('Start',QUEST)
STARTED=State('Started',QUEST)
COMPLETED=State('Completed',QUEST)

QUEST.setInitialState(CREATED)

for npcId in NPC:
QUEST.addStartNpc(npcId)
QUEST.addTalkId(npcId)

Compartilhar este post


Link para o post
Compartilhar em outros sites

Tem outros tutoriais de como adicionar NPC, mas de qualquer forma qual a parte que está tendo dificuldades ?

Editado por KhayrusS

Compartilhar este post


Link para o post
Compartilhar em outros sites

Ola amigos alguem pode me da uma ajudinha.

Eu estou com 1 erro que estou virando a noite para resolver.

Meu buffer. ele esta buffando tudo.

Normal Buff.

especial.

Sumon. e muitos outros.

 

Vai quando eu clico no Songs ou dances. ele entra, mais quando eu vou clica na carinha para me da o buff. da 1 erro. " Scrips Erro " vai quando vou buffa, Buff Fight e mago. também da porque quando vai bufa o Dances e o Song vai da o erro. entender

Entao alguem poderia me da uma ajuda. eu vou colocar aqui minhas scrips todinha. Do normal ate o ultimo buff

 

==================================================================================================================================================

 

 

import sys

from com.l2jlive.gameserver.datatables import SkillTable

from com.l2jlive import L2DatabaseFactory

from com.l2jlive.gameserver.model.quest import State

from com.l2jlive.gameserver.model.quest import QuestState

from com.l2jlive.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"

 

print "importing custom: 99999: NpcBuffer OK"

 

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)

 

#Might

if event == "2":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1068,2).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"

st.setState(COMPLETED)

 

#Empower

if event == "3":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1059,2).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"

st.setState(COMPLETED)

 

#Magic Barrier

if event == "4":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1036,2).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"

st.setState(COMPLETED)

 

#Bless the Body

if event == "5":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1045,2).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"

st.setState(COMPLETED)

 

#Bless the Soul

if event == "6":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1048,2).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"

st.setState(COMPLETED)

 

#Haste

if event == "7":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1086,2).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"

st.setState(COMPLETED)

 

#Vampiric Rage

if event == "8":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1268,2).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"

st.setState(COMPLETED)

 

#Acumen

if event == "9":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1085,2).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"

st.setState(COMPLETED)

 

#Wild Magic

if event == "10":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1303,2).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"

st.setState(COMPLETED)

 

#Death Whisper

if event == "11":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1242,2).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"

st.setState(COMPLETED)

 

#Focus

if event == "12":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1077,2).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"

st.setState(COMPLETED)

 

#Wild Walk

if event == "13":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1204,2).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"

st.setState(COMPLETED)

 

#Agility

if event == "14":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1087,2).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"

st.setState(COMPLETED)

 

#Guidance

if event == "15":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1240,2).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"

st.setState(COMPLETED)

 

#Advanced Block

if event == "16":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1304,2).getEffects(st.getPlayer(),st.getPlayer())

return "2.htm"

st.setState(COMPLETED)

 

#===============SPECIAL BUFFS====================

 

#Prophecy Of Fire

if event == "17":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1356,2).getEffects(st.getPlayer(),st.getPlayer())

return "3.htm"

st.setState(COMPLETED)

 

#Prophecy Of Wind

if event == "18":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1357,2).getEffects(st.getPlayer(),st.getPlayer())

return "3.htm"

st.setState(COMPLETED)

 

#Prophecy Of Walter

if event == "19":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1355,2).getEffects(st.getPlayer(),st.getPlayer())

return "3.htm"

st.setState(COMPLETED)

 

#Great Might

if event == "20":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1388,2).getEffects(st.getPlayer(),st.getPlayer())

return "3.htm"

st.setState(COMPLETED)

 

#Great Shield

if event == "21":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1389,2).getEffects(st.getPlayer(),st.getPlayer())

return "3.htm"

st.setState(COMPLETED)

 

#Berserker Spirit

if event == "22":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1062,2).getEffects(st.getPlayer(),st.getPlayer())

return "3.htm"

st.setState(COMPLETED)

 

#Counter Critical

if event == "23":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1542,2).getEffects(st.getPlayer(),st.getPlayer())

return "3.htm"

st.setState(COMPLETED)

 

#===============RESIST BUFFS====================

 

#Resist Fire

if event == "24":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1191,2).getEffects(st.getPlayer(),st.getPlayer())

return "4.htm"

st.setState(COMPLETED)

 

#Resist Poison

if event == "25":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1033,2).getEffects(st.getPlayer(),st.getPlayer())

return "4.htm"

st.setState(COMPLETED)

 

#Resist Wind

if event == "26":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1189,2).getEffects(st.getPlayer(),st.getPlayer())

return "4.htm"

st.setState(COMPLETED)

 

#Resist Aqua

if event == "27":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1182,2).getEffects(st.getPlayer(),st.getPlayer())

return "4.htm"

st.setState(COMPLETED)

 

#Holy Resistence

if event == "28":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1392,2).getEffects(st.getPlayer(),st.getPlayer())

return "4.htm"

st.setState(COMPLETED)

 

#Unholy Resistence

if event == "29":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1393,2).getEffects(st.getPlayer(),st.getPlayer())

return "4.htm"

st.setState(COMPLETED)

 

#Elemental Protection

if event == "30":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1352,2).getEffects(st.getPlayer(),st.getPlayer())

return "4.htm"

st.setState(COMPLETED)

 

#Divine Protection

if event == "31":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1353,2).getEffects(st.getPlayer(),st.getPlayer())

return "4.htm"

st.setState(COMPLETED)

 

#Arcane Protection

if event == "32":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1354,2).getEffects(st.getPlayer(),st.getPlayer())

return "4.htm"

st.setState(COMPLETED)

 

#Resist Shock

if event == "33":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1259,2).getEffects(st.getPlayer(),st.getPlayer())

return "4.htm"

st.setState(COMPLETED)

 

#Metal Shield

if event == "34":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1035,2).getEffects(st.getPlayer(),st.getPlayer())

return "4.htm"

st.setState(COMPLETED)

 

#Concentration

if event == "35":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1078,2).getEffects(st.getPlayer(),st.getPlayer())

return "4.htm"

st.setState(COMPLETED)

 

#Invigor

if event == "36":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1032,2).getEffects(st.getPlayer(),st.getPlayer())

return "4.htm"

st.setState(COMPLETED)

 

#Kiss Of Eva

if event == "37":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1073,2).getEffects(st.getPlayer(),st.getPlayer())

return "4.htm"

st.setState(COMPLETED)

 

#===============HEALER BUFFS====================

 

#Holy Weapon

if event == "38":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1043,2).getEffects(st.getPlayer(),st.getPlayer())

return "5.htm"

st.setState(COMPLETED)

 

#Regeneration

if event == "39":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1044,2).getEffects(st.getPlayer(),st.getPlayer())

return "5.htm"

st.setState(COMPLETED)

 

#Clarity

if event == "40":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1397,2).getEffects(st.getPlayer(),st.getPlayer())

return "5.htm"

st.setState(COMPLETED)

 

#Mana Gain

if event == "41":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1460,2).getEffects(st.getPlayer(),st.getPlayer())

return "5.htm"

st.setState(COMPLETED)

 

#Prayer

if event == "42":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1307,2).getEffects(st.getPlayer(),st.getPlayer())

return "5.htm"

st.setState(COMPLETED)

 

#Body Of Avatar

if event == "43":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1311,2).getEffects(st.getPlayer(),st.getPlayer())

return "5.htm"

st.setState(COMPLETED)

 

#===================SONGS=======================

 

#Song Of Earth

if event == "44":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(264,2).getEffects(st.getPlayer(),st.getPlayer())

return "6.htm"

st.setState(COMPLETED)

 

#Song Of Life

if event == "45":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(265,2).getEffects(st.getPlayer(),st.getPlayer())

return "6.htm"

st.setState(COMPLETED)

 

#Song Of Water

if event == "46":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(266,2).getEffects(st.getPlayer(),st.getPlayer())

return "6.htm"

st.setState(COMPLETED)

 

#Song Of Warding

if event == "47":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(267,2).getEffects(st.getPlayer(),st.getPlayer())

return "6.htm"

st.setState(COMPLETED)

 

#Song of Wind

if event == "48":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(268,2).getEffects(st.getPlayer(),st.getPlayer())

return "6.htm"

st.setState(COMPLETED)

 

#Song of Hunter

if event == "49":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(269,2).getEffects(st.getPlayer(),st.getPlayer())

return "6.htm"

st.setState(COMPLETED)

 

#Song of Invocation

if event == "50":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(270,2).getEffects(st.getPlayer(),st.getPlayer())

return "6.htm"

st.setState(COMPLETED)

 

#Song of Vitality

if event == "51":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(304,2).getEffects(st.getPlayer(),st.getPlayer())

return "6.htm"

st.setState(COMPLETED)

 

#Song of Vengeance

if event == "52":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(305,2).getEffects(st.getPlayer(),st.getPlayer())

return "6.htm"

st.setState(COMPLETED)

 

#Song of Flame Guard

if event == "53":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(306,2).getEffects(st.getPlayer(),st.getPlayer())

return "6.htm"

st.setState(COMPLETED)

 

#Song of Storm Guard

if event == "54":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(308,2).getEffects(st.getPlayer(),st.getPlayer())

return "6.htm"

st.setState(COMPLETED)

 

#Song of Renewal

if event == "55":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(349,2).getEffects(st.getPlayer(),st.getPlayer())

return "6.htm"

st.setState(COMPLETED)

 

#Song of Meditation

if event == "56":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(363,2).getEffects(st.getPlayer(),st.getPlayer())

return "6.htm"

st.setState(COMPLETED)

 

#Song of Champion

if event == "57":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(364,2).getEffects(st.getPlayer(),st.getPlayer())

return "6.htm"

st.setState(COMPLETED)

 

#Song of Elemental

if event == "58":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(529,2).getEffects(st.getPlayer(),st.getPlayer())

return "6.htm"

st.setState(COMPLETED)

 

#==================DANCES=======================

 

#Dance of Warrior

if event == "59":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(271,2).getEffects(st.getPlayer(),st.getPlayer())

return "7.htm"

st.setState(COMPLETED)

 

#Dance of Isparation

if event == "60":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(272,2).getEffects(st.getPlayer(),st.getPlayer())

return "7.htm"

st.setState(COMPLETED)

 

#Dance of fire

if event == "61":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(274,2).getEffects(st.getPlayer(),st.getPlayer())

return "7.htm"

st.setState(COMPLETED)

 

#Dance of Fury

if event == "62":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(275,2).getEffects(st.getPlayer(),st.getPlayer())

return "7.htm"

st.setState(COMPLETED)

 

#Dance of Concetaion

if event == "63":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(276,2).getEffects(st.getPlayer(),st.getPlayer())

return "7.htm"

st.setState(COMPLETED)

 

#Dance of Light

if event == "64":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(277,2).getEffects(st.getPlayer(),st.getPlayer())

return "7.htm"

st.setState(COMPLETED)

 

#Dance of Aqua Guard

if event == "65":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(307,2).getEffects(st.getPlayer(),st.getPlayer())

return "7.htm"

st.setState(COMPLETED)

 

#Dance of Earth Guard

if event == "66":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(309,2).getEffects(st.getPlayer(),st.getPlayer())

return "7.htm"

st.setState(COMPLETED)

 

#Dance of Vampire

if event == "67":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(310,2).getEffects(st.getPlayer(),st.getPlayer())

return "7.htm"

st.setState(COMPLETED)

 

#Dance of Protection

if event == "68":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(311,2).getEffects(st.getPlayer(),st.getPlayer())

return "7.htm"

st.setState(COMPLETED)

 

#Siren's Dance

if event == "69":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(365,2).getEffects(st.getPlayer(),st.getPlayer())

return "7.htm"

st.setState(COMPLETED)

 

#Dance of Alignment

if event == "70":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(530,2).getEffects(st.getPlayer(),st.getPlayer())

return "7.htm"

st.setState(COMPLETED)

 

#Dance of Shadow

if event == "71":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(366,2).getEffects(st.getPlayer(),st.getPlayer())

return "7.htm"

st.setState(COMPLETED)

 

#Dance of Berserker

if event == "72":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(915,2).getEffects(st.getPlayer(),st.getPlayer())

return "7.htm"

st.setState(COMPLETED)

 

#Dance of the Mystic

if event == "73":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(273,2).getEffects(st.getPlayer(),st.getPlayer())

return "7.htm"

st.setState(COMPLETED)

 

 

#=================Warcryer======================

 

 

#Chant of Battle

if event == "74":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1007,2).getEffects(st.getPlayer(),st.getPlayer())

return "8.htm"

st.setState(COMPLETED)

 

#Chant of Shieldin

if event == "75":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1009,2).getEffects(st.getPlayer(),st.getPlayer())

return "8.htm"

st.setState(COMPLETED)

 

#Flame Chant

if event == "76":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1002,2).getEffects(st.getPlayer(),st.getPlayer())

return "8.htm"

st.setState(COMPLETED)

 

#Chant of Fire

if event == "77":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1006,2).getEffects(st.getPlayer(),st.getPlayer())

return "8.htm"

st.setState(COMPLETED)

 

#Chant of Fury

if event == "78":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1251,2).getEffects(st.getPlayer(),st.getPlayer())

return "8.htm"

st.setState(COMPLETED)

 

#Chant of Evasion

if event == "79":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1252,2).getEffects(st.getPlayer(),st.getPlayer())

return "8.htm"

st.setState(COMPLETED)

 

#Chant of Rage

if event == "80":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1253,2).getEffects(st.getPlayer(),st.getPlayer())

return "8.htm"

st.setState(COMPLETED)

 

#Chant of Predator

if event == "81":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1308,2).getEffects(st.getPlayer(),st.getPlayer())

return "8.htm"

st.setState(COMPLETED)

 

#Chant of Spirit

if event == "82":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1362,2).getEffects(st.getPlayer(),st.getPlayer())

return "8.htm"

st.setState(COMPLETED)

 

 

#Chant of protection

if event == "83":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1461,2).getEffects(st.getPlayer(),st.getPlayer())

return "8.htm"

st.setState(COMPLETED)

 

#War Chant

if event == "84":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1390,2).getEffects(st.getPlayer(),st.getPlayer())

return "8.htm"

st.setState(COMPLETED)

 

#Chant Of Victory

if event == "85":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1363,2).getEffects(st.getPlayer(),st.getPlayer())

return "8.htm"

st.setState(COMPLETED)

 

#Magnu's Chant

if event == "86":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1413,2).getEffects(st.getPlayer(),st.getPlayer())

return "8.htm"

st.setState(COMPLETED)

 

#Chant of Eagle

if event == "87":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1309,2).getEffects(st.getPlayer(),st.getPlayer())

return "8.htm"

st.setState(COMPLETED)

 

#Chant of Revange

if event == "88":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1284,2).getEffects(st.getPlayer(),st.getPlayer())

return "8.htm"

st.setState(COMPLETED)

 

#Earth Chant

if event == "89":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1391,2).getEffects(st.getPlayer(),st.getPlayer())

return "8.htm"

st.setState(COMPLETED)

 

#==================OVERLORD=======================

 

#Pa'agrian Gift

if event == "90":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1003,2).getEffects(st.getPlayer(),st.getPlayer())

return "9.htm"

st.setState(COMPLETED)

 

#Wisdom of Pa'agrio

if event == "91":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1004,2).getEffects(st.getPlayer(),st.getPlayer())

return "9.htm"

st.setState(COMPLETED)

 

#Blessings of Pa'agrio

if event == "92":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1005,2).getEffects(st.getPlayer(),st.getPlayer())

return "9.htm"

st.setState(COMPLETED)

 

#Glory of Pa'agrio

if event == "93":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1008,2).getEffects(st.getPlayer(),st.getPlayer())

return "9.htm"

st.setState(COMPLETED)

 

#Vision of Pa'agrio

if event == "94":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1249,2).getEffects(st.getPlayer(),st.getPlayer())

return "9.htm"

st.setState(COMPLETED)

 

#Eye of Pa'agrio

if event == "95":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1364,2).getEffects(st.getPlayer(),st.getPlayer())

return "9.htm"

st.setState(COMPLETED)

 

#Soul of Pa'agrio

if event == "96":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1365,2).getEffects(st.getPlayer(),st.getPlayer())

return "9.htm"

st.setState(COMPLETED)

 

#Pa'agrio Victor

if event == "97":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1414,2).getEffects(st.getPlayer(),st.getPlayer())

return "9.htm"

st.setState(COMPLETED)

 

#Pa'agrio's Emblem

if event == "98":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1415,2).getEffects(st.getPlayer(),st.getPlayer())

return "9.htm"

st.setState(COMPLETED)

 

#Tact of Pa'agrio

if event == "99":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1260,2).getEffects(st.getPlayer(),st.getPlayer())

return "9.htm"

st.setState(COMPLETED)

 

#Pa'agrio Haste

if event == "100":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1282,2).getEffects(st.getPlayer(),st.getPlayer())

return "9.htm"

st.setState(COMPLETED)

 

#Pa'agrio's Fist

if event == "101":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1416,2).getEffects(st.getPlayer(),st.getPlayer())

return "9.htm"

st.setState(COMPLETED)

 

#Protect of Pa'agrio

if event == "102":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1250,2).getEffects(st.getPlayer(),st.getPlayer())

return "9.htm"

st.setState(COMPLETED)

 

#Pa'agrio Rage

if event == "103":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1261,2).getEffects(st.getPlayer(),st.getPlayer())

return "9.htm"

st.setState(COMPLETED)

 

 

#=================Improved======================

 

#Improved Combat

if event == "104":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1499,2).getEffects(st.getPlayer(),st.getPlayer())

return "10.htm"

st.setState(COMPLETED)

 

#Improved Magic

if event == "105":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1500,2).getEffects(st.getPlayer(),st.getPlayer())

return "10.htm"

st.setState(COMPLETED)

 

#Improved Condition

if event == "106":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1501,2).getEffects(st.getPlayer(),st.getPlayer())

return "10.htm"

st.setState(COMPLETED)

 

#Improved Critical Atack

if event == "107":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1502,2).getEffects(st.getPlayer(),st.getPlayer())

return "10.htm"

st.setState(COMPLETED)

 

#Improved Shield Defence

if event == "108":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1503,2).getEffects(st.getPlayer(),st.getPlayer())

return "10.htm"

st.setState(COMPLETED)

 

#Improved Movement

if event == "109":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(1504,2).getEffects(st.getPlayer(),st.getPlayer())

return "10.htm"

st.setState(COMPLETED)

 

#==================SUMMON=======================

 

#Blessing of Queen

if event == "300":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(4699,2).getEffects(st.getPlayer(),st.getPlayer())

return "11.htm"

st.setState(COMPLETED)

 

#Gift of Queen

if event == "301":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(4700,2).getEffects(st.getPlayer(),st.getPlayer())

return "11.htm"

st.setState(COMPLETED)

 

#Blessing of Seraphin

if event == "302":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(4702,2).getEffects(st.getPlayer(),st.getPlayer())

return "11.htm"

st.setState(COMPLETED)

 

#Gift of Seraphim

if event == "303":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(4703,2).getEffects(st.getPlayer(),st.getPlayer())

return "11.htm"

st.setState(COMPLETED)

 

#=================WARSMITH======================

 

#Sharp Edge

if event == "114":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(825,2).getEffects(st.getPlayer(),st.getPlayer())

return "12.htm"

st.setState(COMPLETED)

 

#Spike

if event == "115":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(826,2).getEffects(st.getPlayer(),st.getPlayer())

return "12.htm"

st.setState(COMPLETED)

 

#Restring

if event == "116":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(827,2).getEffects(st.getPlayer(),st.getPlayer())

return "12.htm"

st.setState(COMPLETED)

 

#Case Harden

if event == "117":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(828,2).getEffects(st.getPlayer(),st.getPlayer())

return "12.htm"

st.setState(COMPLETED)

 

#Hard Training

if event == "118":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(829,2).getEffects(st.getPlayer(),st.getPlayer())

return "12.htm"

st.setState(COMPLETED)

 

#Embroider

if event == "119":

st.takeItems(ADENA_ID,Val_Buff_Ind)

SkillTable.getInstance().getInfo(830,2).getEffects(st.getPlayer(),st.getPlayer())

return "12.htm"

st.setState(COMPLETED)

 

#==================NOBLESS======================

 

#Blessing Of Nobless

if event == "120":

st.takeItems(ADENA_ID,Val_Nobless)

SkillTable.getInstance().getInfo(1323,2).getEffects(st.getPlayer(),st.getPlayer())

return "13.htm"

st.setState(COMPLETED)

 

#===================ARCHER======================

 

#Fighter Buffer

if event == "121":

st.takeItems(ADENA_ID,Val_Buff_All)

SkillTable.getInstance().getInfo(1040,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(1068,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(1045,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(1048,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(1086,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(1268,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(1242,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(1077,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(1204,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(1087,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(1240,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(1388,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(1062,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(1542,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(1259,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(1363,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(1416,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(4700,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(271,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(272,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(274,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(275,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(310,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(915,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(264,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(265,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(266,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(268,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(269,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(304,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(1323,1).getEffects(st.getPlayer(),st.getPlayer())

return "1.htm"

st.setState(State.COMPLETED)

 

#===================DAGGER======================

 

#Mage Buffer

if event == "122":

st.takeItems(ADENA_ID,Val_Buff_All)

SkillTable.getInstance().getInfo(1059,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(1036,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(1045,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(1048,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(1268,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(1085,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(1303,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(1242,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(1077,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(1204,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(1087,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(1413,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(1542,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(1352,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(1035,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(1078,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(1416,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(4699,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(272,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(273,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(274,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(276,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(277,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(310,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(264,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(265,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(266,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(267,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(268,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(304,2).getEffects(st.getPlayer(),st.getPlayer())

SkillTable.getInstance().getInfo(1323,1).getEffects(st.getPlayer(),st.getPlayer())

return "1.htm"

st.setState(State.COMPLETED)

 

#==============HEAL AND REMOVE==================

 

#Heal

if event == "200":

st.getPlayer().setCurrentCp(st.getPlayer().getMaxCp())

st.getPlayer().setCurrentHp(st.getPlayer().getMaxHp())

st.getPlayer().setCurrentMp(st.getPlayer().getMaxMp())

return "1.htm"

st.setState(COMPLETED)

 

#Remove Buffs

if event == "201":

st.getPlayer().stopAllEffects()

return "1.htm"

st.setState(COMPLETED)

 

#===================FIM=======================

 

if htmltext != event:

st.setState(COMPLETED)

st.exitQuest(1)

return htmltext

 

 

def onTalk (self,npc,player):

st = player.getQuestState(qn)

htmltext = "<html><head><body><center>ERROR<br1>Please, contact the administrator.</center></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)

 

 

 

Alguem poder me ajuda. So folta esse Npc para meu serve fica 100% certinho . Abraços ae

espero ajuda !

Compartilhar este post


Link para o post
Compartilhar em outros sites

pode dá mais detalhes desse erro ? aparece mais algum, ele não cria um log do erro ?

 

ou só aparece esse script error? geralmente aparece informações importantes no GS, quando ocorre esse tipo de erro

Compartilhar este post


Link para o post
Compartilhar em outros sites

pode dá mais detalhes desse erro ? aparece mais algum, ele não cria um log do erro ?

 

ou só aparece esse script error? geralmente aparece informações importantes no GS, quando ocorre esse tipo de erro

Oie, Scrips erro so aparece quando eu vo clica na carinha do Buffs Songs e dances. Vou passa as Fotos . http://img294.imageshack.us/i/minhaimagemb.jpg/

http://img843.imageshack.us/i/minhaimagem2.jpg/

ve ae so o erros. la em cima é minha lista do buffs

Editado por ruberllan

Compartilhar este post


Link para o post
Compartilhar em outros sites

Muito bom tutorial. Parabéns

 

-----------

Como o KhayrusS falou não da para ver o erro na imagem

Editado por Turok*

Compartilhar este post


Link para o post
Compartilhar em outros sites

Venho aqui postar esse tuto que acho que estava faltando aqui no forúm. Sem mais bla bla vamos começar

 

Vou começar com o buffer por template

 

aqui é uma parte do HTML do buffer

 

<html><title>Buffer</title>

<body>

<br>

<center>

<font color="80F0FF">Custom Buff</font>

 

<button value="Wind Walk" action="bypass -h npc_%objectId%_MakeBuffs WindWalkbyUsweer" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal">

<button value="Invigore" action="bypass -h npc_%objectId%_MakeBuffs InvigorebyUsweer" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal">

<button value="Mental Shield" action="bypass -h npc_%objectId%_MakeBuffs MentalShieldbyUsweer" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal">

<button value="Magic Barrier" action="bypass -h npc_%objectId%_MakeBuffs MagicBarrierbyUsweer" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal">

 

<br>

 

<button value="Back" action="bypass -h npc_%objectId%_Chat" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal">

 

<font color="LEVEL">------</font><font color="00FF00">Cost</font> <font color="FF0000">1</font> <font color="00FF00">Buff-</font> <font color="FF0000">40</font><font color="LEVEL">'</font><font color="FF0000">000</font> <font color="00FF00">aden</font><font color="LEVEL">------</font>

</center>

</body>

</html>

 

 

Essa parte que eu destaquei é a parte que direciona o html para a tabela dos buffs

 

<button value="Wind Walk" action="bypass -h npc_%objectId%_MakeBuffs WindWalkbyUsweer" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal">

 

Agora vou explicar cada parte do html

 

1º- button -> cria um botão no html ( também pode ser substituido por <a>...</a> no caso de ser um npc mais simples)

2º- value -> o nome que aparece no botão (nesse caso "wind walk")

 

3º- action -> aqui é a parte fundamental do html, pois ele redireciona o npc para o DB, usando esse codigo: "bypass -h npc_%objectId%_MakeBuffs WindWalkbyUsweer"

 

bypass -h npc_%objectId%_MakeBuffs (o comando MakeBuffs em algum servidores não funcionará pois precisa ser implementado no java)

 

essa parte é a que manda o npc buffar o player

 

WindWalkbyUsweer

esse é o buff que ele vai dá pro player, ele deverá está na tabela buff_templates

 

4º- width e height-> aqui é a largura e altura do botão da html, respectivamente

 

5º- back e fore -> aqui são as imagens do botão quando for clicado e o normal, respectivamente

 

 

Aqui está a tabela buff_templates

bufft.pngbufft2.png

 

aí vem a pergunta para que serve cada coluna dessa tabela?

 

1- ID -> Aqui encontrar o ID do nome do buff para direcionamento

 

.2- name -> Aqui é o nome do buff que usamos para direcionar (nesse caso WindWalkbyUsweer)

.3- Skill_id -> Aqui é o id da skill que o buffer usará

 

4- Skill_name -> nome da skill que será usada pelo buffer

 

5- Skill_level -> Level da skill que será usada pelo buffer

 

.6- skill force -> aqui é usado quando a skill tem stocktype( aconselho que deixe 1 nessa coluna)

.7- Skill order -> usado quando o buffer tem a opção full buff ou buff fight ( aquelas que dá muitos buffs de uma só vez) então so colocar a order dos buffs que queira que seja usado primeiro.

 

.8- char_min_level -> o level minimo que o player tem que ter para ser buffado

 

.9- char_max_level -> o level maximo que o player poderá ser buffado

 

.10- char_race -> expecifica qual a raça do char poderá se buffar ( coloque 0 para que todas as raças possam se buffar)

.11- char_class -> expecifica qual classe poderá se buffar ( coloque 0 para que todas as classes possam se buffar)

.12- char_faction -> esse ainda não testei mas creio que seja para buffar um determinado clan

 

.13- price_adena -> aqui é o preço do buff

 

.14- price_points -> aqui pode deixar 0

 

Então para editar só precisará do html e da tabela buff templates com isso acho que vcs já saberão como adicionar ou remover um buff do npc por template

 

OBS: Esse Tutorial foi baseado em l2jFree e pode não ser igual em outras REVs

 

 

NPC BUFFER POR SCRIPT

 

1. A HTML DO NPC

Só lembrando que A HTML TEM QUE SER FEITA COM O MESMO ID DO NPC

 

 

 

vou só explicar uma pequena diferença desse html pro outro, que é o caminho do link

 

 

ao invés de redirecionar a html pro DB ele redirecionará para uma "quest" (9999_NPCBuffer)

 

 

2.Agora partiremos para o SCRIPT do NPC

 

O npc buffer por script fica na pasta Gameserver/data/script/custom ou jscript/custom

( esse no caso de IL)

Então vá até essa pasta e crie uma pasta com o nome 9999_NPCBuffer, após criar esta pasta abra o bloco de notas e crie um arquivo __init__.py e coloque esse codigo dentro:

 

Obs: este já ta editado

 

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 = "9999_NPCBuffer"

 NPC=[55400]
 ADENA_ID=57
 QuestId	 = 9999
 QuestName   = "NPCBuffer"
 QuestDesc   = "custom"
 InitialHtml = "1.htm"

 print "importing custom: 9999: 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 < 0 or st.getPlayer().getLevel() < 10 :
		  htmltext = "<html><head><body>Voce Nao tem Adena<br></body></html>"
	  else:
		  st.takeItems(ADENA_ID,0)
		  st.getPlayer().setTarget(st.getPlayer())

		  if event == "1":
			  st.takeItems(ADENA_ID,10000)
			  st.getPlayer().restoreHPMP()
			  return "1.htm"		
			  st.setState(COMPLETED)

		  #Wind Walk
		  if event == "2":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1204,2).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "2.htm"		
			  st.setState(COMPLETED)

		  #Decrease Weight
		  if event == "3":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1257,3).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "2.htm"		
			  st.setState(COMPLETED)

		  #Shield
		  if event == "4":
			  st.takeItems(ADENA_ID,200)
			  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,200)
			  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,200)
			  SkillTable.getInstance().getInfo(1035,4).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "2.htm"		
			  st.setState(COMPLETED)

		  #Bless the Body
		  if event == "7":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1045,6).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "2.htm"		
			  st.setState(COMPLETED)

		  #Bless the Soul
		  if event == "8":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1048,6).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "2.htm"		
			  st.setState(COMPLETED)

		  #Magic Barrier
		  if event == "9":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1036,2).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "2.htm"		
			  st.setState(COMPLETED)

		  #Resist Shock
		  if event == "10":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1259,4).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "2.htm"		
			  st.setState(COMPLETED)

		  #Concentration
		  if event == "11":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1078,6).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "2.htm"		
			  st.setState(COMPLETED)

		  #Berserker Spirit
		  if event == "12":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1062,2).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "2.htm"		
			  st.setState(COMPLETED)

		  #Bless Shield
		  if event == "13":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1243,6).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "2.htm"		
			  st.setState(COMPLETED)

		  #Vampiric Rage
		  if event == "14":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1268,4).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "2.htm"		
			  st.setState(COMPLETED)

		  #Acumen
		  if event == "15":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1085,3).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "2.htm"		
			  st.setState(COMPLETED)

		  #Empower
		  if event == "16":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1059,3).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "2.htm"		
			  st.setState(COMPLETED)

		  #Haste
		  if event == "17":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1086,2).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "2.htm"		
			  st.setState(COMPLETED)

		  #Guidance
		  if event == "18":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1240,3).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "2.htm"		
			  st.setState(COMPLETED)

		  #Focus
		  if event == "19":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1077,3).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "2.htm"		
			  st.setState(COMPLETED)

		  #Death Whisper
		  if event == "20":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1242,3).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "2.htm"		
			  st.setState(COMPLETED)

		  if event == "21":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(271,1).getEffects(st.getPlayer(),st.getPlayer())	
			  st.getPlayer().restoreHPMP()
			  return "3.htm"

		  if event == "22":
			  st.takeItems(ADENA_ID,200)	
			  SkillTable.getInstance().getInfo(272,1).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "3.htm"

		  if event == "23":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(273,1).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "3.htm"

		  if event == "24":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(274,1).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "3.htm"

		  if event == "25":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(275,1).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "3.htm"

		  if event == "26":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(276,1).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "3.htm"

		  if event == "27":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(277,1).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "3.htm"

		  if event == "28":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(307,1).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "3.htm"

		  if event == "29":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(309,1).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "3.htm"

		  if event == "30":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(310,1).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "3.htm"

		  if event == "31":
			  st.takeItems(ADENA_ID,200)		
			  SkillTable.getInstance().getInfo(311,1).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "3.htm"

		  if event == "32":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(366,1).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "3.htm"

		  if event == "33":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(365,1).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()			
			  return "3.htm"

		  if event == "34":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(264,1).getEffects(st.getPlayer(),st.getPlayer())	
			  st.getPlayer().restoreHPMP()
			  return "4.htm"

		  if event == "35":
			  st.takeItems(ADENA_ID,200)	
			  SkillTable.getInstance().getInfo(265,1).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "4.htm"

		  if event == "36":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(266,1).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "4.htm"

		  if event == "37":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(267,1).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "4.htm"

		  if event == "38":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(268,1).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "4.htm"

		  if event == "39":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(269,1).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "4.htm"

		  if event == "40":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(270,1).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "4.htm"

		  if event == "41":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(304,1).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "4.htm"

		  if event == "42":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(305,1).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "4.htm"

		  if event == "43":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(306,1).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "4.htm"	

		  if event == "44":
			  st.takeItems(ADENA_ID,200)	
			  SkillTable.getInstance().getInfo(308,1).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "4.htm"

		  if event == "45":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(363,1).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "4.htm"

		  if event == "46":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(364,1).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "4.htm"	

		  if event == "47":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(349,1).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "4.htm"	
			  st.setState(COMPLETED)


		  #Chant of Battle
		  if event == "48":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1007,3).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "5.htm"
			  st.setState(COMPLETED)

		  #Chant of Shielding
		  if event == "49":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1009,3).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "5.htm"
			  st.setState(COMPLETED)

		  #Chant of Fire
		  if event == "50":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1006,3).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "5.htm"
			  st.setState(COMPLETED)

		  #Chant of Flame
		  if event == "51":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1002,3).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "5.htm"
			  st.setState(COMPLETED)

		  #Chant of life
		  if event == "52":
			  st.takeItems(ADENA_ID,2000)
			  SkillTable.getInstance().getInfo(1229,18).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "5.htm"
			  st.setState(COMPLETED)

		  #Chant of Fury
		  if event == "53":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1251,2).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "5.htm"
			  st.setState(COMPLETED)

		  #Chant of Evasion
		  if event == "54":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1252,3).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "5.htm"
			  st.setState(COMPLETED)

		  #Chant of Rage
		  if event == "55":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1253,3).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "5.htm"
			  st.setState(COMPLETED)

		  #Chant of Revenge
		  if event == "56":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1284,3).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "5.htm"
			  st.setState(COMPLETED)

		  #Chant of Vampire
		  if event == "57":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1310,4).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "5.htm"
			  st.setState(COMPLETED)

		  #Chant of Eagle
		  if event == "58":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1309,3).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "5.htm"
			  st.setState(COMPLETED)

		  #Chant of Predator
		  if event == "59":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1308,3).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "5.htm"
			  st.setState(COMPLETED)

		  #Chant of Spirit
		  if event == "60":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1362,1).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "5.htm"
			  st.setState(COMPLETED)

		  #Chant of Victory
		  if event == "61":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1363,1).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "5.htm"
			  st.setState(COMPLETED)

		  #chant of magnus
		  if event == "62":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1413,1).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "5.htm"
			  st.setState(COMPLETED)	

		  #MPreg
		  if event == "63":
			  st.takeItems(ADENA_ID,1000)
			  SkillTable.getInstance().getInfo(1013,32).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "1.htm"		
			  st.setState(COMPLETED)			

		  #greatmight
		  if event == "64":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1388,3).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "2.htm"		
			  st.setState(COMPLETED)

		  #greatshield
		  if event == "65":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1389,3).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "2.htm"		
			  st.setState(COMPLETED)

		  #holyresist
		  if event == "66":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1392,3).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "2.htm"		
			  st.setState(COMPLETED)

		  #Unholyresist
		  if event == "67":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1393,3).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "2.htm"		
			  st.setState(COMPLETED)

		  #pof
		  if event == "68":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1356,1).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "2.htm"		
			  st.setState(COMPLETED)

		  #elemtprotect
		  if event == "69":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1352,1).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "2.htm"		
			  st.setState(COMPLETED)

		  #wildmagic
		  if event == "70":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1303,2).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "2.htm"		
			  st.setState(COMPLETED)

		  #advblock
		  if event == "71":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1304,3).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "2.htm"		
			  st.setState(COMPLETED)

		  #divProtect
		  if event == "72":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1353,1).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "2.htm"		
			  st.setState(COMPLETED)

		  #pow
		  if event == "73":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1355,1).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "2.htm"		
			  st.setState(COMPLETED)

		  #powi
		  if event == "74":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1357,1).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "2.htm"		
			  st.setState(COMPLETED)

		  #manaregen
		  if event == "75":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1047,4).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "2.htm"		
			  st.setState(COMPLETED)

		  #ba
		  if event == "76":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1311,6).getEffects(st.getPlayer(),st.getPlayer())
			  st.getPlayer().restoreHPMP()
			  return "2.htm"		
			  st.setState(COMPLETED)
					  #noble
		  if event == "77":
			  st.takeItems(ADENA_ID,200)
			  SkillTable.getInstance().getInfo(1323,1).getEffects(st.getPlayer(),st.getPlayer())
			  return "1.htm"		
			  st.setState(COMPLETED)


		  #Cancellation
		  if event == "78":
			  st.takeItems(ADENA_ID,0)
			  st.getPlayer().useMagic(SkillTable.getInstance().getInfo(9950,1),False,False)
			  st.getPlayer().restoreHPMP()
			  return "1.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>I have nothing to say to you</body></html>"
	 st.setState(STARTED)
	 return InitialHtml

 QUEST	   = Quest(9999,qn,"custom")
 CREATED		= State('Start',QUEST)
 STARTED		= State('Started',QUEST)
 COMPLETED	= State('Completed',QUEST)

 for npcId in NPC:
  QUEST.addStartNpc(npcId)
  QUEST.addTalkId(npcId)

 

Agora vou explicar algumas partes importantes deste arquivo

 

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

 

aqui ele está importando algums arquivos que já estão no servidor

 

Geralmente esses pachts mudam de acordo com o pack.

para saber qual é o certo só abrir algum arquivo de quest (__init__.py) que já venha

no server e usar o pacht (caminho)

 

 

 

 

 

 

 

 

 

 

 

para adicionar mais buff é só seguir o mesmo raciocionio, não esquecendo de acresentar no event

 

 

 

 

3. html da quest ( onde estará localizado os links para os buffs)

 

1.htm

------------------------------------------------------------------------------------------------------------------------------------------

<html><title> Buffer 1</title>

<body>

<br>

Lembrando que voce tem que estar no Nivel <font color="LEVEL">10</font>.

<br>

<img src="L2UI_CH3.onscrmsg_pattern01_2" width=300 height=32 align=left>

<table width="200" border="0">

<tr>

 

<td><button value="HP-MP" action="bypass -h Quest 9999_NPCBuffer 1" width=80 height=20 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td> -> aqui é o evento 1 aquele que mostrei aqui em cima pra curar HP e MP

 

<td><button value="Choose Buffs" action="bypass -h Quest 9999_NPCBuffer 2.htm" width=80 height=20 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td></tr> -> aqui é a parte que vai redirecionar para a página de buff que é a 2.htm

</table>

</body>

</center>

</html>

---------------------------------------------------------------------------------------------------------------------------------------------

 

2.htm

--------------------------------------------------------------------------------------------------------------------------------------------

<html><title>buffer 2</title>

<body>

<button value="WindWalk" action="bypass -h Quest 9999_NPCBuffer 2" width=100 height=20 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td> -> aqui a única coisa que mudou foi o 2 que diz respeito ao event do wind walk

<button value="Shield" action="bypass -h Quest 9999_NPCBuffer 4" width=100 height=20 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df">

</body>

</html>

---------------------------------------------------------------------------------------------------------------------------------------------

 

Após ter feito va na pasta jscript/custom ou script/custom abra o arquivo __init__.py e adicione a pasta do seu buffer

 

 

 

 

Então para adicionar mais buffs só lembra de editar no arquivo __init__.py e no html.

 

Não esqueça seja criativo, mude, inove. vc pode fazer diversas páginas com buffs diferentes buffs separado por class e talz

 

Acho que é só isso que tenho para passar pra vocês, qualquer dúvida é só perguntar, e se alguém acha que está faltando alguma coisa favor posta ai ou manda mp para eu adicionar

 

 

credits: KhayrusS

Proibida a reprodução mesmo que em partes desse tutorial sem a publicação dos devidos créditos de criação

Garantido pela Constituição da República Federativa do Brasil, de 05 de outubro de 1988

Portaria MCT n° 88, de 23/04/98

Propriedade Intelectual

 

Nossa Mt Complicado ;@

Compartilhar este post


Link para o post
Compartilhar em outros sites

Pode até parecer assim a primeira vista, mas na verdade é bem fácil.

 

PS.: Não precisava dá quote no post inteiro wink.gif, Algum moderador favor editar happy.gif

Compartilhar este post


Link para o post
Compartilhar em outros sites



     


  • Quem Está Navegando

    Nenhum usuário registrado visualizando esta página.

×