#include <define.h>

//#define NAME                    SCRIPT_

#include <command.h>
//#include <ModReact.h>



procedure start;
#include <push.h>
procedure use_p_proc;
procedure Coke00;
procedure Coke01;

variable caps;


procedure start
begin
	if (script_action == use_proc) then begin
		call use_p_proc;
	end
end

procedure use_p_proc
begin
	script_overrides;
	if (local_var(0) == 1) then begin
		call Coke00;
	end
	else begin
		call Coke01;
	end
end

procedure Coke00
begin
	display_msg(message_str(SCRIPT_COKE, 100));
end

procedure Coke01
begin
	set_local_var(0, 1);
	if (is_success(do_check(dude_obj, 6, 0))) then begin
		display_msg(message_str(SCRIPT_COKE, 101));
		caps := random(1, 6) + random(1, 6) + random(1, 6);
		item_caps_adjust(dude_obj, caps);
	end
end