*label UsePrimary *set curr_weapon p_weapon *set curr_mod p_mod *set curr_class p_class *set curr_weaponmode p_weaponmode *set curr_range p_range *set curr_type p_type *set curr_ammo p_ammo *set curr_arrow p_arrow *set curr_ammo_num p_ammo_num *set curr_suppressor p_suppressor *set curr_scope p_scope *set curr_lethal p_lethal *return *label UseSecondary *set curr_weapon s_weapon *set curr_mod s_mod *set curr_class s_class *set curr_weaponmode s_weaponmode *set curr_range s_range *set curr_type s_type *set curr_ammo s_ammo *set curr_arrow s_arrow *set curr_ammo_num s_ammo_num *set curr_suppressor s_suppressor *set curr_scope s_scope *set curr_lethal s_lethal *return *label AttackResult *set range_difficulty 0 *set attack_result 0 *if (curr_type = "ranged") *if ranged_matters *set range_difficulty ((curr_range - target_range)*5) *if (((ranged + curr_mod)) + range_difficulty) >= target_difficulty *set attack_result 4 *return *elseif (((ranged + curr_mod)) + range_difficulty) >= (target_difficulty - 25) *set attack_result 3 *return *elseif (((ranged + curr_mod)) + range_difficulty) >= (target_difficulty - 50) *set attack_result 2 *return *else *set attack_result 1 *return *elseif curr_class = "fist" *if (hth + curr_mod) >= target_difficulty *set attack_result 4 *return *elseif (hth + curr_mod) >= (target_difficulty - 25) *set attack_result 3 *return *elseif (hth + curr_mod) >= (target_difficulty - 50) *set attack_result 2 *return *else *set attack_result 1 *return *else *if (ccw + curr_mod) >= target_difficulty *set attack_result 4 *return *elseif (ccw + curr_mod) >= (target_difficulty - 25) *set attack_result 3 *return *elseif (ccw + curr_mod) >= (target_difficulty - 50) *set attack_result 2 *return *else *set attack_result 1 *return *label CheckAmmo *if curr_weapon = ".38 Special" *if ammo_38 = 0 You have no spare ammo for it. *gosub SwapWeapons *return *else You reload it with the ammo you're carrying. *set ammo_38 -1 *set revolver_loaded true *return *if curr_weapon = "SKS carbine" *if ammo_762 = 0 You have no spare magazines for it. *gosub SwapWeapons *return *else You reload it with the ammo you're carrying. *set ammo_762 -1 *set sks_loaded true *return *if curr_weapon = "AK-47" *if ammo_762 = 0 You have no spare magazines for it. *gosub SwapWeapons *return *else You reload it with the ammo you're carrying. *set ammo_762 -1 *set ak47_loaded true *return *if curr_weapon = "Arsenal AK" *if ammo_556 = 0 You have no spare magazines for it. *gosub SwapWeapons *return *else You reload it with the ammo you're carrying. *set ammo_556 -1 *set arsenal_loaded true *return *if curr_weapon = "AR-15" *if ammo_556 = 0 You have no spare magazines for it. *gosub SwapWeapons *return *else You reload it with the ammo you're carrying. *set ammo_556 -1 *set ar15_loaded true *return *if curr_weapon = "recurve bow" *if ammo_arrows = 0 You have no spare arrows left. *gosub SwapWeapons *return *else You take out more arrows from your inventory. *set ammo_arrows -1 *set recurve_bow_loaded true *return *if curr_weapon = "compound bow" *if ammo_arrows = 0 You have no spare arrows left. *gosub SwapWeapons *return *else You take out more arrows from your inventory. *set ammo_arrows -1 *set bow_loaded true *return *if curr_weapon = "chrome-plated rifle" *if ammo_3030 = 0 You have no spare ammo for it. *gosub SwapWeapons *return *else You reload it with the ammo you're carrying. *set ammo_3030 -1 *set chrome_plated_rifle_loaded true *return *if curr_weapon = "Colt Python" *if ammo_357 = 0 You have no spare ammo for it. *gosub SwapWeapons *return *else You reload it with the ammo you're carrying. *set ammo_357 -1 *set colt_loaded true *return *if curr_weapon = "crossbow" *if ammo_bolts = 0 You have no spare bolts left. *gosub SwapWeapons *return *else You take out more bolts from your inventory. *set ammo_bolts -1 *set crossbow_loaded true *return *if curr_weapon = "Desert Eagle" *if ammo_357 = 0 You have no spare magazines for it. *gosub SwapWeapons *return *else You reload it with the ammo you're carrying. *set ammo_357 -1 *set desert_eagle_loaded true *return *if curr_weapon = "Glock" *if ammo_9mm = 0 You have no spare magazines for it. *gosub SwapWeapons *return *else You reload it with the ammo you're carrying. *set ammo_9mm -1 *set glock_loaded true *return *if curr_weapon = "Light assault rifle" *if ammo_556 = 0 You have no spare magazines for it. *gosub SwapWeapons *return *else You reload it with the ammo you're carrying. *set ammo_556 -1 *set manns_lar_loaded true *return *if curr_weapon = "M4 carbine" *if ammo_556 = 0 You have no spare magazines for it. *gosub SwapWeapons *return *else You reload it with the ammo you're carrying. *set ammo_556 -1 *set m4_loaded true *return *if curr_weapon = "M9 pistol" *if ammo_9mm = 0 You have no spare magazines for it. *gosub SwapWeapons *return *else You reload it with the ammo you're carrying. *set ammo_9mm -1 *set m9_loaded true *return *if curr_weapon = "M16" *if ammo_556 = 0 You have no spare magazines for it. *gosub SwapWeapons *return *else You reload it with the ammo you're carrying. *set ammo_556 -1 *set m16_loaded true *return *if curr_weapon = "pistol" *if ammo_45 = 0 You have no spare magazines for it. *gosub SwapWeapons *return *else You reload it with the ammo you're carrying. *set ammo_45 -1 *set pistol_loaded true *return *if curr_weapon = "rifle" *if ammo_3030 = 0 You have no spare magazines for it. *gosub SwapWeapons *return *else You reload it with the ammo you're carrying. *set ammo_3030 -1 *set rifle_loaded true *return *if curr_weapon = "sawed-off" *if ammo_shells = 0 You have no spare ammo for it. *gosub SwapWeapons *return *else You reload it with the ammo you're carrying. *set ammo_shells -1 *set sawed_off_loaded true *return *if curr_weapon = "shotgun" *if ammo_shells = 0 You have no spare ammo for it. *gosub SwapWeapons *return *else You reload it with the ammo you're carrying. *set ammo_shells -1 *set shotgun_loaded true *return *if curr_weapon = "MP5" *if ammo_9mm = 0 You have no spare magazines for it. *gosub SwapWeapons *return *else You reload it with the ammo you're carrying. *set ammo_9mm -1 *set smg_loaded true *return *if curr_weapon = "sniper rifle" *if ammo_308 = 0 You have no spare magazines for it. *gosub SwapWeapons *return *else You reload it with the ammo you're carrying. *set ammo_308 -1 *set sniper_rifle_loaded true *return *if curr_weapon = "tactical_shotgun" *if ammo_shells = 0 You have no spare ammo for it. *gosub SwapWeapons *return *else You reload it with the ammo you're carrying. *set ammo_shells -1 *set tactical_shotgun_loaded true *return *if curr_weapon = "Springfield rifle" *if ammo_3006 = 0 You have no spare magazines for it. *gosub SwapWeapons *return *else You reload it with the ammo you're carrying. *set ammo_3006 -1 *set springfield_loaded true *return *label CheckPrimaryLoaded *if (p_weapon = ".38 Special") and revolver_loaded *set weapon_loaded true *if (p_weapon = "AK-47") and ak47_loaded *set weapon_loaded true *if (p_weapon = "AR-15") and ar15_loaded *set weapon_loaded true *if (p_weapon = "Arsenal AK") and arsenal_loaded *set weapon_loaded true *if (p_weapon = "chrome-plated rifle") and chrome_plated_rifle_loaded *set weapon_loaded true *if (p_weapon = "Colt Python") and colt_loaded *set weapon_loaded true *if (p_weapon = "compound bow") and bow_loaded *set weapon_loaded true *if (p_weapon = "recurve bow") and recurve_bow_loaded *set weapon_loaded true *if (p_weapon = "crossbow") and crossbow_loaded *set weapon_loaded true *if (p_weapon = "Desert Eagle") and desert_eagle_loaded *set weapon_loaded true *if (p_weapon = "Glock") and glock_loaded *set weapon_loaded true *if (p_weapon = "M4 carbine") and m4_loaded *set weapon_loaded true *if (p_weapon = "SKS carbine") and sks_loaded *set weapon_loaded true *if (p_weapon = "Light assault rifle") and manns_lar_loaded *set weapon_loaded true *if (p_weapon = "M9 pistol") and m9_loaded *set weapon_loaded true *if (p_weapon = "M16") and m16_loaded *set weapon_loaded true *if (p_weapon = "MP5") and smg_loaded *set weapon_loaded true *if (p_weapon = "sniper_rifle") and sniper_rifle_loaded *set weapon_loaded true *if (p_weapon = "shotgun") and shotgun_loaded *set weapon_loaded true *if (p_weapon = "sawed-off") and sawed_off_loaded *set weapon_loaded true *if (p_weapon = "Springfield rifle") and springfield_loaded *set weapon_loaded true *if (p_weapon = "tactical_shotgun") and tactical_shotgun_loaded *set weapon_loaded true *return *label CheckSecondaryLoaded *if (s_weapon = ".38 Special") and revolver_loaded *set weapon_loaded true *if (s_weapon = "AK-47") and ak47_loaded *set weapon_loaded true *if (s_weapon = "AR-15") and ar15_loaded *set weapon_loaded true *if (s_weapon = "Arsenal AK") and arsenal_loaded *set weapon_loaded true *if (s_weapon = "chrome-plated rifle") and chrome_plated_rifle_loaded *set weapon_loaded true *if (s_weapon = "Colt Python") and colt_loaded *set weapon_loaded true *if (s_weapon = "recurve bow") and recurve_bow_loaded *set weapon_loaded true *if (s_weapon = "compound bow") and bow_loaded *set weapon_loaded true *if (s_weapon = "crossbow") and crossbow_loaded *set weapon_loaded true *if (s_weapon = "Desert Eagle") and desert_eagle_loaded *set weapon_loaded true *if (s_weapon = "Glock") and glock_loaded *set weapon_loaded true *if (s_weapon = "Light assault rifle") and manns_lar_loaded *set weapon_loaded true *if (s_weapon = "SKs carbine") and sks_loaded *set weapon_loaded true *if (s_weapon = "M4 carbine") and m4_loaded *set weapon_loaded true *if (s_weapon = "M9 pistol") and m9_loaded *set weapon_loaded true *if (s_weapon = "M16") and m16_loaded *set weapon_loaded true *if (s_weapon = "MP5") and smg_loaded *set weapon_loaded true *if (s_weapon = "sniper_rifle") and sniper_rifle_loaded *set weapon_loaded true *if (s_weapon = "shotgun") and shotgun_loaded *set weapon_loaded true *if (s_weapon = "sawed-off") and sawed_off_loaded *set weapon_loaded true *if (s_weapon = "Springfield rifle") and springfield_loaded *set weapon_loaded true *if (s_weapon = "tactical_shotgun") and tactical_shotgun_loaded *set weapon_loaded true *return *label SwapWeapons *set weapon_loaded false *gosub_scene LoadWeapons *if curr_weapon = p_weapon *gosub CheckSecondaryLoaded *if weapon_loaded or (s_type != "ranged") You switch to your ${s_weapon}. *set p_weapon "hands" *set p_mod 0 *set p_weaponmode "strike" *set p_range 0 *set p_class "fist" *set p_type "other" *set p_ammo "" *set p_arrow "" *set p_lethal true *set p_ammo_num 0 *gosub UseSecondary *return *else Unfortunately, your ${s_weapon} is also out of ammunition. You are forced to use your bare hands. *set s_weapon "hands" *set s_mod 0 *set s_weaponmode "strike" *set s_range 0 *set s_class "fist" *set s_type "other" *set s_ammo "" *set s_arrow "" *set s_lethal true *set s_ammo_num 0 *set p_weapon s_weapon *set p_mod s_mod *set p_weaponmode s_weaponmode *set p_range s_range *set p_class s_class *set p_type s_type *set p_ammo s_ammo *set p_arrow s_arrow *set p_lethal s_lethal *set p_ammo_num s_ammo_num *set curr_weapon s_weapon *set curr_mod s_mod *set curr_class s_class *set curr_weaponmode s_weaponmode *set curr_range s_range *set curr_type s_type *set curr_ammo s_ammo *set curr_arrow s_arrow *set curr_lethal s_lethal *set curr_ammo_num s_ammo_num *set curr_suppressor s_suppressor *set curr_scope s_scope *set curr_lethal s_lethal *return *else *if weapon_loaded or (p_type != "ranged") You switch to your ${p_weapon}. *set s_weapon "hands" *set s_mod 0 *set s_weaponmode "strike" *set s_range 0 *set s_class "fist" *set s_type "other" *set s_ammo "" *set s_arrow "" *set s_lethal true *set s_ammo_num 0 *gosub UsePrimary *return *else Unfortunately, your ${p_weapon} is also out of ammunition. You are forced to use your bare hands. *set p_weapon "hands" *set p_mod 0 *set p_weaponmode "strike" *set p_range 0 *set p_class "fist" *set p_type "other" *set p_ammo "" *set p_arrow "" *set p_lethal true *set p_ammo_num 0 *set s_weapon p_weapon *set s_mod p_mod *set s_weaponmode p_weaponmode *set s_range p_range *set s_class p_class *set s_type p_type *set s_ammo p_ammo *set s_arrow p_arrow *set s_lethal p_lethal *set s_ammo_num p_ammo_num *set curr_weapon p_weapon *set curr_mod p_mod *set curr_class p_class *set curr_weaponmode p_weaponmode *set curr_range p_range *set curr_type p_type *set curr_ammo p_ammo *set curr_arrow p_arrow *set curr_lethal p_lethal *set curr_ammo_num p_ammo_num *set curr_suppressor p_suppressor *set curr_scope p_scope *set curr_lethal p_lethal *return