onFight2.c

grendel-1.0.0a7/progs/examples/onFight2.c · 352 B

From the archive grendel-1.0.0a7.zip

Download the archive   « Back to the archive contents

require "glib.c"

void onGreet(external ch, external target)
{
  do("say Me welcome " + target.Pname);
  do("say You buy something from me?"); 
}

void onFight(external ch, external target)
{
  int x;
  x = random(100);

  if(x =< 20)
  {
    do("say Please, Scralemon want live");
    do("say Stop fight, me afraid to die!");
  }
}

Site Stats

Snippets: 1791
Codebases: 571