Custom-Server-Gump-Controls
Custom server gump controls
Section titled “Custom server gump controls”TazUO has added for now one additional html gump control that you can use, we are open to adding more.
Map Area
Section titled “Map Area”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:
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} }}"); }}