@paintswap/estfor-definitions 0.1.24 → 0.1.26

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,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Action = exports.ActionChoice = exports.ShopItem = exports.UserItemNFT = exports.Item = exports.QueuedAction = exports.LastAttire = exports.ActivityInfo = exports.Activity = 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.ActionReward = exports.ActionInfo = exports.QueuedActionInput = exports.Equipment = exports.CombatStyle = exports.ActionQueueStatus = exports.Attire = exports.EquipPosition = exports.Skill = exports.BoostType = void 0;
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
4
  var BoostType;
5
5
  (function (BoostType) {
6
6
  BoostType[BoostType["NONE"] = 0] = "NONE";
@@ -36,7 +36,7 @@ var EquipPosition;
36
36
  EquipPosition[EquipPosition["BODY"] = 3] = "BODY";
37
37
  EquipPosition[EquipPosition["ARMS"] = 4] = "ARMS";
38
38
  EquipPosition[EquipPosition["LEGS"] = 5] = "LEGS";
39
- EquipPosition[EquipPosition["BOOTS"] = 6] = "BOOTS";
39
+ EquipPosition[EquipPosition["FEET"] = 6] = "FEET";
40
40
  EquipPosition[EquipPosition["SPARE1"] = 7] = "SPARE1";
41
41
  EquipPosition[EquipPosition["SPARE2"] = 8] = "SPARE2";
42
42
  EquipPosition[EquipPosition["LEFT_HAND"] = 9] = "LEFT_HAND";
@@ -47,7 +47,6 @@ var EquipPosition;
47
47
  EquipPosition[EquipPosition["FOOD"] = 14] = "FOOD";
48
48
  EquipPosition[EquipPosition["AUX"] = 15] = "AUX";
49
49
  EquipPosition[EquipPosition["BOOST_VIAL"] = 16] = "BOOST_VIAL";
50
- EquipPosition[EquipPosition["NO_POSITION"] = 17] = "NO_POSITION";
51
50
  })(EquipPosition = exports.EquipPosition || (exports.EquipPosition = {}));
52
51
  class Attire {
53
52
  head = 0;
@@ -55,7 +54,7 @@ class Attire {
55
54
  body = 0;
56
55
  arms = 0;
57
56
  legs = 0;
58
- boots = 0;
57
+ feet = 0;
59
58
  ring = 0;
60
59
  reserved1 = 0;
61
60
  queueId = 0;
@@ -70,12 +69,8 @@ var ActionQueueStatus;
70
69
  var CombatStyle;
71
70
  (function (CombatStyle) {
72
71
  CombatStyle[CombatStyle["NONE"] = 0] = "NONE";
73
- CombatStyle[CombatStyle["MELEE"] = 1] = "MELEE";
74
- CombatStyle[CombatStyle["RANGE"] = 2] = "RANGE";
75
- CombatStyle[CombatStyle["MAGIC"] = 3] = "MAGIC";
76
- CombatStyle[CombatStyle["MELEE_DEFENCE"] = 4] = "MELEE_DEFENCE";
77
- CombatStyle[CombatStyle["RANGE_DEFENCE"] = 5] = "RANGE_DEFENCE";
78
- CombatStyle[CombatStyle["MAGIC_DEFENCE"] = 6] = "MAGIC_DEFENCE";
72
+ CombatStyle[CombatStyle["ATTACK"] = 1] = "ATTACK";
73
+ CombatStyle[CombatStyle["DEFENCE"] = 2] = "DEFENCE";
79
74
  })(CombatStyle = exports.CombatStyle || (exports.CombatStyle = {}));
80
75
  class Equipment {
81
76
  itemTokenId = 0;
@@ -93,8 +88,7 @@ class QueuedActionInput {
93
88
  timespan = 0; // How long to queue the action for
94
89
  rightHandEquipmentTokenId = 0;
95
90
  leftHandEquipmentTokenId = 0;
96
- startTime = '0'; // Filled in by the smart contract, can be "0"
97
- isValid = true; // If we still have the item, TODO: Not used yet
91
+ skill = Skill.NONE;
98
92
  }
99
93
  exports.QueuedActionInput = QueuedActionInput;
100
94
  class ActionInfo {
@@ -103,17 +97,24 @@ class ActionInfo {
103
97
  isDynamic = false;
104
98
  actionChoiceRequired = false;
105
99
  xpPerHour = 0;
106
- numSpawn = 0;
100
+ numSpawned = 0;
107
101
  minXP = 0;
108
102
  handItemTokenIdRangeMin = 0;
109
103
  handItemTokenIdRangeMax = 0;
104
+ successPercent = 0;
110
105
  }
111
106
  exports.ActionInfo = ActionInfo;
112
- class ActionReward {
107
+ class GuaranteedReward {
113
108
  itemTokenId = 0;
114
109
  rate = 0; // base 100, 2 decimal places
115
110
  }
116
- exports.ActionReward = ActionReward;
111
+ exports.GuaranteedReward = GuaranteedReward;
112
+ class RandomReward {
113
+ itemTokenId = 0;
114
+ chance = 0; // out of 65335
115
+ amount = 0;
116
+ }
117
+ exports.RandomReward = RandomReward;
117
118
  class ActionInput {
118
119
  actionId = 0;
119
120
  info = new ActionInfo();
@@ -201,22 +202,23 @@ class Player {
201
202
  isActive = false; // Is this player the active one for the owner
202
203
  numActivities = 0; // Not used yet
203
204
  pendingRandomRewards = []; // Timestamps for any rewards which are waiting on the next seed
205
+ speedMultiplier = 1;
204
206
  /* Action XP */
205
- woodcuttingXP = 0;
206
- firemakingXP = 0;
207
- fishingXP = 0;
208
- cookingXP = 0;
209
- miningXP = 0;
210
- smithingXP = 0;
211
- craftingXP = 0;
212
- thievingXP = 0;
207
+ woodcuttingXP = '0';
208
+ firemakingXP = '0';
209
+ fishingXP = '0';
210
+ cookingXP = '0';
211
+ miningXP = '0';
212
+ smithingXP = '0';
213
+ craftingXP = '0';
214
+ thievingXP = '0';
213
215
  totalXP = '0';
214
216
  /* Combat XP */
215
- healthXP = 0;
216
- meleeXP = 0;
217
- defenceXP = 0;
218
- magicXP = 0;
219
- rangeXP = 0;
217
+ healthXP = '0';
218
+ meleeXP = '0';
219
+ defenceXP = '0';
220
+ magicXP = '0';
221
+ rangeXP = '0';
220
222
  /** Ranks */
221
223
  woodcuttingRank = 0;
222
224
  firemakingRank = 0;
@@ -253,23 +255,25 @@ class GlobalPlayerStats {
253
255
  exports.GlobalPlayerStats = GlobalPlayerStats;
254
256
  var ActivityType;
255
257
  (function (ActivityType) {
256
- ActivityType[ActivityType["LevelUp"] = 0] = "LevelUp";
257
- ActivityType[ActivityType["Buy"] = 1] = "Buy";
258
- ActivityType[ActivityType["Sell"] = 2] = "Sell";
259
- ActivityType[ActivityType["Died"] = 3] = "Died";
260
- ActivityType[ActivityType["Consumed"] = 4] = "Consumed";
261
- ActivityType[ActivityType["Rewards"] = 5] = "Rewards";
262
- ActivityType[ActivityType["ClaimedXPThresholdRewards"] = 6] = "ClaimedXPThresholdRewards";
263
- ActivityType[ActivityType["ActionPartiallyFinished"] = 7] = "ActionPartiallyFinished";
264
- ActivityType[ActivityType["ActionsQueued"] = 8] = "ActionsQueued";
265
- ActivityType[ActivityType["ActionFinished"] = 9] = "ActionFinished";
258
+ ActivityType[ActivityType["Buy"] = 0] = "Buy";
259
+ ActivityType[ActivityType["Sell"] = 1] = "Sell";
260
+ ActivityType[ActivityType["ActionPartiallyFinished"] = 2] = "ActionPartiallyFinished";
261
+ ActivityType[ActivityType["ActionFinished"] = 3] = "ActionFinished";
262
+ ActivityType[ActivityType["PendingRandomRewardsClaimed"] = 4] = "PendingRandomRewardsClaimed";
266
263
  })(ActivityType = exports.ActivityType || (exports.ActivityType = {}));
264
+ var Direction;
265
+ (function (Direction) {
266
+ Direction[Direction["Consumed"] = 0] = "Consumed";
267
+ Direction[Direction["Produced"] = 1] = "Produced";
268
+ })(Direction = exports.Direction || (exports.Direction = {}));
267
269
  class Activity {
268
270
  id = '';
269
271
  type = ''; // ActivityType
270
272
  itemTokenIds = [];
271
273
  amounts = [];
274
+ directions = []; // Direction
272
275
  prices = [];
276
+ actionId = '';
273
277
  queueId = '';
274
278
  timestamp = '';
275
279
  hash = '';
@@ -282,19 +286,31 @@ class ActivityInfo {
282
286
  numActivities = '';
283
287
  }
284
288
  exports.ActivityInfo = ActivityInfo;
285
- class LastAttire {
286
- id = ''; // playerId
287
- playerId = '';
289
+ class LastFullEquipment {
290
+ id = '0'; // playerId
291
+ playerId = '0';
288
292
  user = '';
293
+ actionId = 0;
294
+ regenerateId = 0;
295
+ choiceId = 0;
296
+ choiceId1 = 0;
297
+ choiceId2 = 0;
298
+ rightHandEquipmentTokenId = 0;
299
+ leftHandEquipmentTokenId = 0;
300
+ startTime = '';
301
+ timespan = 0;
302
+ isValid = true;
303
+ skill = Skill.NONE;
289
304
  headEquipped = 0;
290
305
  neckEquipped = 0;
291
306
  bodyEquipped = 0;
292
307
  armsEquipped = 0;
293
308
  legsEquipped = 0;
294
- bootsEquipped = 0;
309
+ feetEquipped = 0;
295
310
  ringEquipped = 0;
311
+ timestamp = '0';
296
312
  }
297
- exports.LastAttire = LastAttire;
313
+ exports.LastFullEquipment = LastFullEquipment;
298
314
  class QueuedAction {
299
315
  id = ''; // queueId
300
316
  actionId = 0;
@@ -308,12 +324,14 @@ class QueuedAction {
308
324
  startTime = '';
309
325
  timespan = 0;
310
326
  isValid = true;
327
+ skill = Skill.NONE;
328
+ combatStyle = CombatStyle.NONE;
311
329
  headEquipped = 0;
312
330
  neckEquipped = 0;
313
331
  bodyEquipped = 0;
314
332
  armsEquipped = 0;
315
333
  legsEquipped = 0;
316
- bootsEquipped = 0;
334
+ feetEquipped = 0;
317
335
  ringEquipped = 0;
318
336
  }
319
337
  exports.QueuedAction = QueuedAction;
@@ -354,6 +372,23 @@ class ShopItem {
354
372
  price = '0';
355
373
  }
356
374
  exports.ShopItem = ShopItem;
375
+ class ActionChoiceInput {
376
+ skill = Skill.NONE;
377
+ diff = 0;
378
+ rate = 0;
379
+ xpPerHour = 0;
380
+ minXP = 0;
381
+ inputTokenId1 = 0;
382
+ num1 = 0;
383
+ inputTokenId2 = 0;
384
+ num2 = 0;
385
+ inputTokenId3 = 0;
386
+ num3 = 0;
387
+ outputTokenId = 0;
388
+ outputNum = 1;
389
+ successPercent = 100;
390
+ }
391
+ exports.ActionChoiceInput = ActionChoiceInput;
357
392
  class ActionChoice {
358
393
  id = '';
359
394
  actionId = 0;
@@ -369,6 +404,8 @@ class ActionChoice {
369
404
  inputTokenId3 = 0;
370
405
  num3 = 0;
371
406
  outputTokenId = 0;
407
+ outputNum = 1;
408
+ successPercent = 100;
372
409
  }
373
410
  exports.ActionChoice = ActionChoice;
374
411
  class Action {
@@ -376,7 +413,7 @@ class Action {
376
413
  actionId = 0;
377
414
  skill = Skill.NONE;
378
415
  xpPerHour = 0;
379
- numSpawn = 0;
416
+ numSpawned = 0;
380
417
  minXP = '0';
381
418
  guaranteedRewardItemTokenIds = [];
382
419
  guaranteedRewardRates = [];
@@ -387,6 +424,7 @@ class Action {
387
424
  isAvailable = false;
388
425
  isDynamic = false;
389
426
  actionChoiceRequired = false;
427
+ successPercent = 100;
390
428
  /* Combat Stats */
391
429
  melee = 0;
392
430
  magic = 0;
@@ -397,3 +435,9 @@ class Action {
397
435
  health = 0;
398
436
  }
399
437
  exports.Action = Action;
438
+ class RandomWords {
439
+ lastRequestedTimestamp;
440
+ lastRandomWordsReceived = ''; // Bytes
441
+ hasLastRequestedRandomWordsBeenReceived = false;
442
+ }
443
+ exports.RandomWords = RandomWords;