Exemplo n.º 1
0
def AutoChat(npc, text):
    chars = npc.getKnownList().getKnownPlayers().values().toArray()
    if chars != None:
        for pc in chars:
            sm = CreatureSay(npc.getObjectId(),
                             SystemChatChannelId.Chat_Normal, npc.getName(),
                             text)
            pc.sendPacket(sm)
Exemplo n.º 2
0
def checkBelethSample(self, world, npc, player, BS):
    for mob in world.FifthRoom.npclist:
        for order in world.FifthRoom.belethOrder:
            if mob[0] == npc and mob[3] == 1:
                player.sendPacket(
                    CreatureSay(npc.getObjectId(), 0, npc.getName(),
                                "You have done well!"))
                mob[3] = 0
    for mob in world.FifthRoom.npclist:
        if mob[3] == 0:
            continue
        else:
            return
    for mob in world.FifthRoom.npclist:
        mob[0].decayMe()
    endInstance(self, world)
Exemplo n.º 3
0
def runFifthRoom(self,world,player):
	world.status = 9
	world.foundBeleth = 0
	world.attacked = False
	openDoor(D6,world.instanceId)
	world.FifthRoom = PyObject()
	world.FifthRoom.npclist = []
	a,b,c,d,e,f,g = beleths[Rnd.get(len(beleths))]
	world.FifthRoom.belethOrder = []
	world.FifthRoom.belethOrder.append([a,b,c,d,e,f,g])
	temp = [a,b,c,d,e,f,g]
	idx = 0
	for x in range(148720,149175,65):
		newNpc = self.addSpawn(BS[idx],x,182145,-6117,48810,False,0,False,world.instanceId)
		world.FifthRoom.npclist.append([newNpc,idx,temp[idx]])
		if temp[idx] == 1 and Rnd.get(100) < 50:
			player.sendPacket(CreatureSay(newNpc.getObjectId(), SystemChatChannelId.Chat_Normal, newNpc.getName(), "You will never pass this test!"))
		idx += 1
	if debug: print "DarkCloudMansion: spawned fifth room"
	if debug: print str(world.FifthRoom.npclist)
Exemplo n.º 4
0
def autochat(npc, text):
    if npc:
        npc.broadcastPacket(
            CreatureSay(npc.getObjectId(), 0, npc.getName(), text))