Members | Descriptions |
---|---|
public Unit getUnit ( int type,String name,uint32_t mode,uint32_t nUnitId) |
Get a unit by type, name, mode and nUnitId. |
public Unit getUnit ( int type,uint32_t classId,uint32_t mode,uint32_t nUnitId) |
Get a unit by type, classId, mode and nUnitId. |
public object[] getPath (uint32_t Area,uint32_t srcX,uint32_t srcY,uint32_t dstX, int dstY,uint32_t reductionType,uint32_t Radius) |
Creates a path (walking or teleporting) from the source to the destination. |
public object[] getPath (uint32_t Area,uint32_t srcX,uint32_t srcY,uint32_t dstX, int dstY,uint32_t reductionType,uint32_t Radius,bool(*)(int32_t x, int32_t y) reject,bool(*)(object curPt, int i, object[] pts) reduce,int32_t(*)(int32_t x, int32_t y) mutate) |
Creates a path (walking or teleporting) from the source to the destination. |
public unsigned short getCollision (uint32_t nLevelId,int32_t nX,int32_t nY) |
Get the collision flags at a given point in a given area. |
public int getMercHP () |
Get the health points of the controlled unit's merc. |
public int getCursorType () |
Get the cursor type from p_D2CLIENT_RegularCursorType. |
public int getCursorType ( int nType) |
Get the cursor type from p_D2CLIENT_RegularCursorType if nType != 1, from p_D2CLIENT_ShopCursorType if nType == 1. |
public int getSkillByName (String skillName) |
Get skill ID by name. |
public String getSkillById ( int skillId) |
Get skill name by ID. |
public String getLocaleString (uint16_t localeId) |
Get the String in the current locale that corresponds to the given id. |
public int getTextSize (String string, int font,bool asObject) |
Get the width and height of the given text in the given font. |
public int getThreadPriority () |
Get the priority of the current thread. |
public bool getUIFlag ( int nUIId) |
Get whether or not a UI flag is set. |
public int getTradeInfo ( int nMode) |
Get the TradeFlag or RecentTradeId. |
public bool getWaypoint ( int nWaypointId) |
Get whether the controlled unit has the given waypoint. |
public D2BSScript getScript (bool currentScript) |
Get the current or first context. |
public D2BSScript getScript ( int threadId) |
Get a script by thread id. |
public D2BSScript getScript (String name) |
Get a script by filename. |
public D2BSScript getScript () |
Get the first script. |
public Room getRoom (uint32_t levelId) |
Get the first room in area given by level id. |
public Room getRoom (uint32_t levelId, int x, int y) |
Get the room that the given point is in from the given level id. |
public Room getRoom ( int x, int y) |
Get the room that the given point is in. |
public Room getRoom () |
Get the first room in the current area. |
public Party getParty () |
Get the first party. |
public Party getParty (String name) |
Get the party line for the player with the given name. |
public Party getParty (uint32_t playerId) |
Get the party line for the player with the given player id. |
public Party getParty ( Unit player) |
Get the party line that corresponds to the given unit. |
public PresetUnit getPresetUnit (uint32_t levelId, int nType, int nClassId) |
Get the first PresetUnit of the given type and class id. |
public PresetUnit getPresetUnits (uint32_t levelId, int nType, int nClassId) |
Get an array of PresetUnit s of the given type and class id. |
public Area getArea () |
Get the Area where the controlled unit currently resides. |
public Area getArea (int32_t nArea) |
Get the Area for area ID nArea. |
public String getBaseStat (String szTableName,int32_t nClassId,String szStatName) |
Get the base stat from the given table with the given class ID and stat name. |
public String getBaseStat (int32_t nBaseStat,int32_t nClassId,String szStatName) |
Get the base stat from the given table with the given class ID and stat name. |
public String getBaseStat (String szTableName,int32_t nClassId,int32_t nStat) |
Get the base stat from the given table with the given class ID and stat ID. |
public String getBaseStat (int32_t nBaseStat,int32_t nClassId,int32_t nStat) |
Get the base stat from the given table with the given class ID and stat ID. |
public Control getControl (int32_t nType,int32_t nX,int32_t nY,int32_t nXSize,int32_t nYSize) |
Get the control specified by type, location and size. |
public bool getPlayerFlag ( int nFirstUnitId, int nSecondUnitId, int nFlag) |
Get the relation between two units. |
public int getTickCount () |
Get the tick count. |
public Unit getInteractedNPC () |
Get the Unit that the controlled Unit is currently interacting with. |
public void print (...) |
Print the String representation of the arguments to the console. |
public void delay (uint32_t nDelay) |
Delay for nDelay milliseconds. |
public D2BSScript load (String file,...) |
Load file and create a thread with it's main function. |
public bool isIncluded (String file) |
Determine whether a file has been included yet or not. |
public bool include (String file) |
Include file from the scriptDir\libs directory. |
public void stop ( int stop) |
Conditionally stop current script. |
public void stop (bool stop) |
Conditionnaly stop current script. |
public int rand (int32_t low,int32_t high) |
Return a random number between low and high. |
public void copy (String txt) |
Copy txt to clipboard. |
public int sendCopyData (String windowClassName,String windowName,int32_t nModeId,String data) |
Send data to another window by means of the WM_COPYDATA message. |
public int sendCopyData (HWND hWnd,String dummy,int32_t nModeId,String data) |
Send data to another window by means of the WM_COPYDATA message. |
public String sendDDE (int32_t mode,String pszDDEServer,String pszTopic,String pszItem) |
Send data to a DDE server by means of DdeClientTransaction. |
public bool keystate ( int vKey) |
Get whether or not a key is pressed. |
public void addEventListener (String event,Function eventHandler) |
Add an event handler to the list of listeners for the given event. |
public void removeEventListener (String event,Function eventHandler) |
Removes a previously added event from the listener list. |
public void clearEvent (String event) |
Clear the event handler list for given event. |
public void clearAllEvents () |
Clear all event handlers (from all events). |
public bool js_strict () |
Get whether or not the JSOPTION_STRICT flag is set. |
public void js_strict (bool setStrictFlag) |
Set or clear the JSOPTION_STRICT flag. |
public String version () |
Get the D2BS version string. |
public void version ( int a) |
Print the D2BS version string. |
public void scriptBroadcast (...) |
Broadcast a message to all other scripts. |
public String sqlite_version () |
Get the sqlite version string (from sqlite3_version). |
public double sqlite_memusage () |
Return the sqlite memory usage. |
public Folder dopen (String name) |
Get the Folder object for the directory scriptPath\name. |
public void debugLog (...) |
Log the String representation of the arguments. |
public void showConsole () |
Show the console. |
public void hideConsole () |
Hide the console. |
public void login () |
Loads the default (either from config or copydata or DDE) profile from d2bs.ini and gets to the lobby (for battle.net chars) or into a game (for single player characters). |
public void login (String profile) |
Loads the profile from d2bs.ini and gets to the lobby (for battle.net chars) or into a game (for single player characters). |
public bool selectCharacter (String profile) |
Select the character from the given profile. |
public void createGame (String name,String pass,int32_t diff) |
Create a game with the given name and password in the given difficulty. |
public void joinGame (String name,String pass) |
Join a game with the given name and password. |
public void addProfile (String profile,String mode,String gateway,String username,String password,String charname, int spDifficulty) |
Create a profile with the given profile name, mode, gateway, username, password, character name and single player difficulty. |
public int getLocation () |
Get the current OOG location. |
public void loadMpq (String path) |
Load an mpq file. |
public bool submitItem () |
Submit the item on the cursor to the open screen (like the add sockets screen). |
public int getMouseCoords (bool nFlag,bool nReturn) |
Get the mouse coordinates (in screen or map space) and return as an array. |
public Unit copyUnit ( Unit other) |
Copy the cached data associated with given unit. |
public bool clickMap (uint16_t nClickType,uint16_t nShift, Unit toClick) |
Click on the map with the given click type and possibly shift at the given unit. |
public bool clickMap (uint16_t nClickType,bool nShift, Unit toClick) |
Click on the map with the given click type and possibly shift at the given unit. |
public bool clickMap (uint16_t nClickType,uint16_t nShift,uint16_t nX,uint16_t nY) |
Click on the map with the given click type and possibly shift at the given point. |
public bool clickMap (uint16_t nClickType,bool nShift,uint16_t nX,uint16_t nY) |
Click on the map with the given click type and possibly shift at the given point. |
public bool acceptTrade ( int action) |
Get or do something to do with accepting trade. |
public bool acceptTrade () |
Accept a trade if not already accepted, cancel a trade if already accepted. |
public void tradeOk () |
Hit the OK button to open the trade window. |
public object[] getDialogLines () |
Get the lines of dialog of whatever you're talking to. |
public void beep ( int nBeepId) |
Beep with beep ID nBeepId. |
public void clickItem ( Unit item) |
Click an item. |
public void clickItem ( int nClickType, int nBodyLoc) |
Click on a body location with a certain click type. |
public void clickItem ( int nClickType, Unit item) |
Click on a given item with the given click type. |
public void clickItem ( int nClickType, int nX, int nY, int nLoc) |
Click an item location with the given click type. |
public double getDistance ( Unit a) |
Get the euclidean distance from me to a. |
public double getDistance ( Unit a, Unit b) |
Get the euclidean distance from a to b. |
public double getDistance ( Unit a,int32_t bx,int32_t by) |
Get the euclidean distance from a to b. |
public double getDistance (int32_t ax,int32_t ay) |
Get the euclidean distance from me to a. |
public double getDistance (int32_t ax,int32_t ay, Unit b) |
Get the euclidean distance from a to b. |
public double getDistance (int32_t ax,int32_t ay,int32_t bx,int32_t by) |
Get the euclidean distance from a to b. |
public void gold ( int nGold, int nMode) |
Do something with some gold. |
public int checkCollision ( Unit a, Unit b, int nBitMask) |
Check if two units collide. |
public bool playSound ( int nSoundId) |
Play d2 sound by id. |
public void quit () |
Quit the game. |
public void quitGame () |
Quit Diablo II. |
public bool say (...) |
Say the string equivalent of the each of the arguments. |
public bool clickParty ( Party player, int nMode) |
Click one of the buttons in the party screen for the given player. |
public int weaponSwitch (int32_t dummy) |
Get which weapon switch is being used. |
public void transmute () |
Hit the transmute button. |
public void useStatPoint (uint16_t statType,uint32_t count) |
Use a stat point. |
public void useSkillPoint (uint16_t skill,uint32_t count) |
Use a skill point. |
public void takeScreenshot () |
Take a screenshot. |
public Object screenToAutomap (Object arg) |
Convert a point from screen coordinates to automap coordinates. |
public Object screenToAutomap ( int ix, int iy) |
Convert a point from screen coordinates to automap coordinates. |
public Object automapToScreen (Object arg) |
Convert a point from automap coordinates to screen coordinates. |
public Object automapToScreen ( int ix, int iy) |
Convert a point from automap coordinates to screen coordinates. |
public String md5 (String str) |
Takes the md5 hash. |
public String sha1 (String str) |
Takes the sha1 hash. |
public String sha256 (String str) |
Takes the sha256 hash. |
public String sha384 (String str) |
Takes the sha384 hash. |
public String sha512 (String str) |
Takes the sha512 hash. |
public String md5_file (String file) |
Take the md5 hash of a file. |
public String sha1_file (String file) |
Take the sha1 hash of a file. |
public String sha256_file (String file) |
Take the sha256 hash of a file. |
public String sha384_file (String file) |
Take the sha384 hash of a file. |
public String sha512_file (String file) |
Take the sha512 hash of a file. |
public
Unit
getUnit
(
int
type,String name,uint32_t mode,uint32_t nUnitId)
{#group__globalFunctions_1gab92645722228c1b850c56a97a331e64e}
Get a unit by type, name, mode and nUnitId.
-
type
The type of the unit. Set to -1 to get any unit. 100 gets the cursor item, 101 gets the selected unit. -
name
The name of the unit to look for. -
mode
Either the mode being searched for, or a bitmask with bit 29 set and bits 0-28 corresponding to modes of units being searched for. -
nUnitId
The unique id of the unit.
The first unit found that matches the description.
public
Unit
getUnit
(
int
type,uint32_t classId,uint32_t mode,uint32_t nUnitId)
{#group__globalFunctions_1ga00d41e69e334872da0d57a9406de86df}
Get a unit by type, classId, mode and nUnitId.
-
type
The type of the unit. Set to -1 to get any unit. 100 gets the cursor item, 101 gets the selected unit. -
classId
The class id of the unit. -
mode
Either the mode being searched for, or a bitmask with bit 29 set and bits 0-28 corresponding to modes of units being searched for. -
nUnitId
The unique id of the unit.
The first unit found that matches the description.
public object[]
getPath
(uint32_t Area,uint32_t srcX,uint32_t srcY,uint32_t dstX,
int
dstY,uint32_t reductionType,uint32_t Radius)
{#group__globalFunctions_1ga7913f6338480cc180c015198b6c18024}
Creates a path (walking or teleporting) from the source to the destination.
Returns an array of points that form a path from the source to the destination. Takes Area ID(s), source and destination points, walking or teleporting and range as parameters.
-
[Area](api-undefined.md#classArea)
The Area ID to path through. -
srcX
The source X coordinate. -
srcY
The source Y coordinate. -
dstX
The destination X coordinate. -
dstY
The destination Y coordinate. -
reductionType
The type of reduction: {0 - walking, 1 - teleport, 2 - none} -
Radius
The distance between each point.
The path as an array of objects with x and y properties.
public object[]
getPath
(uint32_t Area,uint32_t srcX,uint32_t srcY,uint32_t dstX,
int
dstY,uint32_t reductionType,uint32_t Radius,bool(*)(int32_t x, int32_t y) reject,bool(*)(object curPt,
int
i, object[] pts) reduce,int32_t(*)(int32_t x, int32_t y) mutate)
{#group__globalFunctions_1ga051897c1e76c0ceeccd946dbedc6ea54}
Creates a path (walking or teleporting) from the source to the destination.
Returns an array of points that form a path from the source to the destination. Takes Area ID, source and destination points, walking or teleporting, range and reduction or not as parameters.
-
[Area](api-undefined.md#classArea)
The Area ID to path through. -
srcX
The source X coordinate. -
srcY
The source Y coordinate. -
dstX
The destination X coordinate. -
dstY
The destination Y coordinate. -
reductionType
The type of reduction: {0 - walking, 1 - teleport, 2 - none, 3 - user specified} -
Radius
The distance between each point. -
reject
Called on start and end to determine if point is valid. -
reduce
Function to determine whether to keep point. Returns true if point should be kept, false if point should be eliminated. -
mutate
Called on the start/end if it isn't/is rejected respectively. This is done before path generation.
The path as an array of objects with x and y properties.
public unsigned short
getCollision
(uint32_t nLevelId,int32_t nX,int32_t nY)
{#group__globalFunctions_1gac3a89f2d8c4940ae49dce43fbe2f626b}
Get the collision flags at a given point in a given area.
-
nLevelId
The level id of the area in question. -
nX
The x coordinate of the point in question. -
nY
The y coordinate of the point in question.
The collision flags. For details see: http://forums.d2botnet.org/viewtopic.php?f=18&t=1212 .
Get the health points of the controlled unit's merc.
The health points.
public
int
getCursorType
()
{#group__globalFunctions_1gaa0bc4f7877d6992600202b8dce442787}
Get the cursor type from p_D2CLIENT_RegularCursorType.
Todo: Determine what the return value means.
The regular cursor type.
public
int
getCursorType
(
int
nType)
{#group__globalFunctions_1ga9b3530843295a8ee8fa59a3130ae7409}
Get the cursor type from p_D2CLIENT_RegularCursorType if nType != 1, from p_D2CLIENT_ShopCursorType if nType == 1.
nType
What type of cursor to get. 1 - ShopCursorType, other - RegularCursorType.
Todo: Determine what the return value means.
The cursor type.
public
int
getSkillByName
(String skillName)
{#group__globalFunctions_1gaee860cd7482aff8e89519314a0f86955}
Get skill ID by name.
skillName
The skill name.
The skill ID.
public String
getSkillById
(
int
skillId)
{#group__globalFunctions_1ga14cda78dea3cf554c8ebeeb0834039c9}
Get skill name by ID.
skillId
The skill ID.
The skill name.
public String
getLocaleString
(uint16_t localeId)
{#group__globalFunctions_1gaf2065d798cd6a0337fb94f7bae718283}
Get the String in the current locale that corresponds to the given id.
localeId
The id of the String.
The String in the current locale.
public
int
getTextSize
(String string,
int
font,bool asObject)
{#group__globalFunctions_1ga19d918388535584b388c00c57d76ab47}
Get the width and height of the given text in the given font.
-
string
The string to get the size of. -
font
The font to use. -
asObject
False to return as an array.
The width and height of the text. 0 - width, 1 - height.
-
string
The string to get the size of. -
font
The font to use. -
asObject
True to return as an object.
The width and height of the text. Has properties .width and .height.
public
int
getThreadPriority
()
{#group__globalFunctions_1ga6ab5869695c97ce6e4fbc6899e16a75d}
Get the priority of the current thread.
The priority.
Get whether or not a UI flag is set.
Todo: Get a reference for the UI IDs.
nUIId
The ID of the UI in question.
Whether or not the flag is set.
public
int
getTradeInfo
(
int
nMode)
{#group__globalFunctions_1gaedebe009d3f6c0afeab5cb544f430767}
Get the TradeFlag or RecentTradeId.
Get the RecentTradeName.
Todo: Determine what this means.
nMode
What to return. 0 - TradeFlag, 2 - RecentTradeId.
The TradeFlag or RecentTradeId.
Currently broken, returns null.
Todo: Determine what these are.
nMode
What to return. 1 - RecentTradeName.
The RecentTradeName.
public bool
getWaypoint
(
int
nWaypointId)
{#group__globalFunctions_1ga4561d06e77835b04e0794758844bd987}
Get whether the controlled unit has the given waypoint.
nWaypointId
The area id of the waypoint in question.
Whether or not the controlled unit has the waypoint.
public
D2BSScript
getScript
(bool currentScript)
{#group__globalFunctions_1ga8340268c49de1e5f34588c01b0cf971d}
Get the current or first context.
currentScript
Whether to get the current script (true) or the first (false).
A D2BSScript object for the request script.
public
D2BSScript
getScript
(
int
threadId)
{#group__globalFunctions_1ga02ad0d69faff60c7061a98a3e8a2b53b}
Get a script by thread id.
threadId
The thread id of the script to get.
A D2BSScript object for the script from the given thread.
public
D2BSScript
getScript
(String name)
{#group__globalFunctions_1gac202e144c149fa59378fd01585e6a2bd}
Get a script by filename.
name
The filename of the script to find.
A D2BSScript object for the script.
public
D2BSScript
getScript
()
{#group__globalFunctions_1ga822bdc4cbce00ca342a05bc29ffae76e}
Get the first script.
A D2BSScript representing the first script in the runtime.
Get the first room in area given by level id.
levelId
The id of the area to get the room from, or 0 to get the room the controlled unit is in.
The first room in the area.
public
Room
getRoom
(uint32_t levelId,
int
x,
int
y)
{#group__globalFunctions_1ga6c10567ae9eac427ef0770edb2ab8c21}
Get the room that the given point is in from the given level id.
-
levelId
The level id to look in. -
x
The x coordinate to find a room for. -
y
The y coordinate to find a room for.
The room at the given point.
Get the room that the given point is in.
-
x
The x coordinate to find a room for. -
y
The y coordinate to find a room for.
The room at the given point.
Get the first room in the current area.
The first room in the current area.
Get the first party.
The first party.
Get the party line for the player with the given name.
name
The name of the player to search for
The party line
public
Party
getParty
(uint32_t playerId)
{#group__globalFunctions_1ga3fa567c623c83fe382918a7c6fb49978}
Get the party line for the player with the given player id.
playerId
The party line
Get the party line that corresponds to the given unit.
player
Unit
The party line
public
PresetUnit
getPresetUnit
(uint32_t levelId,
int
nType,
int
nClassId)
{#group__globalFunctions_1ga6bf8c5a903fcf00dcd2504e8f4dc4ff7}
Get the first PresetUnit of the given type and class id.
-
levelId
The area id of the level to look for a PresetUnit in. -
nType
The type of the PresetUnit. See getUnit for type codes. -
nClassId
The class id to find. See: http://forums.d2botnet.org/viewtopic.php?f=18&t=986 and http://forums.d2botnet.org/viewtopic.php?f=18&t=985 .
The first PresetUnit found of type nType and class ID nClassId.
public
PresetUnit
getPresetUnits
(uint32_t levelId,
int
nType,
int
nClassId)
{#group__globalFunctions_1gaf77d2fb8bcab572d328c5764155be78d}
Get an array of PresetUnit s of the given type and class id.
-
levelId
The area id of the level to look for PresetUnit s in. -
nType
The type of the PresetUnit. See getUnit for type codes. -
nClassId
The class id to find. See: http://forums.d2botnet.org/viewtopic.php?f=18&t=986 and http://forums.d2botnet.org/viewtopic.php?f=18&t=985 .
An array of PresetUnit s found of type nType and class ID nClassId.
Get the Area where the controlled unit currently resides.
An Area object for the current object.
Get the Area for area ID nArea.
nArea
The area ID.
An Area object.
public String
getBaseStat
(String szTableName,int32_t nClassId,String szStatName)
{#group__globalFunctions_1gab4ebba6bce777cb9705e199af1d08bc8}
Get the base stat from the given table with the given class ID and stat name.
-
szTableName
The name of the table to look in. -
nClassId
The class ID of the ... -
szStatName
The stat name.
Todo: Determine what these tables are.
The stat.
-
szTableName
The name of the table to look in. -
nClassId
The class ID of the ... -
szStatName
The stat name.
Todo: Determine what these tables are.
The stat.
-
szTableName
The name of the table to look in. -
nClassId
The class ID of the ... -
szStatName
The stat name.
Todo: Determine what these tables are.
The stat.
-
szTableName
The name of the table to look in. -
nClassId
The class ID of the ... -
szStatName
The stat name.
Todo: Determine what these tables are.
The stat.
public String
getBaseStat
(int32_t nBaseStat,int32_t nClassId,String szStatName)
{#group__globalFunctions_1ga79338ba3a14fe002f38d987fed2809b3}
Get the base stat from the given table with the given class ID and stat name.
-
nBaseStat
The stat to look up. -
nClassId
The class ID of the ... -
szStatName
The stat name.
Todo: Determine what these tables are.
The stat.
-
nBaseStat
The stat to look up. -
nClassId
The class ID of the ... -
szStatName
The stat name.
Todo: Determine what these tables are.
The stat.
-
nBaseStat
The stat to look up. -
nClassId
The class ID of the ... -
szStatName
The stat name.
Todo: Determine what these tables are.
The stat.
-
nBaseStat
The stat to look up. -
nClassId
The class ID of the ... -
szStatName
The stat name.
Todo: Determine what these tables are.
The stat.
public String
getBaseStat
(String szTableName,int32_t nClassId,int32_t nStat)
{#group__globalFunctions_1gac86c8437c691e21b5593552ab9def9ba}
Get the base stat from the given table with the given class ID and stat ID.
-
szTableName
The name of the table to look in. -
nClassId
The class ID of the ... -
nStat
The stat ID.
Todo: Determine what these tables are.
The stat.
-
szTableName
The name of the table to look in. -
nClassId
The class ID of the ... -
nStat
The stat ID.
Todo: Determine what these tables are.
The stat.
-
szTableName
The name of the table to look in. -
nClassId
The class ID of the ... -
nStat
The stat ID.
Todo: Determine what these tables are.
The stat.
-
szTableName
The name of the table to look in. -
nClassId
The class ID of the ... -
nStat
The stat ID.
Todo: Determine what these tables are.
The stat.
public String
getBaseStat
(int32_t nBaseStat,int32_t nClassId,int32_t nStat)
{#group__globalFunctions_1gafcfdd2f8d3eb3a2c30436ddfc4add78b}
Get the base stat from the given table with the given class ID and stat ID.
-
nBaseStat
The stat to look up. -
nClassId
The class ID of the ... -
nStat
The stat ID.
Todo: Determine what these tables are.
The stat.
-
nBaseStat
The stat to look up. -
nClassId
The class ID of the ... -
nStat
The stat ID.
Todo: Determine what these tables are.
The stat.
-
nBaseStat
The stat to look up. -
nClassId
The class ID of the ... -
nStat
The stat ID.
Todo: Determine what these tables are.
The stat.
-
nBaseStat
The stat to look up. -
nClassId
The class ID of the ... -
nStat
The stat ID.
Todo: Determine what these tables are.
The stat.
public
Control
getControl
(int32_t nType,int32_t nX,int32_t nY,int32_t nXSize,int32_t nYSize)
{#group__globalFunctions_1gaad0e54fb02bc1ce440b96204167da80f}
Get the control specified by type, location and size.
-1 indicates parameter not to be matched against.
-
nType
The type of control (button, text box, etc.) -
nX
The x coordinate of the control of the control to find. -
nY
The y coordinate of the control of the control to find. -
nXSize
The width of the control. -
nYSize
The height of the control.
Todo: Get a reference for nType
A Control object representing the Control found.
public bool
getPlayerFlag
(
int
nFirstUnitId,
int
nSecondUnitId,
int
nFlag)
{#group__globalFunctions_1gaa18d78f3e5bb312f53b602247ec66fd3}
Get the relation between two units.
-
nFirstUnitId
The unit id for the unit making the relationship. -
nSecondUnitId
The unit id for the unit receiving the relationship. -
nFlag
The relationship.
Todo: Determine what the flags are.
Todo: Should this return bool instead of int? (i.e. change the d2bs code).
Whether or not the relationship is of the type specified.
public
int
getTickCount
()
{#group__globalFunctions_1gad6eff12ded45cc505954f4763a71eae3}
Get the tick count.
Returns GetTickCount().
The tick count.
public
Unit
getInteractedNPC
()
{#group__globalFunctions_1ga3338c7af7db3773f41edb61bf9c5873c}
Get the Unit that the controlled Unit is currently interacting with.
The Unit currently being interacted with.
public void
print
(...)
{#group__globalFunctions_1ga428513e838de3670e09b242cde1f0f6b}
Print the String representation of the arguments to the console.
public void
delay
(uint32_t nDelay)
{#group__globalFunctions_1ga95cd2552eeef0300ab5bae0ee284f82d}
Delay for nDelay milliseconds.
This is done by suspending the context, sleeping, then resuming the context for short (<50 ms) delays. For longer delays the context is suspended, 50ms are slept away, the context is resumed, sequence repeats until time slept is greater then nDelay ms.
nDelay
Milliseconds to sleep.
public
D2BSScript
load
(String file,...)
{#group__globalFunctions_1gabb55e1126cb1e7626356bd529f6bc965}
Load file and create a thread with it's main function.
File taken from scriptDir\file. All remaining parameters are passed to the script.
file
The filename of the script.
If successful returns the new script object representing the thread of the thread. Otherwise it returns null.
public bool
isIncluded
(String file)
{#group__globalFunctions_1gae9d2eb16bc4dc333da24e3d968897f67}
Determine whether a file has been included yet or not.
File taken from scriptDir\libs\file
file
Filename of the file that might have been included.
Whether or not the file has been included.
public bool
include
(String file)
{#group__globalFunctions_1ga41df84bb09ce63ef47fd30ddf980294b}
Include file from the scriptDir\libs directory.
file
Filename of the file to include.
Whether the inclusion was successful.
Conditionally stop current script.
stop
1 if current script should be stopped.
public void
stop
(bool stop)
{#group__globalFunctions_1gaaff9311fc25289798786b3c364291a28}
Conditionnaly stop current script.
stop
True if current script should be stopped.
public
int
rand
(int32_t low,int32_t high)
{#group__globalFunctions_1ga6cbf7046bc4629083c0d50f6c5ce8843}
Return a random number between low and high.
Uses C rand() when out of game, and D2GAME_D2Rand with the game seed while in game.
-
low
The lowest possible integer to return. -
high
The highest possible integer to return.
A random integer in the range [low,high].
public void
copy
(String txt)
{#group__globalFunctions_1gaca5b8f5b2f8d97182bab3979920352e4}
Copy txt to clipboard.
txt
Text to copy to the clipboard.
public
int
sendCopyData
(String windowClassName,String windowName,int32_t nModeId,String data)
{#group__globalFunctions_1gad4e03d1abafaa3beab0e1cbb90ca8e37}
Send data to another window by means of the WM_COPYDATA message.
Uses FindWindow to get the HWND and SendMessage to send the message.
-
windowClassName
The class name of the receiving window. -
windowName
The window name of the receiving window. -
nModeId
Data to be sent as the dwData member of the copy data. -
data
Data to be send as the lpData member of the copy data.
The result of SendMessage.
public
int
sendCopyData
(HWND hWnd,String dummy,int32_t nModeId,String data)
{#group__globalFunctions_1ga3dc20441410e40f237213140436a68d3}
Send data to another window by means of the WM_COPYDATA message.
Uses SendMessage to send the message to hWnd.
-
hWnd
The handle to the receiving window. -
dummy
Ignored. -
nModeId
Data to be sent as the dwData member of the copy data. -
data
Data to be send as the lpData member of the copy data.
The result of SendMessage.
public String
sendDDE
(int32_t mode,String pszDDEServer,String pszTopic,String pszItem)
{#group__globalFunctions_1ga1b7c45afc2b2302e309c1376d3ecf83f}
Send data to a DDE server by means of DdeClientTransaction.
mode
The mode of transaction to use.
0 - Do command given by pszItem with an XTYP_REQUEST and get the resulting data.
1 - Do command given by pszItem with an XTYP_POKE sending ""
2 - Do command with an XTYP_EXECUTE sending ""
-
pszDDEServer
The service name of the DDE server to connect to. -
pszTopic
The topic with which to start the connection. -
pszItem
Data to be sent.
Result data if mode was 0.
Get whether or not a key is pressed.
Returns the value of GetAsyncKeyState.
vKey
The virtual key code for the key in question. See: http://msdn.microsoft.com/en-us/library/dd375731%28v=VS.85%29.aspx
Whether not the key is pressed.
public void
addEventListener
(String event,Function eventHandler)
{#group__globalFunctions_1gaef5f2e6f72ff80cc13fd4ab84ab34810}
Add an event handler to the list of listeners for the given event.
event
The name of the event. Can be:
melife (uint32_t dwLife)
memana (uint32_t dwMana)
keyup (uint32_t key)
keydown (uint32_t key)
bool keyupblock (uint32_t key) - Returns true to block event from Diablo II
bool keydownblock (uint32_t key) - Returns true to block event from Diablo II
playerassign (uint32_t unitId)
mouseclick (uint32_t button, uint32_t x, uint32_t y, bool bUp)
mousemove (uint32_t x, uint32_t y)
scriptmsg (...)
golddrop (uint32_t gId, uint32_t Mode)
chatmsg (String lpszNick, String lpszMsg)
bool chatmsgblocker (String lpszNick, String lpszMsg) - Returns true to block event from Diablo II
whispermsg (String lpszNick, String lpszMsg)
bool whispermsgblocker (String lpszNick, String lpszMsg) - Returns true to block event from Diablo II
copydata (int32_t dwMode, String lpszMsg)
itemaction (uint32_t gId, uint32_t mode, String code, Bool global)
gameevent (BYTE mode, DWORD param1, DWORD param2, String name1, String name2)
From http://www.blizzhackers.cc/viewtopic.php?t=392307 Dark_Mage-
mode:
0x00 - "%Name1(%Name2) dropped due to time out." 0x01 - "%Name1(%Name2) dropped due to errors." 0x02 - "%Name1(%Name2) joined our world. Diablo's minions grow stronger." 0x03 - "%Name1(%Name2) left our world. Diablo's minions weaken." 0x04 - "%Name1 is not in the game." 0x05 - "%Name1 is not logged in."
0x06 - "%Name1 was Slain by %Name2" BYTE Param2 = Unit Type of Slayer (0x00 = Player, 0x01 = NPC) if Type = Player, Name2 = Slayer Character Name & DWORD Param1 = Slayer Character Type if Type = NPC, DWORD Param1 = Monster Id Code from MPQ (points to string for Name2) if Type = NPC & Monster is Unique, Name2 = Unique Monster Id
0x07 - Player Relations (Bottom Left Text) DWORD Param1 = Player Id Player Id = Pointer to Character Name BYTE Param2 = Action Taken Actions: 0x01 - "%Player permits you to loot his corpse." 0x02 - "%Player permits you to loot her corpse." 0x03 - "%Player has declared hostility towards you." 0x04 - "%Player is no longer hostile towards you." 0x05 - "%Player invites you to ally against the forces of evil." 0x06 - "%Player has canceled party invite." 0x07 - "%Player has joined your party to fight the forces of evil." 0x08 - "You are now allied with %Player." 0x09 - "%Player has left your party." 0x0a - "%Player no longer allows you to access his corpse." 0x0b - "%Player no longer allows you to access her corpse."
0x08 - "%Name1 is busy." 0x09 - "You must wait a short time to trade with that player."
0x0a - "%Name1 has items in his box." if Name1 = 0x00, "You have items in your box."
0x0b - 0x0c - 0x0d - "%Name1 is not listening to you." 0x0e - Received on 'Not enough mana' speech. 0x0f - "Realm going down in %Param1 minutes." 0x10 - "You must wait a short time to declare hostility with that player." 0x11 - "%Param1 Stones of Jordan Sold to Merchants" 0x12 - "Diablo Walks the Earth"
eventHandler
A function with the signature listed above that handles the event.
public void
removeEventListener
(String event,Function eventHandler)
{#group__globalFunctions_1gaee02cb255ac39d16c7035fb1b58c70ed}
Removes a previously added event from the listener list.
-
event
The event name (the one used to add the event). -
eventHandler
The handler to remove.
public void
clearEvent
(String event)
{#group__globalFunctions_1ga185f0dafe7fd58fd565b8ce3b460541b}
Clear the event handler list for given event.
event
The name of the event to clear the handler list for.
public void
clearAllEvents
()
{#group__globalFunctions_1ga229f0f1b263c13dc1a2c5bdcb51a5320}
Clear all event handlers (from all events).
public bool
js_strict
()
{#group__globalFunctions_1ga7b204d249e4e2d8274bec860070f1be3}
Get whether or not the JSOPTION_STRICT flag is set.
Whether or not the strict flag is set.
public void
js_strict
(bool setStrictFlag)
{#group__globalFunctions_1gae9bcfbfe5b3392c7533b960c25720b4f}
Set or clear the JSOPTION_STRICT flag.
setStrictFlag
The new JSOPTION_STRICT state.
public String
version
()
{#group__globalFunctions_1ga8972d7cb64b90764c110de40e134cfbc}
Get the D2BS version string.
The D2BS version string.
Print the D2BS version string.
public void
scriptBroadcast
(...)
{#group__globalFunctions_1ga2dea3ce2441ba8f7a7e4c5bdf1be7bba}
Broadcast a message to all other scripts.
D2BS calls each scripts scriptmsg event listeners with the messages passed in.
public String
sqlite_version
()
{#group__globalFunctions_1ga182b9023c5495a885298b7f981ee8919}
Get the sqlite version string (from sqlite3_version).
The sqlite version string.
public double
sqlite_memusage
()
{#group__globalFunctions_1gae497b684eaeacd9196d73700e4d57d52}
Return the sqlite memory usage.
Get the Folder object for the directory scriptPath\name.
name
The name of the Folder to open.
A Folder object representing the Folder name.
public void
debugLog
(...)
{#group__globalFunctions_1gacab2f81ca665988be5ca4ceb60503073}
Log the String representation of the arguments.
public void
showConsole
()
{#group__globalFunctions_1ga084bae5a15c2ac3f27ea93f3a03ca0ce}
Show the console.
public void
hideConsole
()
{#group__globalFunctions_1gaaaafa71c8fdd6db81a134ae4aaa355db}
Hide the console.
public void
login
()
{#group__globalFunctions_1gaf76b7b46958dabf5e4ee9a492f0ec3fa}
Loads the default (either from config or copydata or DDE) profile from d2bs.ini and gets to the lobby (for battle.net chars) or into a game (for single player characters).
String
May throw one of the following:
"invalid character name" - If it fails to select the character.
"Failed to click the Single button?" - If it fails to click the single player button.
"Failed to click the 'Battle.net' button?" - If it fails to click the battle.net button.
"Failed to click the 'Other Multiplayer' button?" - If it fails to click the Other Multiplayer button.
"Failed to click the 'Open Battle.net' button?" - If it fails to click the Open battle.net button.
"Failed to click the 'TCP/IP' button?" - If it fails to click the TCP/IP button.
"Failed to click the 'Host Game' button?" - If it fails to click the Host Game (TCP/IP) button.
"Failed to click the 'Join Game' button?" - If it fails to click the Join Game (TCP/IP) button.
"Failed to click the OK button" - If it fails to click the OK button (TCP/IP enter IP address).
"Failed to find the 'Host IP Address' text-edit box." - If it can't find the host IP address (TCP/IP) text box.
"Could not get the IP address from the profile in the d2bs.ini file." - If the user failed to specify the IP address in the d2bs.ini file.
"Failed to click the exit button?" - If it is login and fails to click the exit button.
"Failed to set the 'Username' text-edit box.' - If it can't find the username control.
"Failed to set the 'Password' text-edit box." - If it can't find the password control.
"Failed to click the 'Log in' button?" - If it can't click the login button.
"Failed to click the 'Normal Difficulty' button?" - If it can't click the normal button in single player game creation.
"Failed to click the 'Nightmare Difficulty' button?" - If it can't click the nightmare button in single player game creation.
"Failed to click the 'Hell Difficulty' button?" - If it can't click the hell button in single player game creation.
"Invalid single player difficulty level specified!" - If the difficulty level is invalid.
"Unable to connect" - If the unable to connect screen is shown.
"CD-Key in use" - If the cdkey in use screen is shown.
"Bad account or password" - If the username/password wrong screen is shown.
"Realm Down" - If the realm down message is shown.
"Unhandled login location" - If the game is in an unsupported location.
public void
login
(String profile)
{#group__globalFunctions_1gad9588235f179db8af822d1356337b021}
Loads the profile from d2bs.ini and gets to the lobby (for battle.net chars) or into a game (for single player characters).
profile
The profile to load.
String
May throw one of the following:
"invalid character name" - If it fails to select the character.
"Failed to click the Single button?" - If it fails to click the single player button.
"Failed to click the 'Battle.net' button?" - If it fails to click the battle.net button.
"Failed to click the 'Other Multiplayer' button?" - If it fails to click the Other Multiplayer button.
"Failed to click the 'Open Battle.net' button?" - If it fails to click the Open battle.net button.
"Failed to click the exit button?" - If it is login and fails to click the exit button.
"Failed to set the 'Username' text-edit box.' - If it can't find the username control.
"Failed to set the 'Password' text-edit box." - If it can't find the password control.
"Failed to click the 'Log in' button?" - If it can't click the login button.
"Failed to click the 'Normal Difficulty' button?" - If it can't click the normal button in single player game creation.
"Failed to click the 'Nightmare Difficulty' button?" - If it can't click the nightmare button in single player game creation.
"Failed to click the 'Hell Difficulty' button?" - If it can't click the hell button in single player game creation.
"Invalid single player difficulty level specified!" - If the difficulty level is invalid.
"Unable to connect" - If the unable to connect screen is shown.
"CD-Key in use" - If the cdkey in use screen is shown.
"Bad account or password" - If the username/password wrong screen is shown.
"Realm Down" - If the realm down message is shown.
"Unhandled login location" - If the game is in an unsupported location.
public bool
selectCharacter
(String profile)
{#group__globalFunctions_1ga5bec5be39d3ffe649ab5a32fa328d680}
Select the character from the given profile.
Keeps all details except the character name from old profile.
profile
The profile to get the character name from.
Whether or not character swap was successful.
public void
createGame
(String name,String pass,int32_t diff)
{#group__globalFunctions_1ga73e647c911a4b4a29fa03498a86873f8}
Create a game with the given name and password in the given difficulty.
-
name
The game name. -
pass
The game password. -
diff
The game difficulty. 0 - normal, 1 - nightmare, 2 - hell, 3 - hardest difficulty available.
public void
joinGame
(String name,String pass)
{#group__globalFunctions_1gae7e03a89a0c5ce69e71e7489b5ff2d28}
Join a game with the given name and password.
-
name
The game name. -
pass
The game password.
public void
addProfile
(String profile,String mode,String gateway,String username,String password,String charname,
int
spDifficulty)
{#group__globalFunctions_1ga198630d3b1155cad54add069502b17a8}
Create a profile with the given profile name, mode, gateway, username, password, character name and single player difficulty.
-
profile
The profile name. -
mode
The mode (single player/battle.net/etc). -
gateway
The realm gateway. -
username
Account username. -
password
Account password. -
charname
Character name (case sensitive). -
spDifficulty
The difficulty to create games for a single player character.
public
int
getLocation
()
{#group__globalFunctions_1ga21d43545897ce3af3692562593053480}
Get the current OOG location.
Todo: Create a reference for the return values.
The current OOG location.
public void
loadMpq
(String path)
{#group__globalFunctions_1ga9add41a51f249d6a0d6fd3ed51fd7825}
Load an mpq file.
path
The mpq file to load
public bool
submitItem
()
{#group__globalFunctions_1gaaf6e11417ccd95f45faea57945684689}
Submit the item on the cursor to the open screen (like the add sockets screen).
Whether or not it was successful.
public
int
getMouseCoords
(bool nFlag,bool nReturn)
{#group__globalFunctions_1gadf9310ea4d054d7013f93e4e8e840af4}
Get the mouse coordinates (in screen or map space) and return as an array.
Get the mouse coordinates (in screen or map space) and return as an Object.
-
nFlag
Whether to return in map space (true) or screen space (false). -
nReturn
Whether to return as an array or as an Object, false for array format.
The mouse coordinates in an array. 0 - x, 1 - y.
-
nFlag
Whether to return in map space (true) or screen space (false). -
nReturn
Whether to return as an array or as an Object, true for Object format.
The mouse coordinates in an array. Has properties .x and .y.
Copy the cached data associated with given unit.
This is things like type and unit id.
Todo: Figure out why anyone would want to copy a unit.
The new copy of the unit.
public bool
clickMap
(uint16_t nClickType,uint16_t nShift,
Unit
toClick)
{#group__globalFunctions_1gaa5bf89869bc19b084e30faf73fd9b5b3}
Click on the map with the given click type and possibly shift at the given unit.
-
nClickType
The click type to do. -
nShift
Whether or not to be holding down shift. 0 - Don't hold shift, 1 - hold shift. -
toClick
The unit to click on.
Todo: Get a reference for nClickType.
Whether or not the click was successful.
public bool
clickMap
(uint16_t nClickType,bool nShift,
Unit
toClick)
{#group__globalFunctions_1ga751d442b1f8e8a2a0f02c3d484d4e43c}
Click on the map with the given click type and possibly shift at the given unit.
-
nClickType
The click type to do. -
nShift
Whether or not to be holding down shift. -
toClick
The unit to click on.
Todo: Get a reference for nClickType.
Whether or not the click was successful.
public bool
clickMap
(uint16_t nClickType,uint16_t nShift,uint16_t nX,uint16_t nY)
{#group__globalFunctions_1ga192a8f3a562aa9801ccc9e90e48b132d}
Click on the map with the given click type and possibly shift at the given point.
-
nClickType
The click type to do. -
nShift
Whether or not to be holding down shift. 0 - Don't hold shift, 1 - hold shift. -
nX
The x coordinate to click at. -
nY
The y coordinate to click at.
Todo: Get a reference for nClickType.
Whether or not the click was successful.
public bool
clickMap
(uint16_t nClickType,bool nShift,uint16_t nX,uint16_t nY)
{#group__globalFunctions_1gaf77b0ae23278cf2e0d3ab86c53a38f2d}
Click on the map with the given click type and possibly shift at the given point.
-
nClickType
The click type to do. -
nShift
Whether or not to be holding down shift. -
nX
The x coordinate to click at. -
nY
The y coordinate to click at.
Todo: Get a reference for nClickType.
Whether or not the click was successful.
public bool
acceptTrade
(
int
action)
{#group__globalFunctions_1ga1d54436fac5efdab779706bb6cce5144}
Get or do something to do with accepting trade.
action
What action to perform.
1 - Get whether trade we've accepted trade already or not.
2 - Get the trade flag ...
3 - Get whether the check is red or not.
The flag specified by action.
public bool
acceptTrade
()
{#group__globalFunctions_1ga2a996039f7583fccf5900a6d6d12dee7}
Accept a trade if not already accepted, cancel a trade if already accepted.
Todo: Verify that I understand this correctly.
Whether or not trade was accepted.
public void
tradeOk
()
{#group__globalFunctions_1ga1d2f580b3ec43e5e2d09e0ea3b417154}
Hit the OK button to open the trade window.
Throws an error if client not in a proper state to click ok.
public object[]
getDialogLines
()
{#group__globalFunctions_1ga337232421eadff983fd70603bc5211c9}
Get the lines of dialog of whatever you're talking to.
Each object has a text property which gives the text and a selectable property which is a boolean as to whether you can click on that line or not.
An array of objects of the lines, or undefined if no dialog up.
Beep with beep ID nBeepId.
nBeepId
ID of the beep to make. See: http://msdn.microsoft.com/en-us/library/ms680356%28VS.85%29.aspx .
Click an item.
item
The item to click on.
public void
clickItem
(
int
nClickType,
int
nBodyLoc)
{#group__globalFunctions_1ga59b940335f9d7a19a6d9294b3cf8959a}
Click on a body location with a certain click type.
-
nClickType
The click type. {0 - left click, 4 - left click merc body locations} -
nBodyLoc
The body location.
0 - Not equipped
1 - Helmet
2 - Amulet
3 - Armor
4 - Right hand slot 1
5 - Left hand slot 1
6 - Right ring
7 - Left ring
8 - Belt
9 - Boots
10 - Gloves
11 - Right hand slot 2
12 - Left hand slot 2
public void
clickItem
(
int
nClickType,
Unit
item)
{#group__globalFunctions_1ga49309d493f0b9601e12aa4f73db8165e}
Click on a given item with the given click type.
-
nClickType
The click type. {0 - left click, 1 - right click, 4 - left click merc location} -
item
The item to click. -
nClickType
public void
clickItem
(
int
nClickType,
int
nX,
int
nY,
int
nLoc)
{#group__globalFunctions_1gad906e16da3dc0445fe6babdd9903a3c6}
Click an item location with the given click type.
-
nClickType
The click type. {0 - left click, 1 - right click, 2 - shift left click, 4 - left click merc location} -
nX
The x coordinate of the location to click. -
nY
The y coordinate of the location to click. -
nLoc
The game location of the item.
2 - Belt
3 - Inventory
4 - Player trade
6 - Cube
7 - Stash
public double
getDistance
(
Unit
a)
{#group__globalFunctions_1gae31399c1fa4cc70ad1235bfb1790556a}
Get the euclidean distance from me to a.
a
The second Unit.
The euclidean distance from a.
public double
getDistance
(
Unit
a,
Unit
b)
{#group__globalFunctions_1ga8d30dbe020059f12ee58f99e69c131ec}
Get the euclidean distance from a to b.
The euclidean distance from a to b.
public double
getDistance
(
Unit
a,int32_t bx,int32_t by)
{#group__globalFunctions_1gaa79333fe4ec69dc11bffd905431db402}
Get the euclidean distance from a to b.
-
a
The first Unit. -
bx
The x coordinate of point b. -
by
The y coordinate of point b.
The euclidean distance from a to b.
public double
getDistance
(int32_t ax,int32_t ay)
{#group__globalFunctions_1ga099a9099c3a32df0346fa40c496964b9}
Get the euclidean distance from me to a.
-
ax
The x coordinate of point a. -
ay
The y coordinate of point a.
The euclidean distance from me to a.
public double
getDistance
(int32_t ax,int32_t ay,
Unit
b)
{#group__globalFunctions_1gaf62a14b80beae3219199c0f05c1ea44b}
Get the euclidean distance from a to b.
-
ax
The x coordinate of point a. -
ay
The y coordinate of point a. -
b
The second Unit.
The euclidean distance from a to b.
public double
getDistance
(int32_t ax,int32_t ay,int32_t bx,int32_t by)
{#group__globalFunctions_1ga5b44bdbe481beae0bd0a5fb322820864}
Get the euclidean distance from a to b.
-
ax
The x coordinate of point a. -
ay
The y coordinate of point a. -
bx
The x coordinate of point b. -
by
The y coordinate of point b.
The euclidean distance from a to b.
Do something with some gold.
Todo: Determine what the values for nMode are.
-
nGold
The amount of gold to move around. -
nMode
What to do with the gold.
public
int
checkCollision
(
Unit
a,
Unit
b,
int
nBitMask)
{#group__globalFunctions_1gacbe9f546980a44ff675f8c5b77d617d3}
Check if two units collide.
Play d2 sound by id.
true
public void
quit
()
{#group__globalFunctions_1ga2463a3acef2df4c951ce942a3229e44e}
Quit the game.
public void
quitGame
()
{#group__globalFunctions_1gaa5cd0b13e9579fbd9b3f538ebae81d99}
Quit Diablo II.
Allows the core to shutdown, than terminates the process.
public bool
say
(...)
{#group__globalFunctions_1ga88ff9ae5c22b23bd4de2a7025c3cf107}
Say the string equivalent of the each of the arguments.
true if at least one parameter was sent in.
public bool
clickParty
(
Party
player,
int
nMode)
{#group__globalFunctions_1ga40e19c4f23164e0119973be3b66ec581}
Click one of the buttons in the party screen for the given player.
-
player
The player who's button you wish to click. -
nMode
Which button to click.
0 - Allow loot corpse
1 - Hostile player
2 - Join party
3 - Leave party (doesn't matter which party is passed in)
public
int
weaponSwitch
(int32_t dummy)
{#group__globalFunctions_1gab9c5eb66ccf79108ee26a7f73943d0bc}
Get which weapon switch is being used.
Switch the weapons.
dummy
Any int other than 0.
Which weapon switch is active.
dummy
0 to use this mode.
true
public void
transmute
()
{#group__globalFunctions_1ga66b26223d5346aaf653562d27cdfe889}
Hit the transmute button.
public void
useStatPoint
(uint16_t statType,uint32_t count)
{#group__globalFunctions_1ga895a78a9e6fbafc50cc592a81f891bb6}
Use a stat point.
BE CAREFUL! This function directly sends packets without checks. If you call this function and do not have the points, or specify an invalid stat, you might get flagged/banned.
Todo: Come up with a reference for the statType values
-
statType
The type of stat to add the points to -
count
The number of points to add
public void
useSkillPoint
(uint16_t skill,uint32_t count)
{#group__globalFunctions_1ga2316220fcf3f65233c46a23881f5702e}
Use a skill point.
BE CAREFUL! This function directly sends packets without checks. If you call this function and do not have the points, or specify an invalid skill, you might get flagged/banned.
Todo: Come up with a reference for the skill values
-
skill
The skill to add the points to -
count
The number points to spend
public void
takeScreenshot
()
{#group__globalFunctions_1gab872a4402833e45312ccdde4004b4f96}
Take a screenshot.
Performs the action that pressing print screen (by default) would do
public Object
screenToAutomap
(Object arg)
{#group__globalFunctions_1ga252bace45245bc8c4794f27d31f8ca45}
Convert a point from screen coordinates to automap coordinates.
arg
An object with x and y parameters specifying the point.
An object with x and y, containing the automap coordinate.
public Object
screenToAutomap
(
int
ix,
int
iy)
{#group__globalFunctions_1gadb899fcbf6b0520f61c6ac2134b7bddd}
Convert a point from screen coordinates to automap coordinates.
-
ix
The x coordinate. -
iy
The y coordinate.
An object with x and y, containing the automap coordinate.
public Object
automapToScreen
(Object arg)
{#group__globalFunctions_1ga8430f6eb530edcbdc6518f0449235cae}
Convert a point from automap coordinates to screen coordinates.
arg
An object with x and y parameters specifying the point.
An object with x and y, containing the screen coordinate.
public Object
automapToScreen
(
int
ix,
int
iy)
{#group__globalFunctions_1ga12b95062f34ffb0b121981df69f6de66}
Convert a point from automap coordinates to screen coordinates.
-
ix
The x coordinate. -
iy
The y coordinate.
An object with x and y, containing the screen coordinate.
public String
md5
(String str)
{#group__globalFunctions_1ga5aefa76b292174617e0020a21484ddc3}
Takes the md5 hash.
str
The string to hash.
The md5 hash of the string.
public String
sha1
(String str)
{#group__globalFunctions_1gab3300abd7aaa5487c52f78452e32926b}
Takes the sha1 hash.
str
The string to hash.
The sha1 hash of the string.
public String
sha256
(String str)
{#group__globalFunctions_1gacbf583814bf77aa15bf6b10be1bc2921}
Takes the sha256 hash.
str
The string to hash.
The sha256 hash of the string.
public String
sha384
(String str)
{#group__globalFunctions_1ga16efc8fdeb82a91dde92253fd4f81f6b}
Takes the sha384 hash.
str
The string to hash.
The sha384 hash of the string.
public String
sha512
(String str)
{#group__globalFunctions_1gafe6cf810a65b58a3685657dfde830367}
Takes the sha512 hash.
str
The string to hash.
The sha512 hash of the string.
public String
md5_file
(String file)
{#group__globalFunctions_1ga84736bab060acfa890403db4fff9e25f}
Take the md5 hash of a file.
file
Filename relative to script path.
The md5 hash of the file.
public String
sha1_file
(String file)
{#group__globalFunctions_1ga2a0768372027c28a64fcb0780f7ff47b}
Take the sha1 hash of a file.
file
Filename relative to script path.
The sha1 hash of the file.
public String
sha256_file
(String file)
{#group__globalFunctions_1gacd44b56a400b27db81deb0edd542a81e}
Take the sha256 hash of a file.
file
Filename relative to script path.
The sha256 hash of the file.
public String
sha384_file
(String file)
{#group__globalFunctions_1gaec5638f75198f07622c214371a2bbef7}
Take the sha384 hash of a file.
file
Filename relative to script path.
The sha384 hash of the file.
public String
sha512_file
(String file)
{#group__globalFunctions_1gad562af84fe5dd55bf5d5172861b2a28f}
Take the sha512 hash of a file.
file
Filename relative to script path.
The sha512 hash of the file.