<command name="stats">
<pattern>stats #object#; #object# stats;</pattern>
<script>
msg ("Status")
if (object=player) {
msg ("Your current stamina is " + object.stamina)
}
else {
msg ("Current " + object.alias + " stamina is " + object.stamina)
}
</script>
<unresolved>"ERROR"</unresolved>
</command>ClearScreen
msg ("Character Information Screen")
msg ("")
msg ("Name: " + player.alias)
msg ("Age: " + player.age)
msg ("Sex: " + player.sex)
msg ("Life: + player.life)
msg ("Strength: + player.strength)
// etc etc etc stats
wait {
ClearScreen
}
ClearScreen
msg ("Character Information Screen")
msg ("")
msg ("Name: {player.alias}")
msg ("Age: {player.age}")
msg ("Sex: {player.sex}")
msg ("Life: {player.life}")
msg ("Strength: {player.strength}")
// etc etc etc stats
wait {
ClearScreen
}ClearScreen
msg ("Character Information Screen")
msg ("")
msg ("Name: " + player.alias)
msg ("Age: " + player.age)
msg ("Sex: " + player.sex)
msg ("Life: + player.life)
msg ("Strength: + player.strength)
// etc etc etc stats
wait {
ClearScreen
}
do you mean having your stats displayed permanently~constantly in the big text area (left side of the screen during game play) ???
or is it okay to type in a command, such as 'stats', whenever the person playing the game needs to see them?
or is it okay to click on a verb button or hyperlink, named such as 'stats', whenever the person playing the game needs to see them?
// data_list = split ("10;9;8;7;6;5;4;3;2;1", ";")
// (I'm assuming Lists can be passed as Parameters)
game.smallest_value = get_smallest_function (data_list)
<function name="get_smallest_function" type="int" parameter="list_parameter">
smallest = ToInt (StringListItem (list_parameter, 0))
for (x, 1, ListCount (list_parameter) - 1) {
if (ToInt (StringListItem (list_parameter, x)) < smallest) {
smallest = ToInt (StringListItem (list_parameter, x))
}
}
return (smallest)
</function><game name="xxx">
<attr name="largest_value" type="int">-1</attr>
<attr name="largest_name" type="string">unknown</attr>
<attr name="personality_list" type="simplestringlist">sexy;sympathy;sarcasm;snoopy;serious</attr>
<attr name="start" type="script">
character_creation_function
on ready {
largest_function
on ready {
response_function
}
}
</attr>
</game>
<object name="player">
// pretending that after your 'character creation', you start with these stats, for an example:
<attr name="sexy" type="int">5</attr>
<attr name="sympathy" type="int">6</attr>
<attr name="sarcasm" type="int">7</attr>
<attr name="snoopy" type="int">8</attr>
<attr name="serious" type="int">9</attr>
</object>
<function name="character_creation_function">
// blah scripts
</function>
<function name="largest_function">
game.largest_value = player.sexy
game.largest_name = "sexy"
for (personality_x, 1, ListCount(personality_list) - 1) {
value_x = GetInt (player, personality_x)
if (value_x > game.largest_value) {
game.largest_value = value_x
game.largest_name = personality_x
}
}
</function>
<function name="response_function">
switch (game.largest_name) {
case ("sexy") {
msg ("You're dominant personality is sexiness, at " + game.largest_value)
}
case ("sympathy") {
msg ("You're dominant personality is sympathetic, at " + game.largest_value)
}
case ("sarcasm") {
msg ("You're dominant personality is sarcastic, at " + game.largest_value)
}
case ("snoopy") {
msg ("You're dominant personality is snoopiness, at " + game.largest_value)
}
case ("serious") {
msg ("You're dominant personality is seriousness, at " + game.largest_value)
}
}
</function>