package
0.0.0-20250103183519-5d391d309e22
Repository: https://github.com/volte6/gomud.git
Documentation: pkg.go.dev

# README

Scripting Language

All scripting is in ECMAScript 5.1 (AKA javascript).

Room Scripting

See Room Scripting

Mob Scripting

See Mob Scripting

Item Scripting

See Item Scripting

Buff Scripting

See Buff Scripting

Spell Scripting

See Spell Scripting

Script Functions

ActorObject Functions - Functions that query or alter user/mob data.

RoomObject Functions - Functions that query or alter room data.

ItemObject Functions - Functions that query or alter item data.

Utility Functions - Helper and info functions.

Messaging Functions - Helper and info functions.

Special symbols in user or mob commands:

There are some special prefixes that can help target more specifically than just a name. These are particularly helpful when there may be other matching targets on a given name:

  • goblin peaceful vs goblin that hit you `(that is fighting),
  • dagger vs a dagger with enhancements
  • user sam vs user samuel, when sam has already left the room.

These are only useful in commands such as look, give, attack, etc.

  • !{number} - denotes a specific ItemId as a target.
    • drop !123 will drop ItemId=123
    • give !123 to samuel will give ItemId=123 to a user or mob in the room named samuel
  • #{number} - denotes a specific Mob Instance Id as a target.
    • kick #98 will kick Mob Instance Id=98
  • @{number} - denotes a specific UserId as a target.
    • give !123 to @5 will give ItemId=123 to UserId=5
    • give !123 to #98 will give ItemId=123 to Mob Instance Id=98

These are optional, everything can still be referred to by name or augmented name ( dagger#2 etc. )

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
CreateItem creates a NEW instance of an item by id.
//////////////////////////////////////////////////////// # These functions get exported to the scripting engine ////////////////////////////////////////////////////////.
Converts an item into a ScriptItem for use in the scripting engine.
mapRoomId - Room the map is centered on mapSize - wide or normal mapHeight - Height of the map mapWidth - Width of the map mapName - The title of the map showSecrets - Include secret exits/rooms? mapMarkers - A list of strings representing custom map markers: [roomId],[symbol],[legend text] 1,×,Here.
No description provided by the author
//////////////////////////////////////////////////////// # These functions get exported to the scripting engine ////////////////////////////////////////////////////////.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
//////////////////////////////////////////////////////// # These functions get exported to the scripting engine ////////////////////////////////////////////////////////.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author