本文整理汇总了Python中com.l2jfrozen.gameserver.model.quest.State.addQuestDrop方法的典型用法代码示例。如果您正苦于以下问题:Python State.addQuestDrop方法的具体用法?Python State.addQuestDrop怎么用?Python State.addQuestDrop使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.l2jfrozen.gameserver.model.quest.State
的用法示例。
在下文中一共展示了State.addQuestDrop方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Quest
# 需要导入模块: from com.l2jfrozen.gameserver.model.quest import State [as 别名]
# 或者: from com.l2jfrozen.gameserver.model.quest.State import addQuestDrop [as 别名]
st = player.getQuestState(qn)
if not st : return
if st.getState() != STARTED : return
npcId = npc.getNpcId()
if npcId == GEMSTONE_BEAST and st.getInt("cond")==5 and st.getRandom(2)==1 and st.getQuestItemsCount(GEMSTONE_BEAST_CRYSTAL)<10 :
st.giveItems(GEMSTONE_BEAST_CRYSTAL,1)
if st.getQuestItemsCount(GEMSTONE_BEAST_CRYSTAL) == 10 :
st.playSound("ItemSound.quest_middle")
else:
st.playSound("ItemSound.quest_itemget")
return
QUEST = Quest(347,qn,"Calculator")
CREATED = State('Start', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)
QUEST.setInitialState(CREATED)
QUEST.addStartNpc(BRUNON)
QUEST.addTalkId(BRUNON)
QUEST.addTalkId(SILVERA)
QUEST.addTalkId(SPIRON)
QUEST.addTalkId(BALANKI)
QUEST.addKillId(GEMSTONE_BEAST)
STARTED.addQuestDrop(GEMSTONE_BEAST, GEMSTONE_BEAST_CRYSTAL, 1)
示例2: divmod
# 需要导入模块: from com.l2jfrozen.gameserver.model.quest import State [as 别名]
# 或者: from com.l2jfrozen.gameserver.model.quest.State import addQuestDrop [as 别名]
count = st.getQuestItemsCount(VACUALITE_ORE)
if st.getInt("cond") == 2 and count < 50 :
chance = CHANCE_FOR_QUEST_ITEMS * Config.RATE_DROP_QUEST
numItems, chance = divmod(chance,100)
if st.getRandom(100) < chance :
numItems += 1
if numItems :
if count + numItems >= 50 :
numItems = 50 - count
st.playSound("ItemSound.quest_middle")
st.set("cond","3")
else:
st.playSound("ItemSound.quest_itemget")
st.giveItems(VACUALITE_ORE,int(numItems))
return
QUEST = Quest(618,qn,"Into the Flame")
CREATED = State('Start', QUEST)
STARTED = State('Started', QUEST)
QUEST.setInitialState(CREATED)
QUEST.addStartNpc(KLEIN)
QUEST.addTalkId(KLEIN)
QUEST.addTalkId(HILDA)
for mob in range(21274,21278)+range(21282,21286)+range(21290,21294) :
QUEST.addKillId(mob)
for item in range(7265,7267) :
STARTED.addQuestDrop(KLEIN,item,1)
示例3: onKill
# 需要导入模块: from com.l2jfrozen.gameserver.model.quest import State [as 别名]
# 或者: from com.l2jfrozen.gameserver.model.quest.State import addQuestDrop [as 别名]
def onKill(self,npc,player,isPet):
st = player.getQuestState(qn)
if not st : return
if st.getState() != STARTED : return
npcId = npc.getNpcId()
if npcId == 20333 :
if st.getInt("cond") == 1 and st.getQuestItemsCount(STARSTONE1_ID) < 20 :
if st.getRandom(2) == 0 :
st.giveItems(STARSTONE1_ID,1)
if st.getQuestItemsCount(STARSTONE1_ID) == 20 :
st.playSound("ItemSound.quest_middle")
st.set("cond","2")
else :
st.playSound("ItemSound.quest_itemget")
return
QUEST = Quest(277,qn,"Gatekeepers Offering")
CREATED = State('Start', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)
QUEST.setInitialState(CREATED)
QUEST.addStartNpc(30576)
QUEST.addTalkId(30576)
QUEST.addKillId(20333)
STARTED.addQuestDrop(20333,STARSTONE1_ID,1)
示例4: onTalk
# 需要导入模块: from com.l2jfrozen.gameserver.model.quest import State [as 别名]
# 或者: from com.l2jfrozen.gameserver.model.quest.State import addQuestDrop [as 别名]
def onTalk (self,npc,player):
htmltext = "<html><body>You are either not carrying out your quest or don't meet the criteria.</body></html>"
st = player.getQuestState(qn)
if not st : return htmltext
npcId = str(npc.getNpcId())
id = st.getState()
if id == CREATED :
st.set("cond","0")
if st.getInt("cond") == 0:
htmltext = npcId+"-01.htm"
elif check(st) :
htmltext = npcId+"-03.htm"
elif st.getQuestItemsCount(RED_SOUL_CRYSTAL0_ID) == st.getQuestItemsCount(GREEN_SOUL_CRYSTAL0_ID) == st.getQuestItemsCount(BLUE_SOUL_CRYSTAL0_ID) == 0 :
htmltext = npcId+"-21.htm"
return htmltext
QUEST = Quest(350,qn,"Enhance Your Weapon")
CREATED = State('Start', QUEST)
STARTING = State('Starting', QUEST)
STARTED = State('Started', QUEST)
QUEST.setInitialState(CREATED)
for npcId in NPC:
QUEST.addStartNpc(npcId)
QUEST.addTalkId(npcId)
STARTED.addQuestDrop(4629,RED_SOUL_CRYSTAL0_ID,1)
STARTED.addQuestDrop(4640,GREEN_SOUL_CRYSTAL0_ID,1)
STARTED.addQuestDrop(4651,BLUE_SOUL_CRYSTAL0_ID,1)
示例5:
# 需要导入模块: from com.l2jfrozen.gameserver.model.quest import State [as 别名]
# 或者: from com.l2jfrozen.gameserver.model.quest.State import addQuestDrop [as 别名]
QUEST.addTalkId(30501)
QUEST.addTalkId(30515)
QUEST.addTalkId(30565)
QUEST.addTalkId(30571)
QUEST.addTalkId(30615)
QUEST.addTalkId(30616)
QUEST.addTalkId(30617)
QUEST.addTalkId(30618)
QUEST.addTalkId(30619)
QUEST.addTalkId(30642)
for i in DROPLIST_COND_1.keys()+DROPLIST_COND_4.keys()+DROPLIST_COND_6.keys()+[20778,20779,27086] :
QUEST.addKillId(i)
STARTED.addQuestDrop(30514,VOKIYANS_ORDER1,1)
STARTED.addQuestDrop(20563,MANASHEN_SHARD,1)
STARTED.addQuestDrop(20193,TYRANT_TALON,1)
STARTED.addQuestDrop(20550,GUARDIAN_BASILISK_FANG,1)
STARTED.addQuestDrop(30514,VOKIYANS_ORDER2,1)
STARTED.addQuestDrop(30615,SCEPTER_OF_BREKA,1)
STARTED.addQuestDrop(30616,SCEPTER_OF_ENKU,1)
STARTED.addQuestDrop(30619,SCEPTER_OF_VUKU,1)
STARTED.addQuestDrop(30617,SCEPTER_OF_TUREK,1)
STARTED.addQuestDrop(30618,SCEPTER_OF_TUNATH,1)
STARTED.addQuestDrop(30642,CHIANTAS_ORDER1,1)
STARTED.addQuestDrop(30515,MANAKIAS_LETTER1,1)
STARTED.addQuestDrop(30515,MANAKIAS_LETTER2,1)
STARTED.addQuestDrop(30501,KASMANS_LETTER1,1)
STARTED.addQuestDrop(30642,CHIANTAS_ORDER2,1)
STARTED.addQuestDrop(30571,TANAPIS_ORDER1,1)
示例6: State
# 需要导入模块: from com.l2jfrozen.gameserver.model.quest import State [as 别名]
# 或者: from com.l2jfrozen.gameserver.model.quest.State import addQuestDrop [as 别名]
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)
QUEST.setInitialState(CREATED)
QUEST.addStartNpc(30391)
QUEST.addTalkId(30391)
QUEST.addTalkId(30409)
QUEST.addTalkId(30410)
QUEST.addTalkId(30411)
QUEST.addTalkId(30412)
QUEST.addTalkId(30413)
QUEST.addKillId(20021)
QUEST.addKillId(20359)
QUEST.addKillId(27030)
STARTED.addQuestDrop(20359,KEY_OF_FLAME,1)
STARTED.addQuestDrop(30411,MAP_OF_LUSTER,1)
STARTED.addQuestDrop(30410,WIND_FEATHER,1)
STARTED.addQuestDrop(30412,BROKEN_BRONZE_MIRROR,1)
STARTED.addQuestDrop(27030,SPARKLE_PEBBLE,1)
STARTED.addQuestDrop(30413,RAMAS_DIARY,1)
STARTED.addQuestDrop(20021,RED_SOIL,1)
STARTED.addQuestDrop(30409,RUST_GOLD_COIN,1)
STARTED.addQuestDrop(30411,FLAME_EARING,1)
STARTED.addQuestDrop(30412,WIND_BANGEL,1)
STARTED.addQuestDrop(30413,WATER_NECKLACE,1)
STARTED.addQuestDrop(30409,EARTH_RING,1)