ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/doc/playbook-html/treas1-extract
Revision: 1.1.1.1 (vendor branch)
Committed: Fri Feb 3 07:12:42 2006 UTC (18 years, 5 months ago) by root
Branch: UPSTREAM
CVS Tags: UPSTREAM_2006_03_15, LAST_C_VERSION, STABLE, UPSTREAM_2006_02_22, difficulty_fix_merge_060810_2300, UPSTREAM_2006_02_03
Branch point for: difficulty_fix
Changes since 1.1: +0 -0 lines
Log Message:
initial import

File Contents

# Content
1 # stats-extract - parse the archetypes-file and output the
2 # player's stats in a structured format.
3
4 /^Object/ {
5 randomitems = "";
6 name = obj = $2;
7 type = 0;
8 }
9
10 /^type/ { type = $2 }
11 /^randomitems/ { randomitems = $2 }
12 /^name/ { name = substr($0, 6) }
13
14 /^end/ {
15 if (type == 1) { # Players
16 printf("%s,%s\n", decapitalize(name), randomitems);
17 }
18 }
19
20 END {
21 close("items");
22 }
23
24 function decapitalize(str) {
25 return tolower (substr(str, 1, 1)) substr(str, 2);
26 }