@deafwave/osrs-botmaker-types 0.3.8 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/src/types/java/READ.ME.md +481 -0
  2. package/dist/src/types/java/awt/Color.d.ts +7 -1
  3. package/dist/src/types/java/awt/MouseInfo.d.ts +15 -0
  4. package/dist/src/types/java/index.d.ts +3 -0
  5. package/dist/src/types/java/swing/Component.d.ts +21 -0
  6. package/dist/src/types/java/swing/JButton.d.ts +1 -1
  7. package/dist/src/types/java/swing/JCheckBox.d.ts +3 -0
  8. package/dist/src/types/java/swing/JFrame.d.ts +8 -6
  9. package/dist/src/types/java/swing/JOptionPane.d.ts +39 -0
  10. package/dist/src/types/java/swing/JTabbedPane.d.ts +23 -4
  11. package/dist/src/types/sox/api/bot/attackStyle.d.ts +12 -0
  12. package/dist/src/types/sox/api/bot/bank.d.ts +144 -0
  13. package/dist/src/types/sox/api/bot/bmCache.d.ts +54 -0
  14. package/dist/src/types/sox/api/bot/bmGlobalCache.d.ts +54 -0
  15. package/dist/src/types/sox/api/bot/breakHandler.d.ts +15 -0
  16. package/dist/src/types/sox/api/bot/counters.d.ts +23 -0
  17. package/dist/src/types/sox/api/bot/equipment.d.ts +62 -0
  18. package/dist/src/types/sox/api/bot/events.d.ts +37 -0
  19. package/dist/src/types/sox/api/bot/grandExchange.d.ts +67 -0
  20. package/dist/src/types/sox/api/bot/graphicsObjects.d.ts +16 -0
  21. package/dist/src/types/sox/api/bot/index.d.ts +128 -0
  22. package/dist/src/types/sox/api/bot/inventory.d.ts +153 -0
  23. package/dist/src/types/sox/api/bot/magic.d.ts +122 -0
  24. package/dist/src/types/sox/api/bot/net.d.ts +24 -0
  25. package/dist/src/types/sox/api/bot/notifier.d.ts +16 -0
  26. package/dist/src/types/sox/api/bot/npcs.d.ts +89 -0
  27. package/dist/src/types/sox/api/bot/objects.d.ts +89 -0
  28. package/dist/src/types/sox/api/bot/players.d.ts +35 -0
  29. package/dist/src/types/sox/api/bot/plugins.d.ts +81 -0
  30. package/dist/src/types/sox/api/bot/prayer.d.ts +16 -0
  31. package/dist/src/types/sox/api/bot/projectiles.d.ts +16 -0
  32. package/dist/src/types/sox/api/bot/task.d.ts +30 -0
  33. package/dist/src/types/sox/api/bot/tileItems.d.ts +65 -0
  34. package/dist/src/types/sox/api/bot/variables.d.ts +51 -0
  35. package/dist/src/types/sox/api/bot/walking.d.ts +65 -0
  36. package/dist/src/types/sox/api/bot/widgets.d.ts +32 -0
  37. package/dist/src/types/sox/api/bot.d.ts +2 -204
  38. package/dist/src/types/sox/api/client.d.ts +1 -1
  39. package/dist/src/types/sox/api/clientThread.d.ts +24 -0
  40. package/dist/src/types/sox/api/configManager.d.ts +239 -0
  41. package/dist/src/types/sox/index.d.ts +2 -48
  42. package/package.json +1 -1
@@ -0,0 +1,153 @@
1
+ /// <reference path="../../../runelite/index.d.ts" />
2
+
3
+ declare namespace bot {
4
+ /**
5
+ * Interface for interacting with the player's inventory
6
+ * Provides methods to check inventory contents and use items
7
+ */
8
+ interface inventory {
9
+ /**
10
+ * Checks if the inventory contains all items with the specified IDs
11
+ * @param ids Array of item IDs to check for
12
+ * @returns True if all specified items are in the inventory, false otherwise
13
+ */
14
+ containsAllIds: (ids: number[]) => boolean;
15
+
16
+ /**
17
+ * Checks if the inventory contains all items with the specified names
18
+ * @param names Array of item names to check for
19
+ * @returns True if all specified items are in the inventory, false otherwise
20
+ */
21
+ containsAllNames: (names: string[]) => boolean;
22
+
23
+ /**
24
+ * Checks if the inventory contains any items with the specified IDs
25
+ * @param ids Array of item IDs to check for
26
+ * @returns True if any of the specified items are in the inventory, false otherwise
27
+ */
28
+ containsAnyIds: (ids: number[]) => boolean;
29
+
30
+ /**
31
+ * Checks if the inventory contains any items with the specified names
32
+ * @param names Array of item names to check for
33
+ * @returns True if any of the specified items are in the inventory, false otherwise
34
+ */
35
+ containsAnyNames: (names: string[]) => boolean;
36
+
37
+ /**
38
+ * Checks if the inventory contains an item with the specified ID
39
+ * @param id The item ID to check for
40
+ * @returns True if the item is in the inventory, false otherwise
41
+ */
42
+ containsId: (id: number) => boolean;
43
+
44
+ /**
45
+ * Checks if the inventory contains an item with the specified name
46
+ * @param name The item name to check for
47
+ * @returns True if the item is in the inventory, false otherwise
48
+ */
49
+ containsName: (name: string) => boolean;
50
+
51
+ /**
52
+ * Gets the number of empty slots in the inventory
53
+ * @returns The number of empty inventory slots
54
+ */
55
+ getEmptySlots: () => number;
56
+
57
+ /**
58
+ * Gets the quantities of all items with the specified IDs
59
+ * @param itemIds Array of item IDs to get quantities for
60
+ * @returns Array of quantities corresponding to the input IDs
61
+ */
62
+ getQuantityOfAllIds: (itemIds: number[]) => number[];
63
+
64
+ /**
65
+ * Gets the quantities of all items with the specified names
66
+ * @param itemNames Array of item names to get quantities for
67
+ * @returns Array of quantities corresponding to the input names
68
+ */
69
+ getQuantityOfAllNames: (itemNames: string[]) => number[];
70
+
71
+ /**
72
+ * Gets the quantity of an item with the specified ID
73
+ * @param itemId The item ID to get the quantity for
74
+ * @returns The quantity of the item in the inventory
75
+ */
76
+ getQuantityOfId: (itemId: number) => number;
77
+
78
+ /**
79
+ * Gets the quantity of an item with the specified name
80
+ * @param itemName The item name to get the quantity for
81
+ * @returns The quantity of the item in the inventory
82
+ */
83
+ getQuantityOfName: (itemName: string) => number;
84
+
85
+ /**
86
+ * Interacts with inventory items by their IDs
87
+ * @param itemIds Array of item IDs to interact with
88
+ * @param options Array of interaction options
89
+ */
90
+ interactWithIds: (itemIds: number[], options: string[]) => void;
91
+
92
+ /**
93
+ * Interacts with inventory items by their names
94
+ * @param itemNames Array of item names to interact with
95
+ * @param options Array of interaction options
96
+ */
97
+ interactWithNames: (itemNames: string[], options: string[]) => void;
98
+
99
+ /**
100
+ * Uses one inventory item on another by their IDs
101
+ * @param itemId1 The ID of the item to use
102
+ * @param itemId2 The ID of the item to use it on
103
+ */
104
+ itemOnItemWithIds: (itemId1: number, itemId2: number) => void;
105
+
106
+ /**
107
+ * Uses on inventory item on the last item in the inventory by its ID
108
+ * @param itemId1 The ID of the item to use
109
+ * @param lastItemId2 The ID of the last item in the inventory
110
+ */
111
+ itemOnLastItemWithIds: (itemId1: number, lastItemId2: number) => void;
112
+
113
+ /**
114
+ * Uses an inventory item on an NPC by the item's ID
115
+ * @param itemId The ID of the item to use
116
+ * @param npc The NPC to use the item on
117
+ */
118
+ itemOnNpcWithIds: (itemId: number, npc: net.runelite.api.NPC) => void;
119
+
120
+ /**
121
+ * Uses an inventory item on a tile object by the item's ID
122
+ * @param itemId The ID of the item to use
123
+ * @param tileObject The tile object to use the item on
124
+ */
125
+ itemOnObjectWithIds: (itemId: number, tileObject: net.runelite.api.TileObject) => void;
126
+
127
+ /**
128
+ * Uses an inventory item on a player by the item's ID
129
+ * @param itemId The ID of the item to use
130
+ * @param player The player to use the item on
131
+ */
132
+ itemOnPlayerWithIds: (itemId: number, player: net.runelite.api.Player) => void;
133
+
134
+ /**
135
+ * Uses an inventory item on a player by the item's name
136
+ * @param itemNames Array of item names to use
137
+ * @param playerNames Array of player names to use the item on
138
+ */
139
+ itemOnPlayerWithNames: (itemNames: string[], playerNames: string[]) => void;
140
+
141
+ /**
142
+ * Checks if the inventory is full
143
+ * @returns True if the inventory is full, false otherwise
144
+ */
145
+ isFull: () => boolean;
146
+
147
+ /**
148
+ * Gets all widgets in the inventory
149
+ * @returns An array of all inventory widgets
150
+ */
151
+ getAllWidgets(): net.runelite.api.widgets.Widget[];
152
+ }
153
+ }
@@ -0,0 +1,122 @@
1
+ /// <reference path="../../../runelite/index.d.ts" />
2
+ /// <reference path="./types.d.ts" />
3
+
4
+ declare namespace bot {
5
+ /**
6
+ * Valid spell names that can be cast in the game
7
+ */
8
+ type SpellName =
9
+ // Standard spellbook teleports
10
+ | 'HOME_TELEPORT' | 'VARROCK_TELEPORT' | 'LUMBRIDGE_TELEPORT' | 'FALADOR_TELEPORT'
11
+ | 'TELEPORT_TO_HOUSE' | 'CAMELOT_TELEPORT' | 'ARDOUGNE_TELEPORT' | 'WATCHTOWER_TELEPORT'
12
+ | 'TROLLHEIM_TELEPORT' | 'TELEPORT_TO_APE_ATOLL' | 'TELEPORT_TO_KOUREND'
13
+ | 'TELEOTHER_LUMBRIDGE' | 'TELEOTHER_FALADOR' | 'TELEPORT_TO_BOUNTY_TARGET' | 'TELEOTHER_CAMELOT'
14
+ // Standard spellbook combat spells
15
+ | 'WIND_STRIKE' | 'WATER_STRIKE' | 'EARTH_STRIKE' | 'FIRE_STRIKE'
16
+ | 'WIND_BOLT' | 'WATER_BOLT' | 'EARTH_BOLT' | 'FIRE_BOLT'
17
+ | 'WIND_BLAST' | 'WATER_BLAST' | 'EARTH_BLAST' | 'FIRE_BLAST'
18
+ | 'WIND_WAVE' | 'WATER_WAVE' | 'EARTH_WAVE' | 'FIRE_WAVE'
19
+ | 'WIND_SURGE' | 'WATER_SURGE' | 'EARTH_SURGE' | 'FIRE_SURGE'
20
+ | 'SARADOMIN_STRIKE' | 'CLAWS_OF_GUTHIX' | 'FLAMES_OF_ZAMORAK'
21
+ | 'CRUMBLE_UNDEAD' | 'IBAN_BLAST' | 'MAGIC_DART'
22
+ // Standard spellbook other spells
23
+ | 'CONFUSE' | 'WEAKEN' | 'CURSE' | 'BIND' | 'SNARE' | 'VULNERABILITY'
24
+ | 'ENFEEBLE' | 'ENTANGLE' | 'STUN' | 'TELE_BLOCK' | 'CHARGE'
25
+ | 'BONES_TO_BANANAS' | 'LOW_LEVEL_ALCHEMY' | 'SUPERHEAT_ITEM' | 'HIGH_LEVEL_ALCHEMY' | 'BONES_TO_PEACHES'
26
+ | 'LVL_1_ENCHANT' | 'LVL_2_ENCHANT' | 'LVL_3_ENCHANT' | 'LVL_4_ENCHANT'
27
+ | 'LVL_5_ENCHANT' | 'LVL_6_ENCHANT' | 'LVL_7_ENCHANT'
28
+ | 'CHARGE_WATER_ORB' | 'CHARGE_EARTH_ORB' | 'CHARGE_FIRE_ORB' | 'CHARGE_AIR_ORB'
29
+ | 'TELEKINETIC_GRAB'
30
+ // Ancient spellbook
31
+ | 'EDGEVILLE_HOME_TELEPORT' | 'PADDEWWA_TELEPORT' | 'SENNTISTEN_TELEPORT' | 'KHARYRLL_TELEPORT'
32
+ | 'LASSAR_TELEPORT' | 'DAREEYAK_TELEPORT' | 'CARRALLANGER_TELEPORT' | 'BOUNTY_TARGET_TELEPORT'
33
+ | 'ANNAKARL_TELEPORT' | 'GHORROCK_TELEPORT'
34
+ | 'SMOKE_RUSH' | 'SHADOW_RUSH' | 'BLOOD_RUSH' | 'ICE_RUSH'
35
+ | 'SMOKE_BURST' | 'SHADOW_BURST' | 'BLOOD_BURST' | 'ICE_BURST'
36
+ | 'SMOKE_BLITZ' | 'SHADOW_BLITZ' | 'BLOOD_BLITZ' | 'ICE_BLITZ'
37
+ | 'SMOKE_BARRAGE' | 'SHADOW_BARRAGE' | 'BLOOD_BARRAGE' | 'ICE_BARRAGE'
38
+ // Lunar spellbook
39
+ | 'LUNAR_HOME_TELEPORT' | 'MOONCLAN_TELEPORT' | 'TELE_GROUP_MOONCLAN' | 'OURANIA_TELEPORT'
40
+ | 'WATERBIRTH_TELEPORT' | 'TELE_GROUP_WATERBIRTH' | 'BARBARIAN_TELEPORT' | 'TELE_GROUP_BARBARIAN'
41
+ | 'KHAZARD_TELEPORT' | 'TELE_GROUP_KHAZARD' | 'FISHING_GUILD_TELEPORT' | 'TELE_GROUP_FISHING_GUILD'
42
+ | 'CATHERBY_TELEPORT' | 'TELE_GROUP_CATHERBY' | 'ICE_PLATEAU_TELEPORT' | 'TELE_GROUP_ICE_PLATEAU'
43
+ | 'MONSTER_EXAMINE' | 'CURE_OTHER' | 'CURE_ME' | 'CURE_GROUP' | 'STAT_SPY' | 'DREAM'
44
+ | 'STAT_RESTORE_POT_SHARE' | 'BOOST_POTION_SHARE' | 'ENERGY_TRANSFER'
45
+ | 'HEAL_OTHER' | 'VENGEANCE_OTHER' | 'VENGEANCE' | 'HEAL_GROUP'
46
+ | 'BAKE_PIE' | 'GEOMANCY' | 'CURE_PLANT' | 'NPC_CONTACT' | 'HUMIDIFY'
47
+ | 'HUNTER_KIT' | 'SPIN_FLAX' | 'SUPERGLASS_MAKE' | 'TAN_LEATHER' | 'STRING_JEWELLERY'
48
+ | 'MAGIC_IMBUE' | 'FERTILE_SOIL' | 'PLANK_MAKE' | 'RECHARGE_DRAGONSTONE' | 'SPELLBOOK_SWAP'
49
+ // Arceuus spellbook
50
+ | 'ARCEUUS_HOME_TELEPORT' | 'ARCEUUS_LIBRARY_TELEPORT' | 'DRAYNOR_MANOR_TELEPORT' | 'BATTLEFRONT_TELEPORT'
51
+ | 'MIND_ALTAR_TELEPORT' | 'RESPAWN_TELEPORT' | 'SALVE_GRAVEYARD_TELEPORT' | 'FENKENSTRAINS_CASTLE_TELEPORT'
52
+ | 'WEST_ARDOUGNE_TELEPORT' | 'HARMONY_ISLAND_TELEPORT' | 'CEMETERY_TELEPORT' | 'BARROWS_TELEPORT'
53
+ | 'APE_ATOLL_TELEPORT'
54
+ | 'GHOSTLY_GRASP' | 'SKELETAL_GRASP' | 'UNDEAD_GRASP'
55
+ | 'INFERIOR_DEMONBANE' | 'SUPERIOR_DEMONBANE' | 'DARK_DEMONBANE'
56
+ | 'LESSER_CORRUPTION' | 'GREATER_CORRUPTION'
57
+ | 'RESURRECT_LESSER_GHOST' | 'RESURRECT_LESSER_SKELETON' | 'RESURRECT_LESSER_ZOMBIE'
58
+ | 'RESURRECT_SUPERIOR_GHOST' | 'RESURRECT_SUPERIOR_SKELETON' | 'RESURRECT_SUPERIOR_ZOMBIE'
59
+ | 'RESURRECT_GREATER_GHOST' | 'RESURRECT_GREATER_SKELETON' | 'RESURRECT_GREATER_ZOMBIE'
60
+ | 'DARK_LURE' | 'MARK_OF_DARKNESS' | 'WARD_OF_ARCEUUS'
61
+ | 'BASIC_REANIMATION' | 'ADEPT_REANIMATION' | 'EXPERT_REANIMATION' | 'MASTER_REANIMATION'
62
+ | 'DEMONIC_OFFERING' | 'SINISTER_OFFERING' | 'SHADOW_VEIL' | 'VILE_VIGOUR'
63
+ | 'DEGRIME' | 'RESURRECT_CROPS' | 'DEATH_CHARGE';
64
+
65
+ /**
66
+ * Interface for casting magic spells in the game
67
+ * Provides methods to cast spells on various targets
68
+ */
69
+ interface magic {
70
+ /**
71
+ * Casts a magic spell
72
+ * @param spellName The name of the spell to cast
73
+ * @param actionIndex Action index for the spell
74
+ */
75
+ cast: {
76
+ (spellName: SpellName): void;
77
+ (spellName: SpellName, actionIndex: number): void;
78
+ };
79
+
80
+ /**
81
+ * Casts a magic spell on an inventory item by its ID
82
+ * @param spellName The name of the spell to cast
83
+ * @param itemId The ID of the inventory item to cast the spell on
84
+ */
85
+ castOnInventoryItemId: (spellName: SpellName, itemId: number) => void;
86
+
87
+ /**
88
+ * Casts a magic spell on an inventory item by its name
89
+ * @param spellName The name of the spell to cast
90
+ * @param itemName The name of the inventory item to cast the spell on
91
+ */
92
+ castOnInventoryItemName: (spellName: SpellName, itemName: string) => void;
93
+
94
+ /**
95
+ * Casts a magic spell on an NPC
96
+ * @param spellName The name of the spell to cast
97
+ * @param npc The NPC to cast the spell on
98
+ */
99
+ castOnNpc: (spellName: SpellName, npc: net.runelite.api.NPC) => void;
100
+
101
+ /**
102
+ * Casts a magic spell on a player
103
+ * @param spellName The name of the spell to cast
104
+ * @param player The player to cast the spell on
105
+ */
106
+ castOnPlayer: (spellName: SpellName, player: net.runelite.api.Player) => void;
107
+
108
+ /**
109
+ * Casts a magic spell on a tile item (item on the ground)
110
+ * @param spellName The name of the spell to cast
111
+ * @param tileItem The tile item to cast the spell on
112
+ */
113
+ castOnTileItem: (spellName: SpellName, tileItem: bot.TileItemInfo) => void;
114
+
115
+ /**
116
+ * Casts a magic spell on a tile object (game object in the world)
117
+ * @param spellName The name of the spell to cast
118
+ * @param tileObject The tile object to cast the spell on
119
+ */
120
+ castOnTileObject: (spellName: SpellName, tileObject: net.runelite.api.TileObject) => void;
121
+ }
122
+ }
@@ -0,0 +1,24 @@
1
+
2
+
3
+ declare namespace bot {
4
+ /**
5
+ * Interface for network communication between bots
6
+ * Allows sending messages to other bots or players
7
+ */
8
+ interface net {
9
+ /**
10
+ * Sends a message to specified targets via the network
11
+ * @param targetIds Array of target IDs to send the message to
12
+ * @param message The message content to send
13
+ * @param includeSelf Whether to include the sender in the recipients
14
+ */
15
+ sendMessage: (targetIds: string[], message: string, includeSelf: boolean) => void;
16
+
17
+ /**
18
+ * Sends a message to local players
19
+ * @param message The message content to send
20
+ * @param includeSelf Whether to include the sender in the recipients
21
+ */
22
+ sendMessageToLocalPlayers: (message: string, includeSelf: boolean) => void;
23
+ }
24
+ }
@@ -0,0 +1,16 @@
1
+
2
+
3
+ declare namespace bot {
4
+ /**
5
+ * Interface for sending notifications
6
+ * Used to alert the user about important events
7
+ */
8
+ interface notifier {
9
+ /**
10
+ * Sends a notification message to the user
11
+ * This can trigger desktop notifications or other alerting mechanisms
12
+ * @param message The notification message to send
13
+ */
14
+ sendMessage: (message: string) => void;
15
+ }
16
+ }
@@ -0,0 +1,89 @@
1
+ /// <reference path="../../../runelite/index.d.ts" />
2
+
3
+ declare namespace bot {
4
+ /**
5
+ * Interface for interacting with NPCs (Non-Player Characters) in the game
6
+ * Provides methods to find and interact with NPCs
7
+ */
8
+ interface npcs {
9
+ /**
10
+ * Gets the current animation ID of an NPC
11
+ * @param npc The NPC to get the animation ID for
12
+ * @returns The animation ID of the NPC
13
+ */
14
+ getAnimationID: (npc: net.runelite.api.NPC) => number;
15
+
16
+ /**
17
+ * Gets the attack speed of an NPC type
18
+ * @param npcId The ID of the NPC type
19
+ * @returns The attack speed in game ticks
20
+ */
21
+ getAttackSpeed: (npcId: number) => number;
22
+
23
+ /**
24
+ * Gets the closest NPC from an array of NPCs
25
+ * @param npcs Array of NPCs to search
26
+ * @returns The closest NPC or null if none found
27
+ */
28
+ getClosest: (npcs: Array<net.runelite.api.NPC>) => net.runelite.api.NPC | null;
29
+
30
+ /**
31
+ * Gets the closest NPC within a maximum distance
32
+ * @param npcs Array of NPCs to search
33
+ * @param maxDistance The maximum distance to search within
34
+ * @returns The closest NPC within the specified distance or null if none found
35
+ */
36
+ getClosestWithin: (npcs: Array<net.runelite.api.NPC>, maxDistance: number) => net.runelite.api.NPC | null;
37
+
38
+ /**
39
+ * Gets the head icon of an NPC (such as prayer icons)
40
+ * @param npc The NPC to get the head icon for
41
+ * @returns The head icon of the NPC
42
+ */
43
+ getHeadIcon: (npc: net.runelite.api.NPC) => net.runelite.api.HeadIcon;
44
+
45
+ /**
46
+ * Gets all NPCs with the specified IDs
47
+ * @param ids Array of NPC IDs to search for
48
+ * @returns Array of matching NPC instances
49
+ */
50
+ getWithIds: (ids: number[]) => net.runelite.api.NPC[];
51
+
52
+ /**
53
+ * Gets all NPCs with the specified names
54
+ * @param names Array of NPC names to search for
55
+ * @returns Array of matching NPC instances
56
+ */
57
+ getWithNames: (names: string[]) => net.runelite.api.NPC[];
58
+
59
+ /**
60
+ * Interacts with an NPC by name and action
61
+ * @param npcName The name of the NPC to interact with
62
+ * @param action The interaction action to perform
63
+ */
64
+ interact: (npcName: string, action: string) => void;
65
+
66
+ /**
67
+ * Interacts with a supplied NPC instance
68
+ * @param target The NPC instance to interact with
69
+ * @param action The interaction action to perform
70
+ */
71
+ interactSupplied: (target: net.runelite.api.NPC, action: string) => void;
72
+
73
+ /**
74
+ * Checks if any NPCs with the specified IDs are within a certain distance
75
+ * @param ids Array of NPC IDs to check
76
+ * @param distance The maximum distance to check within
77
+ * @returns True if any NPCs are within the specified distance, false otherwise
78
+ */
79
+ isNearIds: (ids: number[], distance: number) => boolean;
80
+
81
+ /**
82
+ * Checks if any NPCs with the specified names are within a certain distance
83
+ * @param names Array of NPC names to check
84
+ * @param distance The maximum distance to check within
85
+ * @returns True if any NPCs are within the specified distance, false otherwise
86
+ */
87
+ isNearNames: (names: string[], distance: number) => boolean;
88
+ }
89
+ }
@@ -0,0 +1,89 @@
1
+ /// <reference path="../../../runelite/index.d.ts" />
2
+
3
+ declare namespace bot {
4
+ /**
5
+ * Interface for interacting with game objects in the world
6
+ * Provides methods to find and interact with various objects
7
+ */
8
+ interface objects {
9
+ /**
10
+ * Gets the closest object from an array of tile objects
11
+ * @param tileObjects Array of tile objects to search through
12
+ * @returns The closest tile object to the player
13
+ */
14
+ getClosest: (tileObjects: net.runelite.api.TileObject[]) => net.runelite.api.TileObject;
15
+
16
+ /**
17
+ * Gets the closest object within a maximum distance
18
+ * @param tileObjects Array of tile objects to search through
19
+ * @param maxDistance The maximum distance to search within
20
+ * @returns The closest tile object within the specified distance
21
+ */
22
+ getClosestWithin: (tileObjects: net.runelite.api.TileObject[], maxDistance: number) => net.runelite.api.TileObject;
23
+
24
+ /**
25
+ * Gets the composition data for a tile object
26
+ * @param objectId The ID of the object to get composition for
27
+ * @returns The object composition data
28
+ */
29
+ getTileObjectComposition: (objectId: number) => net.runelite.api.ObjectComposition;
30
+
31
+ /**
32
+ * Gets all tile objects with the specified IDs
33
+ * @param ids Array of object IDs to search for
34
+ * @returns Array of matching tile objects
35
+ */
36
+ getTileObjectsWithIds: (ids: number[]) => net.runelite.api.TileObject[];
37
+
38
+ /**
39
+ * Gets all tile objects with the specified names
40
+ * @param names Array of object names to search for
41
+ * @returns Array of matching tile objects
42
+ */
43
+ getTileObjectsWithNames: (names: string[]) => net.runelite.api.TileObject[];
44
+
45
+ /**
46
+ * Gets all tile objects with the specified interaction options
47
+ * @param options Array of interaction options to search for
48
+ * @returns Array of matching tile objects
49
+ */
50
+ getTileObjectsWithOptions: (options: string[]) => net.runelite.api.TileObject[];
51
+
52
+ /**
53
+ * Interacts with an object by name
54
+ * @param objectName The name of the object to interact with
55
+ * @param action The interaction action to perform
56
+ */
57
+ interactObject: (objectName: string, action: string) => void;
58
+
59
+ /**
60
+ * Interacts with multiple objects by name
61
+ * @param objectNames Array of object names to interact with
62
+ * @param actions Array of interaction actions to perform
63
+ */
64
+ interactObjects: (objectNames: string[], actions: string[]) => void;
65
+
66
+ /**
67
+ * Interacts with a supplied object instance
68
+ * @param target The tile object instance to interact with
69
+ * @param action The interaction action to perform
70
+ */
71
+ interactSuppliedObject: (target: net.runelite.api.TileObject, action: string) => void;
72
+
73
+ /**
74
+ * Checks if objects with the specified IDs are near the player
75
+ * @param ids Array of object IDs to check for
76
+ * @param distance The maximum distance to check within
77
+ * @returns True if any matching objects are within the distance, false otherwise
78
+ */
79
+ isNearIds: (ids: number[], distance: number) => boolean;
80
+
81
+ /**
82
+ * Checks if objects with the specified names are near the player
83
+ * @param names Array of object names to check for
84
+ * @param distance The maximum distance to check within
85
+ * @returns True if any matching objects are within the distance, false otherwise
86
+ */
87
+ isNearNames: (names: string[], distance: number) => boolean;
88
+ }
89
+ }
@@ -0,0 +1,35 @@
1
+
2
+
3
+ declare namespace bot {
4
+ /**
5
+ * Interface for interacting with other players in the game
6
+ * Provides methods to interact with and check for other players
7
+ */
8
+ interface players {
9
+ /**
10
+ * Attacks a player by name
11
+ * @param names Array of player names to attack
12
+ */
13
+ attackPlayer: (names: string[]) => void;
14
+
15
+ /**
16
+ * Follows a player by name
17
+ * @param names Array of player names to follow
18
+ */
19
+ followPlayer: (names: string[]) => void;
20
+
21
+ /**
22
+ * Checks if a player is within a specified radius
23
+ * @param radius The radius to check within
24
+ * @param names Array of player names to check for
25
+ * @returns True if any matching players are within the radius, false otherwise
26
+ */
27
+ isNearPlayer: (radius: number, names: string[]) => boolean;
28
+
29
+ /**
30
+ * Initiates a trade with a player by name
31
+ * @param names Array of player names to trade with
32
+ */
33
+ tradePlayer: (names: string[]) => void;
34
+ }
35
+ }
@@ -0,0 +1,81 @@
1
+ /// <reference path="../../../runelite/index.d.ts" />
2
+
3
+ declare namespace bot {
4
+ /**
5
+ * Interface for the Quest Helper plugin
6
+ * Provides methods to assist with quest completion and navigation
7
+ */
8
+ interface questHelper {
9
+ /**
10
+ * Gets the name of the current quest being assisted
11
+ * @returns The name of the current quest
12
+ */
13
+ getCurrentQuestName: () => string;
14
+
15
+ /**
16
+ * Gets the next item(s) needed for the quest
17
+ * @returns An array containing information about the next required item(s)
18
+ */
19
+ getNextItem: () => any[];
20
+
21
+ /**
22
+ * Gets the next item-on-item interaction needed for the quest
23
+ * @returns Information about the next item-on-item interaction
24
+ * @todo ItemOnItem type definition
25
+ */
26
+ getNextItemOnItem: () => any;
27
+
28
+ /**
29
+ * Gets the next NPC to interact with for the quest
30
+ * @returns The next NPC object to interact with
31
+ */
32
+ getNextNpc: () => net.runelite.api.NPC;
33
+
34
+ /**
35
+ * Gets the next object to interact with for the quest
36
+ * @returns The next TileObject to interact with
37
+ */
38
+ getNextTileObject: () => net.runelite.api.TileObject;
39
+
40
+ /**
41
+ * Gets the next widget to interact with for the quest
42
+ * @returns The next Widget to interact with
43
+ */
44
+ getNextWidget: () => net.runelite.api.widgets.Widget;
45
+
46
+ /**
47
+ * Gets the next world point to navigate to for the quest
48
+ * @returns The next WorldPoint to navigate to
49
+ */
50
+ getNextWorldPoint: () => net.runelite.api.coords.WorldPoint;
51
+
52
+ /**
53
+ * Gets the overlay text shown by the quest helper
54
+ * @returns The current overlay text
55
+ */
56
+ getOverlayText: () => string;
57
+
58
+ /**
59
+ * Checks if the current quest has been started
60
+ * @returns True if the quest has been started, false otherwise
61
+ */
62
+ isQuestStarted: () => boolean;
63
+
64
+ /**
65
+ * Performs the next step in the quest
66
+ * @returns True if the next step was performed successfully, false otherwise
67
+ */
68
+ performNextStep: () => boolean;
69
+ }
70
+
71
+ /**
72
+ * Interface for accessing RuneLite plugins
73
+ * Provides access to plugin functionality like Quest Helper
74
+ */
75
+ interface plugins {
76
+ /**
77
+ * Access to the Quest Helper plugin functionality
78
+ */
79
+ questHelper: questHelper;
80
+ }
81
+ }
@@ -0,0 +1,16 @@
1
+ /// <reference path="../../../runelite/index.d.ts" />
2
+
3
+ declare namespace bot {
4
+ /**
5
+ * Interface for interacting with the prayer system
6
+ * Provides methods to toggle prayers on and off
7
+ */
8
+ interface prayer {
9
+ /**
10
+ * Toggles a prayer on or off
11
+ * @param prayer The Prayer enum value to toggle
12
+ * @param bypassMouseClicks Whether to bypass using mouse clicks and toggle directly (true) or use mouse clicks (false)
13
+ */
14
+ togglePrayer: (prayer: net.runelite.api.Prayer, bypassMouseClicks: boolean) => void;
15
+ }
16
+ }
@@ -0,0 +1,16 @@
1
+ /// <reference path="../../../runelite/index.d.ts" />
2
+
3
+ declare namespace bot {
4
+ /**
5
+ * Interface for interacting with projectiles in the game
6
+ * Provides methods to retrieve information about active projectiles
7
+ */
8
+ interface projectiles {
9
+ /**
10
+ * Gets all projectiles that match the specified IDs
11
+ * @param ids Array of projectile IDs to match
12
+ * @returns Array of matching Projectile objects
13
+ */
14
+ getProjectilesWithIds: (ids: number[]) => net.runelite.api.Projectile[];
15
+ }
16
+ }
@@ -0,0 +1,30 @@
1
+
2
+
3
+ declare namespace bot {
4
+ /**
5
+ * Represents an instance of a bot task with actions and control methods.
6
+ */
7
+ interface botTask {
8
+ /**
9
+ * Executes the provided function as an action of the bot task.
10
+ * @param fn - The function to execute as part of the task's action.
11
+ */
12
+ act: (fn: () => void) => void;
13
+
14
+ /**
15
+ * Stops the execution of the bot task.
16
+ */
17
+ stop: () => void;
18
+ }
19
+
20
+ /**
21
+ * Represents a factory for creating bot tasks.
22
+ */
23
+ interface task {
24
+ /**
25
+ * Creates a new instance of a bot task.
26
+ * @returns A new botTask instance.
27
+ */
28
+ create: () => botTask;
29
+ }
30
+ }