def onFirstTalk (self,npc,player):
# 看名字就知道是开始对话的设定
npcId = npc.getNpcId()
st = player.getQuestState(qn)
if not st :
st = self.newQuestState(player)
if npcId == 100002 :
htmltext = "main.htm"
return htmltext
# 天堂2私服职业转生认证阶段
def onTalk (self,npc,player):
npcId = npc.getNpcId()
Class = player.getClassId().getId()
level = player.getLevel()
st = player.getQuestState(qn)
if level < MINLEVEL :
# 认证等级
htmltext = "low-level.htm"
elif Class not in FIGHT and Class not in MAGIC :
# 认证三转职业
htmltext = "no-3th.htm"
elif player.isSubClassActive() :
# 认证副职业 | 也可以屏蔽此项,引去即可
htmltext = "no-fuzhi.htm"
elif (COUNT_1 * (player.getSkillLevel(SKILLBASEM)+0)) >
st.getQuestItemsCount(ITEM_1)< (COUNT_1 *
(player.getSkillLevel(SKILLBASES)+0)) :
# 认证转生物品1
htmltext = "noitem.htm"
elif (COUNT_2 * (player.getSkillLevel(SKILLBASEM)+0)) >
st.getQuestItemsCount(ITEM_2) < (COUNT_2 *
(player.getSkillLevel(SKILLBASES)+0)) :
# 认证转生物品2
htmltext = "noitem.htm"
elif (player.getSkillLevel(SKILLBASES)+
player.getSkillLevel(SKILLBASEM))
> MAXTURN_COUNT+2 :
# 天堂2私服认证最大转生次数
htmltext = "somuch.htm"
elif (player.getSkillLevel(SKILLBASES)+player.getSkillLevel
(SKILLBASEM)) == TURN_COUNT+1 :
# 如果是最后一次职业转生将进入这个提示画面
htmltext = "yes-no.htm"
elif (player.getSkillLevel(SKILLBASES)+player.getSkillLevel
(SKILLBASEM)) < TURN_COUNT+2 :
# 认证职业转生次数,如果没有达到将开始职业转生。
htmltext = "start.htm"
elif st.getQuestItemsCount(GM_ITEM) >= (GM_ITEM_C * (player.getSkillLevel
(SKILLBASES)+player.getSkillLevel(SKILLBASEM))) :
# 例如:要进行第十次转生,此次只要拥有10*设置数量的特殊物品
就可以再次进入职业转生界面(满足以上条件)
st.takeItems(GM_ITEM,GM_ITEM_C * (player.getSkillLevel(SKILLBASES)
+player.getSkillLevel(SKILLBASEM)))
# 剥夺人物的天堂2私服特殊物品,物品消耗随转生次数增加而增加。
htmltext = "start.htm"
# 注意只要通过特殊物品进入此界面,就已经消耗了天堂2私服特殊物品。