Ir para conteúdo
  • Cadastre-se
  • 0

Trocando item de quest


Thur xD

Pergunta

Olá, boa noite...

Gostaria de trocar a quest de Nobles que tenho em minha rev.

 

seguinte:

 

Para fazer a quest de nobles, pelo npc, era necessario 2 gold bars - ID 3470, eu gostaria de colocar 4.000 Gold Einhasad - 4356 ID, alguem sabe me dizer como eu faço pra trocar aki ? seria na Int. sys mesmo ?

no meu se encontra assim, onde exatamente eu teria que mudar... obrigado !!

 

aimport sys

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

from com.l2jknight.gameserver.model.actor.instance import L2NpcInstance

from java.util import Iterator

from com.l2jknight.util.database import L2DatabaseFactory

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

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

from com.l2jknight.gameserver.model.quest.jython import QuestJython as JQuest

 

qn = "6666_NoblessTrader"

 

NPC=[66666]

NOBLESS_TIARA=7694

GOLD_BAR=3470

QuestId = 6666

QuestName = "NoblessTrade"

QuestDesc = "custom"

InitialHtml = "31739-1.htm"

 

print "Nobless Trader (66666) Enabled..."

 

class Quest (JQuest) :

 

def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)

 

def onEvent(self,event,st):

htmltext = "<html><head><body>I have nothing to say you</body></html>"

cond = st.getInt("cond")

count=st.getQuestItemsCount(GOLD_BAR)

if event == "31739-3.htm" :

if cond == 0 and st.getPlayer().isSubClassActive() :

if st.getPlayer().getLevel() >= 70 and count > 1:

htmltext=event

st.set("cond","0")

st.getPlayer().setNoble(True)

st.giveItems(NOBLESS_TIARA,1)

st.playSound("ItemSound.quest_finish")

st.setState(COMPLETED)

st.takeItems(GOLD_BAR,2)

else :

htmltext="31739-2.htm"

st.exitQuest(1)

else :

htmltext="31739-2.htm"

st.exitQuest(1)

return htmltext

 

def onTalk (self,npc,player):

htmltext = "<html><head><body>I have nothing to say you</body></html>"

st = player.getQuestState(qn)

if not st : return htmltext

npcId = npc.getNpcId()

id = st.getState()

if id == CREATED :

st.set("cond","0")

htmltext="31739-1.htm"

elif id == COMPLETED :

htmltext = "<html><head><body>This quest have already been completed.</body></html>"

else :

st.exitQuest(1)

return htmltext

 

 

QUEST = Quest(6666,qn,"custom")

CREATED = State('Start', QUEST)

STARTING = State('Starting', QUEST)

STARTED = State('Started', QUEST)

COMPLETED = State('Completed', QUEST)

QUEST.setInitialState(CREATED)

 

for npcId in NPC:

QUEST.addStartNpc(npcId)

QUEST.addTalkId(npcId)

Link para o comentário
Compartilhar em outros sites

2 respostass a esta questão

Posts recomendados

  • 0

ficaria assim ?

 

aimport sys

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

from com.l2jknight.gameserver.model.actor.instance import L2NpcInstance

from java.util import Iterator

from com.l2jknight.util.database import L2DatabaseFactory

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

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

from com.l2jknight.gameserver.model.quest.jython import QuestJython as JQuest

 

qn = "6666_NoblessTrader"

 

NPC=[66666]

NOBLESS_TIARA=7694

GOLD_EINHASAD=4356

QuestId = 6666

QuestName = "NoblessTrade"

QuestDesc = "custom"

InitialHtml = "31739-1.htm"

 

print "Nobless Trader (66666) Enabled..."

 

class Quest (JQuest) :

 

def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)

 

def onEvent(self,event,st):

htmltext = "<html><head><body>I have nothing to say you</body></html>"

cond = st.getInt("cond")

count=st.getQuestItemsCount(GOLD_EINHASAD)

if event == "31739-3.htm" :

if cond == 0 and st.getPlayer().isSubClassActive() :

if st.getPlayer().getLevel() >= 70 and count > 1:

htmltext=event

st.set("cond","0")

st.getPlayer().setNoble(True)

st.giveItems(NOBLESS_TIARA,1)

st.playSound("ItemSound.quest_finish")

st.setState(COMPLETED)

st.takeItems(GOLD_EINHASAD,4000)

else :

htmltext="31739-2.htm"

st.exitQuest(1)

else :

htmltext="31739-2.htm"

st.exitQuest(1)

return htmltext

 

def onTalk (self,npc,player):

htmltext = "<html><head><body>I have nothing to say you</body></html>"

st = player.getQuestState(qn)

if not st : return htmltext

npcId = npc.getNpcId()

id = st.getState()

if id == CREATED :

st.set("cond","0")

htmltext="31739-1.htm"

elif id == COMPLETED :

htmltext = "<html><head><body>This quest have already been completed.</body></html>"

else :

st.exitQuest(1)

return htmltext

 

 

QUEST = Quest(6666,qn,"custom")

CREATED = State('Start', QUEST)

STARTING = State('Starting', QUEST)

STARTED = State('Started', QUEST)

COMPLETED = State('Completed', QUEST)

QUEST.setInitialState(CREATED)

 

for npcId in NPC:

QUEST.addStartNpc(npcId)

QUEST.addTalkId(npcId)

Link para o comentário
Compartilhar em outros sites


Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Processando...




×
×
  • Criar Novo...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.