本文整理汇总了Python中net.sf.l2j.gameserver.model.quest.State.addTalkId方法的典型用法代码示例。如果您正苦于以下问题:Python State.addTalkId方法的具体用法?Python State.addTalkId怎么用?Python State.addTalkId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sf.l2j.gameserver.model.quest.State
的用法示例。
在下文中一共展示了State.addTalkId方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setLeaderVar
# 需要导入模块: from net.sf.l2j.gameserver.model.quest import State [as 别名]
# 或者: from net.sf.l2j.gameserver.model.quest.State import addTalkId [as 别名]
else:
if npcId == 5181: # Imperial Gravekeeper
st.getPcSpawn().addSpawn(7765,6000000,["Curse of the gods on the one that defiles the property of the empire!"],0)
setLeaderVar(st,"ImpGraveKeeper","3")
else:
st.getPcSpawn().addSpawn(5179)
return
QUEST = Quest(503,qn,"Pursuit of Clan Ambition")
CREATED = State('Start', QUEST)
PROGRESS = State('Progress', QUEST)
COMPLETED = State('Completed', QUEST)
QUEST.setInitialState(CREATED)
QUEST.addStartNpc(NPC[3])
CREATED.addTalkId(NPC[3])
for npcId in NPC:
PROGRESS.addTalkId(npcId)
for mobId in DROPLIST.keys():
PROGRESS.addKillId(mobId)
PROGRESS.addAttackId(5181)
for i in range(3839,3848)+range(3866,3870):
PROGRESS.addQuestDrop(5181,i,1)
print "importing quests: 503: " + qd
示例2: onTalk
# 需要导入模块: from net.sf.l2j.gameserver.model.quest import State [as 别名]
# 或者: from net.sf.l2j.gameserver.model.quest.State import addTalkId [as 别名]
htmltext = "Trade has been canceled."
if htmltext != event:
st.setState(COMPLETED)
st.exitQuest(1)
return htmltext
def onTalk (Self,npc,st):
npcId = npc.getNpcId()
htmltext = "<html><head><body>I have nothing to say to you.</body></html>"
st.set("cond","0")
st.setState(STARTED)
return "1.htm"
QUEST = Quest(1005,"1005_unseal","Blacksmith")
CREATED = State('Start', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)
QUEST.setInitialState(CREATED)
QUEST.addStartNpc(8126)
STARTED.addTalkId(8126)
示例3: onKill
# 需要导入模块: from net.sf.l2j.gameserver.model.quest import State [as 别名]
# 或者: from net.sf.l2j.gameserver.model.quest.State import addTalkId [as 别名]
return htmltext
def onKill (self,npc,st):
npcId = npc.getNpcId()
random = st.getRandom(100)
if random<=CHANCE :
st.giveItems(LIENRIK_EGG1,1)
if random<=CHANCE2 :
st.giveItems(LIENRIK_EGG2,1)
return
QUEST = Quest(352,"352_HelpRoodRaiseANewPet","Help Rood Raise A New Pet")
CREATED = State('Start', QUEST)
STARTED = State('Started', QUEST)
QUEST.setInitialState(CREATED)
QUEST.addStartNpc(8067)
CREATED.addTalkId(8067)
STARTED.addTalkId(8067)
STARTED.addQuestDrop(8067,LIENRIK_EGG1,1)
STARTED.addQuestDrop(8067,LIENRIK_EGG2,1)
STARTED.addKillId(786)
STARTED.addKillId(787)
print "importing quests: 352: Help Rood Raise A New Pet"
示例4: Quest
# 需要导入模块: from net.sf.l2j.gameserver.model.quest import State [as 别名]
# 或者: from net.sf.l2j.gameserver.model.quest.State import addTalkId [as 别名]
if count+qty==100 :
st.playSound("ItemSound.quest_middle")
st.set("cond","2")
else :
st.playSound("ItemSound.quest_itemget")
st.giveItems(PREDATORS_FANG,qty)
return
QUEST = Quest(266,"266_PleaOfPixies","Plea Of Pixies")
CREATED = State('Start', QUEST)
STARTING = State('Starting', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)
QUEST.setInitialState(CREATED)
QUEST.addStartNpc(12091)
CREATED.addTalkId(12091)
STARTING.addTalkId(12091)
STARTED.addTalkId(12091)
COMPLETED.addTalkId(12091)
STARTED.addKillId(525)
STARTED.addKillId(530)
STARTED.addKillId(534)
STARTED.addKillId(537)
STARTED.addQuestDrop(530,PREDATORS_FANG,1)
print "importing quests: 266: Plea Of Pixies"
示例5: range
# 需要导入模块: from net.sf.l2j.gameserver.model.quest import State [as 别名]
# 或者: from net.sf.l2j.gameserver.model.quest.State import addTalkId [as 别名]
st.giveItems(CHAPTER_OF_WIND, 1)
st.playSound("ItemSound.quest_itemget")
elif chance in range(75, 90) and st.getQuestItemsCount(CHAPTER_OF_EARTH) == 0:
st.giveItems(CHAPTER_OF_EARTH, 1)
st.playSound("ItemSound.quest_itemget")
if (
st.getQuestItemsCount(CHAPTER_OF_FIRE)
and st.getQuestItemsCount(CHAPTER_OF_WATER)
and st.getQuestItemsCount(CHAPTER_OF_WIND)
and st.getQuestItemsCount(CHAPTER_OF_EARTH)
):
st.playSound("ItemSound.quest_middle")
return
QUEST = Quest(370, "370_AWisemanSowsSeeds", "A Wiseman Sows Seeds")
CREATED = State("Start", QUEST)
STARTED = State("Started", QUEST)
QUEST.setInitialState(CREATED)
QUEST.addStartNpc(CASIAN)
CREATED.addTalkId(CASIAN)
STARTED.addTalkId(CASIAN)
for i in MOBS:
STARTED.addKillId(i)
for i in range(5917, 5921):
STARTED.addQuestDrop(CASIAN, i, 1)
print "importing quests: 370: A Wiseman Sows Seeds"
示例6: Quest
# 需要导入模块: from net.sf.l2j.gameserver.model.quest import State [as 别名]
# 或者: from net.sf.l2j.gameserver.model.quest.State import addTalkId [as 别名]
htmltext = "7026-09.htm"
#gladiator, darkAvenger, hawkeye
if pcId == 0x02 or pcId == 0x06 or pcId == 0x09:
htmltext = "7026-09.htm"
#mage, wizard, cleric]:
if pcId == 0x0a or pcId == 0x0b or pcId == 0x0f:
htmltext = "7026-10.htm"
#sorceror, necromancer, warlock, bishop, prophet
if pcId == 0x0c or pcId == 0x0d or pcId == 0x0e or pcId == 0x10 or pcId == 0x11:
htmltext = "7026-10.htm"
st.setState(STARTED)
return htmltext
# All other Races must be out
if npcId == GRAND_MASTER_BITZ and Race in [Race.dwarf, Race.darkelf, Race.elf, Race.orc]:
st.setState(COMPLETED)
st.exitQuest(1)
return "7026-10.htm"
QUEST = Quest(7026,"7026_bitz_occupation_change","village_master")
CREATED = State('Start', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)
QUEST.setInitialState(CREATED)
QUEST.addStartNpc(7026)
STARTED.addTalkId(7026)
示例7: int
# 需要导入模块: from net.sf.l2j.gameserver.model.quest import State [as 别名]
# 或者: from net.sf.l2j.gameserver.model.quest.State import addTalkId [as 别名]
elif npcId == 7116 and int(st.get("cond"))==5 :
htmltext = "7116-01.htm"
elif npcId == 7116 and int(st.get("cond"))==6 :
htmltext = "7116-03.htm"
return htmltext
QUEST = Quest(46,"46_OnceMoreInTheArmsOfTheMotherTree","Once More In The Arms Of The Mother Tree")
CREATED = State('Start', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)
QUEST.setInitialState(CREATED)
QUEST.addStartNpc(7097)
CREATED.addTalkId(7097)
COMPLETED.addTalkId(7097)
STARTED.addTalkId(7097)
STARTED.addTalkId(7094)
STARTED.addTalkId(7090)
STARTED.addTalkId(7116)
STARTED.addQuestDrop(7097,GALLADUCCIS_ORDER_DOCUMENT_ID_1,1)
STARTED.addQuestDrop(7097,GALLADUCCIS_ORDER_DOCUMENT_ID_2,1)
STARTED.addQuestDrop(7097,GALLADUCCIS_ORDER_DOCUMENT_ID_3,1)
STARTED.addQuestDrop(7094,MAGIC_SWORD_HILT_ID,1)
STARTED.addQuestDrop(7090,GEMSTONE_POWDER_ID,1)
STARTED.addQuestDrop(7116,PURIFIED_MAGIC_NECKLACE_ID,1)
print "importing quests: 46: Once More In The Arms of the Mother Tree"
示例8: str
# 需要导入模块: from net.sf.l2j.gameserver.model.quest import State [as 别名]
# 或者: from net.sf.l2j.gameserver.model.quest.State import addTalkId [as 别名]
htmltext = event
if event == "0" :
return InitialHtml
for item in Items :
if event == str(item[1]):
htmltext = do_RequestedEvent(event, st, item[1], item[2], item[3], item[4], item[5], item[6])
if htmltext != event :
st.setState(COMPLETED)
st.exitQuest(1)
return htmltext
def onTalk (Self,npc,st):
htmltext = "<html><head><body>I have nothing to say with you</body></html>"
return InitialHtml
### Quest class and state definition
QUEST = Quest(QuestId,str(QuestId) + "_" + QuestName,QuestDesc)
CREATED = State('Start', QUEST)
COMPLETED = State('Completed', QUEST)
### Quest initialization
QUEST.setInitialState(CREATED)
for item in NPC:
### Quest NPC starter initialization
QUEST.addStartNpc(item)
### Quest NPC initialization
CREATED.addTalkId(item)
print "...done"
示例9: do_RequestEvent
# 需要导入模块: from net.sf.l2j.gameserver.model.quest import State [as 别名]
# 或者: from net.sf.l2j.gameserver.model.quest.State import addTalkId [as 别名]
return do_RequestEvent(event,st)
def onTalk (Self,npc,st):
npcId = npc.getNpcId()
htmltext = "<html><head><body>I have nothing to say with you</body></html>"
st.setState(STARTED)
if InitialHtml == "onEvent" :
return do_RequestEvent(str(npcId),st)
elif InitialHtml != "" :
return InitialHtml
return htmltext
### Quest class and state definition
QUEST = Quest(QuestId, str(QuestId) + "_" + QuestName, QuestDesc)
CREATED = State('Start', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)
### Quest initialization
QUEST.setInitialState(CREATED)
for item in NPC:
### Quest NPC starter initialization
QUEST.addStartNpc(item)
### Quest NPC initialization
STARTED.addTalkId(item)
print ": Loaded " + str(len(Items)) + " item(s)"