@paintswap/estfor-definitions 0.1.30 → 0.1.36

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/types.js CHANGED
@@ -1,446 +1,458 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RandomWords = exports.Action = exports.ActionChoice = exports.ActionChoiceInput = exports.ShopItem = exports.UserItemNFT = exports.Item = exports.QueuedAction = exports.LastFullEquipment = exports.ActivityInfo = exports.Activity = exports.Direction = exports.ActivityType = exports.GlobalPlayerStats = exports.User = exports.Player = exports.XPThresholdReward = exports.XPThresholdRewardInput = exports.PendingFlags = exports.PendingOutput = exports.noAttire = exports.defaultInputItem = exports.emptyNonCombatStats = exports.emptyCombatStats = exports.NonCombatStats = exports.CombatStats = exports.InputItem = exports.ActionInput = exports.RandomReward = exports.GuaranteedReward = exports.ActionInfo = exports.QueuedActionInput = exports.Equipment = exports.CombatStyle = exports.ActionQueueStatus = exports.Attire = exports.EquipPosition = exports.Skill = exports.BoostType = void 0;
4
- var BoostType;
5
- (function (BoostType) {
6
- BoostType[BoostType["NONE"] = 0] = "NONE";
7
- BoostType[BoostType["ANY_XP"] = 1] = "ANY_XP";
8
- BoostType[BoostType["COMBAT_XP"] = 2] = "COMBAT_XP";
9
- BoostType[BoostType["NON_COMBAT_XP"] = 3] = "NON_COMBAT_XP";
10
- BoostType[BoostType["GATHERING"] = 4] = "GATHERING";
11
- BoostType[BoostType["ABSENCE"] = 5] = "ABSENCE";
12
- })(BoostType = exports.BoostType || (exports.BoostType = {}));
13
- var Skill;
14
- (function (Skill) {
15
- Skill[Skill["NONE"] = 0] = "NONE";
16
- Skill[Skill["COMBAT"] = 1] = "COMBAT";
17
- Skill[Skill["MELEE"] = 2] = "MELEE";
18
- Skill[Skill["RANGE"] = 3] = "RANGE";
19
- Skill[Skill["MAGIC"] = 4] = "MAGIC";
20
- Skill[Skill["DEFENCE"] = 5] = "DEFENCE";
21
- Skill[Skill["HEALTH"] = 6] = "HEALTH";
22
- Skill[Skill["MINING"] = 7] = "MINING";
23
- Skill[Skill["WOODCUTTING"] = 8] = "WOODCUTTING";
24
- Skill[Skill["FISHING"] = 9] = "FISHING";
25
- Skill[Skill["SMITHING"] = 10] = "SMITHING";
26
- Skill[Skill["THIEVING"] = 11] = "THIEVING";
27
- Skill[Skill["CRAFTING"] = 12] = "CRAFTING";
28
- Skill[Skill["COOKING"] = 13] = "COOKING";
29
- Skill[Skill["FIREMAKING"] = 14] = "FIREMAKING";
30
- })(Skill = exports.Skill || (exports.Skill = {}));
31
- var EquipPosition;
32
- (function (EquipPosition) {
33
- EquipPosition[EquipPosition["NONE"] = 0] = "NONE";
34
- EquipPosition[EquipPosition["HEAD"] = 1] = "HEAD";
35
- EquipPosition[EquipPosition["NECK"] = 2] = "NECK";
36
- EquipPosition[EquipPosition["BODY"] = 3] = "BODY";
37
- EquipPosition[EquipPosition["ARMS"] = 4] = "ARMS";
38
- EquipPosition[EquipPosition["LEGS"] = 5] = "LEGS";
39
- EquipPosition[EquipPosition["FEET"] = 6] = "FEET";
40
- EquipPosition[EquipPosition["SPARE1"] = 7] = "SPARE1";
41
- EquipPosition[EquipPosition["SPARE2"] = 8] = "SPARE2";
42
- EquipPosition[EquipPosition["LEFT_HAND"] = 9] = "LEFT_HAND";
43
- EquipPosition[EquipPosition["RIGHT_HAND"] = 10] = "RIGHT_HAND";
44
- EquipPosition[EquipPosition["BOTH_HANDS"] = 11] = "BOTH_HANDS";
45
- EquipPosition[EquipPosition["ARROW_SATCHEL"] = 12] = "ARROW_SATCHEL";
46
- EquipPosition[EquipPosition["MAGIC_BAG"] = 13] = "MAGIC_BAG";
47
- EquipPosition[EquipPosition["FOOD"] = 14] = "FOOD";
48
- EquipPosition[EquipPosition["AUX"] = 15] = "AUX";
49
- EquipPosition[EquipPosition["BOOST_VIAL"] = 16] = "BOOST_VIAL";
50
- })(EquipPosition = exports.EquipPosition || (exports.EquipPosition = {}));
51
- class Attire {
52
- head = 0;
53
- neck = 0;
54
- body = 0;
55
- arms = 0;
56
- legs = 0;
57
- feet = 0;
58
- ring = 0;
59
- reserved1 = 0;
60
- queueId = 0;
61
- }
62
- exports.Attire = Attire;
63
- var ActionQueueStatus;
64
- (function (ActionQueueStatus) {
65
- ActionQueueStatus[ActionQueueStatus["NONE"] = 0] = "NONE";
66
- ActionQueueStatus[ActionQueueStatus["APPEND"] = 1] = "APPEND";
67
- ActionQueueStatus[ActionQueueStatus["KEEP_LAST_IN_PROGRESS"] = 2] = "KEEP_LAST_IN_PROGRESS";
68
- })(ActionQueueStatus = exports.ActionQueueStatus || (exports.ActionQueueStatus = {}));
69
- var CombatStyle;
70
- (function (CombatStyle) {
71
- CombatStyle[CombatStyle["NONE"] = 0] = "NONE";
72
- CombatStyle[CombatStyle["ATTACK"] = 1] = "ATTACK";
73
- CombatStyle[CombatStyle["DEFENCE"] = 2] = "DEFENCE";
74
- })(CombatStyle = exports.CombatStyle || (exports.CombatStyle = {}));
75
- class Equipment {
76
- itemTokenId = 0;
77
- amount = 0;
78
- }
79
- exports.Equipment = Equipment;
80
- class QueuedActionInput {
81
- attire = new Attire();
82
- actionId = 0;
83
- regenerateId = 0; // Food (combat), maybe something for non-combat later
84
- choiceId = 0; // Melee/Arrow/Magic (combat), logs, ore (non-combat)
85
- choiceId1 = 0; // Reserved (TBD)
86
- choiceId2 = 0; // Reserved (TBD)
87
- combatStyle = CombatStyle.NONE;
88
- timespan = 0; // How long to queue the action for
89
- rightHandEquipmentTokenId = 0;
90
- leftHandEquipmentTokenId = 0;
91
- skill = Skill.NONE;
92
- }
93
- exports.QueuedActionInput = QueuedActionInput;
94
- class ActionInfo {
95
- skill = Skill.NONE;
96
- isAvailable = true;
97
- isDynamic = false;
98
- actionChoiceRequired = false;
99
- xpPerHour = 0;
100
- numSpawned = 0;
101
- minXP = 0;
102
- handItemTokenIdRangeMin = 0;
103
- handItemTokenIdRangeMax = 0;
104
- successPercent = 0;
105
- }
106
- exports.ActionInfo = ActionInfo;
107
- class GuaranteedReward {
108
- itemTokenId = 0;
109
- rate = 0; // base 100, 2 decimal places
110
- }
111
- exports.GuaranteedReward = GuaranteedReward;
112
- class RandomReward {
113
- itemTokenId = 0;
114
- chance = 0; // out of 65335
115
- amount = 0;
116
- }
117
- exports.RandomReward = RandomReward;
118
- class ActionInput {
119
- actionId = 0;
120
- info = new ActionInfo();
121
- guaranteedRewards = [];
122
- randomRewards = [];
123
- combatStats = new CombatStats();
124
- }
125
- exports.ActionInput = ActionInput;
126
- // Contains everything you need to create an item
127
- class InputItem {
128
- combatStats = new CombatStats();
129
- nonCombatStats = new NonCombatStats();
130
- tokenId = 0;
131
- equipPosition = EquipPosition.NONE;
132
- // Can this be transferred to another player?
133
- isTransferable = true;
134
- // Minimum requirements in this skill
135
- skill = Skill.NONE;
136
- minXP = 0;
137
- // Food
138
- healthRestored = 0;
139
- // Boost
140
- boostType = BoostType.NONE;
141
- boostValue = 0; // Varies, could be the % increase
142
- boostDuration = 0; // How long the effect of the boost last
143
- // uri
144
- metadataURI = '';
145
- // name of the item
146
- name = '';
147
- }
148
- exports.InputItem = InputItem;
149
- class CombatStats {
150
- melee = 0;
151
- magic = 0;
152
- range = 0;
153
- meleeDefence = 0;
154
- magicDefence = 0;
155
- rangeDefence = 0;
156
- health = 0;
157
- }
158
- exports.CombatStats = CombatStats;
159
- class NonCombatStats {
160
- skill = Skill.NONE;
161
- diff = 0;
162
- }
163
- exports.NonCombatStats = NonCombatStats;
164
- exports.emptyCombatStats = new CombatStats();
165
- exports.emptyNonCombatStats = new NonCombatStats();
166
- exports.defaultInputItem = new InputItem();
167
- exports.noAttire = new Attire();
168
- class PendingOutput {
169
- consumed = [];
170
- produced = [];
171
- producedPastRandomRewards = [];
172
- producedXPRewards = [];
173
- xpGained = 0;
174
- died = false;
175
- }
176
- exports.PendingOutput = PendingOutput;
177
- class PendingFlags {
178
- includeLoot = true; // Guaranteed loot from actions, and random loot if claiming quite late
179
- includePastRandomRewards = true; // This is random loot from previous actions
180
- includeXPRewards = true; // Passing any xp thresholds gives you extra rewards
181
- }
182
- exports.PendingFlags = PendingFlags;
183
- class XPThresholdRewardInput {
184
- xpThreshold = 0;
185
- equipments = [];
186
- }
187
- exports.XPThresholdRewardInput = XPThresholdRewardInput;
188
- class XPThresholdReward {
189
- id = ''; // XP for the reward
190
- xp = ''; // same as id
191
- rewardItemAmounts = [];
192
- rewardItemTokenIds = [];
193
- }
194
- exports.XPThresholdReward = XPThresholdReward;
195
- class Player {
196
- id = '0';
197
- tokenId = '0';
198
- avatarId = '1';
199
- owner = '';
200
- name = '';
201
- lastTimestamp = '0';
202
- mintedNumber = '0'; // Will be unique, use for sorting
203
- mintedTimestamp = '0';
204
- isActive = false; // Is this player the active one for the owner
205
- numActivities = 0; // Not used yet
206
- pendingRandomRewards = []; // Timestamps for any rewards which are waiting on the next seed
207
- speedMultiplier = 1;
208
- /* Action XP */
209
- woodcuttingXP = '0';
210
- firemakingXP = '0';
211
- fishingXP = '0';
212
- cookingXP = '0';
213
- miningXP = '0';
214
- smithingXP = '0';
215
- craftingXP = '0';
216
- thievingXP = '0';
217
- totalXP = '0';
218
- /* Combat XP */
219
- healthXP = '0';
220
- meleeXP = '0';
221
- defenceXP = '0';
222
- magicXP = '0';
223
- rangeXP = '0';
224
- /** Ranks */
225
- woodcuttingRank = 0;
226
- firemakingRank = 0;
227
- fishingRank = 0;
228
- cookingRank = 0;
229
- miningRank = 0;
230
- smithingRank = 0;
231
- craftingRank = 0;
232
- thievingRank = 0;
233
- meleeRank = 0;
234
- magicRank = 0;
235
- rangeRank = 0;
236
- defenceRank = 0;
237
- healthRank = 0;
238
- combinedRank = 0;
239
- /* Boost */
240
- boostStartTime = 0;
241
- boostDuration = 0;
242
- boostVal = 0;
243
- boostType;
244
- boostItemTokenId = 0;
245
- }
246
- exports.Player = Player;
247
- class User {
248
- id = '0';
249
- totalSold = '0';
250
- totalBought = '0';
251
- numPlayers = 0;
252
- }
253
- exports.User = User;
254
- class GlobalPlayerStats {
255
- totalPlayers = '0';
256
- }
257
- exports.GlobalPlayerStats = GlobalPlayerStats;
258
- var ActivityType;
259
- (function (ActivityType) {
260
- ActivityType[ActivityType["Buy"] = 0] = "Buy";
261
- ActivityType[ActivityType["Sell"] = 1] = "Sell";
262
- ActivityType[ActivityType["ActionPartiallyFinished"] = 2] = "ActionPartiallyFinished";
263
- ActivityType[ActivityType["ActionFinished"] = 3] = "ActionFinished";
264
- ActivityType[ActivityType["PendingRandomRewardsClaimed"] = 4] = "PendingRandomRewardsClaimed";
265
- })(ActivityType = exports.ActivityType || (exports.ActivityType = {}));
266
- var Direction;
267
- (function (Direction) {
268
- Direction[Direction["Consumed"] = 0] = "Consumed";
269
- Direction[Direction["Produced"] = 1] = "Produced";
270
- })(Direction = exports.Direction || (exports.Direction = {}));
271
- class Activity {
272
- id = '';
273
- type = ''; // ActivityType
274
- itemTokenIds = [];
275
- amounts = [];
276
- directions = []; // Direction
277
- prices = [];
278
- actionId = '';
279
- queueId = '';
280
- timestamp = '';
281
- hash = '';
282
- playerId = '0';
283
- user = '';
284
- }
285
- exports.Activity = Activity;
286
- class ActivityInfo {
287
- id = '';
288
- numActivities = '';
289
- }
290
- exports.ActivityInfo = ActivityInfo;
291
- class LastFullEquipment {
292
- id = '0'; // playerId
293
- playerId = '0';
294
- user = '';
295
- actionId = 0;
296
- regenerateId = 0;
297
- choiceId = 0;
298
- choiceId1 = 0;
299
- choiceId2 = 0;
300
- rightHandEquipmentTokenId = 0;
301
- leftHandEquipmentTokenId = 0;
302
- startTime = '';
303
- timespan = 0;
304
- isValid = true;
305
- skill = Skill.NONE;
306
- headEquipped = 0;
307
- neckEquipped = 0;
308
- bodyEquipped = 0;
309
- armsEquipped = 0;
310
- legsEquipped = 0;
311
- feetEquipped = 0;
312
- ringEquipped = 0;
313
- timestamp = '0';
314
- }
315
- exports.LastFullEquipment = LastFullEquipment;
316
- class QueuedAction {
317
- id = ''; // queueId
318
- actionId = 0;
319
- playerId = '';
320
- regenerateId = 0;
321
- choiceId = 0;
322
- choiceId1 = 0;
323
- choiceId2 = 0;
324
- rightHandEquipmentTokenId = 0;
325
- leftHandEquipmentTokenId = 0;
326
- startTime = '';
327
- timespan = 0;
328
- isValid = true;
329
- skill = Skill.NONE;
330
- combatStyle = CombatStyle.NONE;
331
- headEquipped = 0;
332
- neckEquipped = 0;
333
- bodyEquipped = 0;
334
- armsEquipped = 0;
335
- legsEquipped = 0;
336
- feetEquipped = 0;
337
- ringEquipped = 0;
338
- }
339
- exports.QueuedAction = QueuedAction;
340
- class Item {
341
- id = '0';
342
- tokenId = 0;
343
- melee = 0;
344
- magic = 0;
345
- range = 0;
346
- meleeDefence = 0;
347
- magicDefence = 0;
348
- rangeDefence = 0;
349
- health = 0;
350
- totalQuantity = '0';
351
- equipPosition = 0;
352
- healthRestored = 0;
353
- skill1 = Skill.NONE;
354
- skillDiff1 = 0;
355
- boostType = BoostType.NONE;
356
- boostValue = 0;
357
- boostDuration = 0;
358
- // Minimum requirements for equipping
359
- skill = Skill.NONE;
360
- minXP = '0';
361
- name = '';
362
- }
363
- exports.Item = Item;
364
- class UserItemNFT {
365
- id = '';
366
- user = '';
367
- tokenId = 0;
368
- amount = '';
369
- item = new Item();
370
- }
371
- exports.UserItemNFT = UserItemNFT;
372
- class ShopItem {
373
- id = '';
374
- tokenId = 0;
375
- price = '0';
376
- }
377
- exports.ShopItem = ShopItem;
378
- class ActionChoiceInput {
379
- skill = Skill.NONE;
380
- diff = 0;
381
- rate = 0;
382
- xpPerHour = 0;
383
- minXP = 0;
384
- inputTokenId1 = 0;
385
- num1 = 0;
386
- inputTokenId2 = 0;
387
- num2 = 0;
388
- inputTokenId3 = 0;
389
- num3 = 0;
390
- outputTokenId = 0;
391
- outputNum = 1;
392
- successPercent = 100;
393
- }
394
- exports.ActionChoiceInput = ActionChoiceInput;
395
- class ActionChoice {
396
- id = '';
397
- actionId = 0;
398
- skill = Skill.NONE;
399
- diff = 0;
400
- rate = 0;
401
- xpPerHour = 0;
402
- minXP = 0;
403
- inputTokenId1 = 0;
404
- num1 = 0;
405
- inputTokenId2 = 0;
406
- num2 = 0;
407
- inputTokenId3 = 0;
408
- num3 = 0;
409
- outputTokenId = 0;
410
- outputNum = 1;
411
- successPercent = 100;
412
- }
413
- exports.ActionChoice = ActionChoice;
414
- class Action {
415
- id = '';
416
- actionId = 0;
417
- skill = Skill.NONE;
418
- xpPerHour = 0;
419
- numSpawned = 0;
420
- minXP = '0';
421
- guaranteedRewardItemTokenIds = [];
422
- guaranteedRewardRates = [];
423
- randomChanceItemTokenIds = [];
424
- randomChanceRates = [];
425
- handItemTokenIdRangeMin = 0;
426
- handItemTokenIdRangeMax = 0;
427
- isAvailable = false;
428
- isDynamic = false;
429
- actionChoiceRequired = false;
430
- successPercent = 100;
431
- /* Combat Stats */
432
- melee = 0;
433
- magic = 0;
434
- range = 0;
435
- rangeDefence = 0;
436
- meleeDefence = 0;
437
- magicDefence = 0;
438
- health = 0;
439
- }
440
- exports.Action = Action;
441
- class RandomWords {
442
- lastRequestedTimestamp = '';
443
- lastRandomWordsReceived = ''; // Bytes
444
- hasLastRequestedRandomWordsBeenReceived = false;
445
- }
446
- exports.RandomWords = RandomWords;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RandomWords = exports.Action = exports.ActionChoice = exports.ActionChoiceInput = exports.ShopItem = exports.UserItemNFT = exports.Item = exports.QueuedAction = exports.LastFullEquipment = exports.ActivityInfo = exports.Activity = exports.ActivityUndertaker = exports.Direction = exports.ActivityType = exports.GlobalPlayerStats = exports.User = exports.Player = exports.XPThresholdReward = exports.XPThresholdRewardInput = exports.PendingFlags = exports.PendingOutput = exports.noAttire = exports.defaultInputItem = exports.emptyNonCombatStats = exports.emptyCombatStats = exports.NonCombatStats = exports.CombatStats = exports.InputItem = exports.ActionInput = exports.RandomReward = exports.GuaranteedReward = exports.ActionInfo = exports.QueuedActionInput = exports.Equipment = exports.CombatStyle = exports.ActionQueueStatus = exports.Attire = exports.EquipPosition = exports.Skill = exports.BoostType = void 0;
4
+ var BoostType;
5
+ (function (BoostType) {
6
+ BoostType[BoostType["NONE"] = 0] = "NONE";
7
+ BoostType[BoostType["ANY_XP"] = 1] = "ANY_XP";
8
+ BoostType[BoostType["COMBAT_XP"] = 2] = "COMBAT_XP";
9
+ BoostType[BoostType["NON_COMBAT_XP"] = 3] = "NON_COMBAT_XP";
10
+ BoostType[BoostType["GATHERING"] = 4] = "GATHERING";
11
+ BoostType[BoostType["ABSENCE"] = 5] = "ABSENCE";
12
+ })(BoostType = exports.BoostType || (exports.BoostType = {}));
13
+ var Skill;
14
+ (function (Skill) {
15
+ Skill[Skill["NONE"] = 0] = "NONE";
16
+ Skill[Skill["COMBAT"] = 1] = "COMBAT";
17
+ Skill[Skill["MELEE"] = 2] = "MELEE";
18
+ Skill[Skill["RANGE"] = 3] = "RANGE";
19
+ Skill[Skill["MAGIC"] = 4] = "MAGIC";
20
+ Skill[Skill["DEFENCE"] = 5] = "DEFENCE";
21
+ Skill[Skill["HEALTH"] = 6] = "HEALTH";
22
+ Skill[Skill["MINING"] = 7] = "MINING";
23
+ Skill[Skill["WOODCUTTING"] = 8] = "WOODCUTTING";
24
+ Skill[Skill["FISHING"] = 9] = "FISHING";
25
+ Skill[Skill["SMITHING"] = 10] = "SMITHING";
26
+ Skill[Skill["THIEVING"] = 11] = "THIEVING";
27
+ Skill[Skill["CRAFTING"] = 12] = "CRAFTING";
28
+ Skill[Skill["COOKING"] = 13] = "COOKING";
29
+ Skill[Skill["FIREMAKING"] = 14] = "FIREMAKING";
30
+ })(Skill = exports.Skill || (exports.Skill = {}));
31
+ var EquipPosition;
32
+ (function (EquipPosition) {
33
+ EquipPosition[EquipPosition["NONE"] = 0] = "NONE";
34
+ EquipPosition[EquipPosition["HEAD"] = 1] = "HEAD";
35
+ EquipPosition[EquipPosition["NECK"] = 2] = "NECK";
36
+ EquipPosition[EquipPosition["BODY"] = 3] = "BODY";
37
+ EquipPosition[EquipPosition["ARMS"] = 4] = "ARMS";
38
+ EquipPosition[EquipPosition["LEGS"] = 5] = "LEGS";
39
+ EquipPosition[EquipPosition["FEET"] = 6] = "FEET";
40
+ EquipPosition[EquipPosition["SPARE1"] = 7] = "SPARE1";
41
+ EquipPosition[EquipPosition["SPARE2"] = 8] = "SPARE2";
42
+ EquipPosition[EquipPosition["LEFT_HAND"] = 9] = "LEFT_HAND";
43
+ EquipPosition[EquipPosition["RIGHT_HAND"] = 10] = "RIGHT_HAND";
44
+ EquipPosition[EquipPosition["BOTH_HANDS"] = 11] = "BOTH_HANDS";
45
+ EquipPosition[EquipPosition["ARROW_SATCHEL"] = 12] = "ARROW_SATCHEL";
46
+ EquipPosition[EquipPosition["MAGIC_BAG"] = 13] = "MAGIC_BAG";
47
+ EquipPosition[EquipPosition["FOOD"] = 14] = "FOOD";
48
+ EquipPosition[EquipPosition["AUX"] = 15] = "AUX";
49
+ EquipPosition[EquipPosition["BOOST_VIAL"] = 16] = "BOOST_VIAL";
50
+ })(EquipPosition = exports.EquipPosition || (exports.EquipPosition = {}));
51
+ class Attire {
52
+ head = 0;
53
+ neck = 0;
54
+ body = 0;
55
+ arms = 0;
56
+ legs = 0;
57
+ feet = 0;
58
+ ring = 0;
59
+ reserved1 = 0;
60
+ queueId = 0;
61
+ }
62
+ exports.Attire = Attire;
63
+ var ActionQueueStatus;
64
+ (function (ActionQueueStatus) {
65
+ ActionQueueStatus[ActionQueueStatus["NONE"] = 0] = "NONE";
66
+ ActionQueueStatus[ActionQueueStatus["APPEND"] = 1] = "APPEND";
67
+ ActionQueueStatus[ActionQueueStatus["KEEP_LAST_IN_PROGRESS"] = 2] = "KEEP_LAST_IN_PROGRESS";
68
+ })(ActionQueueStatus = exports.ActionQueueStatus || (exports.ActionQueueStatus = {}));
69
+ var CombatStyle;
70
+ (function (CombatStyle) {
71
+ CombatStyle[CombatStyle["NONE"] = 0] = "NONE";
72
+ CombatStyle[CombatStyle["ATTACK"] = 1] = "ATTACK";
73
+ CombatStyle[CombatStyle["DEFENCE"] = 2] = "DEFENCE";
74
+ })(CombatStyle = exports.CombatStyle || (exports.CombatStyle = {}));
75
+ class Equipment {
76
+ itemTokenId = 0;
77
+ amount = 0;
78
+ }
79
+ exports.Equipment = Equipment;
80
+ class QueuedActionInput {
81
+ attire = new Attire();
82
+ actionId = 0;
83
+ regenerateId = 0; // Food (combat), maybe something for non-combat later
84
+ choiceId = 0; // Melee/Arrow/Magic (combat), logs, ore (non-combat)
85
+ choiceId1 = 0; // Reserved (TBD)
86
+ choiceId2 = 0; // Reserved (TBD)
87
+ combatStyle = CombatStyle.NONE;
88
+ timespan = 0; // How long to queue the action for
89
+ rightHandEquipmentTokenId = 0;
90
+ leftHandEquipmentTokenId = 0;
91
+ skill = Skill.NONE;
92
+ }
93
+ exports.QueuedActionInput = QueuedActionInput;
94
+ class ActionInfo {
95
+ skill = Skill.NONE;
96
+ isAvailable = true;
97
+ isDynamic = false;
98
+ actionChoiceRequired = false;
99
+ xpPerHour = 0;
100
+ numSpawned = 0;
101
+ minXP = 0;
102
+ handItemTokenIdRangeMin = 0;
103
+ handItemTokenIdRangeMax = 0;
104
+ successPercent = 0;
105
+ }
106
+ exports.ActionInfo = ActionInfo;
107
+ class GuaranteedReward {
108
+ itemTokenId = 0;
109
+ rate = 0; // base 100, 2 decimal places
110
+ }
111
+ exports.GuaranteedReward = GuaranteedReward;
112
+ class RandomReward {
113
+ itemTokenId = 0;
114
+ chance = 0; // out of 65335
115
+ amount = 0;
116
+ }
117
+ exports.RandomReward = RandomReward;
118
+ class ActionInput {
119
+ actionId = 0;
120
+ info = new ActionInfo();
121
+ guaranteedRewards = [];
122
+ randomRewards = [];
123
+ combatStats = new CombatStats();
124
+ }
125
+ exports.ActionInput = ActionInput;
126
+ // Contains everything you need to create an item
127
+ class InputItem {
128
+ combatStats = new CombatStats();
129
+ nonCombatStats = new NonCombatStats();
130
+ tokenId = 0;
131
+ equipPosition = EquipPosition.NONE;
132
+ // Can this be transferred to another player?
133
+ isTransferable = true;
134
+ // Minimum requirements in this skill
135
+ skill = Skill.NONE;
136
+ minXP = 0;
137
+ // Food
138
+ healthRestored = 0;
139
+ // Boost
140
+ boostType = BoostType.NONE;
141
+ boostValue = 0; // Varies, could be the % increase
142
+ boostDuration = 0; // How long the effect of the boost last
143
+ // uri
144
+ metadataURI = '';
145
+ // name of the item
146
+ name = '';
147
+ }
148
+ exports.InputItem = InputItem;
149
+ class CombatStats {
150
+ melee = 0;
151
+ magic = 0;
152
+ range = 0;
153
+ meleeDefence = 0;
154
+ magicDefence = 0;
155
+ rangeDefence = 0;
156
+ health = 0;
157
+ }
158
+ exports.CombatStats = CombatStats;
159
+ class NonCombatStats {
160
+ skill = Skill.NONE;
161
+ diff = 0;
162
+ }
163
+ exports.NonCombatStats = NonCombatStats;
164
+ exports.emptyCombatStats = new CombatStats();
165
+ exports.emptyNonCombatStats = new NonCombatStats();
166
+ exports.defaultInputItem = new InputItem();
167
+ exports.noAttire = new Attire();
168
+ class PendingOutput {
169
+ consumed = [];
170
+ produced = [];
171
+ producedPastRandomRewards = [];
172
+ producedXPRewards = [];
173
+ xpGained = 0;
174
+ died = false;
175
+ }
176
+ exports.PendingOutput = PendingOutput;
177
+ class PendingFlags {
178
+ includeLoot = true; // Guaranteed loot from actions, and random loot if claiming quite late
179
+ includePastRandomRewards = true; // This is random loot from previous actions
180
+ includeXPRewards = true; // Passing any xp thresholds gives you extra rewards
181
+ }
182
+ exports.PendingFlags = PendingFlags;
183
+ class XPThresholdRewardInput {
184
+ xpThreshold = 0;
185
+ equipments = [];
186
+ }
187
+ exports.XPThresholdRewardInput = XPThresholdRewardInput;
188
+ class XPThresholdReward {
189
+ id = ''; // XP for the reward
190
+ xp = ''; // same as id
191
+ rewardItemAmounts = [];
192
+ rewardItemTokenIds = [];
193
+ }
194
+ exports.XPThresholdReward = XPThresholdReward;
195
+ class Player {
196
+ id = '0';
197
+ tokenId = '0';
198
+ avatarId = '1';
199
+ owner = '';
200
+ name = '';
201
+ lastTimestamp = '0';
202
+ mintedNumber = '0'; // Will be unique, use for sorting
203
+ mintedTimestamp = '0';
204
+ isActive = false; // Is this player the active one for the owner
205
+ numActivities = 0; // Not used yet
206
+ pendingRandomRewards = []; // Timestamps for any rewards which are waiting on the next seed
207
+ speedMultiplier = 1;
208
+ /* Action XP */
209
+ woodcuttingXP = '0';
210
+ firemakingXP = '0';
211
+ fishingXP = '0';
212
+ cookingXP = '0';
213
+ miningXP = '0';
214
+ smithingXP = '0';
215
+ craftingXP = '0';
216
+ thievingXP = '0';
217
+ totalXP = '0';
218
+ /* Combat XP */
219
+ healthXP = '0';
220
+ meleeXP = '0';
221
+ defenceXP = '0';
222
+ magicXP = '0';
223
+ rangeXP = '0';
224
+ /** Ranks */
225
+ woodcuttingRank = 0;
226
+ firemakingRank = 0;
227
+ fishingRank = 0;
228
+ cookingRank = 0;
229
+ miningRank = 0;
230
+ smithingRank = 0;
231
+ craftingRank = 0;
232
+ thievingRank = 0;
233
+ meleeRank = 0;
234
+ magicRank = 0;
235
+ rangeRank = 0;
236
+ defenceRank = 0;
237
+ healthRank = 0;
238
+ combinedRank = 0;
239
+ /* Boost */
240
+ boostStartTime = 0;
241
+ boostDuration = 0;
242
+ boostVal = 0;
243
+ boostType;
244
+ boostItemTokenId = 0;
245
+ }
246
+ exports.Player = Player;
247
+ class User {
248
+ id = '0';
249
+ totalSold = '0';
250
+ totalBought = '0';
251
+ numPlayers = 0;
252
+ }
253
+ exports.User = User;
254
+ class GlobalPlayerStats {
255
+ totalPlayers = '0';
256
+ totalAvatars = [];
257
+ }
258
+ exports.GlobalPlayerStats = GlobalPlayerStats;
259
+ var ActivityType;
260
+ (function (ActivityType) {
261
+ ActivityType[ActivityType["Buy"] = 0] = "Buy";
262
+ ActivityType[ActivityType["Sell"] = 1] = "Sell";
263
+ ActivityType[ActivityType["ActionPartiallyFinished"] = 2] = "ActionPartiallyFinished";
264
+ ActivityType[ActivityType["ActionFinished"] = 3] = "ActionFinished";
265
+ ActivityType[ActivityType["XPThresholdReward"] = 4] = "XPThresholdReward";
266
+ ActivityType[ActivityType["DailyReward"] = 5] = "DailyReward";
267
+ ActivityType[ActivityType["WeeklyReward"] = 6] = "WeeklyReward";
268
+ ActivityType[ActivityType["PendingRandomRewardsClaimed"] = 7] = "PendingRandomRewardsClaimed";
269
+ })(ActivityType = exports.ActivityType || (exports.ActivityType = {}));
270
+ var Direction;
271
+ (function (Direction) {
272
+ Direction[Direction["Consumed"] = 0] = "Consumed";
273
+ Direction[Direction["Produced"] = 1] = "Produced";
274
+ })(Direction = exports.Direction || (exports.Direction = {}));
275
+ var ActivityUndertaker;
276
+ (function (ActivityUndertaker) {
277
+ ActivityUndertaker[ActivityUndertaker["Player"] = 0] = "Player";
278
+ ActivityUndertaker[ActivityUndertaker["User"] = 1] = "User";
279
+ })(ActivityUndertaker = exports.ActivityUndertaker || (exports.ActivityUndertaker = {}));
280
+ class Activity {
281
+ id = '';
282
+ type = ''; // ActivityType
283
+ itemTokenIds = [];
284
+ amounts = [];
285
+ directions = []; // Direction
286
+ prices = [];
287
+ actionId = '';
288
+ queueId = '';
289
+ timestamp = '';
290
+ hash = '';
291
+ playerId = '0';
292
+ user = '';
293
+ undertaker = ''; // ActivityUndertaker
294
+ }
295
+ exports.Activity = Activity;
296
+ class ActivityInfo {
297
+ id = '';
298
+ numActivities = '';
299
+ }
300
+ exports.ActivityInfo = ActivityInfo;
301
+ class LastFullEquipment {
302
+ id = '0'; // playerId
303
+ playerId = '0';
304
+ user = '';
305
+ actionId = 0;
306
+ regenerateId = 0;
307
+ choiceId = 0;
308
+ choiceId1 = 0;
309
+ choiceId2 = 0;
310
+ rightHandEquipmentTokenId = 0;
311
+ leftHandEquipmentTokenId = 0;
312
+ startTime = '';
313
+ timespan = 0;
314
+ isValid = true;
315
+ skill = Skill.NONE;
316
+ headEquipped = 0;
317
+ neckEquipped = 0;
318
+ bodyEquipped = 0;
319
+ armsEquipped = 0;
320
+ legsEquipped = 0;
321
+ feetEquipped = 0;
322
+ ringEquipped = 0;
323
+ timestamp = '0';
324
+ }
325
+ exports.LastFullEquipment = LastFullEquipment;
326
+ class QueuedAction {
327
+ id = ''; // queueId
328
+ actionId = 0;
329
+ playerId = '';
330
+ regenerateId = 0;
331
+ choiceId = 0;
332
+ choiceId1 = 0;
333
+ choiceId2 = 0;
334
+ rightHandEquipmentTokenId = 0;
335
+ leftHandEquipmentTokenId = 0;
336
+ startTime = '';
337
+ timespan = 0;
338
+ originalStartTime = '';
339
+ originalTimespan = 0;
340
+ isValid = true;
341
+ skill = Skill.NONE;
342
+ combatStyle = CombatStyle.NONE;
343
+ headEquipped = 0;
344
+ neckEquipped = 0;
345
+ bodyEquipped = 0;
346
+ armsEquipped = 0;
347
+ legsEquipped = 0;
348
+ feetEquipped = 0;
349
+ ringEquipped = 0;
350
+ }
351
+ exports.QueuedAction = QueuedAction;
352
+ class Item {
353
+ id = '0';
354
+ tokenId = 0;
355
+ melee = 0;
356
+ magic = 0;
357
+ range = 0;
358
+ meleeDefence = 0;
359
+ magicDefence = 0;
360
+ rangeDefence = 0;
361
+ health = 0;
362
+ totalQuantity = '0';
363
+ equipPosition = 0;
364
+ healthRestored = 0;
365
+ skill1 = Skill.NONE;
366
+ skillDiff1 = 0;
367
+ boostType = BoostType.NONE;
368
+ boostValue = 0;
369
+ boostDuration = 0;
370
+ // Minimum requirements for equipping
371
+ skill = Skill.NONE;
372
+ minXP = '0';
373
+ name = '';
374
+ }
375
+ exports.Item = Item;
376
+ class UserItemNFT {
377
+ id = '';
378
+ user = '';
379
+ tokenId = 0;
380
+ amount = '';
381
+ item = new Item();
382
+ }
383
+ exports.UserItemNFT = UserItemNFT;
384
+ class ShopItem {
385
+ id = '';
386
+ tokenId = 0;
387
+ price = '0';
388
+ }
389
+ exports.ShopItem = ShopItem;
390
+ class ActionChoiceInput {
391
+ skill = Skill.NONE;
392
+ diff = 0;
393
+ rate = 0;
394
+ xpPerHour = 0;
395
+ minXP = 0;
396
+ inputTokenId1 = 0;
397
+ num1 = 0;
398
+ inputTokenId2 = 0;
399
+ num2 = 0;
400
+ inputTokenId3 = 0;
401
+ num3 = 0;
402
+ outputTokenId = 0;
403
+ outputNum = 1;
404
+ successPercent = 100;
405
+ }
406
+ exports.ActionChoiceInput = ActionChoiceInput;
407
+ class ActionChoice {
408
+ id = '';
409
+ actionId = 0;
410
+ skill = Skill.NONE;
411
+ diff = 0;
412
+ rate = 0;
413
+ xpPerHour = 0;
414
+ minXP = 0;
415
+ inputTokenId1 = 0;
416
+ num1 = 0;
417
+ inputTokenId2 = 0;
418
+ num2 = 0;
419
+ inputTokenId3 = 0;
420
+ num3 = 0;
421
+ outputTokenId = 0;
422
+ outputNum = 1;
423
+ successPercent = 100;
424
+ }
425
+ exports.ActionChoice = ActionChoice;
426
+ class Action {
427
+ id = '';
428
+ actionId = 0;
429
+ skill = Skill.NONE;
430
+ xpPerHour = 0;
431
+ numSpawned = 0;
432
+ minXP = '0';
433
+ guaranteedRewardItemTokenIds = [];
434
+ guaranteedRewardRates = [];
435
+ randomChanceItemTokenIds = [];
436
+ randomChanceRates = [];
437
+ handItemTokenIdRangeMin = 0;
438
+ handItemTokenIdRangeMax = 0;
439
+ isAvailable = false;
440
+ isDynamic = false;
441
+ actionChoiceRequired = false;
442
+ successPercent = 100;
443
+ /* Combat Stats */
444
+ melee = 0;
445
+ magic = 0;
446
+ range = 0;
447
+ rangeDefence = 0;
448
+ meleeDefence = 0;
449
+ magicDefence = 0;
450
+ health = 0;
451
+ }
452
+ exports.Action = Action;
453
+ class RandomWords {
454
+ lastRequestedTimestamp = '';
455
+ lastRandomWordsReceived = ''; // Bytes
456
+ hasLastRequestedRandomWordsBeenReceived = false;
457
+ }
458
+ exports.RandomWords = RandomWords;