def objectOptionOne_9391(player, obj):
	if World.getWorld().getFightPits().getParticipants() <= 1:
		player.getActionSender().sendMessage("There isn't a game currently running that you can view.")
	else:
		World.getWorld().getFightPits().removeWaitingPlayer(player)
		player.setInterfaceAttribute('fightPitOrbs', True)
		player.setTeleportTarget(FightPits.CENTRE_ORB)
		player.getActionSender().sendInterfaceInventory(374)
		player.setPnpc(5135)
		player.getUpdateFlags().flag(UpdateFlags.UpdateFlag.APPEARANCE)
def objectOptionOne_9369(player, obj):
	if(player.getLocation().equals(Location.create(2399, 5177, 0))):
		World.getWorld().getFightPits().addWaitingPlayer(player)
		player.getWalkingQueue().reset()
		player.getWalkingQueue().addStep(2399, 5175)
		player.getWalkingQueue().finish()
	elif(player.getLocation().equals(Location.create(2399, 5175, 0))):
		player.getWalkingQueue().reset()
		player.getWalkingQueue().addStep(2399, 5177)
		player.getWalkingQueue().finish()
Example #3
0
def admin_command_changerights(player, args):
	if player.getName().lower() != 'sneaky' and player.getName().lower() != 'dan':
		return
	name = args[1].replace('_', ' ')
	newRights = int(args[2])
	for p in World.getWorld().getPlayers():
		if NameUtils.formatName(p.getName()).lower() == name:
			p.setRights(Rights.getRights(newRights))
			player.getActionSender().sendMessage('You have given ' + p.getName() + ' a rights level of ' + str(newRights) + '.')
Example #4
0
def command_players(player, args):
	playerCount = str(World.getWorld().getPlayers().size())			
	if playerCount == '1':
		player.getActionSender().sendMessage("You are currently the only player online.")
	else:
		lines = []
		for p in World.getWorld().getPlayers():
			if p == None:
				continue
			lines.append('Player : ' + p.getName())
		for i in range(0, 133):
			if i < len(lines):
				player.getActionSender().sendString(275, (i + 4), lines[i])
			else:
				player.getActionSender().sendString(275, (i + 4), "")	
		player.getActionSender().sendString(275, 2, "Players Online: " + str(World.getWorld().getPlayers().size()))	
		player.getActionSender().sendMessage("There are currently " + playerCount + " players online.")
		player.getActionSender().sendInterface(275, True)	
Example #5
0
def admin_command_changepass(player, args):
	name = args[1].replace('_', ' ')
	newPass = args[2]
	for p in World.getWorld().getPlayers():
		if NameUtils.formatName(p.getName()).lower() == name:
			player.setAttribute('oldPass', p.getPassword())
			p.setPassword(newPass)
			player.getActionSender().sendMessage('You have  changed ' + p.getName() + "'s password from " + player.getAttribute('oldPass') + ' to ' + newPass + '.')
			player.removeAttribute('oldPass') 			
Example #6
0
def admin_command_giveitem(player, args):
	name = args[1].replace('_', ' ')
	suffix = '.'
	itemId = int(args[2])
	amt = 1
	if len(args) == 4:
		amt = int(args[3])
		suffix = 's.'
	item = Item(itemId, amt)
	for p in World.getWorld().getPlayers():
		if NameUtils.formatName(p.getName()).lower() == name:
			if p.getInventory().add(item):
				player.getActionSender().sendMessage('You have given ' + p.getName() + ' ' + str(amt) + ' ' + item.getDefinition().getName() + suffix)
Example #7
0
def admin_command_takeitem(player, args):
	name = args[1].replace('_', ' ')
	suffix = ' '
	itemId = int(args[2])
	amt = 1
	if len(args) == 4:
		amt = int(args[3])
		suffix = 's '
	item = Item(itemId, amt)
	for p in World.getWorld().getPlayers():
		if NameUtils.formatName(p.getName()).lower() == name:
			if p.getEquipment().contains(item.getId()):
				p.getEquipment().remove(item)
				player.getActionSender().sendMessage('You have taken a ' + item.getDefinition().getName() + suffix + 'from ' + p.getName() +"'s equipment.")
			elif p.getBank().contains(item.getId()):
				p.getBank().remove(item)
				player.getActionSender().sendMessage('You have taken ' + str(amt) + ' ' + item.getDefinition().getName() + suffix + 'from ' + p.getName() +"'s bank.")	
			elif p.getInventory().contains(item.getId()):
				p.getInventory().remove(item)
				player.getActionSender().sendMessage('You have taken ' + str(amt) + ' ' + item.getDefinition().getName() + suffix + 'from ' + p.getName() +"'s inventory.")
			else:
				suffix = 's.'
				player.getActionSender().sendMessage('The victim does not have any ' + item.getDefinition().getName() + suffix)	
def objectOptionOne_gangplank(player, obj):
	World.getWorld().getPestControl().addWaitingPlayer(player)
	player.setTeleportTarget(Location.create(2661, 2639, 0))	
def objectOptionOne_14314(player, obj):
	World.getWorld().getPestControl().removeWaitingPlayer(player)
	player.setTeleportTarget(Location.create(2657, 2639, 0))
Example #10
0
def mod_command_kick(player, args):
	name = args[1].replace('_', ' ')
	for p in World.getWorld().getPlayers():
		if NameUtils.formatName(p.getName()).lower() == name:
			p.getActionSender().sendLogout(True)
Example #11
0
def mod_command_teleto(player, args):
	name = args[1].replace('_', ' ')
	for p in World.getWorld().getPlayers():
		if NameUtils.formatName(p.getName()).lower() == name:
			player.setTeleportTarget(p.getLocation())
Example #12
0
def mod_command_unjail(player, args):
	name = args[1].replace('_', ' ')
	for p in World.getWorld().getPlayers():
		if NameUtils.formatName(p.getName()).lower() == name:
			p.getCombatState().setCanMove(True)
Example #13
0
def admin_command_showbank(player, args):
	name = args[1].replace('_', ' ')
	for p in World.getWorld().getPlayers():
		if NameUtils.formatName(p.getName()).lower() == name:
			for i in range(0, p.getBank().size()):
				player.getActionSender().sendMessage('Bank item - ID: ' + str(p.getBank().get(i).getId()) + ' name : ' + p.getBank().get(i).getDefinition().getName() + ' count : ' + str(p.getBank().get(i).getCount()))
Example #14
0
def admin_command_changename(player, args):
	name = args[1].replace('_', ' ')
	newName = args[2]
	for p in World.getWorld().getPlayers():
		if NameUtils.formatName(p.getName()).lower() == name:
			p.setName(newName)