@paintswap/estfor-definitions 0.1.24 → 0.1.25

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,13 @@ class QueuedAction {
308
324
  startTime = '';
309
325
  timespan = 0;
310
326
  isValid = true;
327
+ skill = Skill.NONE;
311
328
  headEquipped = 0;
312
329
  neckEquipped = 0;
313
330
  bodyEquipped = 0;
314
331
  armsEquipped = 0;
315
332
  legsEquipped = 0;
316
- bootsEquipped = 0;
333
+ feetEquipped = 0;
317
334
  ringEquipped = 0;
318
335
  }
319
336
  exports.QueuedAction = QueuedAction;
@@ -354,6 +371,23 @@ class ShopItem {
354
371
  price = '0';
355
372
  }
356
373
  exports.ShopItem = ShopItem;
374
+ class ActionChoiceInput {
375
+ skill = Skill.NONE;
376
+ diff = 0;
377
+ rate = 0;
378
+ xpPerHour = 0;
379
+ minXP = 0;
380
+ inputTokenId1 = 0;
381
+ num1 = 0;
382
+ inputTokenId2 = 0;
383
+ num2 = 0;
384
+ inputTokenId3 = 0;
385
+ num3 = 0;
386
+ outputTokenId = 0;
387
+ outputNum = 1;
388
+ successPercent = 100;
389
+ }
390
+ exports.ActionChoiceInput = ActionChoiceInput;
357
391
  class ActionChoice {
358
392
  id = '';
359
393
  actionId = 0;
@@ -369,6 +403,8 @@ class ActionChoice {
369
403
  inputTokenId3 = 0;
370
404
  num3 = 0;
371
405
  outputTokenId = 0;
406
+ outputNum = 1;
407
+ successPercent = 100;
372
408
  }
373
409
  exports.ActionChoice = ActionChoice;
374
410
  class Action {
@@ -376,7 +412,7 @@ class Action {
376
412
  actionId = 0;
377
413
  skill = Skill.NONE;
378
414
  xpPerHour = 0;
379
- numSpawn = 0;
415
+ numSpawned = 0;
380
416
  minXP = '0';
381
417
  guaranteedRewardItemTokenIds = [];
382
418
  guaranteedRewardRates = [];
@@ -387,6 +423,7 @@ class Action {
387
423
  isAvailable = false;
388
424
  isDynamic = false;
389
425
  actionChoiceRequired = false;
426
+ successPercent = 100;
390
427
  /* Combat Stats */
391
428
  melee = 0;
392
429
  magic = 0;
@@ -397,3 +434,8 @@ class Action {
397
434
  health = 0;
398
435
  }
399
436
  exports.Action = Action;
437
+ class RandomWords {
438
+ lastRandomWordRequestedTimestamp;
439
+ lastRandomWordsReceived = ''; // Bytes
440
+ }
441
+ exports.RandomWords = RandomWords;