Anonymous

User:Silber: Difference between revisions

From Melvor Idle
no edit summary
No edit summary
No edit summary
Line 53: Line 53:
== player.addGP ==
== player.addGP ==
The player.addGP function can be used to add gp to a player.
The player.addGP function can be used to add gp to a player.
  <nowiki>player.addGP(quantity, source)</nowiki>
  <nowiki>player.addGP(amount, source)</nowiki>
=== Attributes ===
=== Attributes ===
{| class="wikitable"
{| class="wikitable"
Line 59: Line 59:
! Attribute !! Type !! Optional? !! Default Value !! Description
! Attribute !! Type !! Optional? !! Default Value !! Description
|-
|-
| quantity || int || No || || The quantity of GP to add
| amount|| int || No || || The quantity of GP to add
|-
|-
| source || string || No || || The source of the GP being added. If set to "Combat" it will add the gp to the players gp received in combat stat for tracking.
| source || string || No || || The source of the GP being added. If set to "Combat" it will add the gp to the players gp received in combat stat for tracking.
Line 71: Line 71:
== player.removeGP ==
== player.removeGP ==
The player.removeGP function can be used to remove gp from a player.
The player.removeGP function can be used to remove gp from a player.
  <nowiki>player.addGP(quantity)</nowiki>
  <nowiki>player.addGP(amount)</nowiki>
=== Attributes ===
=== Attributes ===
{| class="wikitable"
{| class="wikitable"
Line 77: Line 77:
! Attribute !! Type !! Optional? !! Default Value !! Description
! Attribute !! Type !! Optional? !! Default Value !! Description
|-
|-
| quantity || int || No || || The quantity of GP to remove
| amount|| int || No || || The quantity of GP to remove
|}
|}
=== Examples ===
=== Examples ===
Line 84: Line 84:


== player.addPrayerPoints ==
== player.addPrayerPoints ==
The player.addGP function can be used to add prayer points to a player.
The player.addPrayerPoints function can be used to add prayer points to a player.
<nowiki>player.addPrayerPoints(amount)</nowiki>
=== Attributes ===
=== Attributes ===
{| class="wikitable"
|-
! Attribute !! Type !! Optional? !! Default Value !! Description
|-
| amount|| int || No || || The quantity of prayer points to add.
|}
=== Examples ===
=== Examples ===
<nowiki>player.addPrayerPoints(1);</nowiki>
The above code will add 1 prayer point to the player, and update player stats.


== player.addSlayerCoins ==
== player.addSlayerCoins ==
The player.addGP function can be used to add slayer coins to a player.
The player.addSlayerCoins function can be used to add slayer coins to a player.
<nowiki>player.addSlayerCoins(amount)</nowiki>
=== Attributes ===
=== Attributes ===
{| class="wikitable"
|-
! Attribute !! Type !! Optional? !! Default Value !! Description
|-
| amount|| int || No || || The quantity of slayer coins to add.
|}
=== Examples ===
=== Examples ===
<nowiki>player.addSlayerCoins(1);</nowiki>
The above code will add 1 slayer coin to the player, and update player stats.


== player.addXP ==
== player.addXP ==
166

edits