当前位置: 首页>>代码示例>>Python>>正文


Python datatables.SkillTable类代码示例

本文整理汇总了Python中com.l2jserver.gameserver.datatables.SkillTable的典型用法代码示例。如果您正苦于以下问题:Python SkillTable类的具体用法?Python SkillTable怎么用?Python SkillTable使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了SkillTable类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: onAdvEvent

	def onAdvEvent (self,event,npc,player):
		htmltext = event
		st = player.getQuestState(qn)
		if not st: return

		if event == "31001-02.htm":
			st.setState(State.STARTED)
			st.playSound("ItemSound.quest_accept")
		if event == "31001-05.htm":
			st.set("cond","1")
			st.playSound("ItemSound.quest_middle")
		elif event == "32576-02.htm":
			st.giveItems(IdentityCard,1)
			st.set("cond","2")
			st.playSound("ItemSound.quest_middle")
		elif event == "30289-04.htm":
			player.stopAllEffects()
			SkillTable.getInstance().getInfo(6204,1).getEffects(player,player)
			st.set("cond","3")
		elif event == "30289-07.htm":
			player.stopAllEffects()
		elif event == "30969-03.htm":
			st.addExpAndSp(52518015, 5817677)
			st.unset("cond") 
			st.exitQuest(False)
			st.playSound("ItemSound.quest_finish")
		return htmltext
开发者ID:svn2github,项目名称:l2jtw_datapack,代码行数:27,代码来源:__init__.py

示例2: onAdvEvent

 def onAdvEvent (self,event,npc, player) :
     htmltext = event
     st = player.getQuestState(qn)
     if not st : return
     if event in ["30839-02.htm","31307-02.htm"] :
         st.set("cond","1")
         st.setState(State.STARTED)
         st.playSound("ItemSound.quest_accept")
     elif event == "30839-05.htm" :
         st.set("cond","2")
         st.playSound("ItemSound.quest_middle")
     elif event == "31307-05.htm" :
         st.set("cond","7")
         st.playSound("ItemSound.quest_middle")
     elif event == "32325-03.htm" :
         st.set("cond","3")
         st.giveItems(YinSword,1,Elementals.FIRE,10)
         st.playSound("ItemSound.quest_middle")
     elif event == "32326-03.htm" :
         st.set("cond","8")
         st.giveItems(YangSword,1,Elementals.EARTH,10)
         st.playSound("ItemSound.quest_middle")
     elif event == "32325-06.htm" :
         if st.getQuestItemsCount(YinSword):
            st.takeItems(YinSword,1)
            htmltext = "32325-07.htm"
         st.giveItems(YinSword,1,Elementals.FIRE,10)
     elif event == "32326-06.htm" :
         if st.getQuestItemsCount(YangSword):
            st.takeItems(YangSword,1)
            htmltext = "32326-07.htm"
         st.giveItems(YangSword,1,Elementals.EARTH,10)
     elif event == "32325-09.htm" :
         st.set("cond","5")
         SkillTable.getInstance().getInfo(2635,1).getEffects(player,player)
         st.giveItems(YinSword,1,Elementals.FIRE,10)
         st.playSound("ItemSound.quest_middle")
     elif event == "32326-09.htm" :
         st.set("cond","10")
         SkillTable.getInstance().getInfo(2636,1).getEffects(player,player)
         st.giveItems(YangSword,1,Elementals.EARTH,10)
         st.playSound("ItemSound.quest_middle")
     elif event.isdigit() :
         st.giveItems(10520+int(event),2)
         st.addExpAndSp(202160,20375)
         st.unset("cond")
         st.exitQuest(False)
         st.playSound("ItemSound.quest_finish")
         htmltext = str(npc.getNpcId())+"-1"+event+".htm"
     return htmltext
开发者ID:svn2github,项目名称:l2jtw_datapack,代码行数:50,代码来源:__init__.py

示例3: giveBuff

	def giveBuff(self, npc, player, skill_id, skill_lv):
		skill = SkillTable.getInstance().getInfo(skill_id, skill_lv)
		if skill:
			if skill.getSkillType() == L2SkillType.BUFF:
				skill.getEffects(npc, player)
			else:
				skill.useSkill(player, (player,))
开发者ID:6009821,项目名称:s4L2J,代码行数:7,代码来源:AutoBuffGoD.py

示例4: onAdvEvent

 def onAdvEvent (self,event,npc,player) :
    htmltext = event
    st = player.getQuestState(qn)
    if not st: return
    Alevel = player.getAllianceWithVarkaKetra()
    if str(event) in BUFF.keys() :
        skillId,level,horns=BUFF[event]
        if st.getQuestItemsCount(Horn) >= horns :
            st.takeItems(Horn,horns)
            npc.setTarget(player)
            npc.doCast(SkillTable.getInstance().getInfo(skillId,level))
            npc.setCurrentHpMp(npc.getMaxHp(), npc.getMaxMp())
            htmltext = "31372-4.htm"
        else :
            htmltext = "<html><body>魂靈引導者亞瑟法:<br>如果要得到祖先的祝福就需要供上<font color=\"LEVEL\">野牛的角</font>!你,在出戰場累積更多的戰績,你就會得到野牛的角為其代價!</body></html>"
    elif event == "Withdraw" :
        if player.getWarehouse().getSize() == 0 :
            htmltext = "31374-0.htm"
        else :
            player.sendPacket(ActionFailed.STATIC_PACKET)
            player.setActiveWarehouse(player.getWarehouse())
            player.sendPacket(WareHouseWithdrawalList(player, 1))
    elif event == "Teleport" :
        if Alevel == 4 :
            htmltext = "31376-4.htm"
        elif Alevel == 5 :
            htmltext = "31376-5.htm"
    return htmltext
开发者ID:svn2github,项目名称:l2jtw_datapack,代码行数:28,代码来源:__init__.py

示例5: onAdvEvent

 def onAdvEvent (self,event,npc,player) :
    htmltext = event
    st = player.getQuestState(qn)
    if not st: return
    Alevel = player.getAllianceWithVarkaKetra()
    if str(event) in BUFF.keys() :
        skillId,level,seeds=BUFF[event]
        if st.getQuestItemsCount(Seed) >= seeds :
            st.takeItems(Seed,seeds)
            npc.setTarget(player)
            npc.doCast(SkillTable.getInstance().getInfo(skillId,level))
            npc.setCurrentHpMp(npc.getMaxHp(), npc.getMaxMp())
            htmltext = "31379-4.htm"
    elif event == "Withdraw" :
        if player.getWarehouse().getSize() == 0 :
            htmltext = "31381-0.htm"
        else :
            player.sendPacket(ActionFailed.STATIC_PACKET)
            player.setActiveWarehouse(player.getWarehouse())
            player.sendPacket(WareHouseWithdrawalList(player, 1))
    elif event == "Teleport" :
        if Alevel == -4 :
            htmltext = "31383-4.htm"
        elif Alevel == -5 :
            htmltext = "31383-5.htm"
    return htmltext
开发者ID:L2JServer-PVP,项目名称:L2JDatapack,代码行数:26,代码来源:__init__.py

示例6: onAttack

 def onAttack (self,npc,player,damage,isPet, skill):
   st = player.getQuestState(qn)
   if not st : return 
   if st.getState() != State.STARTED : return 
   
   chance=self.getRandom(100)
   if chance < 3 :
      count = 0
      for item in range(5875,5879):
         if st.getQuestItemsCount(item) :
            count += 1
            st.takeItems(item,-1)
      if count:
         st.giveItems(5880,1)
   elif chance < 7 :
      for item in range(5875,5879):
         if st.getQuestItemsCount(item) :
            npc.doCast(SkillTable.getInstance().getInfo(4072,4))
            st.takeItems(item,-1)
            st.giveItems(item+1,1)
            if item < 5878 :
               st.playSound("ItemSound.quest_itemget")
            elif item == 5878 :
               st.playSound("ItemSound.quest_middle")
               st.set("cond","2")
            break
   return
开发者ID:destrodevianne,项目名称:DevAit,代码行数:27,代码来源:__init__.py

示例7: doRebirth

		def doRebirth(player):
			st = player.getQuestState(qn)
			#扣除道具
			for id, count in requireItem:
				st.takeItems(id, count)
			#降等
			player.removeExpAndSp(player.getExp() - ExperienceTable.getInstance().getExpForLevel(levelAfterRebirth), player.getSp())
			#記錄轉生次數
			st.set('times', str(st.getInt('times')+1))
			#移除技能
			for i in player.getAllSkills():
				if i.getId() not in sixStatSkills:
					if i.getId() not in remove_skill_blacklist:
						player.removeSkill(i)
			#轉種族
			newClass = st.getInt('newClass')
			st.getPlayer().setClassId(newClass)
			if player.isSubClassActive():
				player.getSubClasses().get(player.getClassIndex()).setClassId(player.getActiveClass())
			else:
				player.setBaseClass(player.getActiveClass())
			#st.getPlayer().setBaseClass(newClass)
			#st.getPlayer().setActiveClass(newClass)
			player.broadcastUserInfo()
			player.rewardSkills()
			player.sendSkillList()
			#player.stopAllToggles()
			#player.broadcastUserInfo()
			#變身..用作暫時解決轉種族後人物怪怪的問題
			#變身 瑪瑙獸 ID 617
			skillId = 617
			skillLevel = 1
			skill = SkillTable.getInstance().getInfo(skillId, skillLevel)
			if skill:
				skill.getEffects(player, player)
				#5秒後解除變身
				st.startQuestTimer('removeAllEffects', 5000)
				#player.untransform()
			#發道具獎勵
			for id, count in rewardItem:
				st.giveItems(id, count)
			#發素質獎勵
			if self.getFreeRebirthPoint(player) > 0:
				skillId = st.getInt('newSixStat')
				skillLevel = max(player.getSkillLevel(skillId), 1)
				player.addSkill(SkillTable.getInstance().getInfo(skillId, skillLevel + 1), True)
			return
开发者ID:6009821,项目名称:s4L2J,代码行数:47,代码来源:Rebirth.py

示例8: giveBuff

	def giveBuff(self, npc, player, skill_id, skill_lv):
		skill = str(skill_id) + "-" + str(skill_lv)
		if skill_lv > 1:
			if skill not in self.allowBuffList: return
		if skill_lv == 1:
			if str(skill_id) not in self.allowBuffList and skill not in self.allowBuffList: return
		skill = SkillTable.getInstance().getInfo(skill_id, skill_lv)
		if skill:
			skill.getEffects(npc, player)
开发者ID:cass1984,项目名称:s4L2J,代码行数:9,代码来源:vcBuff.py

示例9: transformPlayer

def transformPlayer(npc, player, transid) :
	if player.isTransformed() == True :
		player.untransform()
		time.sleep(2)
	for effect in player.getAllEffects() :
		if effect.getAbnormalType() == "speed_up":
			effect.exit()
	npc.setTarget(player)
	npc.doCast(SkillTable.getInstance().getInfo(transid,1))
	return
开发者ID:Bigcheese,项目名称:l2adena-l2j-datapack,代码行数:10,代码来源:__init__.py

示例10: onEnterWorld

	def onEnterWorld(self, player):
		for skill in player.getAllSkills():
			if skill.getId() in self.removeSkillsData.keys():
				for delskillid in self.removeSkillsData[skill.getId()]:
					level = player.getSkillLevel(delskillid)
					if level != -1:
						delskill = SkillTable.getInstance().getInfo(delskillid, level)
						player.removeSkill(delskill)
						print "%s 因覺醒技能 %s 已移除 %s" % (player.getName(), skill.getName(), delskill.getName())
		player.sendSkillList()
开发者ID:6009821,项目名称:s4L2J,代码行数:10,代码来源:AutoRemoveSkills.py

示例11: onAdvEvent

	def onAdvEvent(self, event, npc, player):
		if event.startswith('page '):
			page = event[len('page '):]
			return self.htm_header + self.htm_search + self.listSkills(player, int(page)) + self.htm_footer
		elif event.startswith('remove '):
			sid, slv = event[len('remove '):].split()
			sid = int(sid)
			slv = int(slv)
			player.removeSkill(SkillTable.getInstance().getInfo(sid, slv))
			player.sendSkillList()
		elif event.startswith('search '):
			kw = event[len('search '):]
			r = self.htm_warning
			skillTable = SkillTable.getInstance()
			for s in player.getAllSkills():
				if kw in skillTable.getInfo(s.getId(), s.getLevel()).getName() or kw == str(s.getId()):
					r += self.makeRemoveLink(s)
			return self.htm_header + self.htm_search + r + self.htm_footer
		return self.onFirstTalk(npc, player)
开发者ID:6009821,项目名称:s4L2J,代码行数:19,代码来源:easySkillRemove.py

示例12: onEnterZone

	def onEnterZone(self, character, zone):
		try:
			if character.getTransformationId(): return
			if not isGM_join_event and player.isGM(): return
		except:
			return
		skillId, skillLevel = [672, 1]
		skill = SkillTable.getInstance().getInfo(skillId, skillLevel)
		if skill:
			skill.getEffects(character, character)
开发者ID:6009821,项目名称:s4L2J,代码行数:10,代码来源:NewYear_2011.py

示例13: listAvailableSkill

	def listAvailableSkill(self, player):
		sl = self.getAvailableSkill(player)
		r = "可學習的技能清單<br1>"
		r += '<a action="bypass -h Quest %s learn_all">全部學習</a><br1>' % self.qn
		for s in sl:
			if s and s.getName():
				ss = SkillTable.getInstance().getInfo(s.getSkillId(), s.getSkillLevel())
				if ss:
					sn = ss.getName()
				else:
					sn = s.getName()
				r += "<a action=\"bypass -h Quest " + self.qn + " learn " + str(s.getSkillId()) + " " + str(s.getSkillLevel()) + "\">" + sn + " Lv " + str(s.getSkillLevel()) + "</a><BR1>"
		return r
开发者ID:6009821,项目名称:s4L2J,代码行数:13,代码来源:easySkillLearn.py

示例14: onAdvEvent

	def onAdvEvent (self,event,npc,player):
		htmltext = event
		st = player.getQuestState(qn)
		if not st: return

		if event == "31001-05.htm":
			st.set("cond","1")
			st.setState(State.STARTED)
			st.playSound("ItemSound.quest_middle")
		elif event == "32576-02.htm":
			st.giveItems(IdentityCard,1)
			st.set("cond","2")
			st.playSound("ItemSound.quest_middle")
		elif event == "30289-04.htm":
			player.stopAllEffects()
			SkillTable.getInstance().getInfo(6204,1).getEffects(player,player)
			st.set("cond","3")
		elif event == "30289-07.htm":
			player.stopAllEffects()
			SkillTable.getInstance().getInfo(6204,1).getEffects(player,player)
		elif event == "30289-08.htm":
			player.stopAllEffects()
		elif event == "30289-11.htm":
			st.set("cond","4")
			st.playSound("ItemSound.quest_middle")
			player.stopAllEffects()
		elif event == "30969-03.htm":
			st.addExpAndSp(52518015, 5817677)
			st.unset("cond") 
			st.exitQuest(False)
			st.playSound("ItemSound.quest_finish")
		elif event == "quit":
			instanceId = player.getInstanceId()
			instance = InstanceManager.getInstance().getInstance(instanceId)
			player.setInstanceId(0)
			player.teleToLocation(-12491,122331,-2984)
			htmltext = ""
		return htmltext
开发者ID:Vados420,项目名称:l2jtw_datapack,代码行数:38,代码来源:__init__.py

示例15: myAddSkill

	def myAddSkill(self, player, id):
		oldSkill = player.getKnownSkill(id)
		sl = self.getAvailableSkill(player)
		for s in sl:
			if s.getSkillId() == id:
				newskill = SkillTable.getInstance().getInfo(s.getSkillId(), s.getSkillLevel())
				if newskill:
					player.addSkill(newskill, True)
				else:
					return 1
				if oldSkill == player.getKnownSkill(id):
					print self.qn, player, "學習技能錯誤", id, newskill.getName()
					player.sendMessage("學習技能錯誤 %s" % newskill.getName())
					return 1
				self.myAddSkill(player, id)
				break
		return 0
开发者ID:6009821,项目名称:s4L2J,代码行数:17,代码来源:easySkillLearn.py


注:本文中的com.l2jserver.gameserver.datatables.SkillTable类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。