procedure timed_event_p_proc
begin
variable LVar1 := 0;
if (maybe_in_battle() == 0) then
begin
if (op_fixed_param() == 2) then
begin
if (tell_funny) then
call NodeGoodJokes();
else
call NodeBadJokes();
end
else if (op_fixed_param() == 3) then
begin
op_float_msg(op_dude_obj(), op_msg_string(440, tmp + 1000), 8);
op_add_timer_event(op_self_obj(), op_game_ticks(8), 4);
end
else if (op_fixed_param() == 4) then
begin
op_gfade_out(600);
op_move_to(op_dude_obj(), 11079, op_elevation(op_dude_obj()));
op_set_obj_invisibility(comedian_obj, 0);
maybe_unlock_input();
op_set_global_var(398, 0);
finished_routine := 1;
op_display_msg(op_msg_string(440, 2500));
op_game_time_advance(60 * (60 * 10) * 2);
op_gfade_in(600);
end
else if (op_fixed_param() == 5) then
begin
op_debug_msg("PITBOSS: tile_set_center(11087): " + op_metarule3(108, 11087, 0, 0));
op_gfade_in(600);
op_add_timer_event(op_self_obj(), op_game_ticks(2), 6);
end
else if (op_fixed_param() == 6) then
begin
tmp := op_random(0, 4);
if (tmp == 0) then
LVar1 := 11085;
else if (tmp == 1) then
LVar1 := 11292;
else if (tmp == 2) then
LVar1 := 10690;
else if (tmp == 3) then
LVar1 := 11484;
else
LVar1 := 11687;
op_reg_anim_func(2, Critter);
op_reg_anim_func(1, 1);
op_animate_move_obj_to_tile(Critter, LVar1, 0);
op_reg_anim_func(3, 0);
op_add_timer_event(op_self_obj(), op_game_ticks(1), 7);
end
else if (op_fixed_param() == 7) then
begin
if (op_anim_busy(Critter)) then
op_add_timer_event(op_self_obj(), op_game_ticks(1), 7);
else
op_add_timer_event(op_self_obj(), op_game_ticks(1), 8);
end
else if (op_fixed_param() == 8) then
begin
op_reg_anim_func(2, Critter);
op_reg_anim_func(1, 1);
op_anim(Critter, 1000, 2);
op_reg_anim_func(3, 0);
op_add_timer_event(op_self_obj(), op_game_ticks(2), 400);
end
else if (op_fixed_param() == 400) then
begin
op_reg_anim_func(2, Critter);
op_reg_anim_func(1, 1);
op_animate_move_obj_to_tile(Critter, 10888, 0);
op_reg_anim_func(3, 0);
op_add_timer_event(op_self_obj(), op_game_ticks(1), 401);
end
else if (op_fixed_param() == 401) then
begin
if (op_anim_busy(Critter)) then
op_add_timer_event(op_self_obj(), op_game_ticks(1), 401);
else
op_add_timer_event(op_self_obj(), op_game_ticks(1), 402);
end
else if (op_fixed_param() == 402) then
begin
op_reg_anim_func(2, Critter);
op_reg_anim_func(1, 1);
op_anim(Critter, 1000, 2);
op_reg_anim_func(3, 0);
op_add_timer_event(op_self_obj(), op_game_ticks(2), 403);
end
else if (op_fixed_param() == 403) then
begin
op_reg_anim_func(2, Critter);
op_reg_anim_func(1, 1);
op_reg_anim_animate(Critter, 13, -1);
op_reg_anim_animate(Critter, 13, 10);
op_reg_anim_func(3, 0);
op_add_timer_event(op_self_obj(), op_game_ticks(2), 404);
end
else if (op_fixed_param() == 404) then
begin
op_reg_anim_func(2, Critter);
op_reg_anim_func(1, 1);
op_reg_anim_animate(Critter, 17, -1);
op_reg_anim_animate(Critter, 17, 15);
op_reg_anim_func(3, 0);
op_add_timer_event(op_self_obj(), op_game_ticks(2), 405);
end
else if (op_fixed_param() == 405) then
begin
op_reg_anim_func(2, Critter);
op_reg_anim_func(1, 1);
op_reg_anim_animate(Critter, 13, -1);
op_reg_anim_animate(Critter, 13, 10);
op_reg_anim_func(3, 0);
op_add_timer_event(op_self_obj(), op_game_ticks(2), 406);
end
else if (op_fixed_param() == 406) then
begin
op_reg_anim_func(2, Critter);
op_reg_anim_func(1, 1);
op_animate_move_obj_to_tile(Critter, 11488, 0);
op_reg_anim_func(3, 0);
op_add_timer_event(op_self_obj(), op_game_ticks(1), 407);
end
else if (op_fixed_param() == 407) then
begin
if (op_anim_busy(Critter)) then
op_add_timer_event(op_self_obj(), op_game_ticks(1), 407);
else
op_add_timer_event(op_self_obj(), op_game_ticks(1), 408);
end
else if (op_fixed_param() == 408) then
begin
op_reg_anim_func(2, Critter);
op_reg_anim_func(1, 1);
op_anim(Critter, 1000, 5);
op_reg_anim_func(3, 0);
op_add_timer_event(op_self_obj(), op_game_ticks(2), 409);
end
else if (op_fixed_param() == 409) then
begin
op_reg_anim_func(2, Critter);
op_reg_anim_func(1, 1);
op_reg_anim_animate(Critter, 10, -1);
op_reg_anim_animate(Critter, 10, 10);
op_reg_anim_func(3, 0);
op_add_timer_event(op_self_obj(), op_game_ticks(2), 410);
end
else if (op_fixed_param() == 410) then
begin
op_reg_anim_func(2, Critter);
op_reg_anim_func(1, 1);
op_anim(Critter, 1000, 4);
op_reg_anim_func(3, 0);
op_add_timer_event(op_self_obj(), op_game_ticks(2), 411);
end
else if (op_fixed_param() == 411) then
begin
op_reg_anim_func(2, Critter);
op_reg_anim_func(1, 1);
op_reg_anim_animate(Critter, 17, -1);
op_reg_anim_animate(Critter, 17, 15);
op_reg_anim_func(3, 0);
op_add_timer_event(op_self_obj(), op_game_ticks(2), 412);
end
else if (op_fixed_param() == 412) then
begin
op_reg_anim_func(2, Critter);
op_reg_anim_func(1, 1);
op_anim(Critter, 1000, 0);
op_reg_anim_func(3, 0);
op_add_timer_event(op_self_obj(), op_game_ticks(2), 413);
end
else if (op_fixed_param() == 413) then
begin
op_reg_anim_func(2, Critter);
op_reg_anim_func(1, 1);
op_reg_anim_animate(Critter, 17, -1);
op_reg_anim_animate(Critter, 17, 15);
op_reg_anim_func(3, 0);
op_add_timer_event(op_self_obj(), op_game_ticks(2), 414);
end
else if (op_fixed_param() == 414) then
begin
op_reg_anim_func(2, Critter);
op_reg_anim_func(1, 1);
op_anim(Critter, 1000, 2);
op_reg_anim_func(3, 0);
op_add_timer_event(op_self_obj(), op_game_ticks(2), 9);
end
else if (op_fixed_param() == 9) then
begin
op_gfade_out(600);
op_destroy_object(Critter);
op_set_obj_invisibility(comedian_obj, 0);
op_set_obj_invisibility(op_dude_obj(), 0);
maybe_unlock_input();
op_set_global_var(398, 0);
finished_dance := 1;
op_display_msg(op_msg_string(440, 2501));
op_game_time_advance(60 * (60 * 10) * 1);
op_debug_msg("PITBOSS: tile_set_center(11079): " + op_metarule3(108, 11079, 0, 0));
op_gfade_in(600);
end
else if (op_fixed_param() == 1) then
begin
if (op_tile_distance(op_tile_num(op_self_obj()), op_tile_num(op_dude_obj())) <= 3) then
begin
if (op_global_var(494) == 8) then
call Node012();
else if ((op_global_var(230) / 100) == op_local_var(1)) then
begin
if (op_using_skill(op_dude_obj(), 8)) then
call Node002();
else
call Node003();
end
else if (op_global_var(232) > 0) then
begin
if (op_using_skill(op_dude_obj(), 8)) then
begin
if (op_get_critter_stat(op_dude_obj(), 34) == 1) then
call Node007();
end
end
else if (op_using_skill(op_dude_obj(), 8)) then
call Node008();
else if (op_party_member_obj(16777376) != 0) then
call Node009();
else if (op_party_member_obj(16777377) != 0) then
call Node010();
else if (op_party_member_obj(16777295) != 0) then
call Node011();
last_timed_obj := op_self_obj();
last_timed_param := last_timed_param;
op_metarule3(100, op_self_obj(), 1, 0);
op_add_timer_event(op_self_obj(), op_game_ticks(15) + op_random(0, op_game_ticks(30 - 15)), 1);
end
else
begin
call Node013();
last_timed_obj := op_self_obj();
last_timed_param := last_timed_param;
op_metarule3(100, op_self_obj(), 1, 0);
op_add_timer_event(op_self_obj(), op_game_ticks(15) + op_random(0, op_game_ticks(30 - 15)), 1);
end
end
else if (op_fixed_param() == 21) then
begin
if (op_local_var(1) == 3) then
begin
tmp := op_random(1, 2);
if (op_tile_num(op_self_obj()) != op_local_var(9)) then
LVar1 := op_local_var(9);
else if (tmp == 1) then
LVar1 := 13466;
else
LVar1 := 14687;
end
else if (op_local_var(1) == 2) then
begin
tmp := op_random(1, 2);
if (op_tile_num(op_self_obj()) != op_local_var(9)) then
LVar1 := op_local_var(9);
else if (tmp == 1) then
LVar1 := 10878;
else
LVar1 := 16673;
end
op_reg_anim_func(2, op_self_obj());
op_reg_anim_func(1, 1);
op_animate_move_obj_to_tile(op_self_obj(), LVar1, 0);
op_reg_anim_func(3, 0);
last_timed_obj := op_self_obj();
last_timed_param := last_timed_param;
op_metarule3(100, op_self_obj(), 21, 0);
op_add_timer_event(op_self_obj(), op_game_ticks(20) + op_random(0, op_game_ticks(40 - 20)), 21);
end
end
end