In-game Functions: Difference between revisions

→‎unlockPet: Add section
m (Update for v1.0.1)
(→‎unlockPet: Add section)
Line 206: Line 206:
  <nowiki>addMasteryXPToPool(11, 600);</nowiki>
  <nowiki>addMasteryXPToPool(11, 600);</nowiki>
The above code will result in 150 Mastery Pool XP being added to the skill with ID 11 (Farming) if the player is under 99 in farming. Or 300 Mastery Pool XP being added if the player is over 99
The above code will result in 150 Mastery Pool XP being added to the skill with ID 11 (Farming) if the player is under 99 in farming. Or 300 Mastery Pool XP being added if the player is over 99
== unlockPet ==
The unlockPet function is used to unlock [[Pets]]. Note that unlocking a pet is permanent - there is no supported method to lock a pet once again.
<nowiki>unlockPet(petID, offline)</nowiki>
=== Attributes ===
{| class="wikitable"
|-
! Attribute !! Type !! Optional? !! Default Value !! Description
|-
| petID || int || No || || The ID of the pet, which can be found on the individual pet pages (such as {{PetIcon|Ty}} for example).
|-
| offline || boolean || Yes || false || Determines if various UI elements are immediately updated to reflect the experience gain. Should usually be left as the default value
|}
=== Examples ===
<nowiki>unlockPet(4);</nowiki>
The above code will result in the unlocking of {{PetIcon|Cool Rock}}.


== Reference Tables ==
== Reference Tables ==