本文整理汇总了Python中net.sf.l2j.gameserver.network.serverpackets.SystemMessage.sendString方法的典型用法代码示例。如果您正苦于以下问题:Python SystemMessage.sendString方法的具体用法?Python SystemMessage.sendString怎么用?Python SystemMessage.sendString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sf.l2j.gameserver.network.serverpackets.SystemMessage
的用法示例。
在下文中一共展示了SystemMessage.sendString方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: onKill
# 需要导入模块: from net.sf.l2j.gameserver.network.serverpackets import SystemMessage [as 别名]
# 或者: from net.sf.l2j.gameserver.network.serverpackets.SystemMessage import sendString [as 别名]
def onKill(self, npc, player, isPet):
npcId = npc.getNpcId()
if self.worlds.has_key(npc.getInstanceId()):
world = self.worlds[npc.getInstanceId()]
if world.status == 0:
if npcId == 22503:
newNpc = self.addSpawn(
KamaBoss1[0], 15829, -174885, -10395, 0, False, 0, False, world.instanceId
) # Boss
world.startRoom.npclist[newNpc] = False
if npcId == 25622:
newNpc = self.addSpawn(
KamaBoss[0], 12050, -174887, -9951, 0, False, 0, False, world.instanceId
) # Boss
world.startRoom.npclist[newNpc] = False
if npcId == 29147:
instanceObj = InstanceManager.getInstance().getInstance(self.currentWorld)
instanceObj.setDuration(300000)
instanceObj.removeNpcs()
party = player.getParty()
if party != None:
for partyMember in party.getPartyMembers().toArray():
partyMember.sendPacket(
SystemMessage.sendString("從現在起將會限制進入即時地區:「欲界 (深淵迷宮)」。下一次的進場時間可透過「/即時地區」指令來查詢。")
)
return
示例2: onTalk
# 需要导入模块: from net.sf.l2j.gameserver.network.serverpackets import SystemMessage [as 别名]
# 或者: from net.sf.l2j.gameserver.network.serverpackets.SystemMessage import sendString [as 别名]
def onTalk(self, npc, player):
if not checkPrimaryConditions(player):
return
tele = PyObject()
dataIndex = getKamaIndex(KamalokaLevel)
tele.x = KamaPorts[dataIndex][0]
tele.y = KamaPorts[dataIndex][1]
tele.z = KamaPorts[dataIndex][2]
instanceId = getExistingInstanceId(player)
if instanceId == 0:
# brand new instance
if not checkNewInstanceConditions(player):
return
instanceId = InstanceManager.getInstance().createDynamicInstance(KamaTemplate[dataIndex])
if not self.worlds.has_key(instanceId):
world = PyObject()
world.rewarded = []
world.instanceId = instanceId
self.worlds[instanceId] = world
self.world_ids.append(instanceId)
self.currentWorld = instanceId
instanceObj = InstanceManager.getInstance().getInstance(instanceId)
instanceObj.setAllowSummon(False)
instanceObj.setReturnTeleport(
ReturnPort[dataIndex][0], ReturnPort[dataIndex][1], ReturnPort[dataIndex][2]
)
print "近緣欲界-深淵之廳:使用 " + InstanceTemplate + " 即時地區:" + str(instanceId) + " 創造玩家:" + str(player.getName())
runStartRoom(self, world)
tele.instanceId = instanceId
player.setKamaDate(1)
player.removeActiveBuffForKama()
teleportPlayer(self, player, tele)
party = player.getParty()
if party != None:
for partyMember in party.getPartyMembers().toArray():
partyMember.setKamaDate(1)
partyMember.removeActiveBuffForKama()
teleportPlayer(self, partyMember, tele)
else:
# party already in Kamaloka
foundworld = False
for worldid in self.world_ids:
if worldid == instanceId:
foundworld = True
if not foundworld:
player.sendPacket(SystemMessage.sendString("你的隊員已進入其它的即時地區。"))
return
instanceObj = InstanceManager.getInstance().getInstance(instanceId)
if instanceObj.getCountPlayers() >= KamaPartySize[dataIndex]:
player.sendPacket(SystemMessage(SystemMessageId.PARTY_EXCEEDED_THE_LIMIT_CANT_ENTER))
return
tele.instanceId = instanceId
player.removeActiveBuffForKama()
teleportPlayer(self, player, tele)
return
示例3: enterInstance
# 需要导入模块: from net.sf.l2j.gameserver.network.serverpackets import SystemMessage [as 别名]
# 或者: from net.sf.l2j.gameserver.network.serverpackets.SystemMessage import sendString [as 别名]
def enterInstance(self,player,template,teleto):
instanceId = 0
if not checkCondition(player):
return 0
party = player.getParty()
# Check for existing instances of party members
for partyMember in party.getPartyMembers().toArray():
if partyMember.getInstanceId()!=0:
instanceId = partyMember.getInstanceId()
if debug: print "Emerald/Steam: found party member in instance:"+str(instanceId)
# Existing instance
if instanceId != 0:
foundworld = False
for worldid in self.world_ids:
if worldid == instanceId:
foundworld = True
if not foundworld:
player.sendPacket(SystemMessage.sendString("你的隊員已進入其它的即時地區。"))
return 0
teleto.instanceId = instanceId
teleportplayer(self,player,teleto,True)
return instanceId
# New instance
else:
instanceId = InstanceManager.getInstance().createDynamicInstance(template)
if not self.worlds.has_key(instanceId):
world = PyObject()
world.instanceId = instanceId
world.bosses = 5
self.worlds[instanceId]=world
self.world_ids.append(instanceId)
if debug: print "Emerald/Steam Instance: " +str(instanceId) + " created by player: " + str(player.getName())
# Close all doors
for door in InstanceManager.getInstance().getInstance(instanceId).getDoors():
door.closeMe()
# Start the first room
runEmeraldAndSteamFirstRoom(self,world)
# Teleports player
for partyMember in party.getPartyMembers().toArray() :
st = partyMember.getQuestState(qn)
if not st : st = self.newQuestState(partyMember)
st.takeItems(9694,-1)
st.takeItems(9698,-1)
st.takeItems(9699,-1)
teleto.instanceId = instanceId
teleportplayer(self,partyMember,teleto,True)
return instanceId
return instanceId
示例4: enterInstance
# 需要导入模块: from net.sf.l2j.gameserver.network.serverpackets import SystemMessage [as 别名]
# 或者: from net.sf.l2j.gameserver.network.serverpackets.SystemMessage import sendString [as 别名]
def enterInstance(self, player, template, tele) :
if not checkPrimaryConditions(player) :
return
tele = PyObject()
dataIndex = getDcmIndex(DcmLevel)
tele.x = DcmPorts[dataIndex][0]
tele.y = DcmPorts[dataIndex][1]
tele.z = DcmPorts[dataIndex][2]
instanceId = getExistingInstanceId(player)
if instanceId == 0 :
#brand new instance
if not checkNewInstanceConditions(player) :
return
instanceId = InstanceManager.getInstance().createDynamicInstance(DcmTemplate[dataIndex])
if not self.worlds.has_key(instanceId) :
world = PyObject()
world.rewarded = []
world.instanceId = instanceId
self.worlds[instanceId] = world
self.world_ids.append(instanceId)
self.currentWorld = instanceId
instanceObj = InstanceManager.getInstance().getInstance(instanceId)
instanceObj.setAllowSummon(False)
instanceObj.setReturnTeleport(ReturnPort[dataIndex][0],ReturnPort[dataIndex][1],ReturnPort[dataIndex][2])
print "暗雲宅邸:使用 " + InstanceTemplate + " 即時地區:" + str(instanceId) + " 創造玩家:" + str(player.getName())
runStartRoom(self, world)
tele.instanceId = instanceId
teleportPlayer(self, player, tele)
party = player.getParty()
if party != None :
for partyMember in party.getPartyMembers().toArray() :
teleportPlayer(self, partyMember, tele)
else:
foundworld = False
for worldid in self.world_ids :
if worldid == instanceId :
foundworld = True
if not foundworld:
player.sendPacket(SystemMessage.sendString("你的隊員已進入其它的即時地區。"))
return
tele.instanceId = instanceId
teleportPlayer(self, player, tele)
return
示例5: enterInstance
# 需要导入模块: from net.sf.l2j.gameserver.network.serverpackets import SystemMessage [as 别名]
# 或者: from net.sf.l2j.gameserver.network.serverpackets.SystemMessage import sendString [as 别名]
def enterInstance(self, player, template, teleto) :
instanceId = 0
if not checkCondition(player) :
return 0
party = player.getParty()
# Check for existing instances of party members
for partyMember in party.getPartyMembers().toArray() :
if partyMember.getInstanceId() != 0 :
instanceId = partyMember.getInstanceId()
# Existing instance
if instanceId != 0 :
foundWorld = False
for worldid in self.world_ids :
if worldid == instanceId :
foundWorld = True
if not foundWorld :
player.sendPacket(SystemMessage.sendString("你的隊員已進入其它的即時地區。"))
return
teleto.instanceId = instanceId
teleportPlayer(self, player, teleto)
return instanceId
# New instance
else :
instanceId = InstanceManager.getInstance().createDynamicInstance(template)
if not self.worlds.has_key(instanceId) :
world = PyObject()
world.instanceId = instanceId
self.worlds[instanceId] = world
self.world_ids.append(instanceId)
print "Tower of Infinity: started " + template + " Instance: " +str(instanceId) + " created by player: " + str(player.getName())
runFloor(self, world, 0)
# teleports player
for partyMember in party.getPartyMembers().toArray() :
st = partyMember.getQuestState(qn)
if not st : st = self.newQuestState(partyMember)
teleto.instanceId = instanceId
teleportPlayer(self, partyMember, teleto)
return instanceId
return instanceId
示例6: checkCondition
# 需要导入模块: from net.sf.l2j.gameserver.network.serverpackets import SystemMessage [as 别名]
# 或者: from net.sf.l2j.gameserver.network.serverpackets.SystemMessage import sendString [as 别名]
def checkCondition(player):
party = player.getParty()
if party:
player.sendPacket(SystemMessage.sendString("菲拉卡只能由單人挑戰。"))
return False
return True