Ejemplo n.º 1
0
def nuke(socket, command, argstring):
    argstring = argstring.strip()  # Remove trailing and leading whitespaces
    if len(argstring) > 0:
        if argstring.lower() == "all":
            gump = WarningGump(
                1060635, 30720,
                tr("Wiping <i>all</i> items in the world.<br>Do you wish to proceed?"
                   ), 0xFFC000, 420, 400, wipeAllWorld, [])
            gump.send(socket)
            return
        elif argstring.lower() == "map":
            gump = WarningGump(
                1060635, 30720,
                tr("Wiping <i>all</i> items in this map.<br>Do you wish to proceed?"
                   ), 0xFFC000, 420, 400, wipeMap, [])
            gump.send(socket)
            return
        else:
            if argstring.lower() == "nomulti":
                socket.sysmessage(
                    tr("You choose to nuke anything except items in multis"))
                baseid = argstring
            else:
                if argstring.lower() == "onlymulti":
                    socket.sysmessage(
                        tr("You choose to nuke just items in multis"))
                    baseid = argstring
                else:
                    baseid = argstring
    else:
        baseid = None

    socket.sysmessage(tr("Select the area to remove"))
    getBoundingBox(socket, wipeBoundingBox, baseid)
    return True
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)
	return
Ejemplo n.º 3
0
def nuke( socket, command, argstring ):
	argstring = argstring.strip() # Remove trailing and leading whitespaces
	if len( argstring ) > 0:
		if argstring.lower() == "all":
			gump = WarningGump( 1060635, 30720, tr("Wiping <i>all</i> items in the world.<br>Do you wish to proceed?"), 0xFFC000, 420, 400, wipeAllWorld, [] )
			gump.send( socket )
			return
		elif argstring.lower() == "map":
			gump = WarningGump( 1060635, 30720, tr("Wiping <i>all</i> items in this map.<br>Do you wish to proceed?"), 0xFFC000, 420, 400, wipeMap, [] )
			gump.send( socket )
			return
		else:
			if argstring.lower() == "nomulti":
				socket.sysmessage(tr("You choose to nuke anything except items in multis"))
				baseid = argstring
			else:
				if argstring.lower() == "onlymulti":
					socket.sysmessage(tr("You choose to nuke just items in multis"))
					baseid = argstring
				else:
					baseid = argstring
	else:
		baseid = None

	socket.sysmessage(tr("Select the area to remove"))
	getBoundingBox( socket, wipeBoundingBox, baseid )
	return True
Ejemplo n.º 4
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)
    return