gostealthclient

package module
v0.0.0-...-e5a3c4b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2022 License: MIT Imports: 10 Imported by: 7

README

Go wrapper for Ultima Online StealthClient

This repository is currently in WIP state

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddChatUserIgnore

func AddChatUserIgnore(user string)

func AddGumpIgnoreByID

func AddGumpIgnoreByID(ID uint32)
func GetGumpInfo(GumpIndex){
    data = _get_gump_info(GumpIndex)
}
values = _struct.unpack_from(_Gump.fmt, data, 0)
result = dict(zip(_Gump.keys, values))
offset = _struct.calcsize(_Gump.fmt)
# parse elements
elements = (_Group, _EndGroup, _GumpButton, _ButtonTileArt, _CheckBox,
            _ChekerTrans, _CroppedText, _GumpPic, _GumpPicTiled,
            _Radiobutton, _ResizePic, _GumpText, _TextEntry, _Text,
            _TextEntryLimited, _TilePic, _TilePicHue, _Tooltip,
            _HtmlGump, _XmfHtmlGump, _XmfHTMLGumpColor, _XmfHTMLTok,
            _ItemProperty)
for cls in elements:
    result[cls.container] = []
    count = _uint.from_buffer(data, offset)
    offset += count.size
    for i in range(count):
        values = []
        for arg in cls.args:
            element = arg.from_buffer(data, offset)
            offset += element.size
            values.append(element.value)
        if cls is _Text:
            result[cls.container].append(
                *[values])  # there is only one element
        else:
            element = dict(zip(cls.keys, values))
            if 'ClilocID' in cls.keys and 'Arguments' in cls.keys:  # need to represent clilocs
                text = GetClilocByID(element['ClilocID'])
                args = element.get('Arguments', '')
                args = args.split('@')[1:] or []
                for arg in args:
                    if '~' in text:
                        if arg.startswith('#'):  # another cliloc
                            arg = GetClilocByID(int(arg.strip('#')))
                        s = text.index('~')
                        e = text.index('~', s + 1)
                        text = text.replace(text[s:e + 1], arg,
                                            1) or arg  # TODO: wtf?
                element['Arguments'] = text
            result[cls.container].append(element)return result

func AddGumpIgnoreBySerial

func AddGumpIgnoreBySerial(Serial uint32)

func AddJournalIgnore

func AddJournalIgnore(str string)

func AddToJournal

func AddToJournal(msg string)

func AddToSystemJournal

func AddToSystemJournal(text string)

func Alarm

func Alarm()

func Armor

func Armor() <-chan uint16

func ArmsLayer

func ArmsLayer() byte

func Attack

func Attack(attackedID uint32)

func AutoBuy

func AutoBuy(itemType, itemColor, quantity uint16)

func AutoBuyEx

func AutoBuyEx(itemType, itemColor, quantity uint16, price uint32, itemName string)

func AutoMenu

func AutoMenu(menuCaption, elementCaption string)

func AutoSell

func AutoSell(itemType, itemColor, quantity uint16)

func BM

func BM() uint16

func BMCount

func BMCount() <-chan uint32

func BP

func BP() uint16

func BPCount

func BPCount() <-chan uint32

func Backpack

func Backpack() <-chan uint32

func BandageSelf

func BandageSelf()

func BankLayer

func BankLayer() byte

func BeardLayer

func BeardLayer() byte

func BookClearText

func BookClearText()

func BookGetPageText

func BookGetPageText(page uint16) <-chan string

func BookSetHeader

func BookSetHeader(title, author string)

func BookSetPageText

func BookSetPageText(page uint16, text string)

func BookSetText

func BookSetText(text string)

func Bootstrap

func Bootstrap(script func() interface{}) interface{}

Main method for script setup Accepts as argument func with script

func Bow

func Bow()

func BpackLayer

func BpackLayer() byte

func BraceLayer

func BraceLayer() byte

func CancelAllMenuHooks

func CancelAllMenuHooks()

func CancelMenu

func CancelMenu()

func CancelTarget

func CancelTarget()

func CancelTrade

func CancelTrade(tradeNum byte) <-chan bool

func CancelWaitTarget

func CancelWaitTarget()

func Cast

func Cast(spellName string)

func CastToObj

func CastToObj(spellName string, oid uint32)

func ChangeProfile

func ChangeProfile(profileName string) <-chan int32

func ChangeProfileEx

func ChangeProfileEx(pName, shardName, charName string) <-chan uint16

func ChangeSkillLockState

func ChangeSkillLockState(skillName string, skillState byte)

func CharName

func CharName() <-chan string

func CheckLag

func CheckLag(timeoutMS uint32) <-chan bool

func ClearBadLocationList

func ClearBadLocationList()

func ClearBadObjectList

func ClearBadObjectList()

func ClearChatUserIgnore

func ClearChatUserIgnore()

func ClearContextMenu

func ClearContextMenu()

_get_context_menu = _ScriptMethod(195) # GetContextMenu _get_context_menu.restype = _buffer

func GetContextMenu(){
    result = []
}
data = _get_context_menu()
count = _uint.from_buffer(data)
offset = count.size
while 42:
    if offset >= len(data) - 1:
        break
    string = _str.from_buffer(data, offset)
    offset += string.size
    result.append(string.value)return result

_get_context_menu_record = _ScriptMethod(345) # GetContextMenuRec _get_context_menu_record.restype = _buffer # TODO: What is this do?

func GetContextMenuRec(){
    """
}
fmt = 'HH'
data = _get_context_menu_record()
keys = 'Tag', 'Flags'
serial, count, tmp = _struct.unpack('>IBI', data[:9])
l = []
for i in range(count):
    l.append(_struct.unpack('HHIHH', data[9+i*12:9+i*12+12]))
"""return None

func ClearGumpsIgnore

func ClearGumpsIgnore()

func ClearInfoWindow

func ClearInfoWindow()

func ClearJournal

func ClearJournal()

func ClearJournalIgnore

func ClearJournalIgnore()

func ClearShopList

func ClearShopList()

func ClearSystemJournal

func ClearSystemJournal()

func ClickOnObject

func ClickOnObject(ObjectID uint32)

func ClientHide

func ClientHide(ID uint32) <-chan bool

func ClientPrint

func ClientPrint(text string)

_get_lands_array = _ScriptMethod(287) # GetLandTilesArray _get_lands_array.restype = _buffer # Array of TFoundTile _get_lands_array.argtypes = [_ushort, # Xmin

_ushort,  # Ymin
_ushort,  # Xmax
_ushort,  # Ymax
_ubyte,  # WorldNum
_uint,  # Len
_buffer]  # TileTypes: Array of Word
func GetLandTilesArray(Xmin, Ymin, Xmax, Ymax, WorldNum, TileTypes){
    if not _iterable(TileTypes):
}
    TileTypes = [TileTypes]
result = []
data = _get_lands_array(
    Xmin, Ymin, Xmax, Ymax, WorldNum, len(TileTypes),
    _struct.pack('<' + 'H' * len(TileTypes), *TileTypes)
)
count = _uint.from_buffer(data)
fmt = '<3Hb'
size = _struct.calcsize(fmt)
for i in range(count):
    result.append(_struct.unpack_from(fmt, data, count.size + i * size))return result

func ClientPrintEx

func ClientPrintEx(senderID uint32, color, font uint16, text string)

func ClientRequestObjectTarget

func ClientRequestObjectTarget()

_wnd = {0: 0, '0': 0, 'wtpaperdoll': 0, 'paperdoll': 0,

1: 1, '1': 1, 'wtstatus': 1, 'status': 1,
2: 2, '2': 2, 'wtcharprofile': 2, 'charprofile': 2, 'profile': 2,
3: 3, '3': 3, 'wtcontainer': 3, 'container': 3}_close_client_ui_window = _ScriptMethod(291)  # CloseClientUIWindow

_close_client_ui_window.argtypes = [_ubyte, # UIWindowType

_uint]  # ID
func CloseClientUIWindow(UIWindowType, ID){
    if isinstance(UIWindowType, str):
}
    UIWindowType = UIWindowType.lower()
if UIWindowType not in _wnd.keys():
    raise ValueError('CloseClientUIWindow: UIWindowType must be '
                     '"Paperdoll", "Status", "CharProfile" or "Container"')
_close_client_ui_window(_wnd[UIWindowType], ID)

func ClientRequestTileTarget

func ClientRequestTileTarget()

func ClientTargetResponse

func ClientTargetResponse() <-chan m.TargetInfo

func ClientTargetResponsePresent

func ClientTargetResponsePresent() <-chan bool

func CloakLayer

func CloakLayer() byte

func CloseClientGump

func CloseClientGump(iD uint32)
func GetMenuItemsEx(MenuCaption){
    """
}
    GetMenuItemsEx(MenuCaption: str) => Array of MenuItems    MenuItems:
        model: int (item type i guess)
        color: int
        text: str    Example:
        menu_items = GetMenuItemsEx('Inscription items')
        print(menu_items[0].text)
        >> 1 Blank scroll
    """    class MenuItems:
        model = None
        color = None
        text = None        func __str__(self){
            template = 'Model: {0}, Color: {1}, Text: {2}'
}
p :=

return '{ ' + template.format(hex(self.model), hex(self.color),

                                          self.text) + ' }'        func __repr__(self){return self.__str__()
}    data = _get_menu_items_ex(MenuCaption)
result = []
count = _struct.unpack_from('<I', data, 0)
offset = count.size
while offset < len(data):
    model, color = _struct.unpack_from('<HH', data, offset)
    offset += 4
    text = _str.from_buffer(data, offset)
    offset += text.size        item = MenuItems()
    item.model = model
    item.color = color
    item.text = text.valuereturn result

func CloseMenu

func CloseMenu()

func CloseSimpleGump

func CloseSimpleGump(GumpIndex uint16)

func ColdResist

func ColdResist() <-chan uint16

func ConfirmTrade

func ConfirmTrade(tradeNum byte)

func Connect

func Connect()

func Connected

func Connected() <-chan bool

func ConnectedTime

func ConnectedTime() <-chan time.Time

func ConsoleEntryReply

func ConsoleEntryReply(text string)

_reg_stealth = 0, '0', 'reg_stealth', 'stealth' _reg_char = 1, '1', 'reg_char', 'char' _set_global = _ScriptMethod(310) # SetGlobal _set_global.argtypes = [_ubyte, # GlobalRegion

_str,  # VarName
_str]  # VarValue
func SetGlobal(GlobalRegion, VarName, VarValue){
    if isinstance(GlobalRegion, str):
}
    GlobalRegion = GlobalRegion.lower()
for region in _reg_stealth, _reg_char:
    if GlobalRegion in region:
        _set_global(region[0], VarName, VarValue)
        break
else:
    raise ValueError('GlobalRegion must be "stealth" or "char".')

_get_global = _ScriptMethod(311) _get_global.restype = _str _get_global.argtypes = [_ubyte, # GlobalRegion

_str]  # VarName
func GetGlobal(GlobalRegion, VarName){
    if isinstance(GlobalRegion, str):
}
    GlobalRegion = GlobalRegion.lower()
for region in _reg_stealth, _reg_char:
    if GlobalRegion in region:
        p :=

return _get_global(region[0], VarName)

else:
    raise ValueError('GlobalRegion must be "stealth" or "char".')

func ConsoleEntryUnicodeReply

func ConsoleEntryUnicodeReply(text string)

func CurrentScriptPath

func CurrentScriptPath() string

func Dead

func Dead() <-chan bool

func Dex

func Dex() <-chan uint32

func Disconnect

func Disconnect()

func DisconnectedTime

func DisconnectedTime() <-chan time.Time

func DragItem

func DragItem(oid uint32, count int32) <-chan bool

func Drop

func Drop(oid uint32, count, x, y, z int32) <-chan bool

func DropHere

func DropHere(oid uint32) <-chan bool

func DropItem

func DropItem(container uint32, x, y, z int32) <-chan bool

func EarLayer

func EarLayer() byte

func EggsLayer

func EggsLayer() byte

func EmptyContainer

func EmptyContainer(container, destContainer, delayMs uint32) <-chan bool

func EnergyResist

func EnergyResist() <-chan uint16

func EquipItemsSetMacro

func EquipItemsSetMacro()

func EquipLastWeapon

func EquipLastWeapon()

func FillNewWindow

func FillNewWindow(s string)

func FindAtCoord

func FindAtCoord(x, y uint16) <-chan uint32

func FindCount

func FindCount() <-chan uint32

func FindFullQuantity

func FindFullQuantity() <-chan uint32

func FindItem

func FindItem() <-chan uint32

func FindNotoriety

func FindNotoriety(objType uint16, notoriety byte) <-chan uint32

func FindQuantity

func FindQuantity() <-chan uint32

func FindType

func FindType(objType uint16, container uint32) <-chan uint32

func FindTypeEx

func FindTypeEx(objType, objColor uint16, container uint32, inSub bool) <-chan uint32

func FindTypesArrayEx

func FindTypesArrayEx(objTypes, colors []uint16, containers []uint32, inSub bool) <-chan uint32

Ищет по заданному массиву типов ObjTypes и массиву цветов Colors в массиве контейнеров Containers. Если InSub включено, то поиск будет осуществляться в сабконтейнерах (рекурсивно). Внутри метод перебором проходит через все типы\цвета\контейнеры и выполняет обычный Findtypeex.

Example 1 - ищет на земле заданные типы (животные, чаты и т.д.):

FindDistance := 20; FindVertical := 10; FindTypesArrayEx([$29A, $29B, $190, $191, $25d, $25e, $192, $193, $25f, $260, $2ea, $2ec, $2ed, $84, $f6, $19, $db, $51, $7a, $2ee, $2e8, $2e9, $2eb, $117, $116, $115],[$FFFF],Ground,false); AddToSystemJournal('FindCount = ' + IntToStr(FindCount));

func FireResist

func FireResist() <-chan uint16

func FoundedParamID

func FoundedParamID() <-chan uint32

func GA

func GA() uint16

func GACount

func GACount() <-chan uint32

func GS

func GS() uint16

func GSCount

func GSCount() <-chan uint32

func GameServerIPString

func GameServerIPString() <-chan string

func GetARStatus

func GetARStatus() <-chan bool

func GetActiveAbility

func GetActiveAbility() <-chan string

func GetAltName

func GetAltName(oid uint32) <-chan string

func GetAutoBuyDelay

func GetAutoBuyDelay() <-chan uint16

func GetAutoSellDelay

func GetAutoSellDelay() <-chan uint16

func GetBuffBarInfo

func GetBuffBarInfo() <-chan m.BuffBarInfo

func GetCell

func GetCell(x, y uint16, worldNum byte) <-chan m.MapCell

func GetCharTitle

func GetCharTitle() <-chan string

func GetClientVersionInt

func GetClientVersionInt() <-chan uint32

func GetCliloc

func GetCliloc(oid uint32) <-chan string

func GetClilocByID

func GetClilocByID(oid uint32) <-chan string

_get_tooltip_obj = _ScriptMethod(152) # GetToolTipRec _get_tooltip_obj.restype = _buffer # Array of TClilocRec _get_tooltip_obj.argtypes = [_uint] # ObjID

func GetTooltipRec(ObjID){
    result = []
}
data = _get_tooltip_obj(ObjID)
count = _uint.from_buffer(data)
offset = 4
for i in range(count):
    cliloc, length = _struct.unpack_from('<iI', data, offset)
    offset += 8
    strings = []
    for j in range(length):
        string = _str.from_buffer(data, offset)
        offset += _struct.calcsize(string.fmt)
        strings.append(string.value)
    result.append({'Cliloc_ID': cliloc, 'Params': strings})return result

func GetColor

func GetColor(oid uint32) <-chan uint16

func GetDex

func GetDex(oid uint32) <-chan int32

func GetDirection

func GetDirection(oid uint32) <-chan byte

func GetDistance

func GetDistance(oid uint32) <-chan int32

func GetDressSpeed

func GetDressSpeed() <-chan uint16
func Disarm(){
    backpack = Backpack()
}
tmp = []
for layer in LhandLayer(), RhandLayer():
    item = ObjAtLayer(layer)
    if item:
        tmp.append(MoveItem(item, 1, backpack, 0, 0, 0))
p :=

return all(tmp) func disarm(){return Disarm() }

func Equip(Layer, Obj){
    if Layer and DragItem(Obj, 1):
}
p :=

return WearItem(Layer, Obj)return False

func equip(Layer, Obj){
    p :=

return Equip(Layer, Obj) }

func Equipt(Layer, ObjType){
    item = FindType(ObjType, Backpack())
}
if item:
    p :=

return Equip(Layer, item)return False

func equipt(Layer, ObjType){
    p :=

return Equipt(Layer, ObjType) }

func UnEquip(Layer){
    item = ObjAtLayer(Layer)
}
if item:
    p :=

return MoveItem(item, 1, Backpack(), 0, 0, 0)return False

func GetDropCheckCoord

func GetDropCheckCoord() <-chan bool

func GetDropDelay

func GetDropDelay() <-chan uint32

func GetExtInfo

func GetExtInfo() <-chan m.ExtendedInfo

func GetFindDistance

func GetFindDistance() <-chan uint32

func GetFindInNulPoint

func GetFindInNulPoint() <-chan bool

func GetFindVertical

func GetFindVertical() <-chan uint32

func GetFoundList

func GetFoundList() <-chan []uint32

func GetGlobal

func GetGlobal(varRegion byte, varName string) <-chan string

func GetGumpID

func GetGumpID(gumpIndex uint16) <-chan uint32

func GetGumpInfo

func GetGumpInfo(gi uint16) chan m.Gump

_get_gump_text = _ScriptMethod(225) # GetGumpTextLines _get_gump_text.restype = _buffer _get_gump_text.argtypes = [_ushort] # GumpIndex

func GetGumpTextLines(GumpIndex){
    result = []
}
data = _get_gump_text(GumpIndex)
count = _uint.from_buffer(data)
offset = count.size
while 42:
    if offset >= len(data) - 1:
        break
    string = _str.from_buffer(data, offset)
    offset += string.size
    result.append(string.value)return result

_get_gump_full_lines = _ScriptMethod(226) # GetGumpFullLines _get_gump_full_lines.restype = _buffer _get_gump_full_lines.argtypes = [_ushort] # GumpIndex

func GetGumpFullLines(GumpIndex){
    result = []
}
data = _get_gump_full_lines(GumpIndex)
count = _uint.from_buffer(data)
offset = count.size
while 42:
    if offset >= len(data) - 1:
        break
    string = _str.from_buffer(data, offset)
    offset += string.size
    result.append(string.value)return result

_get_gump_short_lines = _ScriptMethod(227) # GetGumpShortLines _get_gump_short_lines.restype = _buffer _get_gump_short_lines.argtypes = [_ushort] # GumpIndex

func GetGumpShortLines(GumpIndex){
    result = []
}
data = _get_gump_short_lines(GumpIndex)
count = _uint.from_buffer(data)
offset = count.size
while 42:
    if offset >= len(data) - 1:
        break
    string = _str.from_buffer(data, offset)
    offset += string.size
    result.append(string.value)return result

_get_gump_buttons = _ScriptMethod(228) # GetGumpButtonsDescription _get_gump_buttons.restype = _buffer _get_gump_buttons.argtypes = [_ushort] # GumpIndex

func GetGumpButtonsDescription(GumpIndex){
    result = []
}
data = _get_gump_buttons(GumpIndex)
count = _uint.from_buffer(data)
offset = count.size
while 42:
    if offset >= len(data) - 1:
        break
    string = _str.from_buffer(data, offset)
    offset += string.size
    result.append(string.value)return result

_get_gump_info = _ScriptMethod(229) # GetGumpInfo _get_gump_info.restype = _buffer # TGumpInfo _get_gump_info.argtypes = [_ushort] # GumpIndex class _Group:

args = [_int] * 3
container = 'groups'
keys = 'GroupNumber', 'Page', 'ElemNum'

class _EndGroup(_Group):

container = 'EndGroups'

class _GumpButton:

args = [_int] * 9
container = 'GumpButtons'
keys = ('X', 'Y', 'ReleasedID', 'PressedID', 'Quit', 'PageID',returnValue', 'Page', 'ElemNum')

class _ButtonTileArt:

args = [_int] * 12
container = 'ButtonTileArts'
keys = ('X', 'Y', 'ReleasedID', 'PressedID', 'Quit', 'PageID',returnValue', 'ArtID', 'Hue', 'ArtX', 'ArtY', 'ElemNum')

class _CheckBox:

args = [_int] * 8
container = 'CheckBoxes'returnValue',
        'Page', 'ElemNum')

class _ChekerTrans:

args = [_int] * 6
container = 'ChekerTrans'
keys = 'X', 'Y', 'Width', 'Height', 'Page', 'ElemNum'

class _CroppedText:

args = [_int] * 8
container = 'CroppedText'
keys = 'X', 'Y', 'Width', 'Height', 'Color', 'TextID', 'Page', 'ElemNum'

class _GumpPic:

args = [_int] * 6
container = 'GumpPics'
keys = 'X', 'Y', 'ID', 'Hue', 'Page', 'ElemNum'

class _GumpPicTiled:

fmt = '=7i'
args = [_int] * 7
container = 'GumpPicTiled'
keys = 'X', 'Y', 'Width', 'Height', 'GumpID', 'Page', 'ElemNum'

class _Radiobutton:

args = [_int] * 8
container = 'RadioButtons'returnValue',
        'Page', 'ElemNum')

class _ResizePic:

args = [_int] * 7
container = 'ResizePics'
keys = 'X', 'Y', 'GumpID', 'Width', 'Height', 'Page', 'ElemNum'

class _GumpText:

args = [_int] * 6
container = 'GumpText'
keys = 'X', 'Y', 'Color', 'TextID', 'Page', 'ElemNum'

class _TextEntry:

args = [_int] * 7 + [_str, _int, _int]
container = 'TextEntries'returnValue',
        'DefaultTextID', 'RealValue', 'Page', 'ElemNum')

class _Text:

args = [_str]
container = 'Text'
keys = None

class _TextEntryLimited:

args = [_int] * 10
container = 'TextEntriesLimited'returnValue',
        'DefaultTextID', 'Limit', 'Page', 'ElemNum')

class _TilePic:

args = [_int] * 5
container = 'TilePics'
keys = 'X', 'Y', 'ID', 'Page', 'ElemNum'

class _TilePicHue:

args = [_int] * 6
container = 'TilePicHue'
keys = 'X', 'Y', 'ID', 'Color', 'Page', 'ElemNum'

class _Tooltip:

args = [_uint, _str, _int, _int]
container = 'Tooltips'
keys = 'ClilocID', 'Arguments', 'Page', 'ElemNum'

class _HtmlGump:

args = [_int] * 9
container = 'HtmlGump'
keys = ('X', 'Y', 'Width', 'Height', 'TextID', 'Background', 'Scrollbar',
        'Page', 'ElemNum')

class _XmfHtmlGump:

args = [_int] * 4 + [_uint] + [_int] * 4
container = 'XmfHtmlGump'
keys = ('X', 'Y', 'Width', 'Height', 'ClilocID', 'Background', 'Scrollbar',
        'Page', 'ElemNum')

class _XmfHTMLGumpColor:

args = [_int] * 4 + [_uint] + [_int] * 5
container = 'XmfHTMLGumpColor'
keys = ('X', 'Y', 'Width', 'Height', 'ClilocID', 'Background', 'Scrollbar',
        'Hue', 'Page', 'ElemNum')

class _XmfHTMLTok:

args = [_int] * 7 + [_uint, _str, _int, _int]
container = 'XmfHTMLTok'
keys = ('X', 'Y', 'Width', 'Height', 'Background', 'Scrollbar', 'Color',
        'ClilocID', 'Arguments', 'Page', 'ElemNum')

class _ItemProperty:

args = [_uint, _int]
container = 'ItemProperties'
keys = 'Prop', 'ElemNum'

class _Gump:

fmt = '<2I2hi4?'
args = [_uint, _uint, _short, _short, _int] + [_bool] * 4
keys = ('Serial', 'GumpID', 'X', 'Y', 'Pages', 'NoMove', 'NoResize',
        'NoDispose', 'NoClose')

func GetGumpSerial

func GetGumpSerial(gumpIndex uint16) <-chan uint32

func GetGumpsCount

func GetGumpsCount() <-chan uint16

func GetHP

func GetHP(oid uint32) <-chan int32

func GetIgnoreList

func GetIgnoreList() <-chan []uint32

func GetInt

func GetInt(oid uint32) <-chan int32

func GetLastStepQUsedDoor

func GetLastStepQUsedDoor() <-chan uint32

func GetLayer

func GetLayer(Obj uint32) <-chan byte

func GetLayerCount

func GetLayerCount(x, y uint16, worldNum byte) <-chan byte

func GetMana

func GetMana(oid uint32) <-chan int32

func GetMaxHP

func GetMaxHP(oid uint32) <-chan int32

func GetMaxMana

func GetMaxMana(ObjID uint32) <-chan int32

func GetMaxStam

func GetMaxStam(ObjID uint32) <-chan int32

func GetMoveBetweenTwoCorners

func GetMoveBetweenTwoCorners() <-chan bool

func GetMoveCheckStamina

func GetMoveCheckStamina() <-chan uint16

func GetMoveHeuristicMult

func GetMoveHeuristicMult() <-chan uint32

func GetMoveOpenDoor

func GetMoveOpenDoor() <-chan bool

func GetMoveThroughCorner

func GetMoveThroughCorner() <-chan bool

func GetMoveThroughNPC

func GetMoveThroughNPC() <-chan uint16

func GetMoveTurnCost

func GetMoveTurnCost() <-chan uint32

func GetMultis

func GetMultis() <-chan []m.Multi

func GetName

func GetName(oid uint32) <-chan string

func GetNextStepZ

func GetNextStepZ(currX, currY, destX, destY uint16, worldNum byte, currZ int8) <-chan int8

func GetNotoriety

func GetNotoriety(oid uint32) <-chan byte

func GetParent

func GetParent(oid uint32) <-chan uint32

func GetPauseScriptOnDisconnectStatus

func GetPauseScriptOnDisconnectStatus() <-chan bool

func GetPickupedItem

func GetPickupedItem() <-chan uint32

func GetPrice

func GetPrice(oid uint32) <-chan uint32

func GetQuantity

func GetQuantity(oid uint32) <-chan int32

func GetQuestArrow

func GetQuestArrow() <-chan m.Point2D

func GetRunMountTimer

func GetRunMountTimer() <-chan uint16

func GetRunUnmountTimer

func GetRunUnmountTimer() <-chan uint16

func GetScriptCount

func GetScriptCount() <-chan uint16

# Character creation_create_char = _ScriptMethod(371) _create_char.argtypes =[

_str,  # ProfileName
_str,  # ShardName
_str,  # CharName
_bool, # Gender
_byte, # Race
_byte, # Str
_byte, # Dex
_byte, # Int
_str,  # Skill1
_str,  # Skill2
_str,  # Skill3
_str,  # Skill4
_int,  # SkillValue1
_int,  # SkillValue2
_int,  # SkillValue3
_int,  # SkillValue4
_byte, # Start City
_uint, # Free Slot

] def CreateChar(

ProfileName,  # ProfileName
ShardName,  # ShardName
CharName,  # CharName
Gender,  # Gender
Race,  # Race
Strn,  # Str
Dex,  # Dex
Int,  # Int
Skill1,  # Skill1
Skill2,  # Skill2
Skill3,  # Skill3
Skill4,  # Skill4
SkillValue1,  # SkillValue1
SkillValue2,  # SkillValue2
SkillValue3,  # SkillValue3
SkillValue4,  # SkillValue4
City,  # Start City
Slot,  # Free Slot

):

_create_char(
    ProfileName,    # ProfileName
    ShardName,      # ShardName
    CharName,       # CharName
    Gender,         # Gender
    Race,           # Race
    Strn,           # Str
    Dex,            # Dex
    Int,            # Int
    Skill1,         # Skill1
    Skill2,         # Skill2
    Skill3,         # Skill3
    Skill4,         # Skill4
    SkillValue1,    # SkillValue1
    SkillValue2,    # SkillValue2
    SkillValue3,    # SkillValue3
    SkillValue4,    # SkillValue4
    City,           # Start City
    Slot,           # Free Slot
)

Script control functions

func GetScriptName

func GetScriptName(ScriptIndex uint16) <-chan string

func GetScriptPath

func GetScriptPath(scriptIndex uint16) <-chan string

func GetScriptState

func GetScriptState(scriptIndex uint16) <-chan int8

func GetShardPath

func GetShardPath() <-chan string

func GetShopList

func GetShopList() <-chan []string

func GetSilentMode

func GetSilentMode() <-chan bool

func GetSkillCap

func GetSkillCap(SkillName string) <-chan float64

func GetSkillCurrentValue

func GetSkillCurrentValue(SkillName string) <-chan float64

func GetSkillLockState

func GetSkillLockState(skillName string) <-chan int8

func GetSkillValue

func GetSkillValue(SkillName string) <-chan float64

func GetStam

func GetStam(oid uint32) <-chan int32

func GetStatLockState

func GetStatLockState(skillName string) <-chan byte

func GetStaticArtBitmap

func GetStaticArtBitmap(id uint32, hue uint16) <-chan []byte

func GetStaticTilesArray

func GetStaticTilesArray(xmin, ymin, xmax, ymax uint16, worldNum byte, tileTypes []uint16) <-chan []m.FoundTile

_get_statics_array = _ScriptMethod(286) # GetStaticTilesArray _get_statics_array.restype = _buffer # Array of TFoundTile _get_statics_array.argtypes = [_ushort, # Xmin

_ushort,  # Ymin
_ushort,  # Xmax
_ushort,  # Ymax
_ubyte,  # WorldNum
_uint,  # Len
_buffer]  # TileTypes: Array of Word

func GetStealthProfilePath

func GetStealthProfilePath() <-chan string

func GetStr

func GetStr(oid uint32) <-chan int32

func GetSurfaceZ

func GetSurfaceZ(x, y uint16, worldNum byte) <-chan byte

func GetTileFlags

func GetTileFlags(tileGroup byte, tile uint32) <-chan uint32

_icq_set_status = _ScriptMethod(275) # ICQ_SetStatus _icq_set_status.argtypes = [_ubyte] # Num

func ICQSetStatus(Num){
    _icq_set_status(Num)
}

_icq_set_x_status = _ScriptMethod(276) # ICQ_SetXStatus _icq_set_x_status.argtypes = [_ubyte] # Num

func ICQSetXStatus(Num){
    _icq_set_x_status(Num)
}

_icq_send_message = _ScriptMethod(277) # ICQ_SendText _icq_send_message.argtypes = [_uint, # DestinationUIN

_str]  # Text
func ICQSendText(DestinationUIN, Text){
    _icq_send_message(DestinationUIN, Text)
}

_messengers = {0: 1, # default - telegram

1: 1, 'Telegram': 1, 'telegram': 1,
2: 2, 'Viber': 2, 'viber': 2,
3: 3, 'Discord': 3, 'discord': 3}_messenger_get_connected = _ScriptMethod(501)  # Messenger_GetConnected

_messenger_get_connected.restype = _bool _messenger_get_connected.argtypes = [_ubyte] # MesID

func MessengerGetConnected(MesID){
    if MesID not in _messengers.keys():
}
    error = 'MessengerGetConnected: MesID must be "Telegram", "Viber" or "Discord"'
    raise ValueError(error)
p :=

return _messenger_get_connected(_messengers[MesID]) _messenger_set_connected = _ScriptMethod(502) # Messenger_SetConnected _messenger_set_connected.argtypes = [_ubyte, # MesID

_bool]  # Value
func MessengerSetConnected(MesID, Value){
    if MesID not in _messengers.keys():
}
    error = 'MessengerGetConnected: MesID must be "Telegram", "Viber" or "Discord"'
    raise ValueError(error)
_messenger_set_connected(_messengers[MesID], Value)

_messenger_get_token = _ScriptMethod(503) # Messenger_GetToken _messenger_get_token.restype = _str _messenger_get_token.argtypes = [_ubyte] # MesID

func MessengerGetToken(MesID){
    if MesID not in _messengers.keys():
}
    error = 'MessengerGetConnected: MesID must be "Telegram", "Viber" or "Discord"'
    raise ValueError(error)
p :=

return _messenger_get_token(_messengers[MesID]) _messenger_set_token = _ScriptMethod(504) # Messenger_SetToken _messenger_set_token.argtypes = [_ubyte, # MesID

_str]  # Value
func MessengerSetToken(MesID, Value){
    if MesID not in _messengers.keys():
}
    error = 'MessengerGetConnected: MesID must be "Telegram", "Viber" or "Discord"'
    raise ValueError(error)
_messenger_set_token(_messengers[MesID], Value)

_messenger_get_name = _ScriptMethod(505) # Messenger_GetName _messenger_get_name.restype = _str _messenger_get_name.argtypes = [_ubyte] # MesID

func MessengerGetName(MesID){
    if MesID not in _messengers.keys():
}
    error = 'MessengerGetConnected: MesID must be "Telegram", "Viber" or "Discord"'
    raise ValueError(error)
p :=

return _messenger_get_name(_messengers[MesID]) _messenger_send_message = _ScriptMethod(506) # Messenger_SendMessage _messenger_send_message.argtypes = [_ubyte, # MesID

_str,  # Msg
_str]  # UserID
func MessengerSendMessage(MesID, Msg, UserID){
    if MesID not in _messengers.keys():
}
    error = 'MessengerGetConnected: MesID must be "Telegram", "Viber" or "Discord"'
    raise ValueError(error)
_messenger_send_message(_messengers[MesID], Msg, UserID)

_tile_groups = {0: 0, 'tfLand': 0, 'tfland': 0, 'Land': 0, 'land': 0,

1: 1, 'tfStatic': 1, 'tfstatic': 1, 'Static': 1, 'static': 1}

_get_tile_flags = _ScriptMethod(278) # GetTileFlags _get_tile_flags.restype = _uint _get_tile_flags.argtypes = [_ubyte, # TileGroup

_ushort]  # Tile

func GetTitle

func GetTitle(oid uint32) <-chan string

func GetTooltip

func GetTooltip(oid uint32) <-chan string

func GetTradeContainer

func GetTradeContainer(tradeNum, num byte) <-chan uint32

func GetTradeOpponent

func GetTradeOpponent(tradeNum byte) <-chan uint32

func GetTradeOpponentName

func GetTradeOpponentName(tradeNum byte) <-chan string

func GetType

func GetType(oid uint32) <-chan uint16

func GetWalkMountTimer

func GetWalkMountTimer() <-chan uint16

func GetWalkUnmountTimer

func GetWalkUnmountTimer() <-chan uint16

func GetX

func GetX(oid uint32) <-chan uint16

func GetY

func GetY(oid uint32) <-chan uint16

func GetZ

func GetZ(oid uint32) <-chan int8

func GlobalChatActiveChannel

func GlobalChatActiveChannel() <-chan string

func GlobalChatJoinChannel

func GlobalChatJoinChannel(chName string)

func GlobalChatLeaveChannel

func GlobalChatLeaveChannel()

func GlobalChatSendMsg

func GlobalChatSendMsg(msgText string)

func GlovesLayer

func GlovesLayer() byte

func Gold

func Gold() <-chan uint16

func Grab

func Grab(oid uint32, count int32) <-chan bool

func Ground

func Ground() uint32

func GumpAutoCheckBox

func GumpAutoCheckBox(checkBoxID, value int32)

func GumpAutoRadiobutton

func GumpAutoRadiobutton(radiobuttonID, value int32)

func GumpAutoTextEntry

func GumpAutoTextEntry(textEntryID int32, value string)

func HP

func HP() <-chan uint32

func HairLayer

func HairLayer() byte

func HatLayer

func HatLayer() byte

func HelpRequest

func HelpRequest()

func Hidden

func Hidden() <-chan bool

func HighJournal

func HighJournal() <-chan uint32

func HorseLayer

func HorseLayer() byte

func ICQConnect

func ICQConnect(UIN uint32, password string)

func ICQConnected

func ICQConnected() <-chan bool

func ICQDisconnect

func ICQDisconnect()

func Ignore

func Ignore(ObjID uint32)

func IgnoreOff

func IgnoreOff(ObjID uint32)

func IgnoreReset

func IgnoreReset()

func InJournal

func InJournal(s string) <-chan int32

func InJournalBetweenTimes

func InJournalBetweenTimes(str string, timeBegin time.Time, timeEnd time.Time) <-chan int32

InJournalBetweenTimes

RU: Поиск последней строки в журнале по слову (или по словам) во временном интервале. Если строка не найдена возвратит -1, если найдена, возвратит индекс строки в журнале начиная с 0.

EN: Search for last entry in journal by word(words) in time intervalreturns if string is found - index of string starting from 0 if string is not found -1

func InParty

func InParty() <-chan bool

func Int

func Int() <-chan uint32

func InviteToParty

func InviteToParty(ID uint32)

func IsActiveSpellAbility

func IsActiveSpellAbility(spellName string) <-chan bool

func IsContainer

func IsContainer(ObjID uint32) <-chan bool

func IsDead

func IsDead(ObjID uint32) <-chan bool

func IsFemale

func IsFemale(ObjID uint32) <-chan bool

func IsGump

func IsGump() bool

func IsGumpCanBeClosed

func IsGumpCanBeClosed(gumpIndex uint16) <-chan bool

func IsHidden

func IsHidden(ObjID uint32) <-chan bool

func IsMovable

func IsMovable(ObjID uint32) <-chan bool

func IsNPC

func IsNPC(oid uint32) <-chan bool

func IsObjectExists

func IsObjectExists(oid uint32) <-chan bool

func IsParalyzed

func IsParalyzed(ObjID uint32) <-chan bool

func IsPoisoned

func IsPoisoned(ObjID uint32) <-chan bool

func IsRunning

func IsRunning(ObjID uint32) <-chan bool

func IsTrade

func IsTrade() <-chan bool

func IsWarMode

func IsWarMode(oid uint32) <-chan bool

func IsWorldCellPassable

func IsWorldCellPassable(currX, currY uint16, currZ int8, destX, destY uint16, worldNum byte) <-chan m.WorldCellPassable

func IsYellowHits

func IsYellowHits(ObjID uint32) <-chan bool

func Journal

func Journal(stringIndex uint32) <-chan string

func LastAttack

func LastAttack() <-chan uint32

func LastContainer

func LastContainer() <-chan uint32

func LastJournalMessage

func LastJournalMessage() <-chan string

func LastObject

func LastObject() <-chan uint32

func LastStatus

func LastStatus() <-chan uint32

func LastTarget

func LastTarget() <-chan uint32

func LegsLayer

func LegsLayer() byte

func LhandLayer

func LhandLayer() byte

func Life

func Life() <-chan uint32

func LineCount

func LineCount() <-chan uint32

func LineID

func LineID() <-chan uint32

func LineIndex

func LineIndex() <-chan uint32

func LineMsgType

func LineMsgType() <-chan byte

func LineName

func LineName() <-chan string

func LineTextColor

func LineTextColor() <-chan uint16

func LineTextFont

func LineTextFont() <-chan uint16

func LineTime

func LineTime() <-chan time.Time

func LineType

func LineType() <-chan uint16

func LowJournal

func LowJournal() <-chan uint32

func Luck

func Luck() <-chan uint16

func MR

func MR() uint16

func MRCount

func MRCount() <-chan uint32

func Mana

func Mana() <-chan uint32

func MaxHP

func MaxHP() <-chan uint32

func MaxLife

func MaxLife() <-chan uint32

func MaxMana

func MaxMana() <-chan uint32

func MaxPets

func MaxPets() <-chan byte

func MaxStam

func MaxStam() <-chan uint32

func MaxWeight

func MaxWeight() <-chan uint16
func MenuHookPresent() <-chan bool
func MenuPresent() <-chan bool

func MobileCanBeRenamed

func MobileCanBeRenamed(Mob_ID uint32) <-chan bool

func MoveItem

func MoveItem(itemID uint32, count int32, container uint32, x, y, z int32) <-chan bool

func MoveItems

func MoveItems(container uint32,
	itemsType, itemsColor uint16,
	moveIntoID uint32,
	x, y, z int32,
	delayMS uint32,

	maxCount int) <-chan bool

func MoveXY

func MoveXY(xdst, ydst uint16, optimized bool, accuracy int32, running bool) <-chan bool

func MoveXYZ

func MoveXYZ(xdst, ydst uint16, zdst int8, optimized bool, accuracyXY, accurancyZ int32, running bool) <-chan bool

func MoverStop

func MoverStop()

func NRstkLayer

func NRstkLayer() byte

func NS

func NS() uint16

func NSCount

func NSCount() <-chan uint32

func NeckLayer

func NeckLayer() byte

func NumGumpButton

func NumGumpButton(gumpIndex uint16, value int32) <-chan bool

func NumGumpCheckBox

func NumGumpCheckBox(gumpIndex uint16, checkBoxID, value int32) <-chan bool

func NumGumpRadiobutton

func NumGumpRadiobutton(gumpIndex uint16, radiobuttonID, value int32) <-chan bool

func NumGumpTextEntry

func NumGumpTextEntry(gumpIndex uint16, textEntryID int32, value string) <-chan bool

func ObjAtLayer

func ObjAtLayer(LayerType byte) <-chan uint32

func ObjAtLayerEx

func ObjAtLayerEx(layerType byte, playerID uint32) <-chan uint32

func OpenDoor

func OpenDoor()

func PantsLayer

func PantsLayer() byte

func Paralyzed

func Paralyzed() <-chan bool

func PartyAcceptInvite

func PartyAcceptInvite()

func PartyCanLootMe

func PartyCanLootMe(value bool)

func PartyDeclineInvite

func PartyDeclineInvite()

func PartyLeave

func PartyLeave()

func PartyMembersList

func PartyMembersList() <-chan []uint32

func PartyMessageTo

func PartyMessageTo(oid uint32, msg string)

func PartySay

func PartySay(msg string)

func PauseResumeScript

func PauseResumeScript(scriptIndex uint16)

func PetsCurrent

func PetsCurrent() <-chan byte

func PoisonResist

func PoisonResist() <-chan uint16

func Poisoned

func Poisoned() <-chan bool

func PredictedDirection

func PredictedDirection() <-chan byte

func PredictedX

func PredictedX() <-chan uint16

func PredictedY

func PredictedY() <-chan uint16

func PredictedZ

func PredictedZ() <-chan byte

func PrintScriptMethodsList

func PrintScriptMethodsList(fileName string, sortedList bool)

func ProfileName

func ProfileName() <-chan string

func ProfileShardName

func ProfileShardName() <-chan string

func ProxyIP

func ProxyIP() <-chan string

func ProxyPort

func ProxyPort() <-chan uint16

func QuestRequest

func QuestRequest()

func Race

func Race() <-chan byte

func ReadStaticsXY

func ReadStaticsXY(x, y uint16, wnum byte) <-chan []m.StaticsXY

func RemoveFromParty

func RemoveFromParty(ID uint32)

func RenameMobile

func RenameMobile(mobId uint32, newName string)

func ReqVirtuesGump

func ReqVirtuesGump()

func RequestContextMenu

func RequestContextMenu(ID uint32)

func RequestStats

func RequestStats(ObjID uint32)

func RhandLayer

func RhandLayer() byte

func RingLayer

func RingLayer() byte

func RobeLayer

func RobeLayer() byte

func RstkLayer

func RstkLayer() byte

func SA

func SA() uint16

func SACount

func SACount() <-chan uint32

func SS

func SS() uint16

func SSCount

func SSCount() <-chan uint32

func Salute

func Salute()

func Self

func Self() <-chan uint32

func SellLayer

func SellLayer() byte

func SetARExtParams

func SetARExtParams(shardName, charName string, useAtEveryConnect bool)

func SetARStatus

func SetARStatus(value bool)

func SetAutoBuyDelay

func SetAutoBuyDelay(Value uint16)

func SetAutoSellDelay

func SetAutoSellDelay(Value uint16)

func SetBadLocation

func SetBadLocation(x, y uint16)

func SetBadObject

func SetBadObject(otype, color uint16, radius byte)

func SetCatchBag

func SetCatchBag(ObjectID uint32)

func SetContextMenuHook

func SetContextMenuHook(menuID uint32, entryNumber byte)

func SetDress

func SetDress()
func Undress(){
    tmp = []
}
client_version_int = GetClientVersionInt()
if client_version_int < 7007400:
    delay = GetDressSpeed()
    char = Self()
    backpack = Backpack()
    for layer in _wearable_layers:
        item = ObjAtLayerEx(layer, char)
        if item:
            tmp.append(MoveItem(item, 1, backpack, 0, 0, 0))
            Wait(delay)
else:
    UnequipItemsSetMacro()
    tmp.append(True)
# no need to wait - all this done inside
p :=

return all(tmp)

func SetDressSpeed

func SetDressSpeed(Value uint16)

func SetDropCheckCoord

func SetDropCheckCoord(value bool)

func SetDropDelay

func SetDropDelay(Value uint32)

func SetFindDistance

func SetFindDistance(Value uint32)

func SetFindInNulPoint

func SetFindInNulPoint(v bool)

func SetFindVertical

func SetFindVertical(Value uint32)

func SetGlobal

func SetGlobal(varRegion byte, varName, varValue string)

func SetGoodLocation

func SetGoodLocation(x, y uint16)

func SetJournalLine

func SetJournalLine(stringIndex uint32, text string)

func SetMoveBetweenTwoCorners

func SetMoveBetweenTwoCorners(value bool)

func SetMoveCheckStamina

func SetMoveCheckStamina(Value uint16)

func SetMoveHeuristicMult

func SetMoveHeuristicMult(value int32)

func SetMoveOpenDoor

func SetMoveOpenDoor(v bool)

global_chat_channel_list = _ScriptMethod(365) # SCGlobalChatChannelsList global_chat_channel_list.restype = _buffer

func GlobalChatChannelsList(){
    result = []
}
data = global_chat_channel_list()
count = _uint.from_buffer(data)
offset = count.size
for i in range(count):
    string = _str.from_buffer(data, offset)
    offset += string.size
    result.append(string.value)return result

_set_open_doors = _ScriptMethod(400) # SetMoveOpenDoor _set_open_doors.argtypes = [_bool] # Value

func SetMoveThroughCorner

func SetMoveThroughCorner(value bool)

func SetMoveThroughNPC

func SetMoveThroughNPC(Value uint16)

func SetMoveTurnCost

func SetMoveTurnCost(value uint32)

func SetPauseScriptOnDisconnectStatus

func SetPauseScriptOnDisconnectStatus(value bool)

func SetPickupedItem

func SetPickupedItem(ID uint32)

func SetRunMountTimer

func SetRunMountTimer(Value uint16)

func SetRunUnmountTimer

func SetRunUnmountTimer(Value uint16)

_los_check_type = {1: 1, '1': 1, 'lossphere': 1, 'sphere': 1,

2: 2, '2': 2, 'lossphereadv': 2, 'sphereadv': 2,
3: 3, '3': 3, 'lospol': 3, 'pol': 3,
4: 4, '4': 4, 'losrunuo': 4, 'runuo': 4, 'servuo': 4}_los_check_options = {0: 0, '0': 0, None: 0,
   0x100: 0x100,
   'losspherecheckcorners': 0x100,
   'spherecheckcorners': 0x100,
   0x200: 0x200,
   'lospolusenoshoot': 0x200,
   'polusenoshoot': 0x200,
   0x400: 0x400,
   'lospollosthroughwindow': 0x400,
   'pollosthroughwindow': 0x400}_check_los = _ScriptMethod(333)  # CheckLOS

_check_los.restype = _bool _check_los.argtypes = [_ushort, # xf

_ushort,  # yf
_byte,  # zf
_ushort,  # xt
_ushort,  # yt
_byte,  # zt
_ubyte,  # WorldNum
_ubyte,  # LOSCheckType
_uint]  # LOSOptions
func CheckLOS(xf, yf, zf, xt, yt, zt, WorldNum, LOSCheckType, LOSOptions=None){
    if not _iterable(LOSOptions) or isinstance(LOSOptions, str):
}
    LOSOptions = [LOSOptions]
if isinstance(LOSCheckType, str):
    LOSCheckType = LOSCheckType.lower()
if LOSCheckType not in _los_check_type.keys():
    raise ValueError('CheckLOS: LOSCheckType must be "Sphere", "SphereAdv"'
                     ', "Pol" or "RunUO".')
options = 0
for option in LOSOptions:
    if isinstance(option, str):
        option = option.lower()
    if option not in _los_check_options.keys():
        raise ValueError('CheckLOS: LOSOptions must be set of '
                         '"SphereCheckCorners", "PolUseNoShoot", '
                         '"PolLosThroughWindow" or None.')
    options |= _los_check_options[option]
p :=

return _check_los(xf, yf, zf, xt, yt, zt, WorldNum, LOSCheckType, options) _get_path_array = _ScriptMethod(334) # GetPathArray _get_path_array.restype = _buffer # Array of TMyPoint _get_path_array.argtypes = [_ushort, # DestX

_ushort,  # DestY
_bool,  # Optimized
_int]  # Accuracy
func GetPathArray(DestX, DestY, Optimized, Accuracy){
    result = []
}
data = _get_path_array(DestX, DestY, Optimized, Accuracy)
count = _uint.from_buffer(data)
fmt = '<2Hb'
size = _struct.calcsize(fmt)
for i in range(count):
    result.append(_struct.unpack_from(fmt, data, count.size + i * size))return result

_get_path_array_3d = _ScriptMethod(335) # GetPathArray3D _get_path_array_3d.restype = _buffer # Array of TMyPoint _get_path_array_3d.argtypes = [_ushort, # StartX

_ushort,  # StartY
_byte,  # StartZ
_ushort,  # FinishX
_ushort,  # FinishY
_byte,  # FinishZ
_ubyte,  # WorldNum
_int,  # AccuracyXY
_int,  # AccuracyZ
_bool]  # Run

def GetPathArray3D(StartX, StartY, StartZ, FinishX, FinishY, FinishZ, WorldNum,

               AccuracyXY, AccuracyZ, Run):
result = []
data = _get_path_array_3d(StartX, StartY, StartZ, FinishX, FinishY,
                          FinishZ, WorldNum, AccuracyXY, AccuracyZ, Run)
count = _uint.from_buffer(data)
fmt = '<2Hb'
size = _struct.calcsize(fmt)
for i in range(count):
    result.append(_struct.unpack_from(fmt, data, count.size + i * size))return result
func Dist(x1, y1, x2, y2){
    dx = abs(x2 - x1)
}
dy = abs(y2 - y1)return dx if dx > dy else dy
func CalcCoord(x, y, Dir){
    if Dir > 7:
}return x, y
dirs = {0: (0, -1),
        1: (1, -1),
        2: (1, 0),
        3: (1, 1),
        4: (0, 1),
        5: (-1, 1),
        6: (-1, 0),
        7: (-1, -1)}
dx, dy = dirs[Dir]return x + dx, y + dy
func CalcDir(Xfrom, Yfrom, Xto, Yto){
    dx = abs(Xto - Xfrom)
}
dy = abs(Yto - Yfrom)
if dx == dy == 0:return 100
elif (dx / (dy + 0.1)) >= 2:return 6 if Xfrom > Xto else 2
elif (dy / (dx + 0.1)) >= 2:return 0 if Yfrom > Yto else 4
elif Xfrom > Xto:return 7 if Yfrom > Yto else 5
elif Xfrom < Xto:return 1 if Yfrom > Yto else 3

func SetSilentMode

func SetSilentMode(value bool)

func SetSkillLockState

func SetSkillLockState(skillName string, skillState byte)

func SetStatState

func SetStatState(statNum, statState byte)

func SetWalkMountTimer

func SetWalkMountTimer(Value uint16)

func SetWalkUnmountTimer

func SetWalkUnmountTimer(Value uint16)

func SetWarMode

func SetWarMode(value bool)

func Sex

func Sex() <-chan byte

func ShardName

func ShardName() <-chan string

func ShirtLayer

func ShirtLayer() byte

func ShoesLayer

func ShoesLayer() byte

func Stam

func Stam() <-chan uint32

func StartScript

func StartScript(scriptPath string) <-chan uint16

func StealthPath

func StealthPath() <-chan string

func Step

func Step(direction byte, running bool) <-chan byte

func StepQ

func StepQ(direction byte, running bool) <-chan int32

func StopAllScripts

func StopAllScripts()

func StopMover

func StopMover()

func StopScript

func StopScript(scriptIndex uint16)

func Str

func Str() <-chan uint32

func TalismanLayer

func TalismanLayer() byte

func TargetID

func TargetID() <-chan uint32

func TargetToObject

func TargetToObject(ObjectID uint32)

func TargetToTile

func TargetToTile(tileModel, x, y uint16, z byte)

func TargetToXYZ

func TargetToXYZ(x, y uint16, z byte)

func ToggleFly

func ToggleFly()

func TorsoHLayer

func TorsoHLayer() byte

func TorsoLayer

func TorsoLayer() byte

func TradeCheck

func TradeCheck(tradeNum, num byte) <-chan bool

func TradeCount

func TradeCount() <-chan byte

func UOSay

func UOSay(text string)

func UOSayColor

func UOSayColor(text string, color uint16)

func UnequipItemsSetMacro

func UnequipItemsSetMacro()

_wearable_layers = (RhandLayer(), LhandLayer(), ShoesLayer(), PantsLayer(),

ShirtLayer(), HatLayer(), GlovesLayer(), RingLayer(),
NeckLayer(), WaistLayer(), TorsoLayer(), BraceLayer(),
TorsoHLayer(), EarLayer(), ArmsLayer(), CloakLayer(),

func UnsetCatchBag

func UnsetCatchBag()

func UseFromGround

func UseFromGround(objType, color uint16) <-chan uint32

func UseItemOnMobile

func UseItemOnMobile(itemSerial, targetSerial uint32)

func UseObject

func UseObject(ObjectID uint32)

func UseOtherPaperdollScroll

func UseOtherPaperdollScroll(oid uint32)

func UsePrimaryAbility

func UsePrimaryAbility()

func UseProxy

func UseProxy() <-chan bool

func UseSecondaryAbility

func UseSecondaryAbility()

func UseSelfPaperdollScroll

func UseSelfPaperdollScroll()

func UseSkill

func UseSkill(skillName string)

func UseType

func UseType(objType uint16, color uint16) <-chan uint32

func UseVirtue

func UseVirtue(VirtueName string)

func WaistLayer

func WaistLayer() byte

func WaitForClientTargetResponse

func WaitForClientTargetResponse(maxWaitTime time.Duration) <-chan bool

func WaitGump

func WaitGump(value int32)

func WaitJournalLine

func WaitJournalLine(startTime time.Time, str string, maxWaitTime time.Duration) <-chan bool

func WaitJournalLineSystem

func WaitJournalLineSystem(startTime time.Time, str string, maxWaitTime time.Duration) <-chan bool

func WaitMenu

func WaitMenu(menuCaption, elementCaption string)

func WaitTargetGround

func WaitTargetGround(ObjType uint16)

func WaitTargetLast

func WaitTargetLast()

func WaitTargetObject

func WaitTargetObject(ObjID uint32)

func WaitTargetSelf

func WaitTargetSelf()

func WaitTargetTile

func WaitTargetTile(tile, x, y uint16, z byte)

func WaitTargetType

func WaitTargetType(ObjType uint16)

func WaitTargetXYZ

func WaitTargetXYZ(x, y uint16, z byte)

func WaitTextEntry

func WaitTextEntry(value string)

func WarMode

func WarMode() <-chan bool

func WarTargetID

func WarTargetID() <-chan uint32

func WearItem

func WearItem(layer byte, oid uint32)

func Weight

func Weight() <-chan uint16

func WorldNum

func WorldNum() <-chan byte

Types

type Middleware

type Middleware = func(readBuff []byte) []byte

Directories

Path Synopsis
examples
internal
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL