Player attributes: Difference between revisions

From Graal Bible
No edit summary
No edit summary
 
(14 intermediate revisions by 10 users not shown)
Line 1: Line 1:
[[Category:Administration]]
The properties of any given player. The client is usually afforded the ability to change the visual aspects of their player, whilst more important modifications - money, health and so on - can only be set from the [[RC]] or by using scripts designed to do so.
The properties of any given player. The client is usually afforded the ability to change the visual aspects of their player, whilst more important modifications - money, health and so on - can only be set from the [[RC]] or by using scripts designed to do so.


Line 6: Line 7:


'''Player properties''': Level, x co-ordinate, y co-ordinate, [[hearts]], [[fullhearts]], [[AP]], [[MP]], [[gralats]], glove power, bomb count, arrow count, sword power, sword image, shield power, shield image, gender, weapon status, spin attack status, opened chests, weapons, and script flags.
'''Player properties''': Level, x co-ordinate, y co-ordinate, [[hearts]], [[fullhearts]], [[AP]], [[MP]], [[gralats]], glove power, bomb count, arrow count, sword power, sword image, shield power, shield image, gender, weapon status, spin attack status, opened chests, weapons, and script flags.
Scripting items designed for editting player attributes include:<br />
(''OBJ'': GScript1 -> GScript2)<br />
''sword'': #1 -> player.swordimg<br />
''shield'': #2 -> player.shieldimg<br />
''head'': #3 -> player.headimg<br />
''Body'': #8 -> player.bodyimg<br />
''Skin'': #C0 -> player.colors[0]<br />
''Shoes'': #C1 -> player.colors[1]<br />
''Sleeves'': #C2 -> player.colors[2]<br />
''Coat'': #C3 -> player.colors[3]<br />
''Belt'': #C4 -> player.colors[4]
<br> <br>
Here's a simple list of player Variables.
<br> <br>
players[index] -- gets player from level (for gmaps, this includes players in the 3x3 levels around you)<br>
players[index].x -- a player’s horizontal position<br>
players[index].y -- a player’s vertical position<br>
players[index].z -- a player’s z  position<br>
players[index].rupees -- a player’s rupees count<br>
players[index].bombs -- a player’s bombs count<br>
players[index].darts -- a player’s darts count<br>
players[index].mp -- a player’s magic points (0..100)<br>
players[index].ap -- a player’s alignment points (0..100)<br>
players[index].hearts -- a player’s hearts count<br>
players[index].fullhearts -- a player’s max hearts count<br>
players[index].dir -- a player’s (0-up,1-left,2-down,3-right)<br>
players[index].glovepower -- a player’s glove power (2-glove1,3-glove2)<br>
players[index].swordpower -- a player’s sword power (1-normal sword,2-axe,3-lizardsword,4-golden sword)<br>
players[index].shieldpower -- a player’s sield power (1-normal sword,2-mirror shield,3-lizard shield)<br>
players[index].headset -- a player’s head sprites set (”head”+playerheadset+”.gif”)<br>
players[index].sprite -- a player’s sprites set (0..40)<br>
players[index].anistep -- the anistep of the player)<br>
players[index].id -- a player’s id (=-1 for npc characters)<br>
players[index].saysnumber -- the (index+1)th  player says that number<br>
players[index].id -- a player’s id (=-1 for npc characters)<br>
players[index].attachid -- the player is attached to the npc with that id (<=0-> not attached)<br>
players[index].attachtype -- the type of object the player is attached to<br>
players[index].logintime -- when the player logged in (in timevar)<br>
players[index].lastdead -- when the player last died (in timevar)<br>
==See Also==
*[[Creation/Dev/Script/Client/TServerPlayer|TServerPlayer]]
**[[Creation/Dev/Script/Client/TPlayer|TPlayer]]
*[[Creation/Dev/Script Functions:_NPC_Server|Script Functions: NPC Server]]

Latest revision as of 13:09, 19 February 2010

The properties of any given player. The client is usually afforded the ability to change the visual aspects of their player, whilst more important modifications - money, health and so on - can only be set from the RC or by using scripts designed to do so.

The full list of attributes editable by the RC is listed below.

Player look: head, body, animation, skin colour, coat colour, sleeve colour, shoe colour and belt colour. These can usually be changed by the client using simple chat commands: see appearance commands.

Player properties: Level, x co-ordinate, y co-ordinate, hearts, fullhearts, AP, MP, gralats, glove power, bomb count, arrow count, sword power, sword image, shield power, shield image, gender, weapon status, spin attack status, opened chests, weapons, and script flags.


Scripting items designed for editting player attributes include:
(OBJ: GScript1 -> GScript2)
sword: #1 -> player.swordimg
shield: #2 -> player.shieldimg
head: #3 -> player.headimg
Body: #8 -> player.bodyimg
Skin: #C0 -> player.colors[0]
Shoes: #C1 -> player.colors[1]
Sleeves: #C2 -> player.colors[2]
Coat: #C3 -> player.colors[3]
Belt: #C4 -> player.colors[4]

Here's a simple list of player Variables.

players[index] -- gets player from level (for gmaps, this includes players in the 3x3 levels around you)
players[index].x -- a player’s horizontal position
players[index].y -- a player’s vertical position
players[index].z -- a player’s z position
players[index].rupees -- a player’s rupees count
players[index].bombs -- a player’s bombs count
players[index].darts -- a player’s darts count
players[index].mp -- a player’s magic points (0..100)
players[index].ap -- a player’s alignment points (0..100)
players[index].hearts -- a player’s hearts count
players[index].fullhearts -- a player’s max hearts count
players[index].dir -- a player’s (0-up,1-left,2-down,3-right)
players[index].glovepower -- a player’s glove power (2-glove1,3-glove2)
players[index].swordpower -- a player’s sword power (1-normal sword,2-axe,3-lizardsword,4-golden sword)
players[index].shieldpower -- a player’s sield power (1-normal sword,2-mirror shield,3-lizard shield)
players[index].headset -- a player’s head sprites set (”head”+playerheadset+”.gif”)
players[index].sprite -- a player’s sprites set (0..40)
players[index].anistep -- the anistep of the player)
players[index].id -- a player’s id (=-1 for npc characters)
players[index].saysnumber -- the (index+1)th player says that number
players[index].id -- a player’s id (=-1 for npc characters)
players[index].attachid -- the player is attached to the npc with that id (<=0-> not attached)
players[index].attachtype -- the type of object the player is attached to
players[index].logintime -- when the player logged in (in timevar)
players[index].lastdead -- when the player last died (in timevar)

See Also