ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/doc/playbook-html/treas1-extract
Revision: 1.2
Committed: Thu Sep 7 21:43:23 2006 UTC (17 years, 8 months ago) by pippijn
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
State: FILE REMOVED
Log Message:
Moved documents to doc/historic

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 }