Player
create, edit, and destroy playersexample: # create an enchanter set mel [Player create name=mel race=Human class=Enchanter "at=Somewhere" "offset=100 100" gender=female]# lets give her a sword in her equipment and a dagger in her handset sword [Item create name=sword key]Player num=$mel carry=$swordset dagger [Item create name=dagger key]Player num=$mel use=$dagger# now, lets kill her :(Player num=$mel state=Dead
[ name ] [ race ] [ class ] [ death ] [ state ] [ callback ] [ use ] [ carry ] [ remove ] [ gender ] [ offset ] [ at ] [ group ] [ level ] [ num ] [ signal ] [ target ] [ target_pos ] [ is_at ] [ is_at_pos ] [ wait ] [ create ] [ is_living ] [ strip ] [ get_group ] [ get_pos ] [ get_tags ] [ set_tags ] [ get_stats ] [ pull_from_map ] [ destroy ] [ debug ] [ add_to_map ] [ learn_spells ] [ add_task ] [ portraits ] [ pants ] [ shirt ] [ hair ] [ screen_message ] [ delta_time ] [ start_time ] [ str0 ] [ int0 ] [ dex0 ] [ str1 ] [ int1 ] [ dex1 ] [ str2 ] [ int2 ] [ dex2 ] [ info ] [ get_info ] [ signal_response ]
name
Type: String
Default Value: "Player"
Description: name of the player
race
Type: String
Default Value: "Human"
Description: race of the player
class
Type: String
Default Value: "Untrained"
Description: class of the player (i.e., Enchanter, Archer, etc.
death
Type: String
Default Value: "HELLO"
Description: procedure to call upon death
state
Type: String
Default Value: "Alive"
Description: state of player (Dead, Immobile, NearDead)
callback
Type: String
Default Value: "Dummy"
Description: a callback function which is called when a 'target' is reached.
use
Type: String
Default Value: "Item"
Description: use an item
carry
Type: String
Default Value: "Item"
Description: carry an item
remove
Type: String
Default Value: "Item"
Description: remove an item
gender
Type: String
Default Value: "male"
Description: gender of player (male, female, child, it, random)
offset
Type: String
Default Value: "0 0 0"
Description: offset from 'at' position
at
Type: String
Default Value: "-1"
Description: a marker where the player will be positioned
group
Type: Int
Default Value: 0
Description: the group number to which the player will be added
level
Type: Int
Default Value: 1
Description: the level of the player
num
Type: Int
Default Value: 0
Description: use to modify player 'num'
signal
Type: Int
Default Value: -1
Description: send this signal to the player
target
Type: Int
Default Value: 0
Description: set this item or marker as a target, can be used with 'callback'
target_pos
Type: String
Default Value: "0 0 0"
Description: set this position as a target
is_at
Type: Int
Default Value: 0
Description: see if the player is near a marker or item
is_at_pos
Type: String
Default Value: "0 0 0"
Description: see if the player is near a specific position
wait
Type: Int
Default Value: 0
Description: wait (1000 = 1sec)
create
Type: Bool
Default Value: 0
Description: create a new player
is_living
Type: Bool
Default Value: 0
Description: return 1 if player living, 0 if dead
strip
Type: Bool
Default Value: 0
Description: pull all items off a player and destroy them
get_group
Type: Bool
Default Value: 0
Description: return the group number of which this player is a member
get_pos
Type: Bool
Default Value: 0
Description: return the player position
get_tags
Type: Bool
Default Value: 0
Description: get a list of tags attached to this player
set_tags
Type: String
Default Value: ""
Description: set tags for the player
get_stats
Type: Bool
Default Value: 0
Description: get the stats for the player
pull_from_map
Type: Bool
Default Value: 0
Description: pull the player from the map
destroy
Type: Bool
Default Value: 0
Description: destroy the player
debug
Type: Bool
Default Value: 0
Description: prints out extra info to the debug window
add_to_map
Type: String
Default Value: "0 0"
Description: adds the payer to the map at the specified location
learn_spells
Type: String
Default Value: ""
Description: add these spells to the player's repertoire
add_task
Type: String
Default Value: ""
Description: this task (procedure) will be called at the time specified by start_time (or delta_time)
portraits
Type: String
Default Value: ""
Description: set this player's portraits (bitmaps)
pants
Type: String
Default Value: "grey"
Description: color of the pants
shirt
Type: String
Default Value: "grey"
Description: color of the shirt
hair
Type: String
Default Value: "grey"
Description: color of the hair
screen_message
Type: String
Default Value: ""
Description: a message that will be printed on the screen near the player
delta_time
Type: Int
Default Value: 0
Description: offset in time to start a task (see add_task)
start_time
Type: Int
Default Value: 0
Description: a specified time to start a task (see add_task)
str0
Type: Int
Default Value: 0
Description: set the player's strength (permanent)
int0
Type: Int
Default Value: 0
Description: set the player's intelligence (permanent)
dex0
Type: Int
Default Value: 0
Description: set the player's dexterity (permanent)
str1
Type: Int
Default Value: 0
Description: set the player's strength (temporary)
int1
Type: Int
Default Value: 0
Description: set the player's intelligence (temporary)
dex1
Type: Int
Default Value: 0
Description: set the player's dexterity (temporary)
str2
Type: Int
Default Value: 0
Description: set the player's strength (permanent and temporary)
int2
Type: Int
Default Value: 0
Description: set the player's intelligence (permanent and temporary)
dex2
Type: Int
Default Value: 0
Description: set the player's dexterity (permament and temporary)
info
Type: String
Default Value: ""
Description: any special info to be passed on to the item creation. Different items do different things with this info
get_info
Type: Bool
Default Value: 0
Description: get the info stored in the player
signal_response
Type: String
Default Value: "-1 \"\""
Description: takes two parameters (signalval signal). when signalval is received, the procedure 'signal' is called