libram 0.3.2 → 0.4.2
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/Clan.js +268 -485
- package/dist/Copier.js +11 -48
- package/dist/Dungeon.js +77 -157
- package/dist/Kmail.d.ts +13 -7
- package/dist/Kmail.js +92 -233
- package/dist/Path.js +68 -120
- package/dist/ascend.js +153 -172
- package/dist/combat.d.ts +86 -1
- package/dist/combat.js +295 -387
- package/dist/console.js +13 -36
- package/dist/diet/index.d.ts +31 -0
- package/dist/diet/index.js +333 -0
- package/dist/diet/knapsack.d.ts +7 -0
- package/dist/diet/knapsack.js +106 -0
- package/dist/dungeons/Dreadsylvania.d.ts +4 -0
- package/dist/dungeons/Dreadsylvania.js +14 -0
- package/dist/dungeons/Dungeon.d.ts +28 -0
- package/dist/dungeons/Dungeon.js +99 -0
- package/dist/dungeons/Hobopolis.d.ts +4 -0
- package/dist/dungeons/Hobopolis.js +14 -0
- package/dist/dungeons/SlimeTube.d.ts +4 -0
- package/dist/dungeons/SlimeTube.js +14 -0
- package/dist/freerun.d.ts +23 -0
- package/dist/freerun.js +92 -0
- package/dist/index.d.ts +6 -1
- package/dist/index.js +21 -263
- package/dist/lib.d.ts +43 -0
- package/dist/lib.js +296 -405
- package/dist/logger.js +23 -63
- package/dist/maximize.d.ts +29 -12
- package/dist/maximize.js +318 -421
- package/dist/modifier.d.ts +13 -0
- package/dist/modifier.js +35 -0
- package/dist/modifierTypes.d.ts +16 -0
- package/dist/modifierTypes.js +9 -0
- package/dist/mood.js +220 -531
- package/dist/property.d.ts +2 -0
- package/dist/property.js +96 -242
- package/dist/propertyTypes.d.ts +9 -0
- package/dist/propertyTypes.js +1 -0
- package/dist/propertyTyping.d.ts +2 -9
- package/dist/propertyTyping.js +42 -53
- package/dist/resources/2007/CandyHearts.d.ts +9 -0
- package/dist/resources/2007/CandyHearts.js +24 -0
- package/dist/resources/2008/DivineFavors.d.ts +9 -0
- package/dist/resources/2008/DivineFavors.js +27 -0
- package/dist/resources/2009/Bandersnatch.js +37 -112
- package/dist/resources/2009/LoveSongs.d.ts +9 -0
- package/dist/resources/2009/LoveSongs.js +24 -0
- package/dist/resources/2009/SpookyPutty.js +20 -46
- package/dist/resources/2010/Brickos.d.ts +9 -0
- package/dist/resources/2010/Brickos.js +21 -0
- package/dist/resources/2010/CrownOfThrones.d.ts +18 -0
- package/dist/resources/2010/CrownOfThrones.js +550 -0
- package/dist/resources/2011/Gygaxian.d.ts +9 -0
- package/dist/resources/2011/Gygaxian.js +24 -0
- package/dist/resources/2011/ObtuseAngel.js +21 -63
- package/dist/resources/2012/RainDoh.js +14 -40
- package/dist/resources/2012/Resolutions.d.ts +9 -0
- package/dist/resources/2012/Resolutions.js +28 -0
- package/dist/resources/2013/Florist.d.ts +61 -0
- package/dist/resources/2013/Florist.js +149 -0
- package/dist/resources/2013/PulledTaffy.d.ts +9 -0
- package/dist/resources/2013/PulledTaffy.js +33 -0
- package/dist/resources/2014/WinterGarden.js +15 -43
- package/dist/resources/2015/ChateauMantegna.js +52 -86
- package/dist/resources/2015/MayoClinic.d.ts +13 -0
- package/dist/resources/2015/MayoClinic.js +36 -0
- package/dist/resources/2016/SourceTerminal.d.ts +1 -0
- package/dist/resources/2016/SourceTerminal.js +114 -237
- package/dist/resources/2016/Witchess.js +33 -59
- package/dist/resources/2017/TunnelOfLove.js +62 -111
- package/dist/resources/2018/SongBoom.js +32 -68
- package/dist/resources/2019/BeachComb.d.ts +2 -0
- package/dist/resources/2019/BeachComb.js +26 -0
- package/dist/resources/2019/Snapper.d.ts +28 -0
- package/dist/resources/2019/Snapper.js +70 -0
- package/dist/resources/2020/Guzzlr.js +79 -163
- package/dist/resources/LibramSummon.d.ts +12 -0
- package/dist/resources/LibramSummon.js +66 -0
- package/dist/resources/index.d.ts +18 -11
- package/dist/resources/index.js +19 -85
- package/dist/resources/putty-likes.js +15 -30
- package/dist/ring-buffer.d.ts +24 -0
- package/dist/ring-buffer.js +135 -0
- package/dist/since.d.ts +1 -0
- package/dist/since.js +56 -112
- package/dist/template-string.js +40 -132
- package/dist/utils.d.ts +14 -0
- package/dist/utils.js +50 -114
- package/package.json +5 -3
- package/dist/libram-example-briefcase.js +0 -16073
- package/dist/libram-example-clan.js +0 -8898
- package/dist/libram-example-consult.js +0 -6179
- package/dist/libram-example-item.js +0 -3248
- package/dist/libram-example-kmail.js +0 -2065
- package/dist/libram-example-lib.js +0 -7608
- package/dist/libram-example-props.js +0 -4770
- package/dist/libram-example-resources.js +0 -12226
package/dist/combat.js
CHANGED
|
@@ -1,128 +1,63 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
require("core-js/modules/es.symbol.js");
|
|
6
|
-
|
|
7
|
-
require("core-js/modules/es.symbol.description.js");
|
|
8
|
-
|
|
9
|
-
require("core-js/modules/es.array.iterator.js");
|
|
10
|
-
|
|
11
|
-
Object.defineProperty(exports, "__esModule", {
|
|
12
|
-
value: true
|
|
13
|
-
});
|
|
14
|
-
exports.getMacroId = getMacroId;
|
|
15
|
-
exports.adventureMacro = adventureMacro;
|
|
16
|
-
exports.adventureMacroAuto = adventureMacroAuto;
|
|
17
|
-
exports.Macro = void 0;
|
|
18
|
-
|
|
19
|
-
require("core-js/modules/es.array.map.js");
|
|
20
|
-
|
|
21
|
-
require("core-js/modules/es.array.includes.js");
|
|
22
|
-
|
|
23
|
-
require("core-js/modules/es.string.includes.js");
|
|
24
|
-
|
|
25
|
-
require("core-js/modules/es.object.to-string.js");
|
|
26
|
-
|
|
27
|
-
require("core-js/modules/es.regexp.to-string.js");
|
|
28
|
-
|
|
29
|
-
require("core-js/modules/es.regexp.exec.js");
|
|
30
|
-
|
|
31
|
-
require("core-js/modules/es.string.match.js");
|
|
32
|
-
|
|
33
|
-
require("core-js/modules/es.array.concat.js");
|
|
34
|
-
|
|
35
|
-
require("core-js/modules/es.array.filter.js");
|
|
36
|
-
|
|
37
|
-
require("core-js/modules/es.string.split.js");
|
|
38
|
-
|
|
39
|
-
var _kolmafia = require("kolmafia");
|
|
40
|
-
|
|
41
|
-
var _templateString = require("./template-string");
|
|
42
|
-
|
|
43
|
-
var _property = require("./property");
|
|
44
|
-
|
|
45
|
-
var _templateObject, _templateObject2;
|
|
46
|
-
|
|
47
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
48
|
-
|
|
49
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
50
|
-
|
|
51
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
52
|
-
|
|
53
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
54
|
-
|
|
55
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
56
|
-
|
|
57
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
58
|
-
|
|
59
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
60
|
-
|
|
61
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
62
|
-
|
|
63
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
64
|
-
|
|
65
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
66
|
-
|
|
67
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
68
|
-
|
|
69
|
-
var MACRO_NAME = "Script Autoattack Macro";
|
|
1
|
+
import { adv1, choiceFollowsFight, getAutoAttack, inMultiFight, removeProperty, runCombat, setAutoAttack, toInt, urlEncode, visitUrl, xpath, } from "kolmafia";
|
|
2
|
+
import { $items, $skills } from "./template-string";
|
|
3
|
+
import { get, set } from "./property";
|
|
4
|
+
const MACRO_NAME = "Script Autoattack Macro";
|
|
70
5
|
/**
|
|
71
6
|
* Get the KoL native ID of the macro with name Script Autoattack Macro.
|
|
72
7
|
*
|
|
73
8
|
* @category Combat
|
|
74
9
|
* @returns {number} The macro ID.
|
|
75
10
|
*/
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
11
|
+
export function getMacroId() {
|
|
12
|
+
const macroMatches = xpath(visitUrl("account_combatmacros.php"), `//select[@name="macroid"]/option[text()="${MACRO_NAME}"]/@value`);
|
|
13
|
+
if (macroMatches.length === 0) {
|
|
14
|
+
visitUrl("account_combatmacros.php?action=new");
|
|
15
|
+
const newMacroText = visitUrl(`account_combatmacros.php?macroid=0&name=${MACRO_NAME}¯otext=abort&action=save`);
|
|
16
|
+
return parseInt(xpath(newMacroText, "//input[@name=macroid]/@value")[0], 10);
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
return parseInt(macroMatches[0], 10);
|
|
20
|
+
}
|
|
87
21
|
}
|
|
88
|
-
|
|
89
22
|
function itemOrNameToItem(itemOrName) {
|
|
90
|
-
|
|
23
|
+
return typeof itemOrName === "string" ? Item.get(itemOrName) : itemOrName;
|
|
91
24
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
var substringCombatSkills = (0, _templateString.$skills)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["Shoot, Thrust-Smack, Headbutt, Toss, Sing, Disarm, LIGHT, BURN, Extract, Meteor Shower, Cleave, Boil, Slice, Rainbow"])));
|
|
95
|
-
|
|
25
|
+
const substringCombatItems = $items `spider web, really sticky spider web, dictionary, NG, Cloaca-Cola, yo-yo, top, ball, kite, yo, red potion, blue potion, adder, red button, pile of sand, mushroom, deluxe mushroom`;
|
|
26
|
+
const substringCombatSkills = $skills `Shoot, Thrust-Smack, Headbutt, Toss, Sing, Disarm, LIGHT, BURN, Extract, Meteor Shower, Cleave, Boil, Slice, Rainbow`;
|
|
96
27
|
function itemOrItemsBallsMacroName(itemOrItems) {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
28
|
+
if (Array.isArray(itemOrItems)) {
|
|
29
|
+
return itemOrItems.map(itemOrItemsBallsMacroName).join(", ");
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
const item = itemOrNameToItem(itemOrItems);
|
|
33
|
+
return !substringCombatItems.includes(item)
|
|
34
|
+
? item.name
|
|
35
|
+
: toInt(item).toString();
|
|
36
|
+
}
|
|
103
37
|
}
|
|
104
|
-
|
|
105
38
|
function itemOrItemsBallsMacroPredicate(itemOrItems) {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
39
|
+
if (Array.isArray(itemOrItems)) {
|
|
40
|
+
return itemOrItems.map(itemOrItemsBallsMacroPredicate).join(" && ");
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
return `hascombatitem ${itemOrItems}`;
|
|
44
|
+
}
|
|
111
45
|
}
|
|
112
|
-
|
|
113
46
|
function skillOrNameToSkill(skillOrName) {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
47
|
+
if (typeof skillOrName === "string") {
|
|
48
|
+
return Skill.get(skillOrName);
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
return skillOrName;
|
|
52
|
+
}
|
|
119
53
|
}
|
|
120
|
-
|
|
121
54
|
function skillBallsMacroName(skillOrName) {
|
|
122
|
-
|
|
123
|
-
|
|
55
|
+
const skill = skillOrNameToSkill(skillOrName);
|
|
56
|
+
return skill.name.match(/^[A-Za-z ]+$/) &&
|
|
57
|
+
!substringCombatSkills.includes(skill)
|
|
58
|
+
? skill.name
|
|
59
|
+
: toInt(skill);
|
|
124
60
|
}
|
|
125
|
-
|
|
126
61
|
/**
|
|
127
62
|
* BALLS macro builder for direct submission to KoL.
|
|
128
63
|
* Create a new macro with `new Macro()` and add steps using the instance methods.
|
|
@@ -130,115 +65,113 @@ function skillBallsMacroName(skillOrName) {
|
|
|
130
65
|
* Each method is also defined as a static method that creates a new Macro with only that step.
|
|
131
66
|
* For example, you can do `Macro.skill('Saucestorm').attack()`.
|
|
132
67
|
*/
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
_defineProperty(this, "components", []);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
_createClass(Macro, [{
|
|
141
|
-
key: "toString",
|
|
142
|
-
value:
|
|
68
|
+
export class Macro {
|
|
69
|
+
constructor() {
|
|
70
|
+
this.components = [];
|
|
71
|
+
}
|
|
143
72
|
/**
|
|
144
73
|
* Convert macro to string.
|
|
145
74
|
*/
|
|
146
|
-
|
|
147
|
-
|
|
75
|
+
toString() {
|
|
76
|
+
return this.components.join(";");
|
|
148
77
|
}
|
|
149
78
|
/**
|
|
150
79
|
* Save a macro to a Mafia property for use in a consult script.
|
|
151
80
|
*/
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
key: "save",
|
|
155
|
-
value: function save() {
|
|
156
|
-
(0, _property.set)(Macro.SAVED_MACRO_PROPERTY, this.toString());
|
|
81
|
+
save() {
|
|
82
|
+
set(Macro.SAVED_MACRO_PROPERTY, this.toString());
|
|
157
83
|
}
|
|
158
84
|
/**
|
|
159
85
|
* Load a saved macro from the Mafia property.
|
|
160
86
|
*/
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
87
|
+
static load() {
|
|
88
|
+
return new this().step(...get(Macro.SAVED_MACRO_PROPERTY).split(";"));
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Clear the saved macro in the Mafia property.
|
|
92
|
+
*/
|
|
93
|
+
static clearSaved() {
|
|
94
|
+
removeProperty(Macro.SAVED_MACRO_PROPERTY);
|
|
95
|
+
}
|
|
165
96
|
/**
|
|
166
97
|
* Statefully add one or several steps to a macro.
|
|
167
98
|
* @param nextSteps The steps to add to the macro.
|
|
168
99
|
* @returns {Macro} This object itself.
|
|
169
100
|
*/
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
var nextStepsStrings = (_ref = []).concat.apply(_ref, _toConsumableArray(nextSteps.map(x => x instanceof Macro ? x.components : [x])));
|
|
178
|
-
|
|
179
|
-
this.components = [].concat(_toConsumableArray(this.components), _toConsumableArray(nextStepsStrings.filter(s => s.length > 0)));
|
|
180
|
-
return this;
|
|
101
|
+
step(...nextSteps) {
|
|
102
|
+
const nextStepsStrings = [].concat(...nextSteps.map((x) => (x instanceof Macro ? x.components : [x])));
|
|
103
|
+
this.components = [
|
|
104
|
+
...this.components,
|
|
105
|
+
...nextStepsStrings.filter((s) => s.length > 0),
|
|
106
|
+
];
|
|
107
|
+
return this;
|
|
181
108
|
}
|
|
182
109
|
/**
|
|
183
110
|
* Statefully add one or several steps to a macro.
|
|
184
111
|
* @param nextSteps The steps to add to the macro.
|
|
185
112
|
* @returns {Macro} This object itself.
|
|
186
113
|
*/
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
value:
|
|
114
|
+
static step(...nextSteps) {
|
|
115
|
+
return new this().step(...nextSteps);
|
|
116
|
+
}
|
|
191
117
|
/**
|
|
192
118
|
* Submit the built macro to KoL. Only works inside combat.
|
|
193
119
|
*/
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
120
|
+
submit() {
|
|
121
|
+
const final = this.toString();
|
|
122
|
+
return visitUrl(`fight.php?action=macro¯otext=${urlEncode(final)}`, true, true);
|
|
197
123
|
}
|
|
198
124
|
/**
|
|
199
125
|
* Set this macro as a KoL native autoattack.
|
|
200
126
|
*/
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
(0, _kolmafia.visitUrl)("account_combatmacros.php?macroid=".concat(Macro.cachedMacroId, "&name=").concat((0, _kolmafia.urlEncode)(MACRO_NAME), "¯otext=").concat((0, _kolmafia.urlEncode)(this.toString()), "&action=save"), true, true);
|
|
213
|
-
(0, _kolmafia.visitUrl)("account.php?am=1&action=autoattack&value=".concat(99000000 + Macro.cachedMacroId, "&ajax=1"));
|
|
214
|
-
Macro.cachedAutoAttack = this.toString();
|
|
127
|
+
setAutoAttack() {
|
|
128
|
+
if (Macro.cachedMacroId === null)
|
|
129
|
+
Macro.cachedMacroId = getMacroId();
|
|
130
|
+
if (getAutoAttack() === 99000000 + Macro.cachedMacroId &&
|
|
131
|
+
this.toString() === Macro.cachedAutoAttack) {
|
|
132
|
+
// This macro is already set. Don"t make the server request.
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
visitUrl(`account_combatmacros.php?macroid=${Macro.cachedMacroId}&name=${urlEncode(MACRO_NAME)}¯otext=${urlEncode(this.toString())}&action=save`, true, true);
|
|
136
|
+
visitUrl(`account.php?am=1&action=autoattack&value=${99000000 + Macro.cachedMacroId}&ajax=1`);
|
|
137
|
+
Macro.cachedAutoAttack = this.toString();
|
|
215
138
|
}
|
|
216
139
|
/**
|
|
217
140
|
* Add an "abort" step to this macro.
|
|
218
141
|
* @returns {Macro} This object itself.
|
|
219
142
|
*/
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
key: "abort",
|
|
223
|
-
value: function abort() {
|
|
224
|
-
return this.step("abort");
|
|
143
|
+
abort() {
|
|
144
|
+
return this.step("abort");
|
|
225
145
|
}
|
|
226
146
|
/**
|
|
227
147
|
* Create a new macro with an "abort" step.
|
|
228
148
|
* @returns {Macro} This object itself.
|
|
229
149
|
*/
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
150
|
+
static abort() {
|
|
151
|
+
return new this().abort();
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Add a "runaway" step to this macro.
|
|
155
|
+
* @returns {Macro} This object itself.
|
|
156
|
+
*/
|
|
157
|
+
runaway() {
|
|
158
|
+
return this.step("runaway");
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Create a new macro with an "runaway" step.
|
|
162
|
+
* @returns {Macro} This object itself.
|
|
163
|
+
*/
|
|
164
|
+
static runaway() {
|
|
165
|
+
return new this().runaway();
|
|
166
|
+
}
|
|
234
167
|
/**
|
|
235
168
|
* Add an "if" statement to this macro.
|
|
236
169
|
* @param condition The BALLS condition for the if statement.
|
|
237
170
|
* @param ifTrue Continuation if the condition is true.
|
|
238
171
|
* @returns {Macro} This object itself.
|
|
239
172
|
*/
|
|
240
|
-
|
|
241
|
-
|
|
173
|
+
if_(condition, ifTrue) {
|
|
174
|
+
return this.step(`if ${condition}`).step(ifTrue).step("endif");
|
|
242
175
|
}
|
|
243
176
|
/**
|
|
244
177
|
* Create a new macro with an "if" statement.
|
|
@@ -246,18 +179,17 @@ var Macro = /*#__PURE__*/function () {
|
|
|
246
179
|
* @param ifTrue Continuation if the condition is true.
|
|
247
180
|
* @returns {Macro} This object itself.
|
|
248
181
|
*/
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
value:
|
|
182
|
+
static if_(condition, ifTrue) {
|
|
183
|
+
return new this().if_(condition, ifTrue);
|
|
184
|
+
}
|
|
253
185
|
/**
|
|
254
186
|
* Add a "while" statement to this macro.
|
|
255
187
|
* @param condition The BALLS condition for the if statement.
|
|
256
188
|
* @param contents Loop to repeat while the condition is true.
|
|
257
189
|
* @returns {Macro} This object itself.
|
|
258
190
|
*/
|
|
259
|
-
|
|
260
|
-
|
|
191
|
+
while_(condition, contents) {
|
|
192
|
+
return this.step(`while ${condition}`).step(contents).step("endwhile");
|
|
261
193
|
}
|
|
262
194
|
/**
|
|
263
195
|
* Create a new macro with a "while" statement.
|
|
@@ -265,18 +197,23 @@ var Macro = /*#__PURE__*/function () {
|
|
|
265
197
|
* @param contents Loop to repeat while the condition is true.
|
|
266
198
|
* @returns {Macro} This object itself.
|
|
267
199
|
*/
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
value:
|
|
200
|
+
static while_(condition, contents) {
|
|
201
|
+
return new this().while_(condition, contents);
|
|
202
|
+
}
|
|
272
203
|
/**
|
|
273
204
|
* Conditionally add a step to a macro based on a condition evaluated at the time of building the macro.
|
|
274
205
|
* @param condition The JS condition.
|
|
275
206
|
* @param ifTrue Continuation to add if the condition is true.
|
|
207
|
+
* @param ifFalse Optional input to turn this into an if...else statement.
|
|
276
208
|
* @returns {Macro} This object itself.
|
|
277
209
|
*/
|
|
278
|
-
|
|
279
|
-
|
|
210
|
+
externalIf(condition, ifTrue, ifFalse) {
|
|
211
|
+
if (condition)
|
|
212
|
+
return this.step(ifTrue);
|
|
213
|
+
else if (ifFalse)
|
|
214
|
+
return this.step(ifFalse);
|
|
215
|
+
else
|
|
216
|
+
return this;
|
|
280
217
|
}
|
|
281
218
|
/**
|
|
282
219
|
* Create a new macro with a condition evaluated at the time of building the macro.
|
|
@@ -284,234 +221,140 @@ var Macro = /*#__PURE__*/function () {
|
|
|
284
221
|
* @param ifTrue Continuation to add if the condition is true.
|
|
285
222
|
* @returns {Macro} This object itself.
|
|
286
223
|
*/
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
value:
|
|
224
|
+
static externalIf(condition, ifTrue) {
|
|
225
|
+
return new this().externalIf(condition, ifTrue);
|
|
226
|
+
}
|
|
291
227
|
/**
|
|
292
228
|
* Add a repeat step to the macro.
|
|
293
229
|
* @returns {Macro} This object itself.
|
|
294
230
|
*/
|
|
295
|
-
|
|
296
|
-
|
|
231
|
+
repeat() {
|
|
232
|
+
return this.step("repeat");
|
|
297
233
|
}
|
|
298
234
|
/**
|
|
299
235
|
* Add one or more skill cast steps to the macro.
|
|
300
236
|
* @param skills Skills to cast.
|
|
301
237
|
* @returns {Macro} This object itself.
|
|
302
238
|
*/
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
for (var _len2 = arguments.length, skills = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
308
|
-
skills[_key2] = arguments[_key2];
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
return this.step.apply(this, _toConsumableArray(skills.map(skill => {
|
|
312
|
-
return "skill ".concat(skillBallsMacroName(skill));
|
|
313
|
-
})));
|
|
239
|
+
skill(...skills) {
|
|
240
|
+
return this.step(...skills.map((skill) => {
|
|
241
|
+
return `skill ${skillBallsMacroName(skill)}`;
|
|
242
|
+
}));
|
|
314
243
|
}
|
|
315
244
|
/**
|
|
316
245
|
* Create a new macro with one or more skill cast steps.
|
|
317
246
|
* @param skills Skills to cast.
|
|
318
247
|
* @returns {Macro} This object itself.
|
|
319
248
|
*/
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
value:
|
|
249
|
+
static skill(...skills) {
|
|
250
|
+
return new this().skill(...skills);
|
|
251
|
+
}
|
|
324
252
|
/**
|
|
325
253
|
* Add one or more skill cast steps to the macro, where each step checks if you have the skill first.
|
|
326
254
|
* @param skills Skills to try casting.
|
|
327
255
|
* @returns {Macro} This object itself.
|
|
328
256
|
*/
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
return this.step.apply(this, _toConsumableArray(skills.map(skill => {
|
|
335
|
-
return Macro.if_("hasskill ".concat(skillBallsMacroName(skill)), Macro.skill(skill));
|
|
336
|
-
})));
|
|
257
|
+
trySkill(...skills) {
|
|
258
|
+
return this.step(...skills.map((skill) => {
|
|
259
|
+
return Macro.if_(`hasskill ${skillBallsMacroName(skill)}`, Macro.skill(skill));
|
|
260
|
+
}));
|
|
337
261
|
}
|
|
338
262
|
/**
|
|
339
263
|
* Create a new macro with one or more skill cast steps, where each step checks if you have the skill first.
|
|
340
264
|
* @param skills Skills to try casting.
|
|
341
265
|
* @returns {Macro} This object itself.
|
|
342
266
|
*/
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
value:
|
|
267
|
+
static trySkill(...skills) {
|
|
268
|
+
return new this().trySkill(...skills);
|
|
269
|
+
}
|
|
347
270
|
/**
|
|
348
271
|
* Add one or more skill-cast-and-repeat steps to the macro, where each step checks if you have the skill first.
|
|
349
272
|
* @param skills Skills to try repeatedly casting.
|
|
350
273
|
* @returns {Macro} This object itself.
|
|
351
274
|
*/
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
return this.step.apply(this, _toConsumableArray(skills.map(skill => {
|
|
358
|
-
return Macro.if_("hasskill ".concat(skillBallsMacroName(skill)), Macro.skill(skill).repeat());
|
|
359
|
-
})));
|
|
275
|
+
trySkillRepeat(...skills) {
|
|
276
|
+
return this.step(...skills.map((skill) => {
|
|
277
|
+
return Macro.if_(`hasskill ${skillBallsMacroName(skill)}`, Macro.skill(skill).repeat());
|
|
278
|
+
}));
|
|
360
279
|
}
|
|
361
280
|
/**
|
|
362
281
|
* Create a new macro with one or more skill-cast-and-repeat steps, where each step checks if you have the skill first.
|
|
363
282
|
* @param skills Skills to try repeatedly casting.
|
|
364
283
|
* @returns {Macro} This object itself.
|
|
365
284
|
*/
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
value:
|
|
285
|
+
static trySkillRepeat(...skills) {
|
|
286
|
+
return new this().trySkillRepeat(...skills);
|
|
287
|
+
}
|
|
370
288
|
/**
|
|
371
289
|
* Add one or more item steps to the macro.
|
|
372
290
|
* @param items Items to use. Pass a tuple [item1, item2] to funksling.
|
|
373
291
|
* @returns {Macro} This object itself.
|
|
374
292
|
*/
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
return this.step.apply(this, _toConsumableArray(items.map(itemOrItems => {
|
|
381
|
-
return "use ".concat(itemOrItemsBallsMacroName(itemOrItems));
|
|
382
|
-
})));
|
|
293
|
+
item(...items) {
|
|
294
|
+
return this.step(...items.map((itemOrItems) => {
|
|
295
|
+
return `use ${itemOrItemsBallsMacroName(itemOrItems)}`;
|
|
296
|
+
}));
|
|
383
297
|
}
|
|
384
298
|
/**
|
|
385
299
|
* Create a new macro with one or more item steps.
|
|
386
300
|
* @param items Items to use. Pass a tuple [item1, item2] to funksling.
|
|
387
301
|
* @returns {Macro} This object itself.
|
|
388
302
|
*/
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
value:
|
|
303
|
+
static item(...items) {
|
|
304
|
+
return new this().item(...items);
|
|
305
|
+
}
|
|
393
306
|
/**
|
|
394
307
|
* Add one or more item steps to the macro, where each step checks to see if you have the item first.
|
|
395
308
|
* @param items Items to try using. Pass a tuple [item1, item2] to funksling.
|
|
396
309
|
* @returns {Macro} This object itself.
|
|
397
310
|
*/
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
return this.step.apply(this, _toConsumableArray(items.map(item => {
|
|
404
|
-
return Macro.if_(itemOrItemsBallsMacroPredicate(item), "use ".concat(itemOrItemsBallsMacroName(item)));
|
|
405
|
-
})));
|
|
311
|
+
tryItem(...items) {
|
|
312
|
+
return this.step(...items.map((item) => {
|
|
313
|
+
return Macro.if_(itemOrItemsBallsMacroPredicate(item), `use ${itemOrItemsBallsMacroName(item)}`);
|
|
314
|
+
}));
|
|
406
315
|
}
|
|
407
316
|
/**
|
|
408
317
|
* Create a new macro with one or more item steps, where each step checks to see if you have the item first.
|
|
409
318
|
* @param items Items to try using. Pass a tuple [item1, item2] to funksling.
|
|
410
319
|
* @returns {Macro} This object itself.
|
|
411
320
|
*/
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
value:
|
|
321
|
+
static tryItem(...items) {
|
|
322
|
+
return new this().tryItem(...items);
|
|
323
|
+
}
|
|
416
324
|
/**
|
|
417
325
|
* Add an attack step to the macro.
|
|
418
326
|
* @returns {Macro} This object itself.
|
|
419
327
|
*/
|
|
420
|
-
|
|
421
|
-
|
|
328
|
+
attack() {
|
|
329
|
+
return this.step("attack");
|
|
422
330
|
}
|
|
423
331
|
/**
|
|
424
332
|
* Create a new macro with an attack step.
|
|
425
333
|
* @returns {Macro} This object itself.
|
|
426
334
|
*/
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
key: "load",
|
|
430
|
-
value: function load() {
|
|
431
|
-
var _this;
|
|
432
|
-
|
|
433
|
-
return (_this = new this()).step.apply(_this, _toConsumableArray((0, _property.get)(Macro.SAVED_MACRO_PROPERTY).split(";")));
|
|
335
|
+
static attack() {
|
|
336
|
+
return new this().attack();
|
|
434
337
|
}
|
|
435
338
|
/**
|
|
436
|
-
*
|
|
339
|
+
* Create an if_ statement that triggers only against a particular monster
|
|
340
|
+
* @param monster The monster in question
|
|
341
|
+
* @param macro The macro to trigger when the monster is found
|
|
342
|
+
*/
|
|
343
|
+
ifMonster(monster, macro) {
|
|
344
|
+
return this.if_(`monsterid ${monster.id}`, macro);
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Create a new macro with an if_ statement that triggers only against a particular monster
|
|
348
|
+
* @param monster The monster in question
|
|
349
|
+
* @param macro The macro to trigger when the monster is found
|
|
437
350
|
*/
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
key: "step",
|
|
446
|
-
value: function step() {
|
|
447
|
-
var _this2;
|
|
448
|
-
|
|
449
|
-
return (_this2 = new this()).step.apply(_this2, arguments);
|
|
450
|
-
}
|
|
451
|
-
}, {
|
|
452
|
-
key: "abort",
|
|
453
|
-
value: function abort() {
|
|
454
|
-
return new this().abort();
|
|
455
|
-
}
|
|
456
|
-
}, {
|
|
457
|
-
key: "if_",
|
|
458
|
-
value: function if_(condition, ifTrue) {
|
|
459
|
-
return new this().if_(condition, ifTrue);
|
|
460
|
-
}
|
|
461
|
-
}, {
|
|
462
|
-
key: "while_",
|
|
463
|
-
value: function while_(condition, contents) {
|
|
464
|
-
return new this().while_(condition, contents);
|
|
465
|
-
}
|
|
466
|
-
}, {
|
|
467
|
-
key: "externalIf",
|
|
468
|
-
value: function externalIf(condition, ifTrue) {
|
|
469
|
-
return new this().externalIf(condition, ifTrue);
|
|
470
|
-
}
|
|
471
|
-
}, {
|
|
472
|
-
key: "skill",
|
|
473
|
-
value: function skill() {
|
|
474
|
-
var _this3;
|
|
475
|
-
|
|
476
|
-
return (_this3 = new this()).skill.apply(_this3, arguments);
|
|
477
|
-
}
|
|
478
|
-
}, {
|
|
479
|
-
key: "trySkill",
|
|
480
|
-
value: function trySkill() {
|
|
481
|
-
var _this4;
|
|
482
|
-
|
|
483
|
-
return (_this4 = new this()).trySkill.apply(_this4, arguments);
|
|
484
|
-
}
|
|
485
|
-
}, {
|
|
486
|
-
key: "trySkillRepeat",
|
|
487
|
-
value: function trySkillRepeat() {
|
|
488
|
-
var _this5;
|
|
489
|
-
|
|
490
|
-
return (_this5 = new this()).trySkillRepeat.apply(_this5, arguments);
|
|
491
|
-
}
|
|
492
|
-
}, {
|
|
493
|
-
key: "item",
|
|
494
|
-
value: function item() {
|
|
495
|
-
var _this6;
|
|
496
|
-
|
|
497
|
-
return (_this6 = new this()).item.apply(_this6, arguments);
|
|
498
|
-
}
|
|
499
|
-
}, {
|
|
500
|
-
key: "tryItem",
|
|
501
|
-
value: function tryItem() {
|
|
502
|
-
var _this7;
|
|
503
|
-
|
|
504
|
-
return (_this7 = new this()).tryItem.apply(_this7, arguments);
|
|
505
|
-
}
|
|
506
|
-
}, {
|
|
507
|
-
key: "attack",
|
|
508
|
-
value: function attack() {
|
|
509
|
-
return new this().attack();
|
|
510
|
-
}
|
|
511
|
-
}]);
|
|
512
|
-
|
|
513
|
-
return Macro;
|
|
514
|
-
}();
|
|
351
|
+
static ifMonster(monster, macro) {
|
|
352
|
+
return new Macro().ifMonster(monster, macro);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
Macro.SAVED_MACRO_PROPERTY = "libram_savedMacro";
|
|
356
|
+
Macro.cachedMacroId = null;
|
|
357
|
+
Macro.cachedAutoAttack = null;
|
|
515
358
|
/**
|
|
516
359
|
* Adventure in a location and handle all combats with a given macro.
|
|
517
360
|
* To use this function you will need to create a consult script that runs Macro.load().submit() and a CCS that calls that consult script.
|
|
@@ -521,31 +364,19 @@ var Macro = /*#__PURE__*/function () {
|
|
|
521
364
|
* @param loc Location to adventure in.
|
|
522
365
|
* @param macro Macro to execute.
|
|
523
366
|
*/
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
try {
|
|
539
|
-
(0, _kolmafia.adv1)(loc, 0, "");
|
|
540
|
-
|
|
541
|
-
while ((0, _kolmafia.inMultiFight)()) {
|
|
542
|
-
(0, _kolmafia.runCombat)();
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
if ((0, _kolmafia.choiceFollowsFight)()) (0, _kolmafia.visitUrl)("choice.php");
|
|
546
|
-
} finally {
|
|
547
|
-
Macro.clearSaved();
|
|
548
|
-
}
|
|
367
|
+
export function adventureMacro(loc, macro) {
|
|
368
|
+
macro.save();
|
|
369
|
+
setAutoAttack(0);
|
|
370
|
+
try {
|
|
371
|
+
adv1(loc, 0, "");
|
|
372
|
+
while (inMultiFight())
|
|
373
|
+
runCombat();
|
|
374
|
+
if (choiceFollowsFight())
|
|
375
|
+
visitUrl("choice.php");
|
|
376
|
+
}
|
|
377
|
+
finally {
|
|
378
|
+
Macro.clearSaved();
|
|
379
|
+
}
|
|
549
380
|
}
|
|
550
381
|
/**
|
|
551
382
|
* Adventure in a location and handle all combats with a given autoattack and manual macro.
|
|
@@ -557,25 +388,102 @@ function adventureMacro(loc, macro) {
|
|
|
557
388
|
* @param autoMacro Macro to execute via KoL autoattack.
|
|
558
389
|
* @param nextMacro Macro to execute manually after autoattack completes.
|
|
559
390
|
*/
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
391
|
+
export function adventureMacroAuto(loc, autoMacro, nextMacro = null) {
|
|
392
|
+
nextMacro = nextMacro ?? Macro.abort();
|
|
393
|
+
autoMacro.setAutoAttack();
|
|
394
|
+
nextMacro.save();
|
|
395
|
+
try {
|
|
396
|
+
adv1(loc, 0, "");
|
|
397
|
+
while (inMultiFight())
|
|
398
|
+
runCombat();
|
|
399
|
+
if (choiceFollowsFight())
|
|
400
|
+
visitUrl("choice.php");
|
|
401
|
+
}
|
|
402
|
+
finally {
|
|
403
|
+
Macro.clearSaved();
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
export class StrictMacro extends Macro {
|
|
407
|
+
/**
|
|
408
|
+
* Add one or more skill cast steps to the macro.
|
|
409
|
+
* @param skills Skills to cast.
|
|
410
|
+
* @returns {StrictMacro} This object itself.
|
|
411
|
+
*/
|
|
412
|
+
skill(...skills) {
|
|
413
|
+
return super.skill(...skills);
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* Create a new macro with one or more skill cast steps.
|
|
417
|
+
* @param skills Skills to cast.
|
|
418
|
+
* @returns {StrictMacro} This object itself.
|
|
419
|
+
*/
|
|
420
|
+
static skill(...skills) {
|
|
421
|
+
return new this().skill(...skills);
|
|
422
|
+
}
|
|
423
|
+
/**
|
|
424
|
+
* Add one or more item steps to the macro.
|
|
425
|
+
* @param items Items to use. Pass a tuple [item1, item2] to funksling.
|
|
426
|
+
* @returns {StrictMacro} This object itself.
|
|
427
|
+
*/
|
|
428
|
+
item(...items) {
|
|
429
|
+
return super.item(...items);
|
|
430
|
+
}
|
|
431
|
+
/**
|
|
432
|
+
* Create a new macro with one or more item steps.
|
|
433
|
+
* @param items Items to use. Pass a tuple [item1, item2] to funksling.
|
|
434
|
+
* @returns {StrictMacro} This object itself.
|
|
435
|
+
*/
|
|
436
|
+
static item(...items) {
|
|
437
|
+
return new this().item(...items);
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* Add one or more skill cast steps to the macro, where each step checks if you have the skill first.
|
|
441
|
+
* @param skills Skills to try casting.
|
|
442
|
+
* @returns {StrictMacro} This object itself.
|
|
443
|
+
*/
|
|
444
|
+
trySkill(...skills) {
|
|
445
|
+
return super.trySkill(...skills);
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* Create a new macro with one or more skill cast steps, where each step checks if you have the skill first.
|
|
449
|
+
* @param skills Skills to try casting.
|
|
450
|
+
* @returns {StrictMacro} This object itself.
|
|
451
|
+
*/
|
|
452
|
+
static trySkill(...skills) {
|
|
453
|
+
return new this().trySkill(...skills);
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* Add one or more item steps to the macro, where each step checks to see if you have the item first.
|
|
457
|
+
* @param items Items to try using. Pass a tuple [item1, item2] to funksling.
|
|
458
|
+
* @returns {StrictMacro} This object itself.
|
|
459
|
+
*/
|
|
460
|
+
tryItem(...items) {
|
|
461
|
+
return super.tryItem(...items);
|
|
462
|
+
}
|
|
463
|
+
/**
|
|
464
|
+
* Create a new macro with one or more item steps, where each step checks to see if you have the item first.
|
|
465
|
+
* @param items Items to try using. Pass a tuple [item1, item2] to funksling.
|
|
466
|
+
* @returns {StrictMacro} This object itself.
|
|
467
|
+
*/
|
|
468
|
+
static tryItem(...items) {
|
|
469
|
+
return new this().tryItem(...items);
|
|
470
|
+
}
|
|
471
|
+
/**
|
|
472
|
+
* Add one or more skill-cast-and-repeat steps to the macro, where each step checks if you have the skill first.
|
|
473
|
+
* @param skills Skills to try repeatedly casting.
|
|
474
|
+
* @returns {StrictMacro} This object itself.
|
|
475
|
+
*/
|
|
476
|
+
trySkillRepeat(...skills) {
|
|
477
|
+
return this.step(...skills.map((skill) => {
|
|
478
|
+
return StrictMacro.if_(`hasskill ${skillBallsMacroName(skill)}`, StrictMacro.skill(skill).repeat());
|
|
479
|
+
}));
|
|
480
|
+
}
|
|
481
|
+
/**
|
|
482
|
+
* Create a new macro with one or more skill-cast-and-repeat steps, where each step checks if you have the skill first.
|
|
483
|
+
* @param skills Skills to try repeatedly casting.
|
|
484
|
+
* @returns {StrictMacro} This object itself.
|
|
485
|
+
*/
|
|
486
|
+
static trySkillRepeat(...skills) {
|
|
487
|
+
return new this().trySkillRepeat(...skills);
|
|
488
|
+
}
|
|
489
|
+
}
|