Documentation
¶
Index ¶
- Variables
- func ActorNames(actorList []*ScriptActor) string
- func AddModlueFunction(namespace string, name string, funcRef any)
- func ClearBuffVMs()
- func ClearItemVMs()
- func ClearMobVMs()
- func ClearRoomVMs()
- func ClearSpellVMs()
- func ColorWrap(txt string, colorClass ...string) string
- func CreateInstancesFromRoomIds(roomList []int) map[int]int
- func CreateInstancesFromZone(zoneName string) map[int]int
- func GetMap(mapRoomId int, zoomLevel int, mapHeight int, mapWidth int, mapName string, ...) string
- func PruneBuffVMs(instanceIds ...int)
- func PruneItemVMs(instanceIds ...int)
- func PruneMobVMs(instanceIds ...int)
- func PruneRoomVMs(roomIds ...int)
- func PruneSpellVMs(instanceIds ...int)
- func PruneVMs(forceClear ...bool)
- func RaiseEvent(name string, data map[string]any)
- func SendBroadcast(message string)
- func SendRoomExitsMessage(roomId int, message string, isQuiet bool, excludeUserIds ...int)
- func SendRoomMessage(roomId int, message string, excludeIds ...int)
- func SendUserMessage(userId int, message string)
- func Setup(scriptLoadTimeoutMs int, scriptRoomTimeoutMs int)
- func TryBuffCommand(cmd string, rest string, userId int, mobInstanceId int, buffId int) (bool, error)
- func TryBuffScriptEvent(eventName string, userId int, mobInstanceId int, buffId int) (bool, error)
- func TryItemCommand(cmd string, item items.Item, userId int) (bool, error)
- func TryItemScriptEvent(eventName string, item items.Item, userId int) (bool, error)
- func TryMobCommand(cmd string, rest string, mobInstanceId int, sourceId int, sourceType string) (bool, error)
- func TryMobScriptEvent(eventName string, mobInstanceId int, sourceId int, sourceType string, ...) (bool, error)
- func TryPlayerDownedEvent(mobInstanceId int, downedPlayerId int) (bool, error)
- func TryRoomCommand(cmd string, rest string, userId int) (bool, error)
- func TryRoomIdleEvent(roomId int) (bool, error)
- func TryRoomScriptEvent(eventName string, userId int, roomId int) (bool, error)
- func TrySpellScriptEvent(eventName string, sourceUserId int, sourceMobInstanceId int, ...) (bool, error)
- func UtilApplyColorPattern(input string, patternName string, wordsOnly ...bool) string
- func UtilDiceRoll(diceQty int, diceSides int) int
- func UtilFindMatchIn(search string, items []string) map[string]any
- func UtilGetConfig() configs.Config
- func UtilGetMinutesToRounds(minutes int) int
- func UtilGetMinutesToTurns(minutes int) int
- func UtilGetRoundNumber() uint64
- func UtilGetSecondsToRounds(seconds int) int
- func UtilGetSecondsToTurns(seconds int) int
- func UtilGetTime() gametime.GameDate
- func UtilGetTimeString() string
- func UtilIsDay() bool
- func UtilLocateUser(idOrName any) int
- func UtilSetTime(hour int, minutes int)
- func UtilSetTimeDay()
- func UtilSetTimeNight()
- func UtilStripPrepositions(input string) string
- type ScriptActor
- func (a ScriptActor) AddEventLog(category string, message string)
- func (a ScriptActor) AddGold(amt int, bankAmt ...int)
- func (a ScriptActor) AddHealth(amt int) int
- func (a ScriptActor) AddMana(amt int) int
- func (a ScriptActor) CancelBuffWithFlag(buffFlag string) bool
- func (a ScriptActor) ChangeAlignment(alignmentChange int)
- func (a ScriptActor) CharmExpire()
- func (a ScriptActor) CharmRemove()
- func (a ScriptActor) CharmSet(userId int, charmRounds int, onRevertCommand ...string)
- func (a ScriptActor) Command(cmd string, waitSeconds ...float64)
- func (a ScriptActor) CommandFlagged(cmd string, flags events.EventFlag, waitSeconds ...float64)
- func (a ScriptActor) GetAlignment() int
- func (a ScriptActor) GetAlignmentName() string
- func (a ScriptActor) GetBackpackItems() []ScriptItem
- func (a ScriptActor) GetChanceToTame(target ScriptActor) int
- func (a ScriptActor) GetCharacterName(wrapInTags bool) string
- func (a ScriptActor) GetCharmCount() int
- func (a ScriptActor) GetCharmedUserId() int
- func (a ScriptActor) GetHealth() int
- func (a ScriptActor) GetHealthMax() int
- func (a ScriptActor) GetHealthPct() float64
- func (a ScriptActor) GetLastInputRound() uint64
- func (a ScriptActor) GetLevel() int
- func (a ScriptActor) GetMana() int
- func (a ScriptActor) GetManaMax() int
- func (a ScriptActor) GetManaPct() float64
- func (a ScriptActor) GetMaxCharmCount() int
- func (a ScriptActor) GetMiscCharacterData(key string) any
- func (a ScriptActor) GetMiscCharacterDataKeys(prefixMatches ...string) []string
- func (a ScriptActor) GetMobKills(mobId int) int
- func (a ScriptActor) GetPartyMembers() []ScriptActor
- func (a ScriptActor) GetPet() *pets.Pet
- func (a ScriptActor) GetRace() string
- func (a ScriptActor) GetRaceKills(race string) int
- func (a ScriptActor) GetRoomId() int
- func (a ScriptActor) GetSize() string
- func (a ScriptActor) GetSkillLevel(skillName string) int
- func (a ScriptActor) GetStat(statName string) int
- func (a ScriptActor) GetStatMod(statModName string) int
- func (a ScriptActor) GetStatPoints() int
- func (a ScriptActor) GetTameMastery() map[int]int
- func (a ScriptActor) GetTempData(key string) any
- func (a ScriptActor) GetTrainingPoints() int
- func (a ScriptActor) GiveBuff(buffId int, source string)
- func (a ScriptActor) GiveExtraLife()
- func (a ScriptActor) GiveItem(itm any)
- func (a ScriptActor) GiveQuest(questId string)
- func (a ScriptActor) GiveStatPoints(ct int)
- func (a ScriptActor) GiveTrainingPoints(ct int)
- func (a ScriptActor) GrantXP(xpAmt int, reason string)
- func (a ScriptActor) HasBuff(buffId int) bool
- func (a ScriptActor) HasBuffFlag(buffFlag string) bool
- func (a ScriptActor) HasItemId(itemId int, excludeWorn ...bool) bool
- func (a ScriptActor) HasQuest(questId string) bool
- func (a ScriptActor) HasSpell(spellId string) bool
- func (a ScriptActor) InstanceId() int
- func (a ScriptActor) IsAggro(actor ScriptActor) bool
- func (a ScriptActor) IsCharmed(userId ...int) bool
- func (a ScriptActor) IsHome() bool
- func (a ScriptActor) IsTameable() bool
- func (a ScriptActor) LearnSpell(spellId string) bool
- func (a ScriptActor) MobTypeId() int
- func (a ScriptActor) MoveRoom(destRoomId int, leaveCharmedMobs ...bool)
- func (a ScriptActor) Pathing() bool
- func (a ScriptActor) PathingAtWaypoint() bool
- func (a ScriptActor) RemoveBuff(buffId int) bool
- func (a ScriptActor) SendText(msg string)
- func (a ScriptActor) SetAdjective(adj string, addIt bool)
- func (a ScriptActor) SetCharacterName(newName string)
- func (a ScriptActor) SetHealth(amt int)
- func (a ScriptActor) SetMiscCharacterData(key string, value any)
- func (a ScriptActor) SetTameMastery(mobId int, newSkillLevel int)
- func (a ScriptActor) SetTempData(key string, value any)
- func (a ScriptActor) ShorthandId() string
- func (a ScriptActor) Sleep(seconds int)
- func (a ScriptActor) TakeItem(itm ScriptItem)
- func (a ScriptActor) TimerExists(name string) bool
- func (a ScriptActor) TimerExpired(name string) bool
- func (a ScriptActor) TimerSet(name string, period string)
- func (a ScriptActor) TrainSkill(skillName string, skillLevel int) bool
- func (a ScriptActor) Uncurse() []*ScriptItem
- func (a ScriptActor) UpdateItem(itm ScriptItem)
- func (a ScriptActor) UserId() int
- type ScriptItem
- func (i ScriptItem) AddUsesLeft(amount int) int
- func (i ScriptItem) GetLastUsedRound() uint64
- func (i ScriptItem) GetTempData(key string) any
- func (i ScriptItem) GetUsesLeft() int
- func (i ScriptItem) ItemId() int
- func (i ScriptItem) MarkLastUsed(clear ...bool) uint64
- func (i ScriptItem) Name(simpleVersion ...bool) string
- func (i ScriptItem) NameComplex() string
- func (i ScriptItem) NameSimple() string
- func (i ScriptItem) Redescribe(newDescription string)
- func (i ScriptItem) Rename(newName string, displayNameOrStyle ...string)
- func (i ScriptItem) SetTempData(key string, value any)
- func (i ScriptItem) SetUsesLeft(amount int) int
- func (i ScriptItem) ShorthandId() string
- type ScriptRoom
- func (r ScriptRoom) AddMutator(mutName string)
- func (r ScriptRoom) AddTemporaryExit(exitNameSimple string, exitNameFancy string, exitRoomId int, ...) bool
- func (r ScriptRoom) DestroyItem(itm ScriptItem)
- func (r ScriptRoom) GetAllActors() []*ScriptActor
- func (r ScriptRoom) GetContainers() []string
- func (r ScriptRoom) GetExits() []map[string]any
- func (r ScriptRoom) GetItems() []ScriptItem
- func (r ScriptRoom) GetMob(mobId int, createIfMissing ...bool) *ScriptActor
- func (r ScriptRoom) GetMobs(mobId ...int) []*ScriptActor
- func (r ScriptRoom) GetPermData(key string) any
- func (r ScriptRoom) GetPlayers() []*ScriptActor
- func (r ScriptRoom) GetTempData(key string) any
- func (r ScriptRoom) HasMutator(mutName string) bool
- func (r ScriptRoom) HasQuest(questId string, partyUserId ...int) []int
- func (r ScriptRoom) IsEphemeral() bool
- func (r ScriptRoom) IsLocked(exitName string) bool
- func (r ScriptRoom) MissingQuest(questId string, partyUserId ...int) []int
- func (r ScriptRoom) RemoveMutator(mutName string)
- func (r ScriptRoom) RemoveTemporaryExit(exitNameSimple string, exitNameFancy string, exitRoomId int) bool
- func (r ScriptRoom) RepeatSpawnItem(itemId int, roundFrequency int, containerName ...string) bool
- func (r ScriptRoom) RoomId() int
- func (r ScriptRoom) RoomIdSource() int
- func (r ScriptRoom) SendText(msg string, excludeIds ...int)
- func (r ScriptRoom) SendTextToExits(msg string, isQuiet bool, excludeUserIds ...int)
- func (r ScriptRoom) SetLocked(exitName string, lockIt bool)
- func (r ScriptRoom) SetPermData(key string, value any)
- func (r ScriptRoom) SetTempData(key string, value any)
- func (r ScriptRoom) SpawnItem(itemId int, inStash bool)
- func (r ScriptRoom) SpawnMob(mobId int) *ScriptActor
- type TextWrapperStyle
- type VMWrapper
Constants ¶
This section is empty.
Variables ¶
var (
ErrEventNotFound = errors.New(`event not found`)
)
var ( EventFlags = map[string]events.EventFlag{ `CmdNone`: events.CmdNone, `CmdSkipScripts`: events.CmdSkipScripts, `CmdSecretly`: events.CmdSecretly, `CmdIsRequeue`: events.CmdIsRequeue, `CmdBlockInput`: events.CmdBlockInput, `CmdUnBlockInput`: events.CmdUnBlockInput, `CmdBlockInputUntilComplete`: events.CmdBlockInputUntilComplete, } )
Functions ¶
func ActorNames ¶
func ActorNames(actorList []*ScriptActor) string
func AddModlueFunction ¶
func ClearBuffVMs ¶
func ClearBuffVMs()
func ClearItemVMs ¶
func ClearItemVMs()
func ClearMobVMs ¶
func ClearMobVMs()
func ClearRoomVMs ¶
func ClearRoomVMs()
func ClearSpellVMs ¶
func ClearSpellVMs()
func CreateInstancesFromRoomIds ¶
////////////////////////////////////////////////////////
These functions get exported to the scripting engine ¶
////////////////////////////////////////////////////////
func CreateInstancesFromZone ¶
func GetMap ¶
func GetMap(mapRoomId int, zoomLevel int, mapHeight int, mapWidth int, mapName string, showSecrets bool, mapMarkers ...string) string
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
func PruneBuffVMs ¶
func PruneBuffVMs(instanceIds ...int)
func PruneItemVMs ¶
func PruneItemVMs(instanceIds ...int)
func PruneMobVMs ¶
func PruneMobVMs(instanceIds ...int)
func PruneRoomVMs ¶
func PruneRoomVMs(roomIds ...int)
func PruneSpellVMs ¶
func PruneSpellVMs(instanceIds ...int)
func RaiseEvent ¶
func SendBroadcast ¶
func SendBroadcast(message string)
func SendRoomExitsMessage ¶
func SendRoomMessage ¶
func SendUserMessage ¶
func TryBuffCommand ¶
func TryBuffScriptEvent ¶
func TryItemScriptEvent ¶
func TryMobCommand ¶
func TryMobScriptEvent ¶
func TryPlayerDownedEvent ¶
func TryRoomIdleEvent ¶
func TryRoomScriptEvent ¶
func TrySpellScriptEvent ¶
func TrySpellScriptEvent(eventName string, sourceUserId int, sourceMobInstanceId int, spellAggro characters.SpellAggroInfo) (bool, error)
func UtilApplyColorPattern ¶
func UtilDiceRoll ¶
func UtilGetConfig ¶
func UtilGetMinutesToRounds ¶
func UtilGetMinutesToTurns ¶
func UtilGetRoundNumber ¶
func UtilGetRoundNumber() uint64
////////////////////////////////////////////////////////
These functions get exported to the scripting engine ¶
////////////////////////////////////////////////////////
func UtilGetSecondsToRounds ¶
func UtilGetSecondsToTurns ¶
func UtilGetTime ¶
func UtilGetTimeString ¶
func UtilGetTimeString() string
func UtilLocateUser ¶
func UtilSetTime ¶
func UtilSetTimeDay ¶
func UtilSetTimeDay()
func UtilSetTimeNight ¶
func UtilSetTimeNight()
func UtilStripPrepositions ¶
Types ¶
type ScriptActor ¶
type ScriptActor struct {
// contains filtered or unexported fields
}
func GetActor ¶
func GetActor(userId int, mobInstanceId int) *ScriptActor
////////////////////////////////////////////////////////
These functions get exported to the scripting engine ¶
////////////////////////////////////////////////////////
func GetMob ¶
func GetMob(mobInstanceId int) *ScriptActor
func GetUser ¶
func GetUser(userId int) *ScriptActor
func (ScriptActor) AddEventLog ¶
func (a ScriptActor) AddEventLog(category string, message string)
func (ScriptActor) AddGold ¶
func (a ScriptActor) AddGold(amt int, bankAmt ...int)
func (ScriptActor) AddHealth ¶
func (a ScriptActor) AddHealth(amt int) int
func (ScriptActor) AddMana ¶
func (a ScriptActor) AddMana(amt int) int
func (ScriptActor) CancelBuffWithFlag ¶
func (a ScriptActor) CancelBuffWithFlag(buffFlag string) bool
func (ScriptActor) ChangeAlignment ¶
func (a ScriptActor) ChangeAlignment(alignmentChange int)
func (ScriptActor) CharmExpire ¶
func (a ScriptActor) CharmExpire()
func (ScriptActor) CharmRemove ¶
func (a ScriptActor) CharmRemove()
func (ScriptActor) CharmSet ¶
func (a ScriptActor) CharmSet(userId int, charmRounds int, onRevertCommand ...string)
func (ScriptActor) Command ¶
func (a ScriptActor) Command(cmd string, waitSeconds ...float64)
func (ScriptActor) CommandFlagged ¶
func (a ScriptActor) CommandFlagged(cmd string, flags events.EventFlag, waitSeconds ...float64)
func (ScriptActor) GetAlignment ¶
func (a ScriptActor) GetAlignment() int
func (ScriptActor) GetAlignmentName ¶
func (a ScriptActor) GetAlignmentName() string
func (ScriptActor) GetBackpackItems ¶
func (a ScriptActor) GetBackpackItems() []ScriptItem
func (ScriptActor) GetChanceToTame ¶
func (a ScriptActor) GetChanceToTame(target ScriptActor) int
func (ScriptActor) GetCharacterName ¶
func (a ScriptActor) GetCharacterName(wrapInTags bool) string
func (ScriptActor) GetCharmCount ¶
func (a ScriptActor) GetCharmCount() int
func (ScriptActor) GetCharmedUserId ¶
func (a ScriptActor) GetCharmedUserId() int
func (ScriptActor) GetHealth ¶
func (a ScriptActor) GetHealth() int
func (ScriptActor) GetHealthMax ¶
func (a ScriptActor) GetHealthMax() int
func (ScriptActor) GetHealthPct ¶
func (a ScriptActor) GetHealthPct() float64
func (ScriptActor) GetLastInputRound ¶
func (a ScriptActor) GetLastInputRound() uint64
func (ScriptActor) GetLevel ¶
func (a ScriptActor) GetLevel() int
func (ScriptActor) GetMana ¶
func (a ScriptActor) GetMana() int
func (ScriptActor) GetManaMax ¶
func (a ScriptActor) GetManaMax() int
func (ScriptActor) GetManaPct ¶
func (a ScriptActor) GetManaPct() float64
func (ScriptActor) GetMaxCharmCount ¶
func (a ScriptActor) GetMaxCharmCount() int
func (ScriptActor) GetMiscCharacterData ¶
func (a ScriptActor) GetMiscCharacterData(key string) any
func (ScriptActor) GetMiscCharacterDataKeys ¶
func (a ScriptActor) GetMiscCharacterDataKeys(prefixMatches ...string) []string
func (ScriptActor) GetMobKills ¶
func (a ScriptActor) GetMobKills(mobId int) int
func (ScriptActor) GetPartyMembers ¶
func (a ScriptActor) GetPartyMembers() []ScriptActor
func (ScriptActor) GetPet ¶
func (a ScriptActor) GetPet() *pets.Pet
func (ScriptActor) GetRace ¶
func (a ScriptActor) GetRace() string
func (ScriptActor) GetRaceKills ¶
func (a ScriptActor) GetRaceKills(race string) int
func (ScriptActor) GetRoomId ¶
func (a ScriptActor) GetRoomId() int
func (ScriptActor) GetSize ¶
func (a ScriptActor) GetSize() string
func (ScriptActor) GetSkillLevel ¶
func (a ScriptActor) GetSkillLevel(skillName string) int
func (ScriptActor) GetStat ¶
func (a ScriptActor) GetStat(statName string) int
func (ScriptActor) GetStatMod ¶
func (a ScriptActor) GetStatMod(statModName string) int
func (ScriptActor) GetStatPoints ¶
func (a ScriptActor) GetStatPoints() int
func (ScriptActor) GetTameMastery ¶
func (a ScriptActor) GetTameMastery() map[int]int
func (ScriptActor) GetTempData ¶
func (a ScriptActor) GetTempData(key string) any
func (ScriptActor) GetTrainingPoints ¶
func (a ScriptActor) GetTrainingPoints() int
func (ScriptActor) GiveBuff ¶
func (a ScriptActor) GiveBuff(buffId int, source string)
func (ScriptActor) GiveExtraLife ¶
func (a ScriptActor) GiveExtraLife()
func (ScriptActor) GiveItem ¶
func (a ScriptActor) GiveItem(itm any)
func (ScriptActor) GiveQuest ¶
func (a ScriptActor) GiveQuest(questId string)
func (ScriptActor) GiveStatPoints ¶
func (a ScriptActor) GiveStatPoints(ct int)
func (ScriptActor) GiveTrainingPoints ¶
func (a ScriptActor) GiveTrainingPoints(ct int)
func (ScriptActor) GrantXP ¶
func (a ScriptActor) GrantXP(xpAmt int, reason string)
func (ScriptActor) HasBuff ¶
func (a ScriptActor) HasBuff(buffId int) bool
func (ScriptActor) HasBuffFlag ¶
func (a ScriptActor) HasBuffFlag(buffFlag string) bool
func (ScriptActor) HasQuest ¶
func (a ScriptActor) HasQuest(questId string) bool
func (ScriptActor) HasSpell ¶
func (a ScriptActor) HasSpell(spellId string) bool
func (ScriptActor) InstanceId ¶
func (a ScriptActor) InstanceId() int
func (ScriptActor) IsAggro ¶
func (a ScriptActor) IsAggro(actor ScriptActor) bool
func (ScriptActor) IsCharmed ¶
func (a ScriptActor) IsCharmed(userId ...int) bool
Returns true if a mob is charmed by/friendly to a player. If userId is ommitted, it will return true if the mob is charmed by any player.
func (ScriptActor) IsHome ¶
func (a ScriptActor) IsHome() bool
func (ScriptActor) IsTameable ¶
func (a ScriptActor) IsTameable() bool
func (ScriptActor) LearnSpell ¶
func (a ScriptActor) LearnSpell(spellId string) bool
func (ScriptActor) MobTypeId ¶
func (a ScriptActor) MobTypeId() int
func (ScriptActor) MoveRoom ¶
func (a ScriptActor) MoveRoom(destRoomId int, leaveCharmedMobs ...bool)
func (ScriptActor) Pathing ¶
func (a ScriptActor) Pathing() bool
func (ScriptActor) PathingAtWaypoint ¶
func (a ScriptActor) PathingAtWaypoint() bool
func (ScriptActor) RemoveBuff ¶
func (a ScriptActor) RemoveBuff(buffId int) bool
Remove a buff silently
func (ScriptActor) SendText ¶
func (a ScriptActor) SendText(msg string)
func (ScriptActor) SetAdjective ¶
func (a ScriptActor) SetAdjective(adj string, addIt bool)
func (ScriptActor) SetCharacterName ¶
func (a ScriptActor) SetCharacterName(newName string)
func (ScriptActor) SetHealth ¶
func (a ScriptActor) SetHealth(amt int)
func (ScriptActor) SetMiscCharacterData ¶
func (a ScriptActor) SetMiscCharacterData(key string, value any)
func (ScriptActor) SetTameMastery ¶
func (a ScriptActor) SetTameMastery(mobId int, newSkillLevel int)
func (ScriptActor) SetTempData ¶
func (a ScriptActor) SetTempData(key string, value any)
func (ScriptActor) ShorthandId ¶
func (a ScriptActor) ShorthandId() string
func (ScriptActor) Sleep ¶
func (a ScriptActor) Sleep(seconds int)
func (ScriptActor) TakeItem ¶
func (a ScriptActor) TakeItem(itm ScriptItem)
func (ScriptActor) TimerExists ¶
func (a ScriptActor) TimerExists(name string) bool
func (ScriptActor) TimerExpired ¶
func (a ScriptActor) TimerExpired(name string) bool
func (ScriptActor) TimerSet ¶
func (a ScriptActor) TimerSet(name string, period string)
func (ScriptActor) TrainSkill ¶
func (a ScriptActor) TrainSkill(skillName string, skillLevel int) bool
func (ScriptActor) Uncurse ¶
func (a ScriptActor) Uncurse() []*ScriptItem
func (ScriptActor) UpdateItem ¶
func (a ScriptActor) UpdateItem(itm ScriptItem)
func (ScriptActor) UserId ¶
func (a ScriptActor) UserId() int
type ScriptItem ¶
type ScriptItem struct {
// contains filtered or unexported fields
}
func CreateItem ¶
func CreateItem(itemId int) *ScriptItem
CreateItem creates a NEW instance of an item by id
func GetItem ¶
func GetItem(i items.Item) *ScriptItem
Converts an item into a ScriptItem for use in the scripting engine
func (ScriptItem) AddUsesLeft ¶
func (i ScriptItem) AddUsesLeft(amount int) int
func (ScriptItem) GetLastUsedRound ¶
func (i ScriptItem) GetLastUsedRound() uint64
func (ScriptItem) GetTempData ¶
func (i ScriptItem) GetTempData(key string) any
func (ScriptItem) GetUsesLeft ¶
func (i ScriptItem) GetUsesLeft() int
func (ScriptItem) ItemId ¶
func (i ScriptItem) ItemId() int
func (ScriptItem) MarkLastUsed ¶
func (i ScriptItem) MarkLastUsed(clear ...bool) uint64
func (ScriptItem) Name ¶
func (i ScriptItem) Name(simpleVersion ...bool) string
func (ScriptItem) NameComplex ¶
func (i ScriptItem) NameComplex() string
func (ScriptItem) NameSimple ¶
func (i ScriptItem) NameSimple() string
func (ScriptItem) Redescribe ¶
func (i ScriptItem) Redescribe(newDescription string)
func (ScriptItem) Rename ¶
func (i ScriptItem) Rename(newName string, displayNameOrStyle ...string)
func (ScriptItem) SetTempData ¶
func (i ScriptItem) SetTempData(key string, value any)
func (ScriptItem) SetUsesLeft ¶
func (i ScriptItem) SetUsesLeft(amount int) int
func (ScriptItem) ShorthandId ¶
func (i ScriptItem) ShorthandId() string
type ScriptRoom ¶
type ScriptRoom struct {
// contains filtered or unexported fields
}
func GetRoom ¶
func GetRoom(roomId int) *ScriptRoom
func (ScriptRoom) AddMutator ¶
func (r ScriptRoom) AddMutator(mutName string)
func (ScriptRoom) AddTemporaryExit ¶
func (ScriptRoom) DestroyItem ¶
func (r ScriptRoom) DestroyItem(itm ScriptItem)
func (ScriptRoom) GetAllActors ¶
func (r ScriptRoom) GetAllActors() []*ScriptActor
func (ScriptRoom) GetContainers ¶
func (r ScriptRoom) GetContainers() []string
func (ScriptRoom) GetExits ¶
func (r ScriptRoom) GetExits() []map[string]any
func (ScriptRoom) GetItems ¶
func (r ScriptRoom) GetItems() []ScriptItem
func (ScriptRoom) GetMob ¶
func (r ScriptRoom) GetMob(mobId int, createIfMissing ...bool) *ScriptActor
Get the first mob of the MobId type provided.
func (ScriptRoom) GetMobs ¶
func (r ScriptRoom) GetMobs(mobId ...int) []*ScriptActor
Optionally can provide a MobId to look for
func (ScriptRoom) GetPermData ¶
func (r ScriptRoom) GetPermData(key string) any
func (ScriptRoom) GetPlayers ¶
func (r ScriptRoom) GetPlayers() []*ScriptActor
func (ScriptRoom) GetTempData ¶
func (r ScriptRoom) GetTempData(key string) any
func (ScriptRoom) HasMutator ¶
func (r ScriptRoom) HasMutator(mutName string) bool
func (ScriptRoom) HasQuest ¶
func (r ScriptRoom) HasQuest(questId string, partyUserId ...int) []int
Returns a list of userIds found to have the questId if userIdParty is specified, will only check users in the party of the user.
func (ScriptRoom) IsEphemeral ¶
func (r ScriptRoom) IsEphemeral() bool
func (ScriptRoom) IsLocked ¶
func (r ScriptRoom) IsLocked(exitName string) bool
func (ScriptRoom) MissingQuest ¶
func (r ScriptRoom) MissingQuest(questId string, partyUserId ...int) []int
Returns a list of userIds found to NOT have the questId if userIdParty is specified, will only check users in the party of the user.
func (ScriptRoom) RemoveMutator ¶
func (r ScriptRoom) RemoveMutator(mutName string)
func (ScriptRoom) RemoveTemporaryExit ¶
func (r ScriptRoom) RemoveTemporaryExit(exitNameSimple string, exitNameFancy string, exitRoomId int) bool
func (ScriptRoom) RepeatSpawnItem ¶
func (r ScriptRoom) RepeatSpawnItem(itemId int, roundFrequency int, containerName ...string) bool
func (ScriptRoom) RoomId ¶
func (r ScriptRoom) RoomId() int
func (ScriptRoom) RoomIdSource ¶
func (r ScriptRoom) RoomIdSource() int
func (ScriptRoom) SendText ¶
func (r ScriptRoom) SendText(msg string, excludeIds ...int)
func (ScriptRoom) SendTextToExits ¶
func (r ScriptRoom) SendTextToExits(msg string, isQuiet bool, excludeUserIds ...int)
func (ScriptRoom) SetLocked ¶
func (r ScriptRoom) SetLocked(exitName string, lockIt bool)
func (ScriptRoom) SetPermData ¶
func (r ScriptRoom) SetPermData(key string, value any)
func (ScriptRoom) SetTempData ¶
func (r ScriptRoom) SetTempData(key string, value any)
func (ScriptRoom) SpawnItem ¶
func (r ScriptRoom) SpawnItem(itemId int, inStash bool)
func (ScriptRoom) SpawnMob ¶
func (r ScriptRoom) SpawnMob(mobId int) *ScriptActor
type TextWrapperStyle ¶
type TextWrapperStyle struct { Fg string // ansi class name for foreground Bg string // ansi class name for background ColorPattern string // optional color pattern // contains filtered or unexported fields }
func (*TextWrapperStyle) AnsiClass ¶
func (t *TextWrapperStyle) AnsiClass() string
func (*TextWrapperStyle) Empty ¶
func (t *TextWrapperStyle) Empty() bool
func (*TextWrapperStyle) Reset ¶
func (t *TextWrapperStyle) Reset()
func (*TextWrapperStyle) Set ¶
func (t *TextWrapperStyle) Set(fg string, bg string, colorpattern string, colorStyle ...colorpatterns.ColorizeStyle)
func (*TextWrapperStyle) Wrap ¶
func (t *TextWrapperStyle) Wrap(str string) string