D2bs
D2BS: Diablo 2 Botting System, a JS API to perform human-like actions utilizing Mozilla Spidermonkey
Install / Use
/learn @noah-/D2bsREADME
Summary
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,intdstY,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
