// basin.txt
// Cell 0 - linked flag

// effects
// 0 - bless
// 1 - haste
// 2 - shield
// 3 - essence armor
// 4 - resistant
// 5 - protection aura
// 6 - invlum
// 7 - poison
// 8 - acid
// 9 - summon creature
// 10 - more energy
// 11 - less energy
// 12 - nothing
// 13 - heal
// 14 - experience
// 15 - cure death curse
// 16 - gives trinket
// 17 - increase stat

beginobjectscript;

variables;

short amount = 90;
short is_full = 0;

body;

beginstate INIT_STATE;
	set_obj_act_at_dist(ME,1);
	set_object_icon(ME,2);
	
	if (get_memory_cell(1) != 0)
		amount = get_memory_cell(1);
	break;

beginstate DEAD_STATE;

break;

beginstate START_STATE; 
	if (gf(167,get_memory_cell(0)) > 0) {
		is_full = 1;
		set_object_icon(ME,4);
		}
break;
beginstate RUN_ANIM_STATE;
	if (gf(167,get_memory_cell(0)) > 0) {
		is_full = 1;
		set_object_icon(ME,4);
		}
break;

beginstate USE_STATE;
	if (is_full == 0) {
		print_str_color("Drink Water: You can't. The basin is empty.",2);
		end();
		}
	
	sf(167,get_memory_cell(0),0);
	print_str_color("Drink Water: You drink the water in the basin. Your thoughts become",2);
	print_str_color("  amazingly clear.",2);
	is_full = 0;
	set_object_icon(ME,2);
	play_sound(114);
		run_sparkles_on_object(ME,1,1,1);
	

		status_nearby(5,2,25,0);

		
break;