Documentation ¶
Index ¶
- func AddChatUserIgnore(user string)
- func AddGumpIgnoreByID(ID uint32)
- func AddGumpIgnoreBySerial(Serial uint32)
- func AddJournalIgnore(str string)
- func AddToJournal(msg string)
- func AddToSystemJournal(text string)
- func Alarm()
- func Armor() <-chan uint16
- func ArmsLayer() byte
- func Attack(attackedID uint32)
- func AutoBuy(itemType, itemColor, quantity uint16)
- func AutoBuyEx(itemType, itemColor, quantity uint16, price uint32, itemName string)
- func AutoMenu(menuCaption, elementCaption string)
- func AutoSell(itemType, itemColor, quantity uint16)
- func BM() uint16
- func BMCount() <-chan uint32
- func BP() uint16
- func BPCount() <-chan uint32
- func Backpack() <-chan uint32
- func BandageSelf()
- func BankLayer() byte
- func BeardLayer() byte
- func BookClearText()
- func BookGetPageText(page uint16) <-chan string
- func BookSetHeader(title, author string)
- func BookSetPageText(page uint16, text string)
- func BookSetText(text string)
- func Bootstrap(script func() interface{}) interface{}
- func Bow()
- func BpackLayer() byte
- func BraceLayer() byte
- func CancelAllMenuHooks()
- func CancelMenu()
- func CancelTarget()
- func CancelTrade(tradeNum byte) <-chan bool
- func CancelWaitTarget()
- func Cast(spellName string)
- func CastToObj(spellName string, oid uint32)
- func ChangeProfile(profileName string) <-chan int32
- func ChangeProfileEx(pName, shardName, charName string) <-chan uint16
- func ChangeSkillLockState(skillName string, skillState byte)
- func CharName() <-chan string
- func CheckLag(timeoutMS uint32) <-chan bool
- func ClearBadLocationList()
- func ClearBadObjectList()
- func ClearChatUserIgnore()
- func ClearContextMenu()
- func ClearGumpsIgnore()
- func ClearInfoWindow()
- func ClearJournal()
- func ClearJournalIgnore()
- func ClearShopList()
- func ClearSystemJournal()
- func ClickOnObject(ObjectID uint32)
- func ClientHide(ID uint32) <-chan bool
- func ClientPrint(text string)
- func ClientPrintEx(senderID uint32, color, font uint16, text string)
- func ClientRequestObjectTarget()
- func ClientRequestTileTarget()
- func ClientTargetResponse() <-chan m.TargetInfo
- func ClientTargetResponsePresent() <-chan bool
- func CloakLayer() byte
- func CloseClientGump(iD uint32)
- func CloseMenu()
- func CloseSimpleGump(GumpIndex uint16)
- func ColdResist() <-chan uint16
- func ConfirmTrade(tradeNum byte)
- func Connect()
- func Connected() <-chan bool
- func ConnectedTime() <-chan time.Time
- func ConsoleEntryReply(text string)
- func ConsoleEntryUnicodeReply(text string)
- func CurrentScriptPath() string
- func Dead() <-chan bool
- func Dex() <-chan uint32
- func Disconnect()
- func DisconnectedTime() <-chan time.Time
- func DragItem(oid uint32, count int32) <-chan bool
- func Drop(oid uint32, count, x, y, z int32) <-chan bool
- func DropHere(oid uint32) <-chan bool
- func DropItem(container uint32, x, y, z int32) <-chan bool
- func EarLayer() byte
- func EggsLayer() byte
- func EmptyContainer(container, destContainer, delayMs uint32) <-chan bool
- func EnergyResist() <-chan uint16
- func EquipItemsSetMacro()
- func EquipLastWeapon()
- func FillNewWindow(s string)
- func FindAtCoord(x, y uint16) <-chan uint32
- func FindCount() <-chan uint32
- func FindFullQuantity() <-chan uint32
- func FindItem() <-chan uint32
- func FindNotoriety(objType uint16, notoriety byte) <-chan uint32
- func FindQuantity() <-chan uint32
- func FindType(objType uint16, container uint32) <-chan uint32
- func FindTypeEx(objType, objColor uint16, container uint32, inSub bool) <-chan uint32
- func FindTypesArrayEx(objTypes, colors []uint16, containers []uint32, inSub bool) <-chan uint32
- func FireResist() <-chan uint16
- func FoundedParamID() <-chan uint32
- func GA() uint16
- func GACount() <-chan uint32
- func GS() uint16
- func GSCount() <-chan uint32
- func GameServerIPString() <-chan string
- func GetARStatus() <-chan bool
- func GetActiveAbility() <-chan string
- func GetAltName(oid uint32) <-chan string
- func GetAutoBuyDelay() <-chan uint16
- func GetAutoSellDelay() <-chan uint16
- func GetBuffBarInfo() <-chan m.BuffBarInfo
- func GetCell(x, y uint16, worldNum byte) <-chan m.MapCell
- func GetCharTitle() <-chan string
- func GetClientVersionInt() <-chan uint32
- func GetCliloc(oid uint32) <-chan string
- func GetClilocByID(oid uint32) <-chan string
- func GetColor(oid uint32) <-chan uint16
- func GetDex(oid uint32) <-chan int32
- func GetDirection(oid uint32) <-chan byte
- func GetDistance(oid uint32) <-chan int32
- func GetDressSpeed() <-chan uint16
- func GetDropCheckCoord() <-chan bool
- func GetDropDelay() <-chan uint32
- func GetExtInfo() <-chan m.ExtendedInfo
- func GetFindDistance() <-chan uint32
- func GetFindInNulPoint() <-chan bool
- func GetFindVertical() <-chan uint32
- func GetFoundList() <-chan []uint32
- func GetGlobal(varRegion byte, varName string) <-chan string
- func GetGumpID(gumpIndex uint16) <-chan uint32
- func GetGumpInfo(gi uint16) chan m.Gump
- func GetGumpSerial(gumpIndex uint16) <-chan uint32
- func GetGumpsCount() <-chan uint16
- func GetHP(oid uint32) <-chan int32
- func GetIgnoreList() <-chan []uint32
- func GetInt(oid uint32) <-chan int32
- func GetLastStepQUsedDoor() <-chan uint32
- func GetLayer(Obj uint32) <-chan byte
- func GetLayerCount(x, y uint16, worldNum byte) <-chan byte
- func GetMana(oid uint32) <-chan int32
- func GetMaxHP(oid uint32) <-chan int32
- func GetMaxMana(ObjID uint32) <-chan int32
- func GetMaxStam(ObjID uint32) <-chan int32
- func GetMoveBetweenTwoCorners() <-chan bool
- func GetMoveCheckStamina() <-chan uint16
- func GetMoveHeuristicMult() <-chan uint32
- func GetMoveOpenDoor() <-chan bool
- func GetMoveThroughCorner() <-chan bool
- func GetMoveThroughNPC() <-chan uint16
- func GetMoveTurnCost() <-chan uint32
- func GetMultis() <-chan []m.Multi
- func GetName(oid uint32) <-chan string
- func GetNextStepZ(currX, currY, destX, destY uint16, worldNum byte, currZ int8) <-chan int8
- func GetNotoriety(oid uint32) <-chan byte
- func GetParent(oid uint32) <-chan uint32
- func GetPauseScriptOnDisconnectStatus() <-chan bool
- func GetPickupedItem() <-chan uint32
- func GetPrice(oid uint32) <-chan uint32
- func GetQuantity(oid uint32) <-chan int32
- func GetQuestArrow() <-chan m.Point2D
- func GetRunMountTimer() <-chan uint16
- func GetRunUnmountTimer() <-chan uint16
- func GetScriptCount() <-chan uint16
- func GetScriptName(ScriptIndex uint16) <-chan string
- func GetScriptPath(scriptIndex uint16) <-chan string
- func GetScriptState(scriptIndex uint16) <-chan int8
- func GetShardPath() <-chan string
- func GetShopList() <-chan []string
- func GetSilentMode() <-chan bool
- func GetSkillCap(SkillName string) <-chan float64
- func GetSkillCurrentValue(SkillName string) <-chan float64
- func GetSkillLockState(skillName string) <-chan int8
- func GetSkillValue(SkillName string) <-chan float64
- func GetStam(oid uint32) <-chan int32
- func GetStatLockState(skillName string) <-chan byte
- func GetStaticArtBitmap(id uint32, hue uint16) <-chan []byte
- func GetStaticTilesArray(xmin, ymin, xmax, ymax uint16, worldNum byte, tileTypes []uint16) <-chan []m.FoundTile
- func GetStealthProfilePath() <-chan string
- func GetStr(oid uint32) <-chan int32
- func GetSurfaceZ(x, y uint16, worldNum byte) <-chan byte
- func GetTileFlags(tileGroup byte, tile uint32) <-chan uint32
- func GetTitle(oid uint32) <-chan string
- func GetTooltip(oid uint32) <-chan string
- func GetTradeContainer(tradeNum, num byte) <-chan uint32
- func GetTradeOpponent(tradeNum byte) <-chan uint32
- func GetTradeOpponentName(tradeNum byte) <-chan string
- func GetType(oid uint32) <-chan uint16
- func GetWalkMountTimer() <-chan uint16
- func GetWalkUnmountTimer() <-chan uint16
- func GetX(oid uint32) <-chan uint16
- func GetY(oid uint32) <-chan uint16
- func GetZ(oid uint32) <-chan int8
- func GlobalChatActiveChannel() <-chan string
- func GlobalChatJoinChannel(chName string)
- func GlobalChatLeaveChannel()
- func GlobalChatSendMsg(msgText string)
- func GlovesLayer() byte
- func Gold() <-chan uint16
- func Grab(oid uint32, count int32) <-chan bool
- func Ground() uint32
- func GumpAutoCheckBox(checkBoxID, value int32)
- func GumpAutoRadiobutton(radiobuttonID, value int32)
- func GumpAutoTextEntry(textEntryID int32, value string)
- func HP() <-chan uint32
- func HairLayer() byte
- func HatLayer() byte
- func HelpRequest()
- func Hidden() <-chan bool
- func HighJournal() <-chan uint32
- func HorseLayer() byte
- func ICQConnect(UIN uint32, password string)
- func ICQConnected() <-chan bool
- func ICQDisconnect()
- func Ignore(ObjID uint32)
- func IgnoreOff(ObjID uint32)
- func IgnoreReset()
- func InJournal(s string) <-chan int32
- func InJournalBetweenTimes(str string, timeBegin time.Time, timeEnd time.Time) <-chan int32
- func InParty() <-chan bool
- func Int() <-chan uint32
- func InviteToParty(ID uint32)
- func IsActiveSpellAbility(spellName string) <-chan bool
- func IsContainer(ObjID uint32) <-chan bool
- func IsDead(ObjID uint32) <-chan bool
- func IsFemale(ObjID uint32) <-chan bool
- func IsGump() bool
- func IsGumpCanBeClosed(gumpIndex uint16) <-chan bool
- func IsHidden(ObjID uint32) <-chan bool
- func IsMovable(ObjID uint32) <-chan bool
- func IsNPC(oid uint32) <-chan bool
- func IsObjectExists(oid uint32) <-chan bool
- func IsParalyzed(ObjID uint32) <-chan bool
- func IsPoisoned(ObjID uint32) <-chan bool
- func IsRunning(ObjID uint32) <-chan bool
- func IsTrade() <-chan bool
- func IsWarMode(oid uint32) <-chan bool
- func IsWorldCellPassable(currX, currY uint16, currZ int8, destX, destY uint16, worldNum byte) <-chan m.WorldCellPassable
- func IsYellowHits(ObjID uint32) <-chan bool
- func Journal(stringIndex uint32) <-chan string
- func LastAttack() <-chan uint32
- func LastContainer() <-chan uint32
- func LastJournalMessage() <-chan string
- func LastObject() <-chan uint32
- func LastStatus() <-chan uint32
- func LastTarget() <-chan uint32
- func LegsLayer() byte
- func LhandLayer() byte
- func Life() <-chan uint32
- func LineCount() <-chan uint32
- func LineID() <-chan uint32
- func LineIndex() <-chan uint32
- func LineMsgType() <-chan byte
- func LineName() <-chan string
- func LineTextColor() <-chan uint16
- func LineTextFont() <-chan uint16
- func LineTime() <-chan time.Time
- func LineType() <-chan uint16
- func LowJournal() <-chan uint32
- func Luck() <-chan uint16
- func MR() uint16
- func MRCount() <-chan uint32
- func Mana() <-chan uint32
- func MaxHP() <-chan uint32
- func MaxLife() <-chan uint32
- func MaxMana() <-chan uint32
- func MaxPets() <-chan byte
- func MaxStam() <-chan uint32
- func MaxWeight() <-chan uint16
- func MenuHookPresent() <-chan bool
- func MenuPresent() <-chan bool
- func MobileCanBeRenamed(Mob_ID uint32) <-chan bool
- func MoveItem(itemID uint32, count int32, container uint32, x, y, z int32) <-chan bool
- func MoveItems(container uint32, itemsType, itemsColor uint16, moveIntoID uint32, ...) <-chan bool
- func MoveXY(xdst, ydst uint16, optimized bool, accuracy int32, running bool) <-chan bool
- func MoveXYZ(xdst, ydst uint16, zdst int8, optimized bool, accuracyXY, accurancyZ int32, ...) <-chan bool
- func MoverStop()
- func NRstkLayer() byte
- func NS() uint16
- func NSCount() <-chan uint32
- func NeckLayer() byte
- func NumGumpButton(gumpIndex uint16, value int32) <-chan bool
- func NumGumpCheckBox(gumpIndex uint16, checkBoxID, value int32) <-chan bool
- func NumGumpRadiobutton(gumpIndex uint16, radiobuttonID, value int32) <-chan bool
- func NumGumpTextEntry(gumpIndex uint16, textEntryID int32, value string) <-chan bool
- func ObjAtLayer(LayerType byte) <-chan uint32
- func ObjAtLayerEx(layerType byte, playerID uint32) <-chan uint32
- func OpenDoor()
- func PantsLayer() byte
- func Paralyzed() <-chan bool
- func PartyAcceptInvite()
- func PartyCanLootMe(value bool)
- func PartyDeclineInvite()
- func PartyLeave()
- func PartyMembersList() <-chan []uint32
- func PartyMessageTo(oid uint32, msg string)
- func PartySay(msg string)
- func PauseResumeScript(scriptIndex uint16)
- func PetsCurrent() <-chan byte
- func PoisonResist() <-chan uint16
- func Poisoned() <-chan bool
- func PredictedDirection() <-chan byte
- func PredictedX() <-chan uint16
- func PredictedY() <-chan uint16
- func PredictedZ() <-chan byte
- func PrintScriptMethodsList(fileName string, sortedList bool)
- func ProfileName() <-chan string
- func ProfileShardName() <-chan string
- func ProxyIP() <-chan string
- func ProxyPort() <-chan uint16
- func QuestRequest()
- func Race() <-chan byte
- func ReadStaticsXY(x, y uint16, wnum byte) <-chan []m.StaticsXY
- func RemoveFromParty(ID uint32)
- func RenameMobile(mobId uint32, newName string)
- func ReqVirtuesGump()
- func RequestContextMenu(ID uint32)
- func RequestStats(ObjID uint32)
- func RhandLayer() byte
- func RingLayer() byte
- func RobeLayer() byte
- func RstkLayer() byte
- func SA() uint16
- func SACount() <-chan uint32
- func SS() uint16
- func SSCount() <-chan uint32
- func Salute()
- func Self() <-chan uint32
- func SellLayer() byte
- func SetARExtParams(shardName, charName string, useAtEveryConnect bool)
- func SetARStatus(value bool)
- func SetAutoBuyDelay(Value uint16)
- func SetAutoSellDelay(Value uint16)
- func SetBadLocation(x, y uint16)
- func SetBadObject(otype, color uint16, radius byte)
- func SetCatchBag(ObjectID uint32)
- func SetContextMenuHook(menuID uint32, entryNumber byte)
- func SetDress()
- func SetDressSpeed(Value uint16)
- func SetDropCheckCoord(value bool)
- func SetDropDelay(Value uint32)
- func SetFindDistance(Value uint32)
- func SetFindInNulPoint(v bool)
- func SetFindVertical(Value uint32)
- func SetGlobal(varRegion byte, varName, varValue string)
- func SetGoodLocation(x, y uint16)
- func SetJournalLine(stringIndex uint32, text string)
- func SetMoveBetweenTwoCorners(value bool)
- func SetMoveCheckStamina(Value uint16)
- func SetMoveHeuristicMult(value int32)
- func SetMoveOpenDoor(v bool)
- func SetMoveThroughCorner(value bool)
- func SetMoveThroughNPC(Value uint16)
- func SetMoveTurnCost(value uint32)
- func SetPauseScriptOnDisconnectStatus(value bool)
- func SetPickupedItem(ID uint32)
- func SetRunMountTimer(Value uint16)
- func SetRunUnmountTimer(Value uint16)
- func SetSilentMode(value bool)
- func SetSkillLockState(skillName string, skillState byte)
- func SetStatState(statNum, statState byte)
- func SetWalkMountTimer(Value uint16)
- func SetWalkUnmountTimer(Value uint16)
- func SetWarMode(value bool)
- func Sex() <-chan byte
- func ShardName() <-chan string
- func ShirtLayer() byte
- func ShoesLayer() byte
- func Stam() <-chan uint32
- func StartScript(scriptPath string) <-chan uint16
- func StealthPath() <-chan string
- func Step(direction byte, running bool) <-chan byte
- func StepQ(direction byte, running bool) <-chan int32
- func StopAllScripts()
- func StopMover()
- func StopScript(scriptIndex uint16)
- func Str() <-chan uint32
- func TalismanLayer() byte
- func TargetID() <-chan uint32
- func TargetToObject(ObjectID uint32)
- func TargetToTile(tileModel, x, y uint16, z byte)
- func TargetToXYZ(x, y uint16, z byte)
- func ToggleFly()
- func TorsoHLayer() byte
- func TorsoLayer() byte
- func TradeCheck(tradeNum, num byte) <-chan bool
- func TradeCount() <-chan byte
- func UOSay(text string)
- func UOSayColor(text string, color uint16)
- func UnequipItemsSetMacro()
- func UnsetCatchBag()
- func UseFromGround(objType, color uint16) <-chan uint32
- func UseItemOnMobile(itemSerial, targetSerial uint32)
- func UseObject(ObjectID uint32)
- func UseOtherPaperdollScroll(oid uint32)
- func UsePrimaryAbility()
- func UseProxy() <-chan bool
- func UseSecondaryAbility()
- func UseSelfPaperdollScroll()
- func UseSkill(skillName string)
- func UseType(objType uint16, color uint16) <-chan uint32
- func UseVirtue(VirtueName string)
- func WaistLayer() byte
- func WaitForClientTargetResponse(maxWaitTime time.Duration) <-chan bool
- func WaitGump(value int32)
- func WaitJournalLine(startTime time.Time, str string, maxWaitTime time.Duration) <-chan bool
- func WaitJournalLineSystem(startTime time.Time, str string, maxWaitTime time.Duration) <-chan bool
- func WaitMenu(menuCaption, elementCaption string)
- func WaitTargetGround(ObjType uint16)
- func WaitTargetLast()
- func WaitTargetObject(ObjID uint32)
- func WaitTargetSelf()
- func WaitTargetTile(tile, x, y uint16, z byte)
- func WaitTargetType(ObjType uint16)
- func WaitTargetXYZ(x, y uint16, z byte)
- func WaitTextEntry(value string)
- func WarMode() <-chan bool
- func WarTargetID() <-chan uint32
- func WearItem(layer byte, oid uint32)
- func Weight() <-chan uint16
- func WorldNum() <-chan byte
- type Middleware
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 BandageSelf ¶
func BandageSelf()
func BeardLayer ¶
func BeardLayer() byte
func BookClearText ¶
func BookClearText()
func BookGetPageText ¶
func BookSetHeader ¶
func BookSetHeader(title, author string)
func BookSetPageText ¶
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 BpackLayer ¶
func BpackLayer() byte
func BraceLayer ¶
func BraceLayer() byte
func CancelAllMenuHooks ¶
func CancelAllMenuHooks()
func CancelMenu ¶
func CancelMenu()
func CancelTarget ¶
func CancelTarget()
func CancelTrade ¶
func CancelWaitTarget ¶
func CancelWaitTarget()
func ChangeProfile ¶
func ChangeProfileEx ¶
func ChangeSkillLockState ¶
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 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 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 CloseSimpleGump ¶
func CloseSimpleGump(GumpIndex uint16)
func ColdResist ¶
func ColdResist() <-chan uint16
func ConfirmTrade ¶
func ConfirmTrade(tradeNum byte)
func ConnectedTime ¶
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 Disconnect ¶
func Disconnect()
func DisconnectedTime ¶
func EmptyContainer ¶
func EnergyResist ¶
func EnergyResist() <-chan uint16
func EquipItemsSetMacro ¶
func EquipItemsSetMacro()
func EquipLastWeapon ¶
func EquipLastWeapon()
func FillNewWindow ¶
func FillNewWindow(s string)
func FindAtCoord ¶
func FindFullQuantity ¶
func FindFullQuantity() <-chan uint32
func FindNotoriety ¶
func FindQuantity ¶
func FindQuantity() <-chan uint32
func FindTypeEx ¶
func FindTypesArrayEx ¶
Ищет по заданному массиву типов 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 GameServerIPString ¶
func GameServerIPString() <-chan string
func GetARStatus ¶
func GetARStatus() <-chan bool
func GetActiveAbility ¶
func GetActiveAbility() <-chan string
func GetAltName ¶
func GetAutoBuyDelay ¶
func GetAutoBuyDelay() <-chan uint16
func GetAutoSellDelay ¶
func GetAutoSellDelay() <-chan uint16
func GetBuffBarInfo ¶
func GetBuffBarInfo() <-chan m.BuffBarInfo
func GetCharTitle ¶
func GetCharTitle() <-chan string
func GetClientVersionInt ¶
func GetClientVersionInt() <-chan uint32
func GetClilocByID ¶
_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 GetDirection ¶
func GetDistance ¶
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 GetGumpInfo ¶
_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 GetGumpsCount ¶
func GetGumpsCount() <-chan uint16
func GetIgnoreList ¶
func GetIgnoreList() <-chan []uint32
func GetLastStepQUsedDoor ¶
func GetLastStepQUsedDoor() <-chan uint32
func GetLayerCount ¶
func GetMaxMana ¶
func GetMaxStam ¶
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 GetNextStepZ ¶
func GetNotoriety ¶
func GetPauseScriptOnDisconnectStatus ¶
func GetPauseScriptOnDisconnectStatus() <-chan bool
func GetPickupedItem ¶
func GetPickupedItem() <-chan uint32
func GetQuantity ¶
func GetQuestArrow ¶
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 GetScriptPath ¶
func GetScriptState ¶
func GetShardPath ¶
func GetShardPath() <-chan string
func GetShopList ¶
func GetShopList() <-chan []string
func GetSilentMode ¶
func GetSilentMode() <-chan bool
func GetSkillCap ¶
func GetSkillCurrentValue ¶
func GetSkillLockState ¶
func GetSkillValue ¶
func GetStatLockState ¶
func GetStaticArtBitmap ¶
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 GetSurfaceZ ¶
func GetTileFlags ¶
_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 GetTooltip ¶
func GetTradeContainer ¶
func GetTradeOpponent ¶
func GetTradeOpponentName ¶
func GetWalkMountTimer ¶
func GetWalkMountTimer() <-chan uint16
func GetWalkUnmountTimer ¶
func GetWalkUnmountTimer() <-chan uint16
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 GumpAutoCheckBox ¶
func GumpAutoCheckBox(checkBoxID, value int32)
func GumpAutoRadiobutton ¶
func GumpAutoRadiobutton(radiobuttonID, value int32)
func GumpAutoTextEntry ¶
func HelpRequest ¶
func HelpRequest()
func HighJournal ¶
func HighJournal() <-chan uint32
func HorseLayer ¶
func HorseLayer() byte
func ICQConnect ¶
func ICQConnected ¶
func ICQConnected() <-chan bool
func ICQDisconnect ¶
func ICQDisconnect()
func IgnoreReset ¶
func IgnoreReset()
func InJournalBetweenTimes ¶
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 InviteToParty ¶
func InviteToParty(ID uint32)
func IsActiveSpellAbility ¶
func IsContainer ¶
func IsGumpCanBeClosed ¶
func IsObjectExists ¶
func IsParalyzed ¶
func IsPoisoned ¶
func IsWorldCellPassable ¶
func IsYellowHits ¶
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 LhandLayer ¶
func LhandLayer() byte
func LineMsgType ¶
func LineMsgType() <-chan byte
func LineTextColor ¶
func LineTextColor() <-chan uint16
func LineTextFont ¶
func LineTextFont() <-chan uint16
func LowJournal ¶
func LowJournal() <-chan uint32
func MenuHookPresent ¶
func MenuHookPresent() <-chan bool
func MenuPresent ¶
func MenuPresent() <-chan bool
func MobileCanBeRenamed ¶
func NRstkLayer ¶
func NRstkLayer() byte
func NumGumpButton ¶
func NumGumpCheckBox ¶
func NumGumpRadiobutton ¶
func NumGumpTextEntry ¶
func ObjAtLayer ¶
func ObjAtLayerEx ¶
func PantsLayer ¶
func PantsLayer() byte
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 PauseResumeScript ¶
func PauseResumeScript(scriptIndex uint16)
func PetsCurrent ¶
func PetsCurrent() <-chan byte
func PoisonResist ¶
func PoisonResist() <-chan uint16
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 ProfileName ¶
func ProfileName() <-chan string
func ProfileShardName ¶
func ProfileShardName() <-chan string
func QuestRequest ¶
func QuestRequest()
func RemoveFromParty ¶
func RemoveFromParty(ID uint32)
func RenameMobile ¶
func ReqVirtuesGump ¶
func ReqVirtuesGump()
func RequestContextMenu ¶
func RequestContextMenu(ID uint32)
func RequestStats ¶
func RequestStats(ObjID uint32)
func RhandLayer ¶
func RhandLayer() byte
func SetARExtParams ¶
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 SetCatchBag ¶
func SetCatchBag(ObjectID uint32)
func SetContextMenuHook ¶
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 SetGoodLocation ¶
func SetGoodLocation(x, y uint16)
func SetJournalLine ¶
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 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 ShirtLayer ¶
func ShirtLayer() byte
func ShoesLayer ¶
func ShoesLayer() byte
func StartScript ¶
func StealthPath ¶
func StealthPath() <-chan string
func StopAllScripts ¶
func StopAllScripts()
func StopScript ¶
func StopScript(scriptIndex uint16)
func TalismanLayer ¶
func TalismanLayer() byte
func TargetToObject ¶
func TargetToObject(ObjectID uint32)
func TargetToTile ¶
func TargetToXYZ ¶
func TorsoHLayer ¶
func TorsoHLayer() byte
func TorsoLayer ¶
func TorsoLayer() byte
func TradeCheck ¶
func TradeCount ¶
func TradeCount() <-chan byte
func UOSayColor ¶
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 UseItemOnMobile ¶
func UseItemOnMobile(itemSerial, targetSerial uint32)
func UseOtherPaperdollScroll ¶
func UseOtherPaperdollScroll(oid uint32)
func UsePrimaryAbility ¶
func UsePrimaryAbility()
func UseSecondaryAbility ¶
func UseSecondaryAbility()
func UseSelfPaperdollScroll ¶
func UseSelfPaperdollScroll()
func WaistLayer ¶
func WaistLayer() byte
func WaitJournalLine ¶
func WaitJournalLineSystem ¶
func WaitTargetGround ¶
func WaitTargetGround(ObjType uint16)
func WaitTargetLast ¶
func WaitTargetLast()
func WaitTargetObject ¶
func WaitTargetObject(ObjID uint32)
func WaitTargetSelf ¶
func WaitTargetSelf()
func WaitTargetTile ¶
func WaitTargetType ¶
func WaitTargetType(ObjType uint16)
func WaitTargetXYZ ¶
func WaitTextEntry ¶
func WaitTextEntry(value string)
func WarTargetID ¶
func WarTargetID() <-chan uint32