; <IBF Infinite Booster Fuel
; 0002 = infinite fuel
; 0000 = not infinite fuel
offset 0046D5D0  ;replaces npc 352
#define
:variable = 493873
#enddefine
MOV EAX,DWORD PTR DS:[4A5AD8]
ADD EAX,DWORD PTR DS:[4A5AE0]
CMP BYTE [ECX+1],49                                   ;Check for the letter I
JNE SHORT 00424F33
CMP BYTE [ECX+2],42                                   ;Check for the letter B
JNE SHORT 00424F33
CMP BYTE [ECX+3],46                                   ;Check for the letter F
JNE SHORT 00424F33
;---First Argument---
MOV EAX,DWORD PTR DS:[4A5AE0]
ADD EAX,4
PUSH EAX                             
CALL 00421900                         
ADD ESP,4                             ;Get the argument from the <IBF command, and store it into EAX
CMP EAX,2
JE :infinite_fuel
mov [:variable],0
JMP :END
:infinite_fuel
mov [:variable],2                                     ; infinite fuel
:end
ADD [4A5AE0],8                                        ;Fix the script position
JMP 004252A7                                          ;Jump back to the beginning of the TSC parser
;===============================
;===============================
;===============================
:after_the_fact
ADD BYTE PTR DS:[EAX],AL                   ;this is just a buffet to keep my sanity
:NONONONONONO                              ;begining of booster fuel branch
MOV EAX,DWORD PTR DS:[49E6E8]
CMP [:variable],2                          ;Was our variable set in the above code?
JE :end_booster_code
SUB EAX,1
:end_booster_code
MOV [49E6E8],EAX
JMP 00415C64
; jump address 00415C5D