From: Laszlo T. <ave...@us...> - 2006-11-12 13:21:44
|
Update of /cvsroot/gemrb/gemrb/gemrb/docs/en/GUIScript In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv5934 Modified Files: SetPlayerStat.txt Added Files: ApplyEffect.txt Log Message: added ApplyEffect doc Index: SetPlayerStat.txt =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/docs/en/GUIScript/SetPlayerStat.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SetPlayerStat.txt 1 Nov 2004 11:22:44 -0000 1.2 --- SetPlayerStat.txt 12 Nov 2006 13:21:37 -0000 1.3 *************** *** 10,18 **** Return value: N/A ! Examples: PickedColor=GemRB.GetTableValue(ColorTable, ColorIndex, GemRB.GetVar("Selected")) GemRB.SetPlayerStat (pc, IE_MAJOR_COLOR, PickedColor) The above example sets the player's color just picked via the color customisation dialog. ColorTable holds the available colors. ! See also: GetPlayerStat, SetPlayerName --- 10,18 ---- Return value: N/A ! Example: PickedColor=GemRB.GetTableValue(ColorTable, ColorIndex, GemRB.GetVar("Selected")) GemRB.SetPlayerStat (pc, IE_MAJOR_COLOR, PickedColor) The above example sets the player's color just picked via the color customisation dialog. ColorTable holds the available colors. ! See also: GetPlayerStat, SetPlayerName, ApplyEffect --- NEW FILE: ApplyEffect.txt --- Prototype: GemRB.ApplyEffect(PartyID, opcode, param1, param2) Description: Creates a basic effect and applies it on the player character marked by PartyID. This function could be used to add stats that are stored in effect blocks. Parameters: PartyID - the player character's index in the party opcode - the effect opcode (for values see effects.ids) param1 - parameter 1 for the opcode param2 - parameter 2 for the opcode Return value: N/A Example: for i in range(ProfCount-8): StatID = GemRB.GetTableValue(TmpTable, i+8, 0) Value = GemRB.GetVar ("Prof "+str(i) ) if Value: GemRB.ApplyEffect (MyChar, "Proficiency", Value, StatID ) The above example sets the weapon proficiencies in a bg2's CharGen9.py script. See also: SpellCast, SetPlayerStat, GetPlayerStat |