GetPlayerMana

From Gothic 2 Online: Wiki
Jump to navigation Jump to search

The function gets the hero or npc mana points.

Syntax

int getPlayerMana(int id)

Required Arguments

  • id: The id of the npc or hero.

Returns

  • current mana value

Example

addEventHandler("onInit",function()
{
     setPlayerMana(heroId, 1000) // the function sets 1000 mana

     setPlayerMaxMana(heroId, getPlayerMana(heroId)) // the function sets max mana to get current mana.
});