Anonymous

In-game Functions: Difference between revisions

From Melvor Idle
m
Amend example
(Update for v.0.18.0)
m (Amend example)
Line 107: Line 107:
The above code will result in 300 Mastery XP being added to the skill with ID 11 (Farming) for Mastery ID 13 (Carrot Seeds).
The above code will result in 300 Mastery XP being added to the skill with ID 11 (Farming) for Mastery ID 13 (Carrot Seeds).


  <nowiki>addMasteryXP(2, 3, 3000)</nowiki>
  <nowiki>addMasteryXP(2, 3, 3000);</nowiki>
The above code will result in the calculation & addition of the amount of Mastery XP from an action in skill with ID 2 (Firemaking) for item with Mastery ID 3 (Teak Logs), supposing the action took 3,000 milliseconds.
The above code will result in the calculation & addition of the amount of Mastery XP from an action in skill with ID 2 (Firemaking) for item with Mastery ID 3 (Teak Logs), supposing the action took 3,000 milliseconds.