A very simple LevelSpy-Function. Working with the +- on the numpad.
[code=csharp]
Client client = Client.GetClients()[0]; // global
int currentFloorLevel = 0; // global

KeyboardHook.Enable();

KeyboardHook.Add(Keys.Subtract, new KeyboardHook.KeyPressed(delegate()
{
currentFloorLevel = floor_Down();
return false;
}));

KeyboardHook.Add(Keys.Add, new KeyboardHook.KeyPressed(delegate()
{
currentFloorLevel = floor_Up();
return false;
}));

int floor_Up()
{
currentFloorLevel += 1;

if (currentFloorLevel == 0 || currentFloorLevel > 7)
{
client.Map.LevelSpyOff();
currentFloorLevel = 0;
}
else
{
client.Map.LevelSpyOn(currentFloorLevel);
}
return currentFloorLevel;
}



int floor_Down()
{
currentFloorLevel -= 1;

if (currentFloorLevel == 0 || currentFloorLevel < -7)
{
client.Map.LevelSpyOff();
currentFloorLevel = 0;
}
else
{
client.Map.LevelSpyOn(currentFloorLevel);
}
return currentFloorLevel;
}
[/code]