Example #1
0
void setup() {
   object obj;

   set_name("shayman");
   set_gender( "female" );
   add_adj("orc");
   add_ids("orc", "orc shayman");
   set_short("Orc shayman");
   set_long("An ugly orc shayman.  This thing looks wilder than your average " +
      "orc.");
   set_race("orc");
   set_level(10);
   set_aggressive(1);

   set_spell_chance(20);
   set_spell_damage(20);
   set_spell_message("The shayman casts a magic missile at $t.");

   set_hit_skill("combat/unarmed");
   set_skill("combat/unarmed", 50);
   set_skill("combat/defense", 100);

   obj = clone_object(DIR + "/obj/gold_staff.c");
   obj->setup();
   obj->move(this_object());
   obj = clone_object(DIR + "/obj/orc_slayer.c");
   obj->setup();
   obj->move(this_object());
   do_wield(obj);
}
Example #2
0
void setup(void) {
   set_id("shard");
   add_id("chaosshard");
   add_adj("chaotic");
   set_short("A shard of chaos");
   set_long("A shard of chaos. It's purpose is not immediately " +
      "clear from just looking at it. Perhaps someone else knows and " +
      "has a use for it.");
   set_gettable(1);
   set_value(0);
   set_weight(1);
}
Example #3
0
void setup() {
   set_name("troll");
   add_adj("smelly");
   set_short("A large smelly troll");
   set_long("The troll looks like a messed up tree.");
   set_race("troll");
   set_hit_skill("combat/unarmed");
   set_skill("combat/unarmed", 50);
   set_skill("combat/defense", 100);
   set_level(8);
   set_aggressive(1);
}
Example #4
0
void setup(void) {
   set_id("brain");
   add_adj("mystic");
   add_id("mystic brain");
   set_short("A mystic brain of unknown origins");
   set_long("A mystic brain of unknown origins. It probably isn't of this " +
      "world. It is also most likely imbued with some strange magic. You " +
      "might consider not holding on to it longer than is absolutely " +
      "necessary. There certainly are others who have uses for such things."); 
   set_gettable(1);
   set_weight(1);
   set_value(0);
}
Example #5
0
void setup()
{
  set_name("rat");
  /*  set_gender(0); */ /* Leave out the gender specification, get a random one. */
  add_adj( "filthy" );
  set_in_room_desc("A small filthy rat.");
  set_long("The rat smells awful.");
  set_race( "rodent" );
  set_max_hp( 7 );
  set_hit_skill("combat/unarmed");
  set_skill( "combat/unarmed", 50 );
  set_skill( "combat/defense", 100 );
}
Example #6
0
void setup() {
   set_name("harry");
   add_id("fjant");
   set_gender("male");
   add_adj("affectionate");
   set_short("Harry the affectionate");
   set_long("Harry has an agreeable look.");
   set_race("human");
   set_level(3);
   set_hit_skill("combat/unarmed");
   set_skill("combat/unarmed", 50);
   set_skill("combat/defense", 100);
   count = 0;
}
Example #7
0
void setup(void) {
   set_name("rat");

   /* Leave out the gender specification, get a random one */
   /*  set_gender( "male" ); */

   add_adj("filthy");
   set_short("A small filthy rat");
   set_long("The rat smells awful.");
   set_race("rodent");
   set_level(1);
   set_hit_skill("combat/unarmed");
   set_skill("combat/unarmed", 50);
   set_skill("combat/defense", 100);
}
Example #8
0
void mudlib_setup(mixed * args) {

   if (sizeof(args) != 2) {
      return;
   }

   add_adj(args[0]);

   our_exit = args[0];
   our_identity = args[1];
   update_sibling();
   add_block(our_exit);
   set_open_description(query_open_description() + " %^CYAN%^[" + our_exit +
      "]%^RESET%^");
   set_closed_description(query_closed_description() + " %^CYAN%^[" + our_exit +
      "]%^RESET%^");
   update_description();
}
Example #9
0
void setup() {
   set_name("traveller");

   /* Leave out the gender specification, get a random one */
   /*  set_gender(0); */

   add_adj("wandering");
   set_short("A wandering traveller");
   set_long("This tired-looking person just happens to be passing through " +
      "the area..");
   set_race("human");
   set_level(random(8) + 5);
   set_hit_skill("combat/unarmed");
   set_skill("combat/unarmed", 50);
   set_skill("combat/defense", 100);

   set_wander_area("Gurba");
   start_wander(10, 20);
}
Example #10
0
void setup(void) {
   set_gettable(0);
   set_id("pedestal");
   add_adj("ancient");
   set_short("An ancient pedestal of the Ancient One");
   set_long("The ancient pedestal has a swirling orb " +
      "of mystical blue energy hoving just over the " +
      "top of it. The orb is actually a rift in the " +
      "spacetime continuum, a direct link to the " +
      "mysterious realms of the Ancient One. The "+
      "faeries have come here for thousand and " +
      "thousands of years to pay tribute to the " +
      "Ancient One. You can do the same by " +
      "putting any relic of the Ancient One's " +
      "avatars that you find (relics like finger " +
      "bones, locks of hair, and so on) in the orb.");

   add_action("cmd_put_relic_in_orb", "put");
}
Example #11
0
File: shield.c Project: Lundex/lima
void setup(){
    set_brief("How to make a basic shield");
    set_long(@MAY
#include <bodyslots.h>

inherit ARMOR;

void setup() {
    set_adj("Black","black","right","arm");
    add_adj("right");
    set_size(39);
    set_armor_class (10);
    set_id("shield","Shield","armor","armour");
    set_long(@KAAN
This is a black shield for demonstration.
KAAN
    );
    set_size(LARGE);
    set_slot("right hand");
}
Example #12
0
void setup() {
   object obj;

   set_name("giant");
   set_gender( "male" );
   add_adj("fire");
   set_short("A fire giant");
   set_long("A mighty hot big guy.");
   set_race("giant");
   set_level(15);
   set_aggressive(1);
   set_hit_skill("combat/unarmed");
   set_skill("combat/unarmed", 50);
   set_skill("combat/defense", 100);

   obj = clone_object(DIR + "/obj/fire_sword");
   obj->setup();
   obj->move(this_object());
   do_wield(obj);
}
Example #13
0
void setup() {
   object obj, obj2;

   set_name("octopus");
   add_adj("giant");
   set_short("An octopus");
   set_long("A very big octopus with long arms, reaching for you.");

   set_level(10);
   set_hit_skill("combat/unarmed");
   set_skill("combat/unarmed", 50);
   set_skill("combat/defense", 100);

   obj = clone_object(DIR + "/obj/chest.c");
   obj->move(this_object());
   obj->setup();

   obj2 = clone_object("/domains/required/objects/coin.c");
   obj2->set_amount(random(500) + 1);
   obj2->move(obj);
   obj2->setup();
}
Example #14
0
void setup(void) {
   object obj;

   set_name("slim");
   set_gender( "male" );
   add_adj("large");
   set_short("Slim shady");
   set_long("This guy is skinny, he is also kind of creepy looking.  He " +
      "reminds you of an anemic scarecrow.");

   set_race("human");
   set_level(1);
   set_hit_skill("combat/unarmed");
   set_skill("combat/unarmed", 50);
   set_skill("combat/defense", 100);
   set_aggressive(0);

   obj = clone_object(DIR + "/obj/10ghat.c");
   obj->setup();
   obj->move(this_object());
   do_wear(obj);
}
Example #15
0
create_key()
{
  set_adj("small");
  add_adj("steel");
  set_long("It's a small key made out of steel.\n");
}
void makeBox(gmi_model* model)
{
  //making a box

  int vertPer = 0;
  double vertRan[1][2] = {{0.0,0.0}};
  int vertexMap[8] = {58,56,54,60,5,10,15,2};
  gmi_ent* g_vert[8];
  g_vert[0] = gmi_add_analytic(model, 0, 58, vert0, &vertPer, vertRan, 0);
  g_vert[1] = gmi_add_analytic(model, 0, 56, vert1, &vertPer, vertRan, 0);
  g_vert[2] = gmi_add_analytic(model, 0, 54, vert2, &vertPer, vertRan, 0);
  g_vert[3] = gmi_add_analytic(model, 0, 60, vert3, &vertPer, vertRan, 0);
  g_vert[4] = gmi_add_analytic(model, 0, 5, vert4, &vertPer, vertRan, 0);
  g_vert[5] = gmi_add_analytic(model, 0, 10, vert5, &vertPer, vertRan, 0);
  g_vert[6] = gmi_add_analytic(model, 0, 15, vert6, &vertPer, vertRan, 0);
  g_vert[7] = gmi_add_analytic(model, 0, 2, vert7, &vertPer, vertRan, 0);


  int edgePer = 0;
  double edgeRan[1][2] = {{0.0,1.0}};
  gmi_ent* g_edge[12];

  g_edge[0] = gmi_add_analytic(model, 1, 50, edge0, &edgePer, edgeRan, 0);
  g_edge[1] = gmi_add_analytic(model, 1, 48, edge1, &edgePer, edgeRan, 0);
  g_edge[2] = gmi_add_analytic(model, 1, 46, edge2, &edgePer, edgeRan, 0);
  g_edge[3] = gmi_add_analytic(model, 1, 52, edge3, &edgePer, edgeRan, 0);
  g_edge[4] = gmi_add_analytic(model, 1, 11, edge4, &edgePer, edgeRan, 0);
  g_edge[5] = gmi_add_analytic(model, 1, 16, edge5, &edgePer, edgeRan, 0);
  g_edge[6] = gmi_add_analytic(model, 1, 20, edge6, &edgePer, edgeRan, 0);
  g_edge[7] = gmi_add_analytic(model, 1, 6, edge7, &edgePer, edgeRan, 0);
  g_edge[8] = gmi_add_analytic(model, 1, 73, edge8, &edgePer, edgeRan, 0);
  g_edge[9] = gmi_add_analytic(model, 1, 72, edge9, &edgePer, edgeRan, 0);
  g_edge[10] = gmi_add_analytic(model, 1, 71, edge10, &edgePer, edgeRan, 0);
  g_edge[11] = gmi_add_analytic(model, 1, 74, edge11, &edgePer, edgeRan, 0);

  //reparameterize vertices on edges
  agm_bdry b;
  b = agm_add_bdry(gmi_analytic_topo(model), agm_from_gmi(g_edge[0]));
  agm_use edgeUse0 = add_adj(model, b, vertexMap[0]);
  agm_use edgeUse0_1 = add_adj(model,b,vertexMap[1]);
  gmi_add_analytic_reparam(model, edgeUse0, reparamVert_zero, 0);
  gmi_add_analytic_reparam(model, edgeUse0_1, reparamVert_one, 0);

  b = agm_add_bdry(gmi_analytic_topo(model), agm_from_gmi(g_edge[1]));
  edgeUse0 = add_adj(model, b, vertexMap[1]);
  edgeUse0_1 = add_adj(model,b,vertexMap[2]);
  gmi_add_analytic_reparam(model, edgeUse0, reparamVert_zero, 0);
  gmi_add_analytic_reparam(model, edgeUse0_1, reparamVert_one, 0);

  b = agm_add_bdry(gmi_analytic_topo(model), agm_from_gmi(g_edge[2]));
  edgeUse0 = add_adj(model, b, vertexMap[2]);
  edgeUse0_1 = add_adj(model,b,vertexMap[3]);
  gmi_add_analytic_reparam(model, edgeUse0, reparamVert_one, 0);
  gmi_add_analytic_reparam(model, edgeUse0_1, reparamVert_zero, 0);

  b = agm_add_bdry(gmi_analytic_topo(model), agm_from_gmi(g_edge[3]));
  edgeUse0 = add_adj(model, b, vertexMap[3]);
  edgeUse0_1 = add_adj(model,b,vertexMap[0]);
  gmi_add_analytic_reparam(model, edgeUse0, reparamVert_one, 0);
  gmi_add_analytic_reparam(model, edgeUse0_1, reparamVert_zero, 0);

  b = agm_add_bdry(gmi_analytic_topo(model), agm_from_gmi(g_edge[4]));
  edgeUse0 = add_adj(model, b, vertexMap[4]);
  edgeUse0_1 = add_adj(model,b,vertexMap[5]);
  gmi_add_analytic_reparam(model, edgeUse0, reparamVert_zero, 0);
  gmi_add_analytic_reparam(model, edgeUse0_1, reparamVert_one, 0);

  b = agm_add_bdry(gmi_analytic_topo(model), agm_from_gmi(g_edge[5]));
  edgeUse0 = add_adj(model, b, vertexMap[5]);
  edgeUse0_1 = add_adj(model,b,vertexMap[6]);
  gmi_add_analytic_reparam(model, edgeUse0, reparamVert_zero, 0);
  gmi_add_analytic_reparam(model, edgeUse0_1, reparamVert_one, 0);

  b = agm_add_bdry(gmi_analytic_topo(model), agm_from_gmi(g_edge[6]));
  edgeUse0 = add_adj(model, b, vertexMap[6]);
  edgeUse0_1 = add_adj(model,b,vertexMap[7]);
  gmi_add_analytic_reparam(model, edgeUse0, reparamVert_one, 0);
  gmi_add_analytic_reparam(model, edgeUse0_1, reparamVert_zero, 0);

  b = agm_add_bdry(gmi_analytic_topo(model), agm_from_gmi(g_edge[7]));
  edgeUse0 = add_adj(model, b, vertexMap[7]);
  edgeUse0_1 = add_adj(model,b,vertexMap[4]);
  gmi_add_analytic_reparam(model, edgeUse0, reparamVert_one, 0);
  gmi_add_analytic_reparam(model, edgeUse0_1, reparamVert_zero, 0);

  b = agm_add_bdry(gmi_analytic_topo(model), agm_from_gmi(g_edge[8]));
  edgeUse0 = add_adj(model, b, vertexMap[0]);
  edgeUse0_1 = add_adj(model,b,vertexMap[4]);
  gmi_add_analytic_reparam(model, edgeUse0, reparamVert_zero, 0);
  gmi_add_analytic_reparam(model, edgeUse0_1, reparamVert_one, 0);

  b = agm_add_bdry(gmi_analytic_topo(model), agm_from_gmi(g_edge[9]));
  edgeUse0 = add_adj(model, b, vertexMap[1]);
  edgeUse0_1 = add_adj(model,b,vertexMap[5]);
  gmi_add_analytic_reparam(model, edgeUse0, reparamVert_zero, 0);
  gmi_add_analytic_reparam(model, edgeUse0_1, reparamVert_one, 0);

  b = agm_add_bdry(gmi_analytic_topo(model), agm_from_gmi(g_edge[10]));
  edgeUse0 = add_adj(model, b, vertexMap[2]);
  edgeUse0_1 = add_adj(model,b,vertexMap[6]);
  gmi_add_analytic_reparam(model, edgeUse0, reparamVert_zero, 0);
  gmi_add_analytic_reparam(model, edgeUse0_1, reparamVert_one, 0);

  b = agm_add_bdry(gmi_analytic_topo(model), agm_from_gmi(g_edge[11]));
  edgeUse0 = add_adj(model, b, vertexMap[3]);
  edgeUse0_1 = add_adj(model,b,vertexMap[7]);
  gmi_add_analytic_reparam(model, edgeUse0, reparamVert_zero, 0);
  gmi_add_analytic_reparam(model, edgeUse0_1, reparamVert_one, 0);

  //make faces

  int facePeriodic[2] = {0, 0};
  double faceRanges[2][2] = {{0,1.0},{0,1.0}};
  gmi_ent* g_face[6];
  g_face[0] = gmi_add_analytic(model, 2, 80, face0, facePeriodic, faceRanges, 0);
  g_face[1] = gmi_add_analytic(model, 2, 78, face1, facePeriodic, faceRanges, 0);
  g_face[2] = gmi_add_analytic(model, 2, 76, face2, facePeriodic, faceRanges, 0);
  g_face[3] = gmi_add_analytic(model, 2, 82, face3, facePeriodic, faceRanges, 0);
  g_face[4] = gmi_add_analytic(model, 2, 42, face4, facePeriodic, faceRanges, 0);
  g_face[5] = gmi_add_analytic(model, 2, 24, face5, facePeriodic, faceRanges, 0);

  //reparam edges onto face

  //int edgeMap[12] = {50,48,46,52,11,16,20,6,73,72,71,74};
  int edgeLoop[6][4] = {{50,72,11,73},{72,48,71,16},{46,74,20,71},{52,73,6,74},{50,52,46,48},{11,16,20,6}}; 
  int edgeReparamLoop[6][4] = {{0,3,2,1},{1,0,3,2},{0,1,2,3},{0,1,2,3},{0,1,2,3},{0,3,2,1}}; 
  //int faceLoop[6] = {80,78,76,82,42,24};

  //int faceMap[6] = {0,1,2,3,4,5};
  //int faceLoop[6][4] = {{0,9,4,8},{9,1,10,5},{2,11,6,10},{3,8,7,11},{0,3,2,1},{4,5,6,7}}; 
  
/*
  typedef void (*ParametricFunctionArray) (double const p[2], double x[3], void*);
  ParametricFunctionArray faceFunction[] = 
    {
      face0,
      face1,
      face2,
      face3,
      face4,
      face5,
    };
  for(int i=0; i<6;i++)
  {
    b = agm_add_bdry(gmi_analytic_topo(model), agm_from_gmi(g_face[i]));
    for(int j=0; j<4;j++)
    {
      agm_use faceUse = add_adj(model, b, edgeLoop[i][j]);
      gmi_add_analytic_reparam(model, faceUse, faceFunction[i], 0);
    }
  }
  

*/

  typedef void (*ParametricFunctionArray) (double const from[2], double to[2], void*);
  ParametricFunctionArray edgeFaceFunction[] = 
    {
      reparamEdge_0,
      reparamEdge_1,
      reparamEdge_2,
      reparamEdge_3,
    };

  for(int i=0; i<6;i++)
  {
    b = agm_add_bdry(gmi_analytic_topo(model), agm_from_gmi(g_face[i]));
    for(int j=0; j<4;j++)
    {
      agm_use faceUse = add_adj(model, b, edgeLoop[i][j]);
      gmi_add_analytic_reparam(model, faceUse, edgeFaceFunction[edgeReparamLoop[i][j]], 0);
    }
  }


  //make region
/*
  int regionPeriodic[3] = {0, 0, 0};
  double regionRanges[3][2] = {{0,0},{0,0},{0.0}};
  gmi_ent* g_region;
  g_region = gmi_add_analytic(model, 3, 92, regionFunction, regionPeriodic, regionRanges, 0);
  b = agm_add_bdry(gmi_analytic_topo(model), agm_from_gmi(g_region));
*/
  gmi_add_analytic_cell(model,3,92);

  b = agm_add_bdry(gmi_analytic_topo(model), agm_from_gmi(gmi_find(model,3,92)));
  for(int i=0; i<6;i++)
  {
    agm_use regionUse = add_adj(model, b, faceLoop[i]);
    gmi_add_analytic_reparam(model, regionUse, regionFunction, 0);
  }

/*
  //add edge adjacencies to region?
  it doesn't seem like i need to do this
  for(int i=0;i<12;i++)
  {
    agm_use regionUse = add_adj(model,b,1,edgeMap[i]);
    gmi_add_analytic_reparam(model, regionUse, regionFunction, 0);
  }
*/

  //get the sphere reparameterizations onto box
  //b = agm_add_bdry(gmi_analytic_topo(model), agm_from_gmi(gmi_find(model,3,92)));
  agm_use regionUse = add_adj(model, b, 123);
  gmi_add_analytic_reparam(model, regionUse, regionFunction, 0);


  return;
}
Example #17
0
/*
 * The create routine, called create_monster() in this case since we inherit
 * /std/monster.c
 */
void
create_monster()
{
    /*
     * First we'll give the hermit a name. It's not really necessary but
     * it's always nice. Players can then adress this hermit as 'hurble'.
     * To let them 'exa hermit' we add the name 'hermit' too. Both set_name()
     * and add_name() are functions defined in /std/object.c. Since all
     * objects inherit /std/object.c you can call these functions in all
     * objects.
     */
    set_name("hurble");
    add_name("hermit");

    /*
     * Living beings belong to a race. This one is human.
     */
    set_race_name("human");

    /*
     * Let's add some adjektives. The first adjektive we set to 'old' and
     * then we add 'skinny' too. This way players can both 'exa skinny hermit'
     * as well as 'exa old human' or 'exa old skinny hurble'. Nice, don't you
     * think?
     */
    set_adj("old");
    add_adj("skinny");

    /*
     * You don't have to set the long description in a mobile, but perhaps
     * it's more fun to have some additional information about the mobile?
     * The long description is what player will see when they examine or
     * look at this object.
     */
    set_long("It looks like he's been sitting here a while.\n");

    /*
     * The short description is what players see when they look in a room
     * or check their inventory. If you don't set the dhort description then
     * default will be used, which in case of living beings is all adjektives
     * added and the race name when not introduced. If introduced, the name
     * of the being. In this case, 'old skinny human' as unmet and 'hurble'
     * as met (introduced). Note that if you set this short description, it
     * will always be shown, both as unmet ans met description.
     */
    set_short("old skinny hermit");

    /*
     * Then we want to set the stats of the mobile. This hermit is not
     * particulary strong or intelligent or anything. 15 in all stats.
     */
    default_config_mobile(15);

    /*
     * Perhaps your mobile is skilled? This hermit is not, he just know
     * a little about herbalism. Try 'man skill_list' to see all skills
     * there are. The skills are defined in /sys/ss_types.h
     */
    set_skill(SS_HERBALISM, 30);

    /*
     * We want the hermit to say things, and do some actions too.
     * set_act_time() is used to indicate how often we want the mobile to
     * do something, as well as set_chat_time() how often he should talk.
     * The higher the value the long between actions.
     */
    set_act_time(5);
    add_act("emote makes some strange noise.");
    add_act("moan");
    add_act( ({ "say I can do stuff after eaechothers too.", "smile" }) );