{$CLEO .cs} //-------------MAIN--------------- thread 'CBNPNS' :CBNPNS_01 wait 0 if and Player.Defined($PLAYER_CHAR) 0ADC: test_cheat "CBNPNS" jf @CBNPNS_01 if 00E0: player $PLAYER_CHAR driving jf @CBNPNS_02 03C1: 0@ = player $PLAYER_CHAR car_no_save // car struct + 0x1FE (byte & 7) - car bomb state // //0 - CARBOMB_NONE No bomb //1 - CARBOMB_TIMED Inactive timed bomb, can be obtained from garage type 2 //2 - CARBOMB_ONIGNITION Inactive ignition bomb, can be obtained from garage type 3 //3 - CARBOMB_REMOTE Remote detonation bomb, can be obtained from garage type 4 //4 - CARBOMB_TIMEDACTIVE Active timed bomb, activated from bomb type 1 //5 - CARBOMB_ONIGNITIONACTIVE Active ignition bomb, activated from bomb type 2 // if 0AB1: call_scm_func @opcode_0228 2 car_handle 0@ bomb_stage 0 // check if car bomb state == 0 jf @CBNPNS_02 0AB1: call_scm_func @opcode_0242 2 car_handle 0@ bomb_type 1 // sets car bomb type 1 :CBNPNS_02 0219: 15@ = create_garage_type 5 door -836.738 -915.016 9.8 to -836.738 -898.316 13.4 depth -853.238 -905.016 0ACE: show_formatted_text_box "~h~The ~t~bomb ~h~has been ~x~installed ~h~and ~t~Kam's garage ~h~has been ~x~activated." jump @CBNPNS_01 //------------------------------------------------------------------------------------- // SCM FUNCTIONS: //------------------------------------------------------------------------------------- :opcode_0228 // 0@ - input param (car handle) // 1@ - input param (bomb stage) 05E7: 0@ = car 0@ struct 0@ += 0x1FE // car bomb offset 05E0: 0@ = read_memory 0@ size 1 virtual_protect 0 05F9: 0@ = 0@ AND 7 003B: 0@ == 1@ // check bomb stage in car against input 05F6: ret 0 :opcode_0242 // 0@ - input param (car handle) // 1@ - input param (bomb stage) 05E7: 0@ = car 0@ struct 0@ += 0x1FE // car bomb offset 05E0: 2@ = read_memory 0@ size 1 virtual_protect 0 // store previous value 05F9: 1@ = 1@ AND 7 // keep only the first three bits from input param 05F9: 2@ = 2@ AND 0xF8 // exclude the first three bits in stored value 05FA: 2@ = 2@ OR 1@ // replace the first three bits of stored value with input param 05DF: write_memory 0@ size 1 value 2@ virtual_protect 0 // set to new value 05F6: ret 0