@deafwave/osrs-botmaker-types 0.5.7 → 0.5.9
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.
|
@@ -78,7 +78,7 @@ declare namespace net.runelite.api {
|
|
|
78
78
|
* @param sender the sender/channel name
|
|
79
79
|
* @return the message node for the message
|
|
80
80
|
*/
|
|
81
|
-
addChatMessage(type: ChatMessageType, name: string, message: string, sender: string): MessageNode;
|
|
81
|
+
addChatMessage(type: ChatMessageType, name: string, message: string, sender: string | null): MessageNode;
|
|
82
82
|
|
|
83
83
|
/**
|
|
84
84
|
* Adds a new chat message to the chatbox.
|
|
@@ -90,7 +90,7 @@ declare namespace net.runelite.api {
|
|
|
90
90
|
* @param postEvent whether to post the chat message event
|
|
91
91
|
* @return the message node for the message
|
|
92
92
|
*/
|
|
93
|
-
addChatMessage(type: ChatMessageType, name: string, message: string, sender: string, postEvent: boolean): MessageNode;
|
|
93
|
+
addChatMessage(type: ChatMessageType, name: string, message: string, sender: string | null, postEvent: boolean): MessageNode;
|
|
94
94
|
|
|
95
95
|
/**
|
|
96
96
|
* Gets the current game state.
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
/// <reference path="./types.d.ts" />
|
|
24
24
|
/// <reference path="./variables.d.ts" />
|
|
25
25
|
/// <reference path="./walking.d.ts" />
|
|
26
|
+
/// <reference path="./web.d.ts" />
|
|
26
27
|
/// <reference path="./widgets.d.ts" />
|
|
27
28
|
|
|
28
29
|
declare namespace bot {
|
|
@@ -53,6 +54,7 @@ declare namespace bot {
|
|
|
53
54
|
tileItems: bot.tileItems;
|
|
54
55
|
variables: bot.variables;
|
|
55
56
|
walking: bot.walking;
|
|
57
|
+
web: bot.web;
|
|
56
58
|
widgets: bot.widgets;
|
|
57
59
|
|
|
58
60
|
// Direct methods
|
|
@@ -82,6 +82,13 @@ declare namespace bot {
|
|
|
82
82
|
*/
|
|
83
83
|
getQuantityOfName: (itemName: string) => number;
|
|
84
84
|
|
|
85
|
+
/**
|
|
86
|
+
* Interacts with an inventory item at the specified index
|
|
87
|
+
* @param index The index of the item to interact with
|
|
88
|
+
* @param options Array of interaction options
|
|
89
|
+
*/
|
|
90
|
+
interactAtIndex: (index: number, options: string[]) => void;
|
|
91
|
+
|
|
85
92
|
/**
|
|
86
93
|
* Interacts with inventory items by their IDs
|
|
87
94
|
* @param itemIds Array of item IDs to interact with
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
declare namespace bot {
|
|
4
|
+
|
|
5
|
+
interface web {
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Reads a string from the web
|
|
9
|
+
* Whitelisted URLs: github.com, pastebin
|
|
10
|
+
* @param requestURL The URL to read the string from
|
|
11
|
+
* @returns The string read from the web
|
|
12
|
+
*/
|
|
13
|
+
readString(requestURL: string): string;
|
|
14
|
+
}
|
|
15
|
+
}
|