コード例 #1
0
void create() {
 ::create();
   set_name("rat");
   if (random(10) > 5)
     {
      set_short("fat rat");
      set_level(random(5)+9);
     }
    else 
     { 
      set_short("small rat");
      set_level(random(5)+6);
     }
   set_race("rat");
   set_body_type("feline");
if (random(10) > 5)
     {
      set_gender("female");
     }
    else 
     { 
      set_gender("male");
     }
   set_class("animal");
   set_subclass("fast");
   set_id(({ "rat", query_short() }));
コード例 #2
0
     "a box of nerds":
     (["id": ({"box of nerds", "box", "nerds"}),
       "long": "A box filled with little nerdies."
     ]),
     "cotton candy":
     (["id": ({"cotton candy"}),
       "long": "The cotton candy is %^MAGENTA%^%^BOLD%^pink%^RESET%^."
     ]),
     "A bag of jelly beans":
     (["id": ({"bag of jelly beans", "jelly beans", "bag"}),
       "long": "The bag is full of different color jelly beans"
     ])
          
 ]);

void create()
{
 int i;
 string *shorts;
set_name("candy");
i = random(sizeof(shorts = keys(candys)));
set_short(shorts[i]);
set_long( candys[ shorts[i] ]["long"] );
set_id( candys[ shorts[i] ]["id"] += ({ "candy" }));
set_weight(1);
set_value(0);
set_strength(5);
set_my_mess("You eat "+query_short()+" and smile.");
set_your_mess("eats "+query_short()+" and smiles.");
}
コード例 #3
0
ファイル: netherlash_ob.c プロジェクト: ehershey/pd
string query_desc() {
  return definite_article(strip_color(
    replace_string(query_short(), " (wielded)", "")
  ));
}