onGreet5.c

grendel-1.0.0a7/progs/examples/onGreet5.c · 343 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 Rest for a while and let me heal your wounds");

  if(target.hp < target.max_hp)
  {
    do("cast 'cure light' " + target.Pname);
  }
  
  sleep(5);

  if(target.mv < target.max_mv)
  {
    do("cast 'refresh' " + target.Pname);
  }
  
  sleep(5);
}

Site Stats

Snippets: 1791
Codebases: 571