From b843d4a79f99771b0d385d939ee4c485d0903a3d Mon Sep 17 00:00:00 2001 From: NovaRain Date: Fri, 12 Jul 2024 21:12:47 +0800 Subject: [PATCH] Added missing Bozar proto to sync with UPU Removed unnecessary magic 8-ball code from obj_dude.ssl. --- data/proto/items/00000350.pro | Bin 0 -> 122 bytes scripts_src/generic/zi8ball.ssl | 14 ++--- scripts_src/main/obj_dude.ssl | 90 +++++++++++++------------------- 3 files changed, 43 insertions(+), 61 deletions(-) create mode 100644 data/proto/items/00000350.pro diff --git a/data/proto/items/00000350.pro b/data/proto/items/00000350.pro new file mode 100644 index 0000000000000000000000000000000000000000..8780ab1195a098d14e6ac150847c66c2f02752ca GIT binary patch literal 122 zcmZQzV2op6=-9!)z#sv{V6cFJfrEizG5dcY017YzF(VMO0kH@WHL)`=JTU-rfQlF- ffmj)cK>$ocHGvd^FbFU~#rT12Rv=aaV!0pyJH-*` literal 0 HcmV?d00001 diff --git a/scripts_src/generic/zi8ball.ssl b/scripts_src/generic/zi8ball.ssl index f48d815614..ea66a58ed4 100644 --- a/scripts_src/generic/zi8ball.ssl +++ b/scripts_src/generic/zi8ball.ssl @@ -36,14 +36,14 @@ procedure start begin end procedure use_p_proc begin -variable temp; + variable temp; - if(dude_luck <= 3) then - temp := random( 199, 228 ); - else if(dude_luck < 9) then - temp := random( 200, 228 ); - else if( dude_luck >= 9 ) then - temp := random( 200, 243 ); + if (dude_luck <= 3) then + temp := random(199, 228); + else if (dude_luck < 9) then + temp := random(200, 228); + else if (dude_luck >= 9) then + temp := random(200, 243); if (temp == 232) then begin set_global_var(GVAR_8_BALL_TOILET_SECRET, true); end else if (temp == 233) then begin diff --git a/scripts_src/main/obj_dude.ssl b/scripts_src/main/obj_dude.ssl index d3c3a4e3bd..b73d591c1f 100644 --- a/scripts_src/main/obj_dude.ssl +++ b/scripts_src/main/obj_dude.ssl @@ -194,15 +194,15 @@ procedure timed_event_p_proc begin reg_anim_end(); end else if (fixed_param == SMOKE_POWER) then begin script_overrides; - reg_anim_clear(self_obj); - reg_anim_begin(); - reg_anim_animate(self_obj, ANIM_falling, -1); - reg_anim_play_sfx(self_obj, "powr", 6); - reg_anim_animate(self_obj, ANIM_jump_begin, -1); - reg_anim_play_sfx(self_obj, "zippo", 9); - reg_anim_animate_reverse(self_obj, 5, -1); - reg_anim_play_sfx(self_obj, "powrb", 8); - reg_anim_end(); + reg_anim_clear(self_obj); + reg_anim_begin(); + reg_anim_animate(self_obj, ANIM_falling, -1); + reg_anim_play_sfx(self_obj, "powr", 6); + reg_anim_animate(self_obj, ANIM_jump_begin, -1); + reg_anim_play_sfx(self_obj, "zippo", 9); + reg_anim_animate_reverse(self_obj, 5, -1); + reg_anim_play_sfx(self_obj, "powrb", 8); + reg_anim_end(); end else if (fixed_param == HIGH_SEQUENCE) then begin if (count == 3) then begin float_msg(dude_obj, message_str(SCRIPT_ZISMOKE,210), FLOAT_MSG_GREEN); @@ -404,45 +404,45 @@ procedure use_obj_on_p_proc begin if ((dude_is_male) and (obj_pid(obj_being_used_with) == PID_CIGARETTE)) then begin if not (combat_is_initialized) then begin if ( ((obj_pid(dude_armor) == PID_POWERED_ARMOR) or (obj_pid(dude_armor) == PID_HARDENED_POWER_ARMOR)) and (dude_item_count(PID_LIGHTER) >= 1)) then begin - script_overrides; - if (local_var(LVAR_Smoke_Count) == 0) then - display_msg(message_str(SCRIPT_ZISMOKE, 100)); - else - display_msg(message_str(SCRIPT_ZISMOKE, 101)); + script_overrides; + if (local_var(LVAR_Smoke_Count) == 0) then + display_msg(message_str(SCRIPT_ZISMOKE, 100)); + else + display_msg(message_str(SCRIPT_ZISMOKE, 101)); - add_timer_event(dude_obj, 1, SMOKE_POWER); + add_timer_event(dude_obj, 1, SMOKE_POWER); - set_local_var(LVAR_Smoke_Count,local_var(LVAR_Smoke_Count)+1); + set_local_var(LVAR_Smoke_Count, local_var(LVAR_Smoke_Count) + 1); - if ((local_var(LVAR_Smoke_Count)%10) == 0) then begin + if ((local_var(LVAR_Smoke_Count) % 10) == 0) then begin script_overrides; display_msg(message_str(SCRIPT_ZISMOKE, 103)); - set_global_var(GVAR_PLAYER_SMOKER,1); + set_global_var(GVAR_PLAYER_SMOKER, 1); rm_obj_from_inven(dude_obj,obj_being_used_with); end end else if ( (obj_pid(dude_armor) == PID_ADVANCED_POWER_ARMOR) or (obj_pid(dude_armor) == PID_ADVANCED_POWER_ARMOR_MK2) ) then begin - script_overrides; + script_overrides; display_msg(message_str(SCRIPT_ZISMOKE, 102)); end else if ((source_obj == dude_obj) and (dude_item_count(PID_LIGHTER) >= 1)) then begin - script_overrides; - if (local_var(LVAR_Smoke_Count) == 0) then - display_msg(message_str(SCRIPT_ZISMOKE, 100)); - else - display_msg(message_str(SCRIPT_ZISMOKE, 101)); + script_overrides; + if (local_var(LVAR_Smoke_Count) == 0) then + display_msg(message_str(SCRIPT_ZISMOKE, 100)); + else + display_msg(message_str(SCRIPT_ZISMOKE, 101)); - add_timer_event(dude_obj, 1, SMOKE_NONPOWER); + add_timer_event(dude_obj, 1, SMOKE_NONPOWER); - set_local_var(LVAR_Smoke_Count,local_var(LVAR_Smoke_Count)+1); + set_local_var(LVAR_Smoke_Count, local_var(LVAR_Smoke_Count) + 1); - if ((local_var(LVAR_Smoke_Count)%10) == 0) then begin + if ((local_var(LVAR_Smoke_Count) % 10) == 0) then begin script_overrides; display_msg(message_str(SCRIPT_ZISMOKE, 103)); - set_global_var(GVAR_PLAYER_SMOKER,1); + set_global_var(GVAR_PLAYER_SMOKER, 1); rm_obj_from_inven(dude_obj,obj_being_used_with); end end @@ -460,23 +460,23 @@ procedure use_obj_on_p_proc begin if not (combat_is_initialized) then begin game_ui_disable; if ( ((obj_pid(dude_armor) == PID_POWERED_ARMOR) or (obj_pid(dude_armor) == PID_HARDENED_POWER_ARMOR)) and (dude_item_count(PID_LIGHTER) >= 1)) then begin - script_overrides; - display_msg(message_str(SCRIPT_ZISMOKE, 200)); + script_overrides; + display_msg(message_str(SCRIPT_ZISMOKE, 200)); - add_timer_event(dude_obj, 1, SMOKE_POWER); + add_timer_event(dude_obj, 1, SMOKE_POWER); end - else if ( (obj_pid(dude_armor) == PID_ADVANCED_POWER_ARMOR) or (obj_pid(dude_armor) == PID_ADVANCED_POWER_ARMOR_MK2) ) then begin - script_overrides; + else if ((obj_pid(dude_armor) == PID_ADVANCED_POWER_ARMOR) or (obj_pid(dude_armor) == PID_ADVANCED_POWER_ARMOR_MK2)) then begin + script_overrides; display_msg(message_str(SCRIPT_ZISMOKE, 102)); end else if ((source_obj == dude_obj) and (dude_item_count(PID_LIGHTER) >= 1)) then begin - script_overrides; - display_msg(message_str(SCRIPT_ZISMOKE, 200)); + script_overrides; + display_msg(message_str(SCRIPT_ZISMOKE, 200)); - add_timer_event(dude_obj, 1, SMOKE_NONPOWER); + add_timer_event(dude_obj, 1, SMOKE_NONPOWER); end @@ -563,24 +563,6 @@ procedure use_obj_on_p_proc begin gfade_in(ONE_GAME_SECOND); script_overrides; scr_return(1); - end else if (obj_pid(obj_being_used_with) == PID_MAGIC_8_BALL) then begin - script_overrides; - if (dude_luck <= 3) then - temp := random( 199, 228 ); - else if (dude_luck < 9) then - temp := random( 200, 228 ); - else if ( dude_luck >= 9 ) then - temp := random( 200, 243 ); - if (temp == 232) then begin - set_global_var(GVAR_8_BALL_TOILET_SECRET, true); - end else if (temp == 233) then begin - set_global_var(GVAR_8_BALL_TRASH_SECRET, true); - end else if (temp == 243) then begin - set_global_var(GVAR_8_BALL_VAULT_TERMINAL, 1); - end - script_overrides; - display_msg(message_str(SCRIPT_ZI8BALL, temp)); - scr_return(0); end else if (obj_pid(obj_being_used_with) == PID_ENCLAVE_HOLODISK_5) then begin script_overrides; if (global_var(GVAR_HOLODISK_MB_OUTSIDE) != DOWNLOAD_HOLODISK) then begin