// basicnpc.txt
// A very simple, naive text. Creature attacks anything it hates nearby.
// Once it has won, it returns to its home.
// NPC that doesn't move or do anything
//   Cell 1,2 - Stuff done flag. If both 0, nothing. Otherwise when this is killed, set to 1.

begincreaturescript;

variables;

short i,target;
short last_abil;

body;

beginstate INIT_STATE;
	set_new_abil(ME,1 + get_ran(1,0,7));
	
	set_walk_speed(ME,0);
	set_combat_activity(ME,2);

	set_level(ME,20);
	
	last_abil = get_current_tick();
	break;

beginstate DEAD_STATE;
	print_str_color("The magic bubble pops. Some of its energy flies back toward",3);
	print_str_color("  the lich. The lich shudders.",3);
	inc_flag(71,3,3);

	set_resistance(7627,0,40);
	set_resistance(7627,1,0);
	set_resistance(7627,2,0);
	set_resistance(7627,3,0);
	set_resistance(7627,5,0);
				
break;

beginstate START_STATE; 
	if (tick_difference(last_abil,get_current_tick()) > 3) {
		print_str_color("A magical orb fades away.",2);
		erase_char(ME);
		}
break;

beginstate TALKING_STATE;
	print_str("Talking: It doesn't respond.");
break;