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


Python SystemMessage.addNumber方法代码示例

本文整理汇总了Python中net.sf.l2j.gameserver.network.serverpackets.SystemMessage.addNumber方法的典型用法代码示例。如果您正苦于以下问题:Python SystemMessage.addNumber方法的具体用法?Python SystemMessage.addNumber怎么用?Python SystemMessage.addNumber使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.sf.l2j.gameserver.network.serverpackets.SystemMessage的用法示例。


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

示例1: onTalk

# 需要导入模块: from net.sf.l2j.gameserver.network.serverpackets import SystemMessage [as 别名]
# 或者: from net.sf.l2j.gameserver.network.serverpackets.SystemMessage import addNumber [as 别名]
 def onTalk (self,npc,player):
   npcId = npc.getNpcId()
   if npcId == YIYEN :
      tele = PyObject()
      instanceId = enterInstance(self, player, "DarkCloudMansion.xml", tele)
   if self.worlds.has_key(npc.getInstanceId()) :
      world = self.worlds[npc.getInstanceId()]
      if npcId == SOTruth :
         tele = PyObject()
         tele.x = ReturnPort[dataIndex][0]
         tele.y = ReturnPort[dataIndex][1]
         tele.z = ReturnPort[dataIndex][2]
         exitInstance(player, tele)
         if player.getObjectId() in world.rewarded :
            pass
         else :
            item = player.getInventory().addItem("Quest", CC, 1, player, None)
            iu = InventoryUpdate()
            iu.addItem(item)
            player.sendPacket(iu)
            sm = SystemMessage(SystemMessageId.YOU_PICKED_UP_S1_S2)
            sm.addItemName(item)
            sm.addNumber(1)
            player.sendPacket(sm)
            if debug : print "DarkCloudMansion - id" + str(player.getObjectId()) + " added to reward list"
            world.rewarded.append(player.getObjectId())
         return
   return
开发者ID:svn2github,项目名称:l2jtw_datapack,代码行数:30,代码来源:__init__.py

示例2: onKill

# 需要导入模块: from net.sf.l2j.gameserver.network.serverpackets import SystemMessage [as 别名]
# 或者: from net.sf.l2j.gameserver.network.serverpackets.SystemMessage import addNumber [as 别名]
	def onKill (self,npc,player,isPet):
		npcId = npc.getNpcId()
		if npcId == WANDERING_CARAVAN:
			bcertificate = player.getInventory().getItemByItemId(BASIC_CERTIFICATE)
			scertificate = player.getInventory().getItemByItemId(STANDARD_CERTIFICATE)
			if bcertificate and not scertificate:
				item = player.getInventory().addItem("Quest", MARK_BETRAYAL, 1, player, None)
				iu = InventoryUpdate()
				iu.addItem(item)
				player.sendPacket(iu);
				sm = SystemMessage(SystemMessageId.YOU_PICKED_UP_S1_S2)
				sm.addItemName(item)
				sm.addNumber(1)
				player.sendPacket(sm)
		if npcId in [22334,22335]:
			bcertificate = player.getInventory().getItemByItemId(BASIC_CERTIFICATE)
			scertificate = player.getInventory().getItemByItemId(STANDARD_CERTIFICATE)
			if bcertificate and not scertificate:
				item = player.getInventory().addItem("Quest", SCORPION_POISON_STINGER, 1, player, None)
				iu = InventoryUpdate()
				iu.addItem(item)
				player.sendPacket(iu);
				sm = SystemMessage(SystemMessageId.YOU_PICKED_UP_S1_S2)
				sm.addItemName(item)
				sm.addNumber(1)
				player.sendPacket(sm)
		return
开发者ID:svn2github,项目名称:l2jtw_datapack,代码行数:29,代码来源:__init__.py

示例3: EvolvePet

# 需要导入模块: from net.sf.l2j.gameserver.network.serverpackets import SystemMessage [as 别名]
# 或者: from net.sf.l2j.gameserver.network.serverpackets.SystemMessage import addNumber [as 别名]
def EvolvePet(player,item,striderControlItem) :
   con = L2DatabaseFactory.getInstance().getConnection()
   statement = con.prepareStatement("UPDATE items SET item_id =? WHERE object_id=? AND owner_id=?")
   statement.setInt(1, striderControlItem)
   statement.setInt(2, item.getObjectId())
   statement.setInt(3, player.getObjectId())
   statement.execute()
   statement.close()
   con.close()
   sm1 = SystemMessage(SystemMessageId.S2_S1_DISAPPEARED)
   sm1.addItemName(item.getItemId())
   sm1.addNumber(1)
   sm2 = SystemMessage(SystemMessageId.YOU_PICKED_UP_A_S1_S2)
   sm2.addNumber(item.getEnchantLevel())
   sm2.addItemName(striderControlItem)
   player.sendPacket(sm1)
   player.sendPacket(sm2)
   player.sendPacket(ItemList(player, False))
   return
开发者ID:svn2github,项目名称:l2jtw_datapack,代码行数:21,代码来源:__init__.py


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