Skip to content

Custom server gump controls

TazUO has added for now one additional html gump control that you can use, we are open to adding more.

Most of these are intended for ServUO, if you use another server software you will need to create your own. The main thing is sending ascii text in the proper order with supported values.

Packet text: maparea x y w h mapindex mapx mapy mapendingx mapendingy (For a class you can use in your server see below)

This will generate an area of the map in your gump:

image

Here is a server side class you can use to add to your gumps. Note: This was made with ModernUO so slight modifications may be needed for ServUO.

using System.Buffers;
using Server.Collections;
namespace Server.Gumps;
public class GumpMapArea : GumpEntry
{
private readonly int _x;
private readonly int _y;
private readonly int _width;
private readonly int _height;
private readonly Rectangle2D _area;
private readonly int _mapIndex;
public GumpMapArea(int x, int y, int width, int height, int mapIndex, Rectangle2D area)
{
_x = x;
_y = y;
_width = width;
_height = height;
_area = area;
_mapIndex = mapIndex;
}
public override void AppendTo(ref SpanWriter writer, OrderedSet<string> strings, ref int entries, ref int switches)
{
writer.WriteAscii($"{{ maparea {_x} {_y} {_width}, {_height} {_mapIndex} {_area.X} {_area.Y} {_area.End.X} {_area.End.Y} }}");
}
}