@deafwave/osrs-botmaker-types 0.3.8 → 0.4.0
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.
- package/dist/src/types/sox/api/bot/attackStyle.d.ts +12 -0
- package/dist/src/types/sox/api/bot/bank.d.ts +144 -0
- package/dist/src/types/sox/api/bot/bmCache.d.ts +54 -0
- package/dist/src/types/sox/api/bot/bmGlobalCache.d.ts +54 -0
- package/dist/src/types/sox/api/bot/breakHandler.d.ts +15 -0
- package/dist/src/types/sox/api/bot/counters.d.ts +23 -0
- package/dist/src/types/sox/api/bot/equipment.d.ts +62 -0
- package/dist/src/types/sox/api/bot/events.d.ts +37 -0
- package/dist/src/types/sox/api/bot/grandExchange.d.ts +67 -0
- package/dist/src/types/sox/api/bot/graphicsObjects.d.ts +16 -0
- package/dist/src/types/sox/api/bot/index.d.ts +128 -0
- package/dist/src/types/sox/api/bot/inventory.d.ts +153 -0
- package/dist/src/types/sox/api/bot/magic.d.ts +122 -0
- package/dist/src/types/sox/api/bot/net.d.ts +24 -0
- package/dist/src/types/sox/api/bot/notifier.d.ts +16 -0
- package/dist/src/types/sox/api/bot/npcs.d.ts +89 -0
- package/dist/src/types/sox/api/bot/objects.d.ts +89 -0
- package/dist/src/types/sox/api/bot/players.d.ts +35 -0
- package/dist/src/types/sox/api/bot/plugins.d.ts +81 -0
- package/dist/src/types/sox/api/bot/prayer.d.ts +16 -0
- package/dist/src/types/sox/api/bot/projectiles.d.ts +16 -0
- package/dist/src/types/sox/api/bot/task.d.ts +30 -0
- package/dist/src/types/sox/api/bot/tileItems.d.ts +65 -0
- package/dist/src/types/sox/api/bot/variables.d.ts +51 -0
- package/dist/src/types/sox/api/bot/walking.d.ts +65 -0
- package/dist/src/types/sox/api/bot/widgets.d.ts +32 -0
- package/dist/src/types/sox/api/bot.d.ts +2 -204
- package/dist/src/types/sox/api/client.d.ts +1 -1
- package/dist/src/types/sox/api/clientThread.d.ts +24 -0
- package/dist/src/types/sox/api/configManager.d.ts +239 -0
- package/dist/src/types/sox/index.d.ts +2 -48
- package/package.json +1 -1
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
declare namespace bot {
|
|
4
|
+
/**
|
|
5
|
+
* Represents the interface for interacting with the bank system.
|
|
6
|
+
*/
|
|
7
|
+
interface bank {
|
|
8
|
+
/**
|
|
9
|
+
* Closes the bank interface.
|
|
10
|
+
*/
|
|
11
|
+
close: () => void;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Consumes (removes) items from the bank by their IDs.
|
|
15
|
+
* @param ids - The array of item IDs to consume.
|
|
16
|
+
* @returns True if the operation was successful, otherwise false.
|
|
17
|
+
*/
|
|
18
|
+
consumeIds: (ids: number[]) => boolean;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Consumes (removes) items from the bank by their names.
|
|
22
|
+
* @param names - The array of item names to consume.
|
|
23
|
+
* @returns True if the operation was successful, otherwise false.
|
|
24
|
+
*/
|
|
25
|
+
consumeNames: (names: string[]) => boolean;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Deposits all items from the inventory into the bank.
|
|
29
|
+
*/
|
|
30
|
+
depositAll: () => void;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Deposits all items with the specified ID from the inventory into the bank.
|
|
34
|
+
* @param id - The item ID to deposit.
|
|
35
|
+
*/
|
|
36
|
+
depositAllWithId: (id: number) => void;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Deposits all items with the specified name from the inventory into the bank.
|
|
40
|
+
* @param name - The item name to deposit.
|
|
41
|
+
*/
|
|
42
|
+
depositAllWithName: (name: string) => void;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Deposits a single item with the specified ID from the inventory into the bank.
|
|
46
|
+
* @param id - The item ID to deposit.
|
|
47
|
+
*/
|
|
48
|
+
depositWithId: (id: number) => void;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Deposits a single item with the specified name from the inventory into the bank.
|
|
52
|
+
* @param name - The item name to deposit.
|
|
53
|
+
*/
|
|
54
|
+
depositWithName: (name: string) => void;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Gets the current noted mode status.
|
|
58
|
+
* @returns True if noted mode is enabled, otherwise false.
|
|
59
|
+
*/
|
|
60
|
+
getNotedMode: () => boolean;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Gets the quantities of all specified item IDs in the bank.
|
|
64
|
+
* @param itemIds - The array of item IDs to check.
|
|
65
|
+
* @returns An array of quantities corresponding to the provided item IDs.
|
|
66
|
+
*/
|
|
67
|
+
getQuantityOfAllIds: (itemIds: number[]) => number[];
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Gets the quantities of all specified item names in the bank.
|
|
71
|
+
* @param itemNames - The array of item names to check.
|
|
72
|
+
* @returns An array of quantities corresponding to the provided item names.
|
|
73
|
+
*/
|
|
74
|
+
getQuantityOfAllNames: (itemNames: string[]) => number[];
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Gets the quantity of a specific item ID in the bank.
|
|
78
|
+
* @param itemId - The item ID to check.
|
|
79
|
+
* @returns The quantity of the specified item.
|
|
80
|
+
*/
|
|
81
|
+
getQuantityOfId: (itemId: number) => number;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Gets the quantity of a specific item name in the bank.
|
|
85
|
+
* @param itemName - The item name to check.
|
|
86
|
+
* @returns The quantity of the specified item.
|
|
87
|
+
*/
|
|
88
|
+
getQuantityOfName: (itemName: string) => number;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Checks if the player is currently banking.
|
|
92
|
+
* @returns True if banking, otherwise false.
|
|
93
|
+
*/
|
|
94
|
+
isBanking: () => boolean;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Checks if the bank interface is currently open.
|
|
98
|
+
* @returns True if the bank is open, otherwise false.
|
|
99
|
+
*/
|
|
100
|
+
isOpen: () => boolean;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Opens the bank interface.
|
|
104
|
+
*/
|
|
105
|
+
open: () => void;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Sets the noted mode for withdrawing items.
|
|
109
|
+
* @param value - True to enable noted mode, false to disable.
|
|
110
|
+
*/
|
|
111
|
+
setNotedMode: (value: boolean) => void;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Withdraws all items with the specified ID from the bank.
|
|
115
|
+
* @param id - The item ID to withdraw.
|
|
116
|
+
*/
|
|
117
|
+
withdrawAllWithId: (id: number) => void;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Withdraws all items with the specified name from the bank.
|
|
121
|
+
* @param name - The item name to withdraw.
|
|
122
|
+
*/
|
|
123
|
+
withdrawAllWithName: (name: string) => void;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Withdraws a specific quantity of an item with the specified ID from the bank.
|
|
127
|
+
* @param id - The item ID to withdraw.
|
|
128
|
+
* @param quantity - The quantity to withdraw.
|
|
129
|
+
*/
|
|
130
|
+
withdrawQuantityWithId: (id: number, quantity: number) => void;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Withdraws a single item with the specified ID from the bank.
|
|
134
|
+
* @param id - The item ID to withdraw.
|
|
135
|
+
*/
|
|
136
|
+
withdrawWithId: (id: number) => void;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Withdraws a single item with the specified name from the bank.
|
|
140
|
+
* @param name - The item name to withdraw.
|
|
141
|
+
*/
|
|
142
|
+
withdrawWithName: (name: string) => void;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
declare namespace bot {
|
|
4
|
+
/**
|
|
5
|
+
* Interface for interacting with the Bot Maker's cache system
|
|
6
|
+
* Allows storing and retrieving persistent data between bot sessions
|
|
7
|
+
*/
|
|
8
|
+
interface bmCache {
|
|
9
|
+
/**
|
|
10
|
+
* Gets a boolean value from the BM cache
|
|
11
|
+
* @param key The key to retrieve the value for
|
|
12
|
+
* @param defaultValue The default value to return if the key doesn't exist
|
|
13
|
+
* @returns The stored boolean value or the default value if not found
|
|
14
|
+
*/
|
|
15
|
+
getBoolean: (key: string, defaultValue: boolean) => boolean;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Gets an integer value from the BM cache
|
|
19
|
+
* @param key The key to retrieve the value for
|
|
20
|
+
* @param defaultValue The default value to return if the key doesn't exist
|
|
21
|
+
* @returns The stored integer value or the default value if not found
|
|
22
|
+
*/
|
|
23
|
+
getInt: (key: string, defaultValue: number) => number;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Gets a string value from the BM cache
|
|
27
|
+
* @param key The key to retrieve the value for
|
|
28
|
+
* @param defaultValue The default value to return if the key doesn't exist
|
|
29
|
+
* @returns The stored string value or the default value if not found
|
|
30
|
+
*/
|
|
31
|
+
getString: (key: string, defaultValue: string) => string;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Saves a boolean value to the BM cache
|
|
35
|
+
* @param key The key to store the value under
|
|
36
|
+
* @param value The boolean value to store
|
|
37
|
+
*/
|
|
38
|
+
saveBoolean: (key: string, value: boolean) => void;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Saves an integer value to the BM cache
|
|
42
|
+
* @param key The key to store the value under
|
|
43
|
+
* @param value The integer value to store
|
|
44
|
+
*/
|
|
45
|
+
saveInt: (key: string, value: number) => void;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Saves a string value to the BM cache
|
|
49
|
+
* @param key The key to store the value under
|
|
50
|
+
* @param value The string value to store
|
|
51
|
+
*/
|
|
52
|
+
saveString: (key: string, value: string) => void;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
declare namespace bot {
|
|
4
|
+
/**
|
|
5
|
+
* Interface for interacting with the Bot Maker's cache system
|
|
6
|
+
* Allows storing and retrieving persistent data between bot sessions
|
|
7
|
+
*/
|
|
8
|
+
interface bmCache {
|
|
9
|
+
/**
|
|
10
|
+
* Gets a boolean value from the BM cache
|
|
11
|
+
* @param key The key to retrieve the value for
|
|
12
|
+
* @param defaultValue The default value to return if the key doesn't exist
|
|
13
|
+
* @returns The stored boolean value or the default value if not found
|
|
14
|
+
*/
|
|
15
|
+
getBoolean: (key: string, defaultValue: boolean) => boolean;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Gets an integer value from the BM cache
|
|
19
|
+
* @param key The key to retrieve the value for
|
|
20
|
+
* @param defaultValue The default value to return if the key doesn't exist
|
|
21
|
+
* @returns The stored integer value or the default value if not found
|
|
22
|
+
*/
|
|
23
|
+
getInt: (key: string, defaultValue: number) => number;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Gets a string value from the BM cache
|
|
27
|
+
* @param key The key to retrieve the value for
|
|
28
|
+
* @param defaultValue The default value to return if the key doesn't exist
|
|
29
|
+
* @returns The stored string value or the default value if not found
|
|
30
|
+
*/
|
|
31
|
+
getString: (key: string, defaultValue: string) => string;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Saves a boolean value to the BM cache
|
|
35
|
+
* @param key The key to store the value under
|
|
36
|
+
* @param value The boolean value to store
|
|
37
|
+
*/
|
|
38
|
+
saveBoolean: (key: string, value: boolean) => void;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Saves an integer value to the BM cache
|
|
42
|
+
* @param key The key to store the value under
|
|
43
|
+
* @param value The integer value to store
|
|
44
|
+
*/
|
|
45
|
+
saveInt: (key: string, value: number) => void;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Saves a string value to the BM cache
|
|
49
|
+
* @param key The key to store the value under
|
|
50
|
+
* @param value The string value to store
|
|
51
|
+
*/
|
|
52
|
+
saveString: (key: string, value: string) => void;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
declare namespace bot {
|
|
4
|
+
/**
|
|
5
|
+
* Interface for managing the bot's break handling functionality
|
|
6
|
+
* Controls whether the bot will take automated breaks
|
|
7
|
+
*/
|
|
8
|
+
interface breakHandler {
|
|
9
|
+
/**
|
|
10
|
+
* Sets the status of the break handler
|
|
11
|
+
* @param status True to enable the break handler, false to disable it
|
|
12
|
+
*/
|
|
13
|
+
setBreakHandlerStatus(status: boolean): void;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
declare namespace bot {
|
|
4
|
+
/**
|
|
5
|
+
* Interface for managing numeric counters within the bot
|
|
6
|
+
* Useful for tracking statistics and progress during bot operation
|
|
7
|
+
*/
|
|
8
|
+
interface counters {
|
|
9
|
+
/**
|
|
10
|
+
* Gets the value of a counter
|
|
11
|
+
* @param name The name of the counter to retrieve
|
|
12
|
+
* @returns The current value of the counter
|
|
13
|
+
*/
|
|
14
|
+
getCounter: (name: string) => number;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Sets the value of a counter
|
|
18
|
+
* @param name The name of the counter to set
|
|
19
|
+
* @param value The value to set the counter to
|
|
20
|
+
*/
|
|
21
|
+
setCounter: (name: string, value: number) => void;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
declare namespace bot {
|
|
4
|
+
/**
|
|
5
|
+
* Interface for interacting with the player's equipped items
|
|
6
|
+
* Provides methods to check and manage equipment
|
|
7
|
+
*/
|
|
8
|
+
type Item = {
|
|
9
|
+
id: number;
|
|
10
|
+
quantity: number;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
interface equipment {
|
|
14
|
+
/**
|
|
15
|
+
* Checks if the player has all the specified items equipped by their IDs
|
|
16
|
+
* @param ids Array of item IDs to check for
|
|
17
|
+
* @returns True if all specified items are equipped, false otherwise
|
|
18
|
+
*/
|
|
19
|
+
containsAllIds: (ids: number[]) => boolean;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Checks if the player has all the specified items equipped by their names
|
|
23
|
+
* @param names Array of item names to check for
|
|
24
|
+
* @returns True if all specified items are equipped, false otherwise
|
|
25
|
+
*/
|
|
26
|
+
containsAllNames: (names: string[]) => boolean;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Checks if the player has any of the specified items equipped by their IDs
|
|
30
|
+
* @param ids Array of item IDs to check for
|
|
31
|
+
* @returns True if any of the specified items are equipped, false otherwise
|
|
32
|
+
*/
|
|
33
|
+
containsAnyIds: (ids: number[]) => boolean;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Checks if the player has any of the specified items equipped by their names
|
|
37
|
+
* @param names Array of item names to check for
|
|
38
|
+
* @returns True if any of the specified items are equipped, false otherwise
|
|
39
|
+
*/
|
|
40
|
+
containsAnyNames: (names: string[]) => boolean;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Checks if the player has a specific item equipped by its ID
|
|
44
|
+
* @param id The item ID to check for
|
|
45
|
+
* @returns True if the item is equipped, false otherwise
|
|
46
|
+
*/
|
|
47
|
+
containsId: (id: number) => boolean;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Checks if the player has a specific item equipped by its name
|
|
51
|
+
* @param name The item name to check for
|
|
52
|
+
* @returns True if the item is equipped, false otherwise
|
|
53
|
+
*/
|
|
54
|
+
containsName: (name: string) => boolean;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Gets an array of all currently equipped items
|
|
58
|
+
* @returns Array of equipped items
|
|
59
|
+
*/
|
|
60
|
+
getEquipment: () => Item[];
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/// <reference path="../../../runelite/index.d.ts" />
|
|
2
|
+
|
|
3
|
+
declare namespace bot {
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Interface for handling game events
|
|
7
|
+
* Extends RuneLite's EventBus to provide event subscription capabilities
|
|
8
|
+
*/
|
|
9
|
+
interface events extends net.runelite.client.eventbus.EventBus {
|
|
10
|
+
/**
|
|
11
|
+
* Posts an event to the event bus, notifying all registered subscribers.
|
|
12
|
+
* @param event - The event object to be posted.
|
|
13
|
+
*/
|
|
14
|
+
post: (event: Object) => void;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Registers a subscriber function to listen for events of the specified class.
|
|
18
|
+
* @param clazz - The class of the event to subscribe to.
|
|
19
|
+
* @param subFn - The subscriber function to be called when the event is posted.
|
|
20
|
+
* @param priority - The priority of the subscriber; higher values are called first.
|
|
21
|
+
* @returns The created Subscriber instance.
|
|
22
|
+
*/
|
|
23
|
+
register: (clazz: Class, subFn: Function, priority: number) => Subscriber;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Unregisters a previously registered subscriber function.
|
|
27
|
+
* @param object - The subscriber function to be unregistered.
|
|
28
|
+
*/
|
|
29
|
+
unregister: (object: Function) => void;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Unregisters all event handlers that have been registered
|
|
33
|
+
* Useful for cleaning up event listeners when terminating a bot
|
|
34
|
+
*/
|
|
35
|
+
unregisterAll: () => void;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/// <reference path="../../../runelite/index.d.ts" />
|
|
2
|
+
|
|
3
|
+
declare namespace bot {
|
|
4
|
+
/**
|
|
5
|
+
* Represents a Grand Exchange buy/sell request
|
|
6
|
+
*/
|
|
7
|
+
interface ExchangeRequest {
|
|
8
|
+
/** Aborts the exchange request */
|
|
9
|
+
abort(): void;
|
|
10
|
+
/** Gets the ID of the item being bought or sold */
|
|
11
|
+
getItemId(): number;
|
|
12
|
+
/** Gets the quantity of the item being bought or sold */
|
|
13
|
+
getQuantity(): number;
|
|
14
|
+
/** Gets the slot number used for this exchange request */
|
|
15
|
+
getSlot(): GrandExchangeOffer;
|
|
16
|
+
/** Checks if the request has been aborted */
|
|
17
|
+
isAborted(): boolean;
|
|
18
|
+
/** Checks if the request is in the process of being aborted */
|
|
19
|
+
isAborting(): boolean;
|
|
20
|
+
/** Checks if the request has been completed */
|
|
21
|
+
isComplete(): boolean;
|
|
22
|
+
/** Sets the number of attempts for this exchange request */
|
|
23
|
+
setAttempts(attempts: number): void;
|
|
24
|
+
/** Sets the maximum number of attempts for this exchange request */
|
|
25
|
+
setMaxAttempts(maxAttempts: number): void;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Interface for interacting with the Grand Exchange
|
|
30
|
+
* Provides methods to buy/sell items and check GE status
|
|
31
|
+
* @warning QUEUE DOES NOT CLEAR ON GE ADDTOBUY
|
|
32
|
+
*/
|
|
33
|
+
interface grandExchange {
|
|
34
|
+
/**
|
|
35
|
+
* Adds a buy order to the Grand Exchange queue
|
|
36
|
+
* @param itemId The ID of the item to buy
|
|
37
|
+
* @param quantity The quantity of the item to buy
|
|
38
|
+
* @param walkToAndOpenGE Whether to automatically walk to and open the GE
|
|
39
|
+
* @returns An ExchangeRequest object representing the buy order
|
|
40
|
+
*/
|
|
41
|
+
addBuyToQueue: (itemId: number, quantity: number, walkToAndOpenGE: boolean) => net.runelite.api.GrandExchangeOffer;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Gets the current size of the Grand Exchange queue
|
|
45
|
+
* @returns The number of requests in the queue
|
|
46
|
+
*/
|
|
47
|
+
getExchangeQueueSize: () => number;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Gets the number of free slots in the Grand Exchange
|
|
51
|
+
* @returns The number of available GE slots
|
|
52
|
+
*/
|
|
53
|
+
getFreeSlots: () => number;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Checks if the Grand Exchange is currently processing exchanges
|
|
57
|
+
* @returns True if exchanges are in progress, false otherwise
|
|
58
|
+
*/
|
|
59
|
+
isExchanging: () => boolean;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Checks if the Grand Exchange interface is open
|
|
63
|
+
* @returns True if the GE is open, false otherwise
|
|
64
|
+
*/
|
|
65
|
+
isOpen: () => boolean;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference path="../../../runelite/index.d.ts" />
|
|
2
|
+
|
|
3
|
+
declare namespace bot {
|
|
4
|
+
/**
|
|
5
|
+
* Interface for interacting with in-game graphics objects
|
|
6
|
+
* Graphics objects include visual effects like spell impacts and animations
|
|
7
|
+
*/
|
|
8
|
+
interface graphicsObjects {
|
|
9
|
+
/**
|
|
10
|
+
* Gets all graphics objects with the specified IDs
|
|
11
|
+
* @param ids Array of graphics object IDs to search for
|
|
12
|
+
* @returns Array of matching GraphicsObject instances
|
|
13
|
+
*/
|
|
14
|
+
getWithIds: (ids: number[]) => net.runelite.api.GraphicsObject[];
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/// <reference path="./bank.d.ts" />
|
|
2
|
+
/// <reference path="./bmCache.d.ts" />
|
|
3
|
+
/// <reference path="./bmGlobalCache.d.ts" />
|
|
4
|
+
/// <reference path="./breakHandler.d.ts" />
|
|
5
|
+
/// <reference path="./counters.d.ts" />
|
|
6
|
+
/// <reference path="./equipment.d.ts" />
|
|
7
|
+
/// <reference path="./events.d.ts" />
|
|
8
|
+
/// <reference path="./grandExchange.d.ts" />
|
|
9
|
+
/// <reference path="./graphicsObjects.d.ts" />
|
|
10
|
+
/// <reference path="./inventory.d.ts" />
|
|
11
|
+
/// <reference path="./magic.d.ts" />
|
|
12
|
+
/// <reference path="./menuActions.d.ts" />
|
|
13
|
+
/// <reference path="./net.d.ts" />
|
|
14
|
+
/// <reference path="./notifier.d.ts" />
|
|
15
|
+
/// <reference path="./npcs.d.ts" />
|
|
16
|
+
/// <reference path="./objects.d.ts" />
|
|
17
|
+
/// <reference path="./players.d.ts" />
|
|
18
|
+
/// <reference path="./plugins.d.ts" />
|
|
19
|
+
/// <reference path="./prayer.d.ts" />
|
|
20
|
+
/// <reference path="./projectiles.d.ts" />
|
|
21
|
+
/// <reference path="./task.d.ts" />
|
|
22
|
+
/// <reference path="./tileItems.d.ts" />
|
|
23
|
+
/// <reference path="./types.d.ts" />
|
|
24
|
+
/// <reference path="./variables.d.ts" />
|
|
25
|
+
/// <reference path="./walking.d.ts" />
|
|
26
|
+
/// <reference path="./widgets.d.ts" />
|
|
27
|
+
|
|
28
|
+
declare namespace bot {
|
|
29
|
+
// Core methods are accessed directly on the bot object
|
|
30
|
+
interface SoxBotApi extends bot {
|
|
31
|
+
|
|
32
|
+
// Namespaces
|
|
33
|
+
attackStyle: bot.attackStyle;
|
|
34
|
+
bank: bot.bank;
|
|
35
|
+
bmCache: bot.bmCache;
|
|
36
|
+
bmGlobalCache: bot.bmGlobalCache;
|
|
37
|
+
breakHandler: bot.breakHandler;
|
|
38
|
+
counters: bot.counters;
|
|
39
|
+
equipment: bot.equipment;
|
|
40
|
+
events: bot.events;
|
|
41
|
+
grandExchange: bot.grandExchange;
|
|
42
|
+
graphicsObjects: bot.graphicsObjects;
|
|
43
|
+
inventory: bot.inventory;
|
|
44
|
+
magic: bot.magic;
|
|
45
|
+
net: bot.net;
|
|
46
|
+
notifier: bot.notifier;
|
|
47
|
+
npcs: bot.npcs;
|
|
48
|
+
objects: bot.objects;
|
|
49
|
+
players: bot.players;
|
|
50
|
+
plugins: bot.plugins;
|
|
51
|
+
prayer: bot.prayer;
|
|
52
|
+
projectiles: bot.projectiles;
|
|
53
|
+
task: bot.task;
|
|
54
|
+
tileItems: bot.tileItems;
|
|
55
|
+
variables: bot.variables;
|
|
56
|
+
walking: bot.walking;
|
|
57
|
+
widgets: bot.widgets;
|
|
58
|
+
|
|
59
|
+
// Direct methods
|
|
60
|
+
/**
|
|
61
|
+
* Performs a menu action.
|
|
62
|
+
* @param p0 The first parameter for the menu action
|
|
63
|
+
* @param p1 The second parameter for the menu action
|
|
64
|
+
* @param action The menu action to perform
|
|
65
|
+
* @param identifier The identifier for the menu action
|
|
66
|
+
* @param itemId The item ID for the menu action
|
|
67
|
+
* @param option The option for the menu action
|
|
68
|
+
* @param target The target for the menu action
|
|
69
|
+
* @param bounds The bounds for the menu action
|
|
70
|
+
*/
|
|
71
|
+
menuAction: {
|
|
72
|
+
(
|
|
73
|
+
p0: number,
|
|
74
|
+
p1: number,
|
|
75
|
+
action: net.runelite.api.MenuAction,
|
|
76
|
+
identifier: number,
|
|
77
|
+
itemId: number,
|
|
78
|
+
option: string,
|
|
79
|
+
target: string
|
|
80
|
+
): void;
|
|
81
|
+
(
|
|
82
|
+
p0: number,
|
|
83
|
+
p1: number,
|
|
84
|
+
action: net.runelite.api.MenuAction,
|
|
85
|
+
identifier: number,
|
|
86
|
+
itemId: number,
|
|
87
|
+
option: string,
|
|
88
|
+
target: string,
|
|
89
|
+
bounds: java.awt.Rectangle
|
|
90
|
+
): void;
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* Clears the game chat.
|
|
94
|
+
*/
|
|
95
|
+
clearGameChat: () => void;
|
|
96
|
+
/**
|
|
97
|
+
* Checks if the local player is idle.
|
|
98
|
+
* @returns True if the local player is idle, false otherwise.
|
|
99
|
+
*/
|
|
100
|
+
localPlayerIdle: () => boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Checks if the local player is moving.
|
|
103
|
+
* @returns True if the local player is moving, false otherwise.
|
|
104
|
+
*/
|
|
105
|
+
localPlayerMoving: () => boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Prints a message to the game chat.
|
|
108
|
+
* @param message The message to print.
|
|
109
|
+
*/
|
|
110
|
+
printGameMessage: (message: string) => void;
|
|
111
|
+
/**
|
|
112
|
+
* Prints a message to the log.
|
|
113
|
+
* @param message The message to print.
|
|
114
|
+
*/
|
|
115
|
+
printLogMessage: (message: string) => void;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Runs a client script.
|
|
119
|
+
* @param ints The integer parameters for the script.
|
|
120
|
+
*/
|
|
121
|
+
runClientScript: (ints: number[]) => void;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Terminates the bot.
|
|
125
|
+
*/
|
|
126
|
+
terminate: () => void;
|
|
127
|
+
}
|
|
128
|
+
}
|