GetPlrMagic

Category: Player
Since engine version: 4.6.5.0 CP

Description

Determines magic spell knowledge of a player.

Syntax

bool / id GetPlrMagic (int iPlr, id id, int iIndex);

Parameters

iPlr:
Player whose magic knowledge you want to determine.
id:
With id specified the function returns true, if the specified player knows the specified spell. In this case iIndex is ignored.
iIndex:
With iIndex specified the function returns the indicated spell from the player's list of known spells.

Examples

if (GetPlrMagic(0,MLGT))
	Message("Spieler %s kann Blitze zaubern",0,GetPlayerName(0));
				
If player 0 knows the lightning spell (MGLT), a message is displayed.
var spell;

spell = GetPlrMagic(0,0,4);
Message("Der fünfte Zauberspruch des Spielers ist %i",0,spell);
				
Returns the id of the fifth spell of the first player.
jwk, Juni 2002