Ejemplo n.º 1
0
def nuke( socket, command, argstring ):
	if len( argstring ) > 0:
		if argstring.lower() == "all":
			gump = WarningGump( 1060635, 30720, "Wipping <i>all</i> items in the world.<br>Do you wish to proceed?", 0xFFC000, 420, 400, wipeAllWorld, [] )
			gump.send( socket )
	else:
		socket.sysmessage("Select the area to remove")
		getBoundingBox( socket, wipeBoundingBox )

	return 1
Ejemplo n.º 2
0
def callback(player, arguments, target):
	pos = None
	
	(npc, radius, mintime, maxtime) = arguments
	
	if target.item and not target.item.container:
		pos = target.item.pos
	elif target.char:
		pos = target.char.pos
	else:
		pos = target.pos
		
	args = [pos, npc, radius, mintime, maxtime]
		
	# Check Distance. If more than 30 tiles away, warn the user
	if player.distanceto(pos) > 30:
		gump = WarningGump( 1060635, 30720, tr("The position (%s) you targetted is more than 30 tiles away. Are you sure to add a spawn there?") % pos, 0xFFFFFF, 420, 250, addSpawn, args )
		gump.send( player.socket )	
	else:
		addSpawn(player, True, args)