/********************************************************* ***************** Dumped by aerosoul94 ******************* *********************************************************/ { menuDef { name "popup_secondary_attachments_bling" rect -64 0 854 244 1 1 popup outOfBoundsClick style 1 forecolor 1 1 1 1 backcolor 1 1 1 1 background "white" focuscolor 1 1 1 1 fadeCycle 1 fadeClamp 1 fadeAmount 0.1 allowedBinding "+talk" visible when ( localvarint( "ui_tabDepth" ) == localvarint( "ui_popup_secondary_attachments_bling_tabDepth" ) ) exp rect y ( localvarfloat( "ui_popupYPos" ) + localvarint( "ui_tabDepth" ) * 20 ) execKey 168 { if ( localvarstring( "ui_selected_ref" ) != "none" && !isitemunlocked( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) + " " + localvarstring( "ui_selected_ref" ) ) ) { open "menu_challenge_detail_popup"; } } execKeyInt 167 { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 , "none" ); setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 , "none" ); setLocalVarString "ui_attachment1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "ui_attachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); setLocalVarInt "ui_numAttachments" ( 0 ); if ( localvarstring( "ui_attachment1" ) != "none" ) { setLocalVarInt "ui_numAttachments" ( localvarint( "ui_numAttachments" ) + 1 ); } if ( localvarstring( "ui_attachment2" ) != "none" ) { setLocalVarInt "ui_numAttachments" ( localvarint( "ui_numAttachments" ) + 1 ); } } onOpen { focusfirst; setLocalVarInt "ui_tabDepth" ( localvarint( "ui_tabDepth" ) + 1 ); setLocalVarInt "ui_popup_secondary_attachments_bling_tabDepth" ( localvarint( "ui_tabDepth" ) ); setLocalVarString "ui_attachment1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "ui_attachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); setLocalVarInt "ui_numAttachments" ( 0 ); if ( localvarstring( "ui_attachment1" ) != "none" ) { setLocalVarInt "ui_numAttachments" ( localvarint( "ui_numAttachments" ) + 1 ); } if ( localvarstring( "ui_attachment2" ) != "none" ) { setLocalVarInt "ui_numAttachments" ( localvarint( "ui_numAttachments" ) + 1 ); } focusfirst; } onRequestClose { setLocalVarInt "ui_tabDepth" ( localvarint( "ui_tabDepth" ) - 1 ); } onEsc { close self; } itemDef { rect -918 -480 1708 960 1 1 decoration visible 1 style 1 forecolor 1 1 1 1 backcolor 0 0 0 0.35 background "white" textscale 0.55 visible when ( !localvarint( "ui_centerPopup" ) ) } itemDef { rect -918 -480 1708 960 1 1 decoration visible 1 style 1 forecolor 1 1 1 1 backcolor 1 1 1 1 background "xpbar_stencilbase" textscale 0.55 } itemDef { rect -64 0 854 244 1 1 decoration visible 1 style 1 forecolor 1 1 1 1 backcolor 0.5 0.5 0.5 1 background "white" textscale 0.55 } itemDef { rect -64 0 1708 480 1 1 decoration visible 1 style 3 forecolor 1 1 1 0.75 background "mw2_popup_bg_fogstencil" textscale 0.55 exp rect x ( 0 - ( ( float( milliseconds( ) % 60000 ) / 60000 ) * ( 854 ) ) ) } itemDef { rect -64 0 -1708 -480 1 1 decoration visible 1 style 3 forecolor 0.85 0.85 0.85 1 background "mw2_popup_bg_fogscroll" textscale 0.55 exp rect x ( 0 - ( ( float( milliseconds( ) % 60000 ) / 60000 ) * ( 854 ) ) ) } itemDef { rect -64 0 854 0 1 1 decoration visible 1 style 3 forecolor 1 1 1 1 background "mockup_popup_bg_stencilfill" textscale 0.55 exp rect h ( ( 24 + 11 * 20 ) ) } itemDef { rect -64 0 -1708 -480 1 1 decoration visible 1 style 3 forecolor 1 1 1 0.75 background "mw2_popup_bg_fogstencil" textscale 0.55 exp rect x ( ( - 854 ) + ( ( float( milliseconds( ) % 50000 ) / 50000 ) * ( 854 ) ) ) } itemDef { rect -64 0 -1708 -480 1 1 decoration visible 1 style 3 forecolor 0.85 0.85 0.85 1 background "mw2_popup_bg_fogscroll" textscale 0.55 exp rect x ( ( - 854 ) + ( ( float( milliseconds( ) % 50000 ) / 50000 ) * ( 854 ) ) ) } itemDef { rect -64 0 854 0 1 1 decoration visible 1 style 3 forecolor 1 1 1 0 background "small_box_lightfx" textscale 0.55 exp rect h ( ( 24 + 11 * 20 ) ) } itemDef { rect -96 -32 32 32 1 1 decoration visible 1 style 3 forecolor 0 0 0 1 background "drop_shadow_tl" textscale 0.55 visible when ( !localvarint( "ui_centerPopup" ) ) } itemDef { rect -64 -32 854 32 1 1 decoration visible 1 style 3 forecolor 0 0 0 1 background "drop_shadow_t" textscale 0.55 visible when ( !localvarint( "ui_centerPopup" ) ) } itemDef { rect 790 -32 32 32 1 1 decoration visible 1 style 3 forecolor 0 0 0 1 background "drop_shadow_tr" textscale 0.55 visible when ( !localvarint( "ui_centerPopup" ) ) } itemDef { rect 790 0 32 0 1 1 decoration visible 1 style 3 forecolor 0 0 0 1 background "drop_shadow_r" textscale 0.55 exp rect h ( ( 24 + 11 * 20 ) ) visible when ( !localvarint( "ui_centerPopup" ) ) } itemDef { rect 790 0 32 32 1 1 decoration visible 1 style 3 forecolor 0 0 0 1 background "drop_shadow_br" textscale 0.55 exp rect y ( ( 0 - 0 ) + ( ( 24 + 11 * 20 ) ) ) visible when ( !localvarint( "ui_centerPopup" ) ) } itemDef { rect -64 0 854 32 1 1 decoration visible 1 style 3 forecolor 0 0 0 1 background "drop_shadow_b" textscale 0.55 exp rect y ( ( 0 - 0 ) + ( ( 24 + 11 * 20 ) ) ) visible when ( !localvarint( "ui_centerPopup" ) ) } itemDef { rect -96 0 32 32 1 1 decoration visible 1 style 3 forecolor 0 0 0 1 background "drop_shadow_bl" textscale 0.55 exp rect y ( ( 0 - 0 ) + ( ( 24 + 11 * 20 ) ) ) visible when ( !localvarint( "ui_centerPopup" ) ) } itemDef { rect -96 0 32 0 1 1 decoration visible 1 style 3 forecolor 0 0 0 1 background "drop_shadow_l" textscale 0.55 exp rect h ( ( 24 + 11 * 20 ) ) visible when ( !localvarint( "ui_centerPopup" ) ) } itemDef { rect -64 0 280 244 1 1 decoration visible 1 style 1 forecolor 1 1 1 1 backcolor 1 1 1 0 background "gradient_fadein" textscale 0.55 } itemDef { rect -64 0 280 20 1 1 decoration visible 1 style 1 forecolor 1 1 1 1 backcolor 0.25 0.25 0.25 1 background "white" textscale 0.55 exp rect y ( - 20 - ( ( localvarint( "ui_tabDepth" ) - 1 ) * 20 ) ) visible when ( localvarint( "ui_tabDepth" ) > ( 1 - 1 ) ) } itemDef { rect -64 0 280 20 1 1 decoration visible 1 style 1 forecolor 1 1 1 1 backcolor 0 0 0 1 background "gradient_fadein" textfont 9 textalign 4 textalignx 68 textscale 0.375 exp rect y ( - 20 - ( ( localvarint( "ui_tabDepth" ) - 1 ) * 20 ) ) exp forecolor r ( 1 - ( ( localvarint( "ui_tabDepth" ) > 1 ) * 0.35 ) ) exp forecolor g ( 1 - ( ( localvarint( "ui_tabDepth" ) > 1 ) * 0.35 ) ) exp forecolor b ( 1 - ( ( localvarint( "ui_tabDepth" ) > 1 ) * 0.35 ) ) visible when ( localvarint( "ui_tabDepth" ) > ( 1 - 1 ) ) exp text ( localvarstring( "ui_tab1Name" ) ) } itemDef { rect -64 0 280 20 1 1 decoration visible 1 style 1 forecolor 1 1 1 1 backcolor 0.25 0.25 0.25 1 background "white" textscale 0.55 exp rect y ( - 20 - ( ( localvarint( "ui_tabDepth" ) - 2 ) * 20 ) ) visible when ( localvarint( "ui_tabDepth" ) > ( 2 - 1 ) ) } itemDef { rect -64 0 280 20 1 1 decoration visible 1 style 1 forecolor 1 1 1 1 backcolor 0 0 0 1 background "gradient_fadein" textfont 9 textalign 4 textalignx 68 textscale 0.375 exp rect y ( - 20 - ( ( localvarint( "ui_tabDepth" ) - 2 ) * 20 ) ) exp forecolor r ( 1 - ( ( localvarint( "ui_tabDepth" ) > 2 ) * 0.35 ) ) exp forecolor g ( 1 - ( ( localvarint( "ui_tabDepth" ) > 2 ) * 0.35 ) ) exp forecolor b ( 1 - ( ( localvarint( "ui_tabDepth" ) > 2 ) * 0.35 ) ) visible when ( localvarint( "ui_tabDepth" ) > ( 2 - 1 ) ) exp text ( localvarstring( "ui_tab2Name" ) ) } itemDef { rect -64 0 280 20 1 1 decoration visible 1 style 1 forecolor 1 1 1 1 backcolor 0.25 0.25 0.25 1 background "white" textscale 0.55 exp rect y ( - 20 - ( ( localvarint( "ui_tabDepth" ) - 3 ) * 20 ) ) visible when ( localvarint( "ui_tabDepth" ) > ( 3 - 1 ) ) } itemDef { rect -64 0 280 20 1 1 decoration visible 1 style 1 forecolor 1 1 1 1 backcolor 0 0 0 1 background "gradient_fadein" textfont 9 textalign 4 textalignx 68 textscale 0.375 exp rect y ( - 20 - ( ( localvarint( "ui_tabDepth" ) - 3 ) * 20 ) ) exp forecolor r ( 1 - ( ( localvarint( "ui_tabDepth" ) > 3 ) * 0.35 ) ) exp forecolor g ( 1 - ( ( localvarint( "ui_tabDepth" ) > 3 ) * 0.35 ) ) exp forecolor b ( 1 - ( ( localvarint( "ui_tabDepth" ) > 3 ) * 0.35 ) ) visible when ( localvarint( "ui_tabDepth" ) > ( 3 - 1 ) ) exp text ( localvarstring( "ui_tab3Name" ) ) } itemDef { rect -64 0 280 20 1 1 decoration visible 1 style 1 forecolor 1 1 1 1 backcolor 0.25 0.25 0.25 1 background "white" textscale 0.55 exp rect y ( - 20 - ( ( localvarint( "ui_tabDepth" ) - 4 ) * 20 ) ) visible when ( localvarint( "ui_tabDepth" ) > ( 4 - 1 ) ) } itemDef { rect -64 0 280 20 1 1 decoration visible 1 style 1 forecolor 1 1 1 1 backcolor 0 0 0 1 background "gradient_fadein" textfont 9 textalign 4 textalignx 68 textscale 0.375 exp rect y ( - 20 - ( ( localvarint( "ui_tabDepth" ) - 4 ) * 20 ) ) exp forecolor r ( 1 - ( ( localvarint( "ui_tabDepth" ) > 4 ) * 0.35 ) ) exp forecolor g ( 1 - ( ( localvarint( "ui_tabDepth" ) > 4 ) * 0.35 ) ) exp forecolor b ( 1 - ( ( localvarint( "ui_tabDepth" ) > 4 ) * 0.35 ) ) visible when ( localvarint( "ui_tabDepth" ) > ( 4 - 1 ) ) exp text ( localvarstring( "ui_tab4Name" ) ) } itemDef { rect -64 0 280 20 1 1 decoration visible 1 style 1 forecolor 1 1 1 1 backcolor 0.25 0.25 0.25 1 background "white" textscale 0.55 exp rect y ( - 20 - ( ( localvarint( "ui_tabDepth" ) - 5 ) * 20 ) ) visible when ( localvarint( "ui_tabDepth" ) > ( 5 - 1 ) ) } itemDef { rect -64 0 280 20 1 1 decoration visible 1 style 1 forecolor 1 1 1 1 backcolor 0 0 0 1 background "gradient_fadein" textfont 9 textalign 4 textalignx 68 textscale 0.375 exp rect y ( - 20 - ( ( localvarint( "ui_tabDepth" ) - 5 ) * 20 ) ) exp forecolor r ( 1 - ( ( localvarint( "ui_tabDepth" ) > 5 ) * 0.35 ) ) exp forecolor g ( 1 - ( ( localvarint( "ui_tabDepth" ) > 5 ) * 0.35 ) ) exp forecolor b ( 1 - ( ( localvarint( "ui_tabDepth" ) > 5 ) * 0.35 ) ) visible when ( localvarint( "ui_tabDepth" ) > ( 5 - 1 ) ) exp text ( localvarstring( "ui_tab5Name" ) ) } itemDef { name "cac_attachment_done" rect -64 4 336 20 1 1 visible 1 group "mw2_popup_button" style 1 forecolor 1 1 1 1 disablecolor 0.6 0.55 0.55 1 background "popup_button_selection_bar_short" type 1 textfont 3 textalign 4 textalignx 68 textscale 0.375 visible when ( 1 ) exp text ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , "done" , 3 ) ) action { play "mouse_click"; if ( localvarint( "ui_tabDepth" ) == 0 ) { setLocalVarString "ui_tab1Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 1 ) { setLocalVarString "ui_tab2Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 2 ) { setLocalVarString "ui_tab3Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 3 ) { setLocalVarString "ui_tab4Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 4 ) { setLocalVarString "ui_tab5Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 5 ) { setLocalVarString "ui_tab6Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } close "popup_cac_weapon_primary"; close "popup_primary_attachments" close "popup_secondary_attachments" close "popup_cac_weapon_secondary"; close "popup_cac_handgun_secondary"; close "popup_cac_machinePistols_secondary"; close "popup_cac_assault_primary"; close "popup_cac_SMG_primary"; close "popup_cac_LMG_primary"; close "popup_cac_sniper_primary"; close "popup_cac_shotgun_primary"; close "popup_cac_assault_secondary"; close "popup_cac_SMG_secondary"; close "popup_cac_LMG_secondary"; close "popup_cac_sniper_secondary"; close "popup_cac_shotgun_secondary"; close "popup_cac_template"; close "popup_cac_primary_camo"; close "popup_cac_secondary_camo"; close "popup_cac_bling"; close "popup_cac_perk2"; close "popup_cac_rocket_secondary"; close "popup_primary_attachments_bling"; close "popup_secondary_attachments_bling"; close "popup_cac_other_primary"; if ( !( tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) , 12 ) != "" || tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) , 12 ) != "" ) && ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_gl" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_grip" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_shotgun" ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_heartbeat" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "perks" , 0 , "specialty_null" ); } setLocalVarString "loadoutPrimary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "weapon" ) ); setLocalVarString "loadoutPrimaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) ); setLocalVarString "loadoutPrimaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 1 ) ); if ( localvarstring( "loadoutPrimaryAttachment2" ) == "" ) { setLocalVarString "loadoutPrimaryAttachment2" ( "none" ); } setLocalVarString "loadoutPrimaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "camo" ) ); setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "loadoutSecondaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "loadoutSecondaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); if ( localvarstring( "loadoutSecondaryAttachment2" ) == "" ) { setLocalVarString "loadoutSecondaryAttachment2" ( "none" ); } setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutEquipment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) ); setLocalVarString "loadoutPerk1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) ); setLocalVarString "loadoutPerk2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 2 ) ); setLocalVarString "loadoutPerk3" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 3 ) ); setLocalVarString "loadoutStreak1" ( getplayerdata( "killstreaks" , 0 ) ); setLocalVarString "loadoutStreak2" ( getplayerdata( "killstreaks" , 1 ) ); setLocalVarString "loadoutStreak3" ( getplayerdata( "killstreaks" , 2 ) ); setLocalVarString "loadoutDeathStreak" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 4 ) ); setLocalVarString "loadoutOffhandSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "specialGrenade" ) ); setLocalVarString "loadoutClassName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "name" ) ); } onFocus { play "mouse_over"; if ( dvarstring( "gameMode" ) != "mp" ) { setItemColor "mw2_popup_button" backcolor 0 0 0 0; } setItemColor self backcolor 0 0 0 1; setLocalVarBool "ui_popupAButton" ( 1 ); setLocalVarString "ui_selected_ref" ( "" ); } leaveFocus { setItemColor self backcolor 1 1 1 0; setLocalVarBool "ui_popupAButton" ( 0 ); } } itemDef { rect -64 24 280 1 1 1 decoration visible 1 style 3 forecolor 1 1 1 0.65 background "gradient_fadein" textscale 0.55 } itemDef { rect -64 24 336 20 1 1 decoration visible 1 style 3 forecolor 0.8 0.6 0.1 1 background "popup_button_selected_bar_bling" textscale 0.55 visible when ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 11 ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 11 ) ) } itemDef { name "cac_attachment_0" rect -64 24 336 20 1 1 visible 1 group "mw2_popup_button" style 1 forecolor 1 1 1 1 disablecolor 0.6 0.55 0.55 1 background "popup_button_selection_bar_bling" type 1 textfont 3 textalign 4 textalignx 68 textscale 0.375 visible when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 11 ) != "" ) disabled when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 11 ) != "" && ( !isitemunlocked( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) + " " + ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 11 ) ) ) || ( !( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 11 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 11 ) ) && ( ( !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 11 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment1" ) ) ) != "no" ) || !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 11 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment2" ) ) ) != "no" ) || localvarint( "ui_numAttachments" ) == 2 ) ) ) ) ) exp text ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 11 ) , 3 ) ) action { play "mouse_click"; if ( localvarint( "ui_tabDepth" ) == 0 ) { setLocalVarString "ui_tab1Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 11 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 1 ) { setLocalVarString "ui_tab2Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 11 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 2 ) { setLocalVarString "ui_tab3Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 11 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 3 ) { setLocalVarString "ui_tab4Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 11 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 4 ) { setLocalVarString "ui_tab5Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 11 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 5 ) { setLocalVarString "ui_tab6Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 11 ) , 3 ) ); } setLocalVarString "tempName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setPlayerData( "attachmentNew" , "localVarString" ( "tempName" ) , "localVarString" ( "ui_selected_ref" ) , "false" ) ;; if ( menuisopen( "popup_primary_attachments_bling" ) || menuisopen( "popup_secondary_attachments_bling" ) ) { setLocalVarString "tempName" ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 11 ) ); if ( ( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 11 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 11 ) ) ) { setLocalVarInt "tempInt" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 11 ) ); setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , "localVarInt" ( "tempInt" ) , "none" ); } else { setLocalVarInt "tempInt" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) != "none" ); setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , "localVarInt" ( "tempInt" ) , "localVarString" ( "tempName" ) ); } setLocalVarString "ui_attachment1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "ui_attachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); setLocalVarInt "ui_numAttachments" ( 0 ); if ( localvarstring( "ui_attachment1" ) != "none" ) { setLocalVarInt "ui_numAttachments" ( localvarint( "ui_numAttachments" ) + 1 ); } if ( localvarstring( "ui_attachment2" ) != "none" ) { setLocalVarInt "ui_numAttachments" ( localvarint( "ui_numAttachments" ) + 1 ); } if ( !( tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) , 12 ) != "" || tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) , 12 ) != "" ) && ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_gl" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_grip" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_shotgun" ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_heartbeat" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "perks" , 0 , "specialty_null" ); } setLocalVarString "loadoutPrimary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "weapon" ) ); setLocalVarString "loadoutPrimaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) ); setLocalVarString "loadoutPrimaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 1 ) ); if ( localvarstring( "loadoutPrimaryAttachment2" ) == "" ) { setLocalVarString "loadoutPrimaryAttachment2" ( "none" ); } setLocalVarString "loadoutPrimaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "camo" ) ); setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "loadoutSecondaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "loadoutSecondaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); if ( localvarstring( "loadoutSecondaryAttachment2" ) == "" ) { setLocalVarString "loadoutSecondaryAttachment2" ( "none" ); } setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutEquipment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) ); setLocalVarString "loadoutPerk1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) ); setLocalVarString "loadoutPerk2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 2 ) ); setLocalVarString "loadoutPerk3" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 3 ) ); setLocalVarString "loadoutStreak1" ( getplayerdata( "killstreaks" , 0 ) ); setLocalVarString "loadoutStreak2" ( getplayerdata( "killstreaks" , 1 ) ); setLocalVarString "loadoutStreak3" ( getplayerdata( "killstreaks" , 2 ) ); setLocalVarString "loadoutDeathStreak" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 4 ) ); setLocalVarString "loadoutOffhandSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "specialGrenade" ) ); setLocalVarString "loadoutClassName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "name" ) ); if ( ( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 11 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 11 ) ) ) { setItemColor self backcolor 0 0 0 "0.35"; } else { setItemColor self backcolor 0 0 0 1; } if ( localvarint( "ui_numAttachments" ) == 2 ) { if ( 1 == 0 ) { if ( localvarint( "ui_tabDepth" ) == 0 ) { setLocalVarString "ui_tab1Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 1 ) { setLocalVarString "ui_tab2Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 2 ) { setLocalVarString "ui_tab3Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 3 ) { setLocalVarString "ui_tab4Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 4 ) { setLocalVarString "ui_tab5Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 5 ) { setLocalVarString "ui_tab6Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } open "popup_cac_primary_camo"; } else { close "popup_cac_weapon_primary"; close "popup_primary_attachments" close "popup_secondary_attachments" close "popup_cac_weapon_secondary"; close "popup_cac_handgun_secondary"; close "popup_cac_machinePistols_secondary"; close "popup_cac_assault_primary"; close "popup_cac_SMG_primary"; close "popup_cac_LMG_primary"; close "popup_cac_sniper_primary"; close "popup_cac_shotgun_primary"; close "popup_cac_assault_secondary"; close "popup_cac_SMG_secondary"; close "popup_cac_LMG_secondary"; close "popup_cac_sniper_secondary"; close "popup_cac_shotgun_secondary"; close "popup_cac_template"; close "popup_cac_primary_camo"; close "popup_cac_secondary_camo"; close "popup_cac_bling"; close "popup_cac_perk2"; close "popup_cac_rocket_secondary"; close "popup_primary_attachments_bling"; close "popup_secondary_attachments_bling"; close "popup_cac_other_primary"; } if ( !( tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) , 12 ) != "" || tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) , 12 ) != "" ) && ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_gl" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_grip" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_shotgun" ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_heartbeat" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "perks" , 0 , "specialty_null" ); } setLocalVarString "loadoutPrimary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "weapon" ) ); setLocalVarString "loadoutPrimaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) ); setLocalVarString "loadoutPrimaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 1 ) ); if ( localvarstring( "loadoutPrimaryAttachment2" ) == "" ) { setLocalVarString "loadoutPrimaryAttachment2" ( "none" ); } setLocalVarString "loadoutPrimaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "camo" ) ); setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "loadoutSecondaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "loadoutSecondaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); if ( localvarstring( "loadoutSecondaryAttachment2" ) == "" ) { setLocalVarString "loadoutSecondaryAttachment2" ( "none" ); } setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutEquipment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) ); setLocalVarString "loadoutPerk1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) ); setLocalVarString "loadoutPerk2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 2 ) ); setLocalVarString "loadoutPerk3" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 3 ) ); setLocalVarString "loadoutStreak1" ( getplayerdata( "killstreaks" , 0 ) ); setLocalVarString "loadoutStreak2" ( getplayerdata( "killstreaks" , 1 ) ); setLocalVarString "loadoutStreak3" ( getplayerdata( "killstreaks" , 2 ) ); setLocalVarString "loadoutDeathStreak" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 4 ) ); setLocalVarString "loadoutOffhandSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "specialGrenade" ) ); setLocalVarString "loadoutClassName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "name" ) ); } } else { if ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) == "specialty_bling" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 , "none" ) ;; } if ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) == "specialty_bling" && getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 11 ) ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 , "none" ) ;; } setLocalVarString "tempName" ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 11 ) ); setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 , "localVarString" ( "tempName" ) ); if ( 1 == 0 ) { open "popup_cac_primary_camo"; } else { close "popup_cac_weapon_primary"; close "popup_primary_attachments" close "popup_secondary_attachments" close "popup_cac_weapon_secondary"; close "popup_cac_handgun_secondary"; close "popup_cac_machinePistols_secondary"; close "popup_cac_assault_primary"; close "popup_cac_SMG_primary"; close "popup_cac_LMG_primary"; close "popup_cac_sniper_primary"; close "popup_cac_shotgun_primary"; close "popup_cac_assault_secondary"; close "popup_cac_SMG_secondary"; close "popup_cac_LMG_secondary"; close "popup_cac_sniper_secondary"; close "popup_cac_shotgun_secondary"; close "popup_cac_template"; close "popup_cac_primary_camo"; close "popup_cac_secondary_camo"; close "popup_cac_bling"; close "popup_cac_perk2"; close "popup_cac_rocket_secondary"; close "popup_primary_attachments_bling"; close "popup_secondary_attachments_bling"; close "popup_cac_other_primary"; } if ( !( tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) , 12 ) != "" || tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) , 12 ) != "" ) && ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_gl" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_grip" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_shotgun" ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_heartbeat" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "perks" , 0 , "specialty_null" ); } setLocalVarString "loadoutPrimary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "weapon" ) ); setLocalVarString "loadoutPrimaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) ); setLocalVarString "loadoutPrimaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 1 ) ); if ( localvarstring( "loadoutPrimaryAttachment2" ) == "" ) { setLocalVarString "loadoutPrimaryAttachment2" ( "none" ); } setLocalVarString "loadoutPrimaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "camo" ) ); setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "loadoutSecondaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "loadoutSecondaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); if ( localvarstring( "loadoutSecondaryAttachment2" ) == "" ) { setLocalVarString "loadoutSecondaryAttachment2" ( "none" ); } setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutEquipment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) ); setLocalVarString "loadoutPerk1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) ); setLocalVarString "loadoutPerk2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 2 ) ); setLocalVarString "loadoutPerk3" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 3 ) ); setLocalVarString "loadoutStreak1" ( getplayerdata( "killstreaks" , 0 ) ); setLocalVarString "loadoutStreak2" ( getplayerdata( "killstreaks" , 1 ) ); setLocalVarString "loadoutStreak3" ( getplayerdata( "killstreaks" , 2 ) ); setLocalVarString "loadoutDeathStreak" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 4 ) ); setLocalVarString "loadoutOffhandSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "specialGrenade" ) ); setLocalVarString "loadoutClassName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "name" ) ); } } onFocus { play "mouse_over"; if ( dvarstring( "gameMode" ) != "mp" ) { setItemColor "mw2_popup_button" backcolor 0 0 0 0; } setItemColor self backcolor 0 0 0 1; setLocalVarBool "ui_popupAButton" ( 1 ); setLocalVarString "ui_attachment_hint" ( "" ); setLocalVarString "ui_selected_ref" ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 11 ) ); setLocalVarString "ui_weapon_ref" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "ui_unlock_ref" ( localvarstring( "ui_weapon_ref" ) + " " + tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 11 ) ); setLocalVarString "ui_challenge_ref" ( tablelookup( "mp/unlockTable.csv" , 0 , localvarstring( "ui_unlock_ref" ) , 3 ) ); setLocalVarInt "ui_challenge_state" ( 1 ); if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_2" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 2 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_3" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 3 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_4" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 4 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_5" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 5 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_6" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 6 ); } if ( ( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 11 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 11 ) ) ) { setItemColor self backcolor 0 0 0 "0.35"; } else { if ( !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 11 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment1" ) ) ) != "no" ) ) { setLocalVarString "ui_attachment_hint" ( localvarstring( "ui_attachment1" ) ); } if ( !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 11 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment2" ) ) ) != "no" ) ) { setLocalVarString "ui_attachment_hint" ( localvarstring( "ui_attachment2" ) ); } } } leaveFocus { setItemColor self backcolor 1 1 1 0; setLocalVarBool "ui_popupAButton" ( 0 ); setLocalVarString "tempName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); if ( localvarstring( "ui_selected_ref" ) != "" ) { setPlayerData( "attachmentNew" , "localVarString" ( "tempName" ) , "localVarString" ( "ui_selected_ref" ) , "false" ) ;; } } } itemDef { rect 162 24 40 20 1 1 decoration visible 1 style 3 forecolor 1 1 1 1 background "specialty_new" textscale 0.55 exp forecolor a ( 1 * getplayerdata( "attachmentNew" , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 11 ) ) ) visible when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 11 ) != "" ) } itemDef { rect 162 24 40 20 1 1 decoration visible 1 style 3 forecolor 1 1 1 1 background "specialty_locked" textscale 0.55 visible when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 11 ) != "" && isitemunlocked( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) + " " + tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 11 ) ) == 0 ) } itemDef { rect -64 44 336 20 1 1 decoration visible 1 style 3 forecolor 0.8 0.6 0.1 1 background "popup_button_selected_bar_bling" textscale 0.55 visible when ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 12 ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 12 ) ) } itemDef { name "cac_attachment_1" rect -64 44 336 20 1 1 visible 1 group "mw2_popup_button" style 1 forecolor 1 1 1 1 disablecolor 0.6 0.55 0.55 1 background "popup_button_selection_bar_bling" type 1 textfont 3 textalign 4 textalignx 68 textscale 0.375 visible when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 12 ) != "" ) disabled when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 12 ) != "" && ( !isitemunlocked( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) + " " + ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 12 ) ) ) || ( !( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 12 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 12 ) ) && ( ( !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 12 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment1" ) ) ) != "no" ) || !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 12 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment2" ) ) ) != "no" ) || localvarint( "ui_numAttachments" ) == 2 ) ) ) ) ) exp text ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 12 ) , 3 ) ) action { play "mouse_click"; if ( localvarint( "ui_tabDepth" ) == 0 ) { setLocalVarString "ui_tab1Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 12 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 1 ) { setLocalVarString "ui_tab2Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 12 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 2 ) { setLocalVarString "ui_tab3Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 12 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 3 ) { setLocalVarString "ui_tab4Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 12 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 4 ) { setLocalVarString "ui_tab5Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 12 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 5 ) { setLocalVarString "ui_tab6Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 12 ) , 3 ) ); } setLocalVarString "tempName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setPlayerData( "attachmentNew" , "localVarString" ( "tempName" ) , "localVarString" ( "ui_selected_ref" ) , "false" ) ;; if ( menuisopen( "popup_primary_attachments_bling" ) || menuisopen( "popup_secondary_attachments_bling" ) ) { setLocalVarString "tempName" ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 12 ) ); if ( ( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 12 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 12 ) ) ) { setLocalVarInt "tempInt" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 12 ) ); setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , "localVarInt" ( "tempInt" ) , "none" ); } else { setLocalVarInt "tempInt" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) != "none" ); setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , "localVarInt" ( "tempInt" ) , "localVarString" ( "tempName" ) ); } setLocalVarString "ui_attachment1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "ui_attachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); setLocalVarInt "ui_numAttachments" ( 0 ); if ( localvarstring( "ui_attachment1" ) != "none" ) { setLocalVarInt "ui_numAttachments" ( localvarint( "ui_numAttachments" ) + 1 ); } if ( localvarstring( "ui_attachment2" ) != "none" ) { setLocalVarInt "ui_numAttachments" ( localvarint( "ui_numAttachments" ) + 1 ); } if ( !( tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) , 12 ) != "" || tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) , 12 ) != "" ) && ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_gl" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_grip" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_shotgun" ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_heartbeat" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "perks" , 0 , "specialty_null" ); } setLocalVarString "loadoutPrimary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "weapon" ) ); setLocalVarString "loadoutPrimaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) ); setLocalVarString "loadoutPrimaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 1 ) ); if ( localvarstring( "loadoutPrimaryAttachment2" ) == "" ) { setLocalVarString "loadoutPrimaryAttachment2" ( "none" ); } setLocalVarString "loadoutPrimaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "camo" ) ); setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "loadoutSecondaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "loadoutSecondaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); if ( localvarstring( "loadoutSecondaryAttachment2" ) == "" ) { setLocalVarString "loadoutSecondaryAttachment2" ( "none" ); } setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutEquipment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) ); setLocalVarString "loadoutPerk1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) ); setLocalVarString "loadoutPerk2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 2 ) ); setLocalVarString "loadoutPerk3" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 3 ) ); setLocalVarString "loadoutStreak1" ( getplayerdata( "killstreaks" , 0 ) ); setLocalVarString "loadoutStreak2" ( getplayerdata( "killstreaks" , 1 ) ); setLocalVarString "loadoutStreak3" ( getplayerdata( "killstreaks" , 2 ) ); setLocalVarString "loadoutDeathStreak" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 4 ) ); setLocalVarString "loadoutOffhandSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "specialGrenade" ) ); setLocalVarString "loadoutClassName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "name" ) ); if ( ( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 12 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 12 ) ) ) { setItemColor self backcolor 0 0 0 "0.35"; } else { setItemColor self backcolor 0 0 0 1; } if ( localvarint( "ui_numAttachments" ) == 2 ) { if ( 1 == 0 ) { if ( localvarint( "ui_tabDepth" ) == 0 ) { setLocalVarString "ui_tab1Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 1 ) { setLocalVarString "ui_tab2Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 2 ) { setLocalVarString "ui_tab3Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 3 ) { setLocalVarString "ui_tab4Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 4 ) { setLocalVarString "ui_tab5Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 5 ) { setLocalVarString "ui_tab6Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } open "popup_cac_primary_camo"; } else { close "popup_cac_weapon_primary"; close "popup_primary_attachments" close "popup_secondary_attachments" close "popup_cac_weapon_secondary"; close "popup_cac_handgun_secondary"; close "popup_cac_machinePistols_secondary"; close "popup_cac_assault_primary"; close "popup_cac_SMG_primary"; close "popup_cac_LMG_primary"; close "popup_cac_sniper_primary"; close "popup_cac_shotgun_primary"; close "popup_cac_assault_secondary"; close "popup_cac_SMG_secondary"; close "popup_cac_LMG_secondary"; close "popup_cac_sniper_secondary"; close "popup_cac_shotgun_secondary"; close "popup_cac_template"; close "popup_cac_primary_camo"; close "popup_cac_secondary_camo"; close "popup_cac_bling"; close "popup_cac_perk2"; close "popup_cac_rocket_secondary"; close "popup_primary_attachments_bling"; close "popup_secondary_attachments_bling"; close "popup_cac_other_primary"; } if ( !( tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) , 12 ) != "" || tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) , 12 ) != "" ) && ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_gl" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_grip" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_shotgun" ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_heartbeat" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "perks" , 0 , "specialty_null" ); } setLocalVarString "loadoutPrimary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "weapon" ) ); setLocalVarString "loadoutPrimaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) ); setLocalVarString "loadoutPrimaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 1 ) ); if ( localvarstring( "loadoutPrimaryAttachment2" ) == "" ) { setLocalVarString "loadoutPrimaryAttachment2" ( "none" ); } setLocalVarString "loadoutPrimaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "camo" ) ); setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "loadoutSecondaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "loadoutSecondaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); if ( localvarstring( "loadoutSecondaryAttachment2" ) == "" ) { setLocalVarString "loadoutSecondaryAttachment2" ( "none" ); } setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutEquipment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) ); setLocalVarString "loadoutPerk1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) ); setLocalVarString "loadoutPerk2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 2 ) ); setLocalVarString "loadoutPerk3" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 3 ) ); setLocalVarString "loadoutStreak1" ( getplayerdata( "killstreaks" , 0 ) ); setLocalVarString "loadoutStreak2" ( getplayerdata( "killstreaks" , 1 ) ); setLocalVarString "loadoutStreak3" ( getplayerdata( "killstreaks" , 2 ) ); setLocalVarString "loadoutDeathStreak" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 4 ) ); setLocalVarString "loadoutOffhandSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "specialGrenade" ) ); setLocalVarString "loadoutClassName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "name" ) ); } } else { if ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) == "specialty_bling" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 , "none" ) ;; } if ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) == "specialty_bling" && getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 12 ) ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 , "none" ) ;; } setLocalVarString "tempName" ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 12 ) ); setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 , "localVarString" ( "tempName" ) ); if ( 1 == 0 ) { open "popup_cac_primary_camo"; } else { close "popup_cac_weapon_primary"; close "popup_primary_attachments" close "popup_secondary_attachments" close "popup_cac_weapon_secondary"; close "popup_cac_handgun_secondary"; close "popup_cac_machinePistols_secondary"; close "popup_cac_assault_primary"; close "popup_cac_SMG_primary"; close "popup_cac_LMG_primary"; close "popup_cac_sniper_primary"; close "popup_cac_shotgun_primary"; close "popup_cac_assault_secondary"; close "popup_cac_SMG_secondary"; close "popup_cac_LMG_secondary"; close "popup_cac_sniper_secondary"; close "popup_cac_shotgun_secondary"; close "popup_cac_template"; close "popup_cac_primary_camo"; close "popup_cac_secondary_camo"; close "popup_cac_bling"; close "popup_cac_perk2"; close "popup_cac_rocket_secondary"; close "popup_primary_attachments_bling"; close "popup_secondary_attachments_bling"; close "popup_cac_other_primary"; } if ( !( tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) , 12 ) != "" || tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) , 12 ) != "" ) && ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_gl" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_grip" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_shotgun" ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_heartbeat" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "perks" , 0 , "specialty_null" ); } setLocalVarString "loadoutPrimary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "weapon" ) ); setLocalVarString "loadoutPrimaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) ); setLocalVarString "loadoutPrimaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 1 ) ); if ( localvarstring( "loadoutPrimaryAttachment2" ) == "" ) { setLocalVarString "loadoutPrimaryAttachment2" ( "none" ); } setLocalVarString "loadoutPrimaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "camo" ) ); setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "loadoutSecondaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "loadoutSecondaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); if ( localvarstring( "loadoutSecondaryAttachment2" ) == "" ) { setLocalVarString "loadoutSecondaryAttachment2" ( "none" ); } setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutEquipment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) ); setLocalVarString "loadoutPerk1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) ); setLocalVarString "loadoutPerk2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 2 ) ); setLocalVarString "loadoutPerk3" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 3 ) ); setLocalVarString "loadoutStreak1" ( getplayerdata( "killstreaks" , 0 ) ); setLocalVarString "loadoutStreak2" ( getplayerdata( "killstreaks" , 1 ) ); setLocalVarString "loadoutStreak3" ( getplayerdata( "killstreaks" , 2 ) ); setLocalVarString "loadoutDeathStreak" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 4 ) ); setLocalVarString "loadoutOffhandSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "specialGrenade" ) ); setLocalVarString "loadoutClassName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "name" ) ); } } onFocus { play "mouse_over"; if ( dvarstring( "gameMode" ) != "mp" ) { setItemColor "mw2_popup_button" backcolor 0 0 0 0; } setItemColor self backcolor 0 0 0 1; setLocalVarBool "ui_popupAButton" ( 1 ); setLocalVarString "ui_attachment_hint" ( "" ); setLocalVarString "ui_selected_ref" ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 12 ) ); setLocalVarString "ui_weapon_ref" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "ui_unlock_ref" ( localvarstring( "ui_weapon_ref" ) + " " + tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 12 ) ); setLocalVarString "ui_challenge_ref" ( tablelookup( "mp/unlockTable.csv" , 0 , localvarstring( "ui_unlock_ref" ) , 3 ) ); setLocalVarInt "ui_challenge_state" ( 1 ); if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_2" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 2 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_3" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 3 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_4" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 4 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_5" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 5 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_6" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 6 ); } if ( ( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 12 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 12 ) ) ) { setItemColor self backcolor 0 0 0 "0.35"; } else { if ( !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 12 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment1" ) ) ) != "no" ) ) { setLocalVarString "ui_attachment_hint" ( localvarstring( "ui_attachment1" ) ); } if ( !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 12 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment2" ) ) ) != "no" ) ) { setLocalVarString "ui_attachment_hint" ( localvarstring( "ui_attachment2" ) ); } } } leaveFocus { setItemColor self backcolor 1 1 1 0; setLocalVarBool "ui_popupAButton" ( 0 ); setLocalVarString "tempName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); if ( localvarstring( "ui_selected_ref" ) != "" ) { setPlayerData( "attachmentNew" , "localVarString" ( "tempName" ) , "localVarString" ( "ui_selected_ref" ) , "false" ) ;; } } } itemDef { rect 162 44 40 20 1 1 decoration visible 1 style 3 forecolor 1 1 1 1 background "specialty_new" textscale 0.55 exp forecolor a ( 1 * getplayerdata( "attachmentNew" , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 12 ) ) ) visible when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 12 ) != "" ) } itemDef { rect 162 44 40 20 1 1 decoration visible 1 style 3 forecolor 1 1 1 1 background "specialty_locked" textscale 0.55 visible when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 12 ) != "" && isitemunlocked( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) + " " + tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 12 ) ) == 0 ) } itemDef { rect -64 64 336 20 1 1 decoration visible 1 style 3 forecolor 0.8 0.6 0.1 1 background "popup_button_selected_bar_bling" textscale 0.55 visible when ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 13 ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 13 ) ) } itemDef { name "cac_attachment_2" rect -64 64 336 20 1 1 visible 1 group "mw2_popup_button" style 1 forecolor 1 1 1 1 disablecolor 0.6 0.55 0.55 1 background "popup_button_selection_bar_bling" type 1 textfont 3 textalign 4 textalignx 68 textscale 0.375 visible when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 13 ) != "" ) disabled when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 13 ) != "" && ( !isitemunlocked( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) + " " + ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 13 ) ) ) || ( !( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 13 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 13 ) ) && ( ( !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 13 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment1" ) ) ) != "no" ) || !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 13 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment2" ) ) ) != "no" ) || localvarint( "ui_numAttachments" ) == 2 ) ) ) ) ) exp text ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 13 ) , 3 ) ) action { play "mouse_click"; if ( localvarint( "ui_tabDepth" ) == 0 ) { setLocalVarString "ui_tab1Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 13 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 1 ) { setLocalVarString "ui_tab2Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 13 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 2 ) { setLocalVarString "ui_tab3Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 13 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 3 ) { setLocalVarString "ui_tab4Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 13 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 4 ) { setLocalVarString "ui_tab5Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 13 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 5 ) { setLocalVarString "ui_tab6Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 13 ) , 3 ) ); } setLocalVarString "tempName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setPlayerData( "attachmentNew" , "localVarString" ( "tempName" ) , "localVarString" ( "ui_selected_ref" ) , "false" ) ;; if ( menuisopen( "popup_primary_attachments_bling" ) || menuisopen( "popup_secondary_attachments_bling" ) ) { setLocalVarString "tempName" ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 13 ) ); if ( ( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 13 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 13 ) ) ) { setLocalVarInt "tempInt" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 13 ) ); setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , "localVarInt" ( "tempInt" ) , "none" ); } else { setLocalVarInt "tempInt" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) != "none" ); setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , "localVarInt" ( "tempInt" ) , "localVarString" ( "tempName" ) ); } setLocalVarString "ui_attachment1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "ui_attachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); setLocalVarInt "ui_numAttachments" ( 0 ); if ( localvarstring( "ui_attachment1" ) != "none" ) { setLocalVarInt "ui_numAttachments" ( localvarint( "ui_numAttachments" ) + 1 ); } if ( localvarstring( "ui_attachment2" ) != "none" ) { setLocalVarInt "ui_numAttachments" ( localvarint( "ui_numAttachments" ) + 1 ); } if ( !( tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) , 12 ) != "" || tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) , 12 ) != "" ) && ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_gl" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_grip" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_shotgun" ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_heartbeat" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "perks" , 0 , "specialty_null" ); } setLocalVarString "loadoutPrimary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "weapon" ) ); setLocalVarString "loadoutPrimaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) ); setLocalVarString "loadoutPrimaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 1 ) ); if ( localvarstring( "loadoutPrimaryAttachment2" ) == "" ) { setLocalVarString "loadoutPrimaryAttachment2" ( "none" ); } setLocalVarString "loadoutPrimaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "camo" ) ); setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "loadoutSecondaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "loadoutSecondaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); if ( localvarstring( "loadoutSecondaryAttachment2" ) == "" ) { setLocalVarString "loadoutSecondaryAttachment2" ( "none" ); } setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutEquipment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) ); setLocalVarString "loadoutPerk1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) ); setLocalVarString "loadoutPerk2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 2 ) ); setLocalVarString "loadoutPerk3" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 3 ) ); setLocalVarString "loadoutStreak1" ( getplayerdata( "killstreaks" , 0 ) ); setLocalVarString "loadoutStreak2" ( getplayerdata( "killstreaks" , 1 ) ); setLocalVarString "loadoutStreak3" ( getplayerdata( "killstreaks" , 2 ) ); setLocalVarString "loadoutDeathStreak" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 4 ) ); setLocalVarString "loadoutOffhandSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "specialGrenade" ) ); setLocalVarString "loadoutClassName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "name" ) ); if ( ( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 13 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 13 ) ) ) { setItemColor self backcolor 0 0 0 "0.35"; } else { setItemColor self backcolor 0 0 0 1; } if ( localvarint( "ui_numAttachments" ) == 2 ) { if ( 1 == 0 ) { if ( localvarint( "ui_tabDepth" ) == 0 ) { setLocalVarString "ui_tab1Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 1 ) { setLocalVarString "ui_tab2Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 2 ) { setLocalVarString "ui_tab3Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 3 ) { setLocalVarString "ui_tab4Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 4 ) { setLocalVarString "ui_tab5Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 5 ) { setLocalVarString "ui_tab6Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } open "popup_cac_primary_camo"; } else { close "popup_cac_weapon_primary"; close "popup_primary_attachments" close "popup_secondary_attachments" close "popup_cac_weapon_secondary"; close "popup_cac_handgun_secondary"; close "popup_cac_machinePistols_secondary"; close "popup_cac_assault_primary"; close "popup_cac_SMG_primary"; close "popup_cac_LMG_primary"; close "popup_cac_sniper_primary"; close "popup_cac_shotgun_primary"; close "popup_cac_assault_secondary"; close "popup_cac_SMG_secondary"; close "popup_cac_LMG_secondary"; close "popup_cac_sniper_secondary"; close "popup_cac_shotgun_secondary"; close "popup_cac_template"; close "popup_cac_primary_camo"; close "popup_cac_secondary_camo"; close "popup_cac_bling"; close "popup_cac_perk2"; close "popup_cac_rocket_secondary"; close "popup_primary_attachments_bling"; close "popup_secondary_attachments_bling"; close "popup_cac_other_primary"; } if ( !( tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) , 12 ) != "" || tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) , 12 ) != "" ) && ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_gl" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_grip" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_shotgun" ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_heartbeat" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "perks" , 0 , "specialty_null" ); } setLocalVarString "loadoutPrimary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "weapon" ) ); setLocalVarString "loadoutPrimaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) ); setLocalVarString "loadoutPrimaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 1 ) ); if ( localvarstring( "loadoutPrimaryAttachment2" ) == "" ) { setLocalVarString "loadoutPrimaryAttachment2" ( "none" ); } setLocalVarString "loadoutPrimaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "camo" ) ); setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "loadoutSecondaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "loadoutSecondaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); if ( localvarstring( "loadoutSecondaryAttachment2" ) == "" ) { setLocalVarString "loadoutSecondaryAttachment2" ( "none" ); } setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutEquipment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) ); setLocalVarString "loadoutPerk1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) ); setLocalVarString "loadoutPerk2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 2 ) ); setLocalVarString "loadoutPerk3" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 3 ) ); setLocalVarString "loadoutStreak1" ( getplayerdata( "killstreaks" , 0 ) ); setLocalVarString "loadoutStreak2" ( getplayerdata( "killstreaks" , 1 ) ); setLocalVarString "loadoutStreak3" ( getplayerdata( "killstreaks" , 2 ) ); setLocalVarString "loadoutDeathStreak" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 4 ) ); setLocalVarString "loadoutOffhandSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "specialGrenade" ) ); setLocalVarString "loadoutClassName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "name" ) ); } } else { if ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) == "specialty_bling" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 , "none" ) ;; } if ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) == "specialty_bling" && getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 13 ) ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 , "none" ) ;; } setLocalVarString "tempName" ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 13 ) ); setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 , "localVarString" ( "tempName" ) ); if ( 1 == 0 ) { open "popup_cac_primary_camo"; } else { close "popup_cac_weapon_primary"; close "popup_primary_attachments" close "popup_secondary_attachments" close "popup_cac_weapon_secondary"; close "popup_cac_handgun_secondary"; close "popup_cac_machinePistols_secondary"; close "popup_cac_assault_primary"; close "popup_cac_SMG_primary"; close "popup_cac_LMG_primary"; close "popup_cac_sniper_primary"; close "popup_cac_shotgun_primary"; close "popup_cac_assault_secondary"; close "popup_cac_SMG_secondary"; close "popup_cac_LMG_secondary"; close "popup_cac_sniper_secondary"; close "popup_cac_shotgun_secondary"; close "popup_cac_template"; close "popup_cac_primary_camo"; close "popup_cac_secondary_camo"; close "popup_cac_bling"; close "popup_cac_perk2"; close "popup_cac_rocket_secondary"; close "popup_primary_attachments_bling"; close "popup_secondary_attachments_bling"; close "popup_cac_other_primary"; } if ( !( tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) , 12 ) != "" || tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) , 12 ) != "" ) && ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_gl" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_grip" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_shotgun" ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_heartbeat" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "perks" , 0 , "specialty_null" ); } setLocalVarString "loadoutPrimary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "weapon" ) ); setLocalVarString "loadoutPrimaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) ); setLocalVarString "loadoutPrimaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 1 ) ); if ( localvarstring( "loadoutPrimaryAttachment2" ) == "" ) { setLocalVarString "loadoutPrimaryAttachment2" ( "none" ); } setLocalVarString "loadoutPrimaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "camo" ) ); setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "loadoutSecondaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "loadoutSecondaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); if ( localvarstring( "loadoutSecondaryAttachment2" ) == "" ) { setLocalVarString "loadoutSecondaryAttachment2" ( "none" ); } setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutEquipment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) ); setLocalVarString "loadoutPerk1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) ); setLocalVarString "loadoutPerk2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 2 ) ); setLocalVarString "loadoutPerk3" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 3 ) ); setLocalVarString "loadoutStreak1" ( getplayerdata( "killstreaks" , 0 ) ); setLocalVarString "loadoutStreak2" ( getplayerdata( "killstreaks" , 1 ) ); setLocalVarString "loadoutStreak3" ( getplayerdata( "killstreaks" , 2 ) ); setLocalVarString "loadoutDeathStreak" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 4 ) ); setLocalVarString "loadoutOffhandSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "specialGrenade" ) ); setLocalVarString "loadoutClassName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "name" ) ); } } onFocus { play "mouse_over"; if ( dvarstring( "gameMode" ) != "mp" ) { setItemColor "mw2_popup_button" backcolor 0 0 0 0; } setItemColor self backcolor 0 0 0 1; setLocalVarBool "ui_popupAButton" ( 1 ); setLocalVarString "ui_attachment_hint" ( "" ); setLocalVarString "ui_selected_ref" ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 13 ) ); setLocalVarString "ui_weapon_ref" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "ui_unlock_ref" ( localvarstring( "ui_weapon_ref" ) + " " + tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 13 ) ); setLocalVarString "ui_challenge_ref" ( tablelookup( "mp/unlockTable.csv" , 0 , localvarstring( "ui_unlock_ref" ) , 3 ) ); setLocalVarInt "ui_challenge_state" ( 1 ); if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_2" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 2 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_3" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 3 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_4" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 4 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_5" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 5 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_6" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 6 ); } if ( ( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 13 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 13 ) ) ) { setItemColor self backcolor 0 0 0 "0.35"; } else { if ( !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 13 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment1" ) ) ) != "no" ) ) { setLocalVarString "ui_attachment_hint" ( localvarstring( "ui_attachment1" ) ); } if ( !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 13 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment2" ) ) ) != "no" ) ) { setLocalVarString "ui_attachment_hint" ( localvarstring( "ui_attachment2" ) ); } } } leaveFocus { setItemColor self backcolor 1 1 1 0; setLocalVarBool "ui_popupAButton" ( 0 ); setLocalVarString "tempName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); if ( localvarstring( "ui_selected_ref" ) != "" ) { setPlayerData( "attachmentNew" , "localVarString" ( "tempName" ) , "localVarString" ( "ui_selected_ref" ) , "false" ) ;; } } } itemDef { rect 162 64 40 20 1 1 decoration visible 1 style 3 forecolor 1 1 1 1 background "specialty_new" textscale 0.55 exp forecolor a ( 1 * getplayerdata( "attachmentNew" , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 13 ) ) ) visible when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 13 ) != "" ) } itemDef { rect 162 64 40 20 1 1 decoration visible 1 style 3 forecolor 1 1 1 1 background "specialty_locked" textscale 0.55 visible when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 13 ) != "" && isitemunlocked( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) + " " + tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 13 ) ) == 0 ) } itemDef { rect -64 84 336 20 1 1 decoration visible 1 style 3 forecolor 0.8 0.6 0.1 1 background "popup_button_selected_bar_bling" textscale 0.55 visible when ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 14 ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 14 ) ) } itemDef { name "cac_attachment_3" rect -64 84 336 20 1 1 visible 1 group "mw2_popup_button" style 1 forecolor 1 1 1 1 disablecolor 0.6 0.55 0.55 1 background "popup_button_selection_bar_bling" type 1 textfont 3 textalign 4 textalignx 68 textscale 0.375 visible when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 14 ) != "" ) disabled when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 14 ) != "" && ( !isitemunlocked( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) + " " + ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 14 ) ) ) || ( !( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 14 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 14 ) ) && ( ( !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 14 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment1" ) ) ) != "no" ) || !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 14 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment2" ) ) ) != "no" ) || localvarint( "ui_numAttachments" ) == 2 ) ) ) ) ) exp text ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 14 ) , 3 ) ) action { play "mouse_click"; if ( localvarint( "ui_tabDepth" ) == 0 ) { setLocalVarString "ui_tab1Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 14 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 1 ) { setLocalVarString "ui_tab2Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 14 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 2 ) { setLocalVarString "ui_tab3Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 14 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 3 ) { setLocalVarString "ui_tab4Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 14 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 4 ) { setLocalVarString "ui_tab5Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 14 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 5 ) { setLocalVarString "ui_tab6Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 14 ) , 3 ) ); } setLocalVarString "tempName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setPlayerData( "attachmentNew" , "localVarString" ( "tempName" ) , "localVarString" ( "ui_selected_ref" ) , "false" ) ;; if ( menuisopen( "popup_primary_attachments_bling" ) || menuisopen( "popup_secondary_attachments_bling" ) ) { setLocalVarString "tempName" ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 14 ) ); if ( ( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 14 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 14 ) ) ) { setLocalVarInt "tempInt" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 14 ) ); setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , "localVarInt" ( "tempInt" ) , "none" ); } else { setLocalVarInt "tempInt" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) != "none" ); setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , "localVarInt" ( "tempInt" ) , "localVarString" ( "tempName" ) ); } setLocalVarString "ui_attachment1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "ui_attachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); setLocalVarInt "ui_numAttachments" ( 0 ); if ( localvarstring( "ui_attachment1" ) != "none" ) { setLocalVarInt "ui_numAttachments" ( localvarint( "ui_numAttachments" ) + 1 ); } if ( localvarstring( "ui_attachment2" ) != "none" ) { setLocalVarInt "ui_numAttachments" ( localvarint( "ui_numAttachments" ) + 1 ); } if ( !( tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) , 12 ) != "" || tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) , 12 ) != "" ) && ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_gl" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_grip" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_shotgun" ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_heartbeat" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "perks" , 0 , "specialty_null" ); } setLocalVarString "loadoutPrimary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "weapon" ) ); setLocalVarString "loadoutPrimaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) ); setLocalVarString "loadoutPrimaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 1 ) ); if ( localvarstring( "loadoutPrimaryAttachment2" ) == "" ) { setLocalVarString "loadoutPrimaryAttachment2" ( "none" ); } setLocalVarString "loadoutPrimaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "camo" ) ); setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "loadoutSecondaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "loadoutSecondaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); if ( localvarstring( "loadoutSecondaryAttachment2" ) == "" ) { setLocalVarString "loadoutSecondaryAttachment2" ( "none" ); } setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutEquipment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) ); setLocalVarString "loadoutPerk1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) ); setLocalVarString "loadoutPerk2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 2 ) ); setLocalVarString "loadoutPerk3" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 3 ) ); setLocalVarString "loadoutStreak1" ( getplayerdata( "killstreaks" , 0 ) ); setLocalVarString "loadoutStreak2" ( getplayerdata( "killstreaks" , 1 ) ); setLocalVarString "loadoutStreak3" ( getplayerdata( "killstreaks" , 2 ) ); setLocalVarString "loadoutDeathStreak" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 4 ) ); setLocalVarString "loadoutOffhandSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "specialGrenade" ) ); setLocalVarString "loadoutClassName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "name" ) ); if ( ( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 14 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 14 ) ) ) { setItemColor self backcolor 0 0 0 "0.35"; } else { setItemColor self backcolor 0 0 0 1; } if ( localvarint( "ui_numAttachments" ) == 2 ) { if ( 1 == 0 ) { if ( localvarint( "ui_tabDepth" ) == 0 ) { setLocalVarString "ui_tab1Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 1 ) { setLocalVarString "ui_tab2Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 2 ) { setLocalVarString "ui_tab3Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 3 ) { setLocalVarString "ui_tab4Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 4 ) { setLocalVarString "ui_tab5Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 5 ) { setLocalVarString "ui_tab6Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } open "popup_cac_primary_camo"; } else { close "popup_cac_weapon_primary"; close "popup_primary_attachments" close "popup_secondary_attachments" close "popup_cac_weapon_secondary"; close "popup_cac_handgun_secondary"; close "popup_cac_machinePistols_secondary"; close "popup_cac_assault_primary"; close "popup_cac_SMG_primary"; close "popup_cac_LMG_primary"; close "popup_cac_sniper_primary"; close "popup_cac_shotgun_primary"; close "popup_cac_assault_secondary"; close "popup_cac_SMG_secondary"; close "popup_cac_LMG_secondary"; close "popup_cac_sniper_secondary"; close "popup_cac_shotgun_secondary"; close "popup_cac_template"; close "popup_cac_primary_camo"; close "popup_cac_secondary_camo"; close "popup_cac_bling"; close "popup_cac_perk2"; close "popup_cac_rocket_secondary"; close "popup_primary_attachments_bling"; close "popup_secondary_attachments_bling"; close "popup_cac_other_primary"; } if ( !( tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) , 12 ) != "" || tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) , 12 ) != "" ) && ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_gl" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_grip" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_shotgun" ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_heartbeat" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "perks" , 0 , "specialty_null" ); } setLocalVarString "loadoutPrimary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "weapon" ) ); setLocalVarString "loadoutPrimaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) ); setLocalVarString "loadoutPrimaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 1 ) ); if ( localvarstring( "loadoutPrimaryAttachment2" ) == "" ) { setLocalVarString "loadoutPrimaryAttachment2" ( "none" ); } setLocalVarString "loadoutPrimaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "camo" ) ); setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "loadoutSecondaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "loadoutSecondaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); if ( localvarstring( "loadoutSecondaryAttachment2" ) == "" ) { setLocalVarString "loadoutSecondaryAttachment2" ( "none" ); } setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutEquipment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) ); setLocalVarString "loadoutPerk1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) ); setLocalVarString "loadoutPerk2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 2 ) ); setLocalVarString "loadoutPerk3" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 3 ) ); setLocalVarString "loadoutStreak1" ( getplayerdata( "killstreaks" , 0 ) ); setLocalVarString "loadoutStreak2" ( getplayerdata( "killstreaks" , 1 ) ); setLocalVarString "loadoutStreak3" ( getplayerdata( "killstreaks" , 2 ) ); setLocalVarString "loadoutDeathStreak" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 4 ) ); setLocalVarString "loadoutOffhandSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "specialGrenade" ) ); setLocalVarString "loadoutClassName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "name" ) ); } } else { if ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) == "specialty_bling" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 , "none" ) ;; } if ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) == "specialty_bling" && getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 14 ) ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 , "none" ) ;; } setLocalVarString "tempName" ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 14 ) ); setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 , "localVarString" ( "tempName" ) ); if ( 1 == 0 ) { open "popup_cac_primary_camo"; } else { close "popup_cac_weapon_primary"; close "popup_primary_attachments" close "popup_secondary_attachments" close "popup_cac_weapon_secondary"; close "popup_cac_handgun_secondary"; close "popup_cac_machinePistols_secondary"; close "popup_cac_assault_primary"; close "popup_cac_SMG_primary"; close "popup_cac_LMG_primary"; close "popup_cac_sniper_primary"; close "popup_cac_shotgun_primary"; close "popup_cac_assault_secondary"; close "popup_cac_SMG_secondary"; close "popup_cac_LMG_secondary"; close "popup_cac_sniper_secondary"; close "popup_cac_shotgun_secondary"; close "popup_cac_template"; close "popup_cac_primary_camo"; close "popup_cac_secondary_camo"; close "popup_cac_bling"; close "popup_cac_perk2"; close "popup_cac_rocket_secondary"; close "popup_primary_attachments_bling"; close "popup_secondary_attachments_bling"; close "popup_cac_other_primary"; } if ( !( tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) , 12 ) != "" || tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) , 12 ) != "" ) && ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_gl" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_grip" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_shotgun" ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_heartbeat" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "perks" , 0 , "specialty_null" ); } setLocalVarString "loadoutPrimary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "weapon" ) ); setLocalVarString "loadoutPrimaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) ); setLocalVarString "loadoutPrimaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 1 ) ); if ( localvarstring( "loadoutPrimaryAttachment2" ) == "" ) { setLocalVarString "loadoutPrimaryAttachment2" ( "none" ); } setLocalVarString "loadoutPrimaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "camo" ) ); setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "loadoutSecondaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "loadoutSecondaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); if ( localvarstring( "loadoutSecondaryAttachment2" ) == "" ) { setLocalVarString "loadoutSecondaryAttachment2" ( "none" ); } setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutEquipment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) ); setLocalVarString "loadoutPerk1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) ); setLocalVarString "loadoutPerk2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 2 ) ); setLocalVarString "loadoutPerk3" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 3 ) ); setLocalVarString "loadoutStreak1" ( getplayerdata( "killstreaks" , 0 ) ); setLocalVarString "loadoutStreak2" ( getplayerdata( "killstreaks" , 1 ) ); setLocalVarString "loadoutStreak3" ( getplayerdata( "killstreaks" , 2 ) ); setLocalVarString "loadoutDeathStreak" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 4 ) ); setLocalVarString "loadoutOffhandSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "specialGrenade" ) ); setLocalVarString "loadoutClassName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "name" ) ); } } onFocus { play "mouse_over"; if ( dvarstring( "gameMode" ) != "mp" ) { setItemColor "mw2_popup_button" backcolor 0 0 0 0; } setItemColor self backcolor 0 0 0 1; setLocalVarBool "ui_popupAButton" ( 1 ); setLocalVarString "ui_attachment_hint" ( "" ); setLocalVarString "ui_selected_ref" ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 14 ) ); setLocalVarString "ui_weapon_ref" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "ui_unlock_ref" ( localvarstring( "ui_weapon_ref" ) + " " + tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 14 ) ); setLocalVarString "ui_challenge_ref" ( tablelookup( "mp/unlockTable.csv" , 0 , localvarstring( "ui_unlock_ref" ) , 3 ) ); setLocalVarInt "ui_challenge_state" ( 1 ); if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_2" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 2 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_3" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 3 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_4" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 4 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_5" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 5 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_6" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 6 ); } if ( ( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 14 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 14 ) ) ) { setItemColor self backcolor 0 0 0 "0.35"; } else { if ( !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 14 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment1" ) ) ) != "no" ) ) { setLocalVarString "ui_attachment_hint" ( localvarstring( "ui_attachment1" ) ); } if ( !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 14 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment2" ) ) ) != "no" ) ) { setLocalVarString "ui_attachment_hint" ( localvarstring( "ui_attachment2" ) ); } } } leaveFocus { setItemColor self backcolor 1 1 1 0; setLocalVarBool "ui_popupAButton" ( 0 ); setLocalVarString "tempName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); if ( localvarstring( "ui_selected_ref" ) != "" ) { setPlayerData( "attachmentNew" , "localVarString" ( "tempName" ) , "localVarString" ( "ui_selected_ref" ) , "false" ) ;; } } } itemDef { rect 162 84 40 20 1 1 decoration visible 1 style 3 forecolor 1 1 1 1 background "specialty_new" textscale 0.55 exp forecolor a ( 1 * getplayerdata( "attachmentNew" , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 14 ) ) ) visible when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 14 ) != "" ) } itemDef { rect 162 84 40 20 1 1 decoration visible 1 style 3 forecolor 1 1 1 1 background "specialty_locked" textscale 0.55 visible when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 14 ) != "" && isitemunlocked( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) + " " + tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 14 ) ) == 0 ) } itemDef { rect -64 104 336 20 1 1 decoration visible 1 style 3 forecolor 0.8 0.6 0.1 1 background "popup_button_selected_bar_bling" textscale 0.55 visible when ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 15 ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 15 ) ) } itemDef { name "cac_attachment_4" rect -64 104 336 20 1 1 visible 1 group "mw2_popup_button" style 1 forecolor 1 1 1 1 disablecolor 0.6 0.55 0.55 1 background "popup_button_selection_bar_bling" type 1 textfont 3 textalign 4 textalignx 68 textscale 0.375 visible when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 15 ) != "" ) disabled when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 15 ) != "" && ( !isitemunlocked( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) + " " + ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 15 ) ) ) || ( !( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 15 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 15 ) ) && ( ( !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 15 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment1" ) ) ) != "no" ) || !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 15 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment2" ) ) ) != "no" ) || localvarint( "ui_numAttachments" ) == 2 ) ) ) ) ) exp text ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 15 ) , 3 ) ) action { play "mouse_click"; if ( localvarint( "ui_tabDepth" ) == 0 ) { setLocalVarString "ui_tab1Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 15 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 1 ) { setLocalVarString "ui_tab2Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 15 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 2 ) { setLocalVarString "ui_tab3Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 15 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 3 ) { setLocalVarString "ui_tab4Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 15 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 4 ) { setLocalVarString "ui_tab5Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 15 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 5 ) { setLocalVarString "ui_tab6Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 15 ) , 3 ) ); } setLocalVarString "tempName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setPlayerData( "attachmentNew" , "localVarString" ( "tempName" ) , "localVarString" ( "ui_selected_ref" ) , "false" ) ;; if ( menuisopen( "popup_primary_attachments_bling" ) || menuisopen( "popup_secondary_attachments_bling" ) ) { setLocalVarString "tempName" ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 15 ) ); if ( ( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 15 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 15 ) ) ) { setLocalVarInt "tempInt" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 15 ) ); setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , "localVarInt" ( "tempInt" ) , "none" ); } else { setLocalVarInt "tempInt" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) != "none" ); setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , "localVarInt" ( "tempInt" ) , "localVarString" ( "tempName" ) ); } setLocalVarString "ui_attachment1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "ui_attachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); setLocalVarInt "ui_numAttachments" ( 0 ); if ( localvarstring( "ui_attachment1" ) != "none" ) { setLocalVarInt "ui_numAttachments" ( localvarint( "ui_numAttachments" ) + 1 ); } if ( localvarstring( "ui_attachment2" ) != "none" ) { setLocalVarInt "ui_numAttachments" ( localvarint( "ui_numAttachments" ) + 1 ); } if ( !( tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) , 12 ) != "" || tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) , 12 ) != "" ) && ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_gl" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_grip" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_shotgun" ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_heartbeat" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "perks" , 0 , "specialty_null" ); } setLocalVarString "loadoutPrimary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "weapon" ) ); setLocalVarString "loadoutPrimaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) ); setLocalVarString "loadoutPrimaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 1 ) ); if ( localvarstring( "loadoutPrimaryAttachment2" ) == "" ) { setLocalVarString "loadoutPrimaryAttachment2" ( "none" ); } setLocalVarString "loadoutPrimaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "camo" ) ); setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "loadoutSecondaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "loadoutSecondaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); if ( localvarstring( "loadoutSecondaryAttachment2" ) == "" ) { setLocalVarString "loadoutSecondaryAttachment2" ( "none" ); } setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutEquipment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) ); setLocalVarString "loadoutPerk1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) ); setLocalVarString "loadoutPerk2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 2 ) ); setLocalVarString "loadoutPerk3" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 3 ) ); setLocalVarString "loadoutStreak1" ( getplayerdata( "killstreaks" , 0 ) ); setLocalVarString "loadoutStreak2" ( getplayerdata( "killstreaks" , 1 ) ); setLocalVarString "loadoutStreak3" ( getplayerdata( "killstreaks" , 2 ) ); setLocalVarString "loadoutDeathStreak" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 4 ) ); setLocalVarString "loadoutOffhandSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "specialGrenade" ) ); setLocalVarString "loadoutClassName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "name" ) ); if ( ( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 15 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 15 ) ) ) { setItemColor self backcolor 0 0 0 "0.35"; } else { setItemColor self backcolor 0 0 0 1; } if ( localvarint( "ui_numAttachments" ) == 2 ) { if ( 1 == 0 ) { if ( localvarint( "ui_tabDepth" ) == 0 ) { setLocalVarString "ui_tab1Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 1 ) { setLocalVarString "ui_tab2Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 2 ) { setLocalVarString "ui_tab3Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 3 ) { setLocalVarString "ui_tab4Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 4 ) { setLocalVarString "ui_tab5Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 5 ) { setLocalVarString "ui_tab6Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } open "popup_cac_primary_camo"; } else { close "popup_cac_weapon_primary"; close "popup_primary_attachments" close "popup_secondary_attachments" close "popup_cac_weapon_secondary"; close "popup_cac_handgun_secondary"; close "popup_cac_machinePistols_secondary"; close "popup_cac_assault_primary"; close "popup_cac_SMG_primary"; close "popup_cac_LMG_primary"; close "popup_cac_sniper_primary"; close "popup_cac_shotgun_primary"; close "popup_cac_assault_secondary"; close "popup_cac_SMG_secondary"; close "popup_cac_LMG_secondary"; close "popup_cac_sniper_secondary"; close "popup_cac_shotgun_secondary"; close "popup_cac_template"; close "popup_cac_primary_camo"; close "popup_cac_secondary_camo"; close "popup_cac_bling"; close "popup_cac_perk2"; close "popup_cac_rocket_secondary"; close "popup_primary_attachments_bling"; close "popup_secondary_attachments_bling"; close "popup_cac_other_primary"; } if ( !( tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) , 12 ) != "" || tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) , 12 ) != "" ) && ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_gl" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_grip" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_shotgun" ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_heartbeat" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "perks" , 0 , "specialty_null" ); } setLocalVarString "loadoutPrimary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "weapon" ) ); setLocalVarString "loadoutPrimaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) ); setLocalVarString "loadoutPrimaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 1 ) ); if ( localvarstring( "loadoutPrimaryAttachment2" ) == "" ) { setLocalVarString "loadoutPrimaryAttachment2" ( "none" ); } setLocalVarString "loadoutPrimaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "camo" ) ); setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "loadoutSecondaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "loadoutSecondaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); if ( localvarstring( "loadoutSecondaryAttachment2" ) == "" ) { setLocalVarString "loadoutSecondaryAttachment2" ( "none" ); } setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutEquipment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) ); setLocalVarString "loadoutPerk1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) ); setLocalVarString "loadoutPerk2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 2 ) ); setLocalVarString "loadoutPerk3" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 3 ) ); setLocalVarString "loadoutStreak1" ( getplayerdata( "killstreaks" , 0 ) ); setLocalVarString "loadoutStreak2" ( getplayerdata( "killstreaks" , 1 ) ); setLocalVarString "loadoutStreak3" ( getplayerdata( "killstreaks" , 2 ) ); setLocalVarString "loadoutDeathStreak" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 4 ) ); setLocalVarString "loadoutOffhandSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "specialGrenade" ) ); setLocalVarString "loadoutClassName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "name" ) ); } } else { if ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) == "specialty_bling" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 , "none" ) ;; } if ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) == "specialty_bling" && getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 15 ) ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 , "none" ) ;; } setLocalVarString "tempName" ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 15 ) ); setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 , "localVarString" ( "tempName" ) ); if ( 1 == 0 ) { open "popup_cac_primary_camo"; } else { close "popup_cac_weapon_primary"; close "popup_primary_attachments" close "popup_secondary_attachments" close "popup_cac_weapon_secondary"; close "popup_cac_handgun_secondary"; close "popup_cac_machinePistols_secondary"; close "popup_cac_assault_primary"; close "popup_cac_SMG_primary"; close "popup_cac_LMG_primary"; close "popup_cac_sniper_primary"; close "popup_cac_shotgun_primary"; close "popup_cac_assault_secondary"; close "popup_cac_SMG_secondary"; close "popup_cac_LMG_secondary"; close "popup_cac_sniper_secondary"; close "popup_cac_shotgun_secondary"; close "popup_cac_template"; close "popup_cac_primary_camo"; close "popup_cac_secondary_camo"; close "popup_cac_bling"; close "popup_cac_perk2"; close "popup_cac_rocket_secondary"; close "popup_primary_attachments_bling"; close "popup_secondary_attachments_bling"; close "popup_cac_other_primary"; } if ( !( tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) , 12 ) != "" || tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) , 12 ) != "" ) && ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_gl" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_grip" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_shotgun" ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_heartbeat" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "perks" , 0 , "specialty_null" ); } setLocalVarString "loadoutPrimary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "weapon" ) ); setLocalVarString "loadoutPrimaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) ); setLocalVarString "loadoutPrimaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 1 ) ); if ( localvarstring( "loadoutPrimaryAttachment2" ) == "" ) { setLocalVarString "loadoutPrimaryAttachment2" ( "none" ); } setLocalVarString "loadoutPrimaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "camo" ) ); setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "loadoutSecondaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "loadoutSecondaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); if ( localvarstring( "loadoutSecondaryAttachment2" ) == "" ) { setLocalVarString "loadoutSecondaryAttachment2" ( "none" ); } setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutEquipment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) ); setLocalVarString "loadoutPerk1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) ); setLocalVarString "loadoutPerk2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 2 ) ); setLocalVarString "loadoutPerk3" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 3 ) ); setLocalVarString "loadoutStreak1" ( getplayerdata( "killstreaks" , 0 ) ); setLocalVarString "loadoutStreak2" ( getplayerdata( "killstreaks" , 1 ) ); setLocalVarString "loadoutStreak3" ( getplayerdata( "killstreaks" , 2 ) ); setLocalVarString "loadoutDeathStreak" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 4 ) ); setLocalVarString "loadoutOffhandSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "specialGrenade" ) ); setLocalVarString "loadoutClassName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "name" ) ); } } onFocus { play "mouse_over"; if ( dvarstring( "gameMode" ) != "mp" ) { setItemColor "mw2_popup_button" backcolor 0 0 0 0; } setItemColor self backcolor 0 0 0 1; setLocalVarBool "ui_popupAButton" ( 1 ); setLocalVarString "ui_attachment_hint" ( "" ); setLocalVarString "ui_selected_ref" ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 15 ) ); setLocalVarString "ui_weapon_ref" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "ui_unlock_ref" ( localvarstring( "ui_weapon_ref" ) + " " + tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 15 ) ); setLocalVarString "ui_challenge_ref" ( tablelookup( "mp/unlockTable.csv" , 0 , localvarstring( "ui_unlock_ref" ) , 3 ) ); setLocalVarInt "ui_challenge_state" ( 1 ); if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_2" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 2 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_3" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 3 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_4" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 4 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_5" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 5 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_6" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 6 ); } if ( ( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 15 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 15 ) ) ) { setItemColor self backcolor 0 0 0 "0.35"; } else { if ( !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 15 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment1" ) ) ) != "no" ) ) { setLocalVarString "ui_attachment_hint" ( localvarstring( "ui_attachment1" ) ); } if ( !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 15 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment2" ) ) ) != "no" ) ) { setLocalVarString "ui_attachment_hint" ( localvarstring( "ui_attachment2" ) ); } } } leaveFocus { setItemColor self backcolor 1 1 1 0; setLocalVarBool "ui_popupAButton" ( 0 ); setLocalVarString "tempName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); if ( localvarstring( "ui_selected_ref" ) != "" ) { setPlayerData( "attachmentNew" , "localVarString" ( "tempName" ) , "localVarString" ( "ui_selected_ref" ) , "false" ) ;; } } } itemDef { rect 162 104 40 20 1 1 decoration visible 1 style 3 forecolor 1 1 1 1 background "specialty_new" textscale 0.55 exp forecolor a ( 1 * getplayerdata( "attachmentNew" , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 15 ) ) ) visible when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 15 ) != "" ) } itemDef { rect 162 104 40 20 1 1 decoration visible 1 style 3 forecolor 1 1 1 1 background "specialty_locked" textscale 0.55 visible when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 15 ) != "" && isitemunlocked( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) + " " + tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 15 ) ) == 0 ) } itemDef { rect -64 124 336 20 1 1 decoration visible 1 style 3 forecolor 0.8 0.6 0.1 1 background "popup_button_selected_bar_bling" textscale 0.55 visible when ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 16 ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 16 ) ) } itemDef { name "cac_attachment_5" rect -64 124 336 20 1 1 visible 1 group "mw2_popup_button" style 1 forecolor 1 1 1 1 disablecolor 0.6 0.55 0.55 1 background "popup_button_selection_bar_bling" type 1 textfont 3 textalign 4 textalignx 68 textscale 0.375 visible when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 16 ) != "" ) disabled when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 16 ) != "" && ( !isitemunlocked( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) + " " + ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 16 ) ) ) || ( !( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 16 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 16 ) ) && ( ( !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 16 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment1" ) ) ) != "no" ) || !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 16 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment2" ) ) ) != "no" ) || localvarint( "ui_numAttachments" ) == 2 ) ) ) ) ) exp text ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 16 ) , 3 ) ) action { play "mouse_click"; if ( localvarint( "ui_tabDepth" ) == 0 ) { setLocalVarString "ui_tab1Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 16 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 1 ) { setLocalVarString "ui_tab2Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 16 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 2 ) { setLocalVarString "ui_tab3Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 16 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 3 ) { setLocalVarString "ui_tab4Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 16 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 4 ) { setLocalVarString "ui_tab5Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 16 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 5 ) { setLocalVarString "ui_tab6Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 16 ) , 3 ) ); } setLocalVarString "tempName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setPlayerData( "attachmentNew" , "localVarString" ( "tempName" ) , "localVarString" ( "ui_selected_ref" ) , "false" ) ;; if ( menuisopen( "popup_primary_attachments_bling" ) || menuisopen( "popup_secondary_attachments_bling" ) ) { setLocalVarString "tempName" ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 16 ) ); if ( ( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 16 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 16 ) ) ) { setLocalVarInt "tempInt" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 16 ) ); setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , "localVarInt" ( "tempInt" ) , "none" ); } else { setLocalVarInt "tempInt" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) != "none" ); setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , "localVarInt" ( "tempInt" ) , "localVarString" ( "tempName" ) ); } setLocalVarString "ui_attachment1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "ui_attachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); setLocalVarInt "ui_numAttachments" ( 0 ); if ( localvarstring( "ui_attachment1" ) != "none" ) { setLocalVarInt "ui_numAttachments" ( localvarint( "ui_numAttachments" ) + 1 ); } if ( localvarstring( "ui_attachment2" ) != "none" ) { setLocalVarInt "ui_numAttachments" ( localvarint( "ui_numAttachments" ) + 1 ); } if ( !( tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) , 12 ) != "" || tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) , 12 ) != "" ) && ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_gl" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_grip" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_shotgun" ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_heartbeat" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "perks" , 0 , "specialty_null" ); } setLocalVarString "loadoutPrimary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "weapon" ) ); setLocalVarString "loadoutPrimaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) ); setLocalVarString "loadoutPrimaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 1 ) ); if ( localvarstring( "loadoutPrimaryAttachment2" ) == "" ) { setLocalVarString "loadoutPrimaryAttachment2" ( "none" ); } setLocalVarString "loadoutPrimaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "camo" ) ); setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "loadoutSecondaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "loadoutSecondaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); if ( localvarstring( "loadoutSecondaryAttachment2" ) == "" ) { setLocalVarString "loadoutSecondaryAttachment2" ( "none" ); } setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutEquipment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) ); setLocalVarString "loadoutPerk1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) ); setLocalVarString "loadoutPerk2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 2 ) ); setLocalVarString "loadoutPerk3" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 3 ) ); setLocalVarString "loadoutStreak1" ( getplayerdata( "killstreaks" , 0 ) ); setLocalVarString "loadoutStreak2" ( getplayerdata( "killstreaks" , 1 ) ); setLocalVarString "loadoutStreak3" ( getplayerdata( "killstreaks" , 2 ) ); setLocalVarString "loadoutDeathStreak" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 4 ) ); setLocalVarString "loadoutOffhandSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "specialGrenade" ) ); setLocalVarString "loadoutClassName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "name" ) ); if ( ( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 16 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 16 ) ) ) { setItemColor self backcolor 0 0 0 "0.35"; } else { setItemColor self backcolor 0 0 0 1; } if ( localvarint( "ui_numAttachments" ) == 2 ) { if ( 1 == 0 ) { if ( localvarint( "ui_tabDepth" ) == 0 ) { setLocalVarString "ui_tab1Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 1 ) { setLocalVarString "ui_tab2Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 2 ) { setLocalVarString "ui_tab3Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 3 ) { setLocalVarString "ui_tab4Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 4 ) { setLocalVarString "ui_tab5Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 5 ) { setLocalVarString "ui_tab6Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } open "popup_cac_primary_camo"; } else { close "popup_cac_weapon_primary"; close "popup_primary_attachments" close "popup_secondary_attachments" close "popup_cac_weapon_secondary"; close "popup_cac_handgun_secondary"; close "popup_cac_machinePistols_secondary"; close "popup_cac_assault_primary"; close "popup_cac_SMG_primary"; close "popup_cac_LMG_primary"; close "popup_cac_sniper_primary"; close "popup_cac_shotgun_primary"; close "popup_cac_assault_secondary"; close "popup_cac_SMG_secondary"; close "popup_cac_LMG_secondary"; close "popup_cac_sniper_secondary"; close "popup_cac_shotgun_secondary"; close "popup_cac_template"; close "popup_cac_primary_camo"; close "popup_cac_secondary_camo"; close "popup_cac_bling"; close "popup_cac_perk2"; close "popup_cac_rocket_secondary"; close "popup_primary_attachments_bling"; close "popup_secondary_attachments_bling"; close "popup_cac_other_primary"; } if ( !( tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) , 12 ) != "" || tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) , 12 ) != "" ) && ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_gl" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_grip" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_shotgun" ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_heartbeat" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "perks" , 0 , "specialty_null" ); } setLocalVarString "loadoutPrimary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "weapon" ) ); setLocalVarString "loadoutPrimaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) ); setLocalVarString "loadoutPrimaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 1 ) ); if ( localvarstring( "loadoutPrimaryAttachment2" ) == "" ) { setLocalVarString "loadoutPrimaryAttachment2" ( "none" ); } setLocalVarString "loadoutPrimaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "camo" ) ); setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "loadoutSecondaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "loadoutSecondaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); if ( localvarstring( "loadoutSecondaryAttachment2" ) == "" ) { setLocalVarString "loadoutSecondaryAttachment2" ( "none" ); } setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutEquipment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) ); setLocalVarString "loadoutPerk1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) ); setLocalVarString "loadoutPerk2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 2 ) ); setLocalVarString "loadoutPerk3" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 3 ) ); setLocalVarString "loadoutStreak1" ( getplayerdata( "killstreaks" , 0 ) ); setLocalVarString "loadoutStreak2" ( getplayerdata( "killstreaks" , 1 ) ); setLocalVarString "loadoutStreak3" ( getplayerdata( "killstreaks" , 2 ) ); setLocalVarString "loadoutDeathStreak" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 4 ) ); setLocalVarString "loadoutOffhandSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "specialGrenade" ) ); setLocalVarString "loadoutClassName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "name" ) ); } } else { if ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) == "specialty_bling" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 , "none" ) ;; } if ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) == "specialty_bling" && getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 16 ) ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 , "none" ) ;; } setLocalVarString "tempName" ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 16 ) ); setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 , "localVarString" ( "tempName" ) ); if ( 1 == 0 ) { open "popup_cac_primary_camo"; } else { close "popup_cac_weapon_primary"; close "popup_primary_attachments" close "popup_secondary_attachments" close "popup_cac_weapon_secondary"; close "popup_cac_handgun_secondary"; close "popup_cac_machinePistols_secondary"; close "popup_cac_assault_primary"; close "popup_cac_SMG_primary"; close "popup_cac_LMG_primary"; close "popup_cac_sniper_primary"; close "popup_cac_shotgun_primary"; close "popup_cac_assault_secondary"; close "popup_cac_SMG_secondary"; close "popup_cac_LMG_secondary"; close "popup_cac_sniper_secondary"; close "popup_cac_shotgun_secondary"; close "popup_cac_template"; close "popup_cac_primary_camo"; close "popup_cac_secondary_camo"; close "popup_cac_bling"; close "popup_cac_perk2"; close "popup_cac_rocket_secondary"; close "popup_primary_attachments_bling"; close "popup_secondary_attachments_bling"; close "popup_cac_other_primary"; } if ( !( tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) , 12 ) != "" || tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) , 12 ) != "" ) && ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_gl" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_grip" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_shotgun" ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_heartbeat" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "perks" , 0 , "specialty_null" ); } setLocalVarString "loadoutPrimary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "weapon" ) ); setLocalVarString "loadoutPrimaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) ); setLocalVarString "loadoutPrimaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 1 ) ); if ( localvarstring( "loadoutPrimaryAttachment2" ) == "" ) { setLocalVarString "loadoutPrimaryAttachment2" ( "none" ); } setLocalVarString "loadoutPrimaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "camo" ) ); setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "loadoutSecondaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "loadoutSecondaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); if ( localvarstring( "loadoutSecondaryAttachment2" ) == "" ) { setLocalVarString "loadoutSecondaryAttachment2" ( "none" ); } setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutEquipment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) ); setLocalVarString "loadoutPerk1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) ); setLocalVarString "loadoutPerk2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 2 ) ); setLocalVarString "loadoutPerk3" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 3 ) ); setLocalVarString "loadoutStreak1" ( getplayerdata( "killstreaks" , 0 ) ); setLocalVarString "loadoutStreak2" ( getplayerdata( "killstreaks" , 1 ) ); setLocalVarString "loadoutStreak3" ( getplayerdata( "killstreaks" , 2 ) ); setLocalVarString "loadoutDeathStreak" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 4 ) ); setLocalVarString "loadoutOffhandSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "specialGrenade" ) ); setLocalVarString "loadoutClassName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "name" ) ); } } onFocus { play "mouse_over"; if ( dvarstring( "gameMode" ) != "mp" ) { setItemColor "mw2_popup_button" backcolor 0 0 0 0; } setItemColor self backcolor 0 0 0 1; setLocalVarBool "ui_popupAButton" ( 1 ); setLocalVarString "ui_attachment_hint" ( "" ); setLocalVarString "ui_selected_ref" ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 16 ) ); setLocalVarString "ui_weapon_ref" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "ui_unlock_ref" ( localvarstring( "ui_weapon_ref" ) + " " + tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 16 ) ); setLocalVarString "ui_challenge_ref" ( tablelookup( "mp/unlockTable.csv" , 0 , localvarstring( "ui_unlock_ref" ) , 3 ) ); setLocalVarInt "ui_challenge_state" ( 1 ); if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_2" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 2 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_3" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 3 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_4" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 4 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_5" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 5 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_6" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 6 ); } if ( ( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 16 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 16 ) ) ) { setItemColor self backcolor 0 0 0 "0.35"; } else { if ( !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 16 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment1" ) ) ) != "no" ) ) { setLocalVarString "ui_attachment_hint" ( localvarstring( "ui_attachment1" ) ); } if ( !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 16 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment2" ) ) ) != "no" ) ) { setLocalVarString "ui_attachment_hint" ( localvarstring( "ui_attachment2" ) ); } } } leaveFocus { setItemColor self backcolor 1 1 1 0; setLocalVarBool "ui_popupAButton" ( 0 ); setLocalVarString "tempName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); if ( localvarstring( "ui_selected_ref" ) != "" ) { setPlayerData( "attachmentNew" , "localVarString" ( "tempName" ) , "localVarString" ( "ui_selected_ref" ) , "false" ) ;; } } } itemDef { rect 162 124 40 20 1 1 decoration visible 1 style 3 forecolor 1 1 1 1 background "specialty_new" textscale 0.55 exp forecolor a ( 1 * getplayerdata( "attachmentNew" , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 16 ) ) ) visible when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 16 ) != "" ) } itemDef { rect 162 124 40 20 1 1 decoration visible 1 style 3 forecolor 1 1 1 1 background "specialty_locked" textscale 0.55 visible when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 16 ) != "" && isitemunlocked( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) + " " + tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 16 ) ) == 0 ) } itemDef { rect -64 144 336 20 1 1 decoration visible 1 style 3 forecolor 0.8 0.6 0.1 1 background "popup_button_selected_bar_bling" textscale 0.55 visible when ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 17 ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 17 ) ) } itemDef { name "cac_attachment_6" rect -64 144 336 20 1 1 visible 1 group "mw2_popup_button" style 1 forecolor 1 1 1 1 disablecolor 0.6 0.55 0.55 1 background "popup_button_selection_bar_bling" type 1 textfont 3 textalign 4 textalignx 68 textscale 0.375 visible when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 17 ) != "" ) disabled when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 17 ) != "" && ( !isitemunlocked( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) + " " + ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 17 ) ) ) || ( !( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 17 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 17 ) ) && ( ( !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 17 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment1" ) ) ) != "no" ) || !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 17 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment2" ) ) ) != "no" ) || localvarint( "ui_numAttachments" ) == 2 ) ) ) ) ) exp text ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 17 ) , 3 ) ) action { play "mouse_click"; if ( localvarint( "ui_tabDepth" ) == 0 ) { setLocalVarString "ui_tab1Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 17 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 1 ) { setLocalVarString "ui_tab2Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 17 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 2 ) { setLocalVarString "ui_tab3Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 17 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 3 ) { setLocalVarString "ui_tab4Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 17 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 4 ) { setLocalVarString "ui_tab5Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 17 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 5 ) { setLocalVarString "ui_tab6Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 17 ) , 3 ) ); } setLocalVarString "tempName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setPlayerData( "attachmentNew" , "localVarString" ( "tempName" ) , "localVarString" ( "ui_selected_ref" ) , "false" ) ;; if ( menuisopen( "popup_primary_attachments_bling" ) || menuisopen( "popup_secondary_attachments_bling" ) ) { setLocalVarString "tempName" ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 17 ) ); if ( ( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 17 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 17 ) ) ) { setLocalVarInt "tempInt" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 17 ) ); setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , "localVarInt" ( "tempInt" ) , "none" ); } else { setLocalVarInt "tempInt" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) != "none" ); setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , "localVarInt" ( "tempInt" ) , "localVarString" ( "tempName" ) ); } setLocalVarString "ui_attachment1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "ui_attachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); setLocalVarInt "ui_numAttachments" ( 0 ); if ( localvarstring( "ui_attachment1" ) != "none" ) { setLocalVarInt "ui_numAttachments" ( localvarint( "ui_numAttachments" ) + 1 ); } if ( localvarstring( "ui_attachment2" ) != "none" ) { setLocalVarInt "ui_numAttachments" ( localvarint( "ui_numAttachments" ) + 1 ); } if ( !( tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) , 12 ) != "" || tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) , 12 ) != "" ) && ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_gl" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_grip" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_shotgun" ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_heartbeat" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "perks" , 0 , "specialty_null" ); } setLocalVarString "loadoutPrimary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "weapon" ) ); setLocalVarString "loadoutPrimaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) ); setLocalVarString "loadoutPrimaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 1 ) ); if ( localvarstring( "loadoutPrimaryAttachment2" ) == "" ) { setLocalVarString "loadoutPrimaryAttachment2" ( "none" ); } setLocalVarString "loadoutPrimaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "camo" ) ); setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "loadoutSecondaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "loadoutSecondaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); if ( localvarstring( "loadoutSecondaryAttachment2" ) == "" ) { setLocalVarString "loadoutSecondaryAttachment2" ( "none" ); } setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutEquipment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) ); setLocalVarString "loadoutPerk1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) ); setLocalVarString "loadoutPerk2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 2 ) ); setLocalVarString "loadoutPerk3" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 3 ) ); setLocalVarString "loadoutStreak1" ( getplayerdata( "killstreaks" , 0 ) ); setLocalVarString "loadoutStreak2" ( getplayerdata( "killstreaks" , 1 ) ); setLocalVarString "loadoutStreak3" ( getplayerdata( "killstreaks" , 2 ) ); setLocalVarString "loadoutDeathStreak" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 4 ) ); setLocalVarString "loadoutOffhandSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "specialGrenade" ) ); setLocalVarString "loadoutClassName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "name" ) ); if ( ( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 17 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 17 ) ) ) { setItemColor self backcolor 0 0 0 "0.35"; } else { setItemColor self backcolor 0 0 0 1; } if ( localvarint( "ui_numAttachments" ) == 2 ) { if ( 1 == 0 ) { if ( localvarint( "ui_tabDepth" ) == 0 ) { setLocalVarString "ui_tab1Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 1 ) { setLocalVarString "ui_tab2Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 2 ) { setLocalVarString "ui_tab3Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 3 ) { setLocalVarString "ui_tab4Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 4 ) { setLocalVarString "ui_tab5Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 5 ) { setLocalVarString "ui_tab6Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } open "popup_cac_primary_camo"; } else { close "popup_cac_weapon_primary"; close "popup_primary_attachments" close "popup_secondary_attachments" close "popup_cac_weapon_secondary"; close "popup_cac_handgun_secondary"; close "popup_cac_machinePistols_secondary"; close "popup_cac_assault_primary"; close "popup_cac_SMG_primary"; close "popup_cac_LMG_primary"; close "popup_cac_sniper_primary"; close "popup_cac_shotgun_primary"; close "popup_cac_assault_secondary"; close "popup_cac_SMG_secondary"; close "popup_cac_LMG_secondary"; close "popup_cac_sniper_secondary"; close "popup_cac_shotgun_secondary"; close "popup_cac_template"; close "popup_cac_primary_camo"; close "popup_cac_secondary_camo"; close "popup_cac_bling"; close "popup_cac_perk2"; close "popup_cac_rocket_secondary"; close "popup_primary_attachments_bling"; close "popup_secondary_attachments_bling"; close "popup_cac_other_primary"; } if ( !( tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) , 12 ) != "" || tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) , 12 ) != "" ) && ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_gl" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_grip" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_shotgun" ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_heartbeat" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "perks" , 0 , "specialty_null" ); } setLocalVarString "loadoutPrimary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "weapon" ) ); setLocalVarString "loadoutPrimaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) ); setLocalVarString "loadoutPrimaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 1 ) ); if ( localvarstring( "loadoutPrimaryAttachment2" ) == "" ) { setLocalVarString "loadoutPrimaryAttachment2" ( "none" ); } setLocalVarString "loadoutPrimaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "camo" ) ); setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "loadoutSecondaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "loadoutSecondaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); if ( localvarstring( "loadoutSecondaryAttachment2" ) == "" ) { setLocalVarString "loadoutSecondaryAttachment2" ( "none" ); } setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutEquipment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) ); setLocalVarString "loadoutPerk1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) ); setLocalVarString "loadoutPerk2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 2 ) ); setLocalVarString "loadoutPerk3" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 3 ) ); setLocalVarString "loadoutStreak1" ( getplayerdata( "killstreaks" , 0 ) ); setLocalVarString "loadoutStreak2" ( getplayerdata( "killstreaks" , 1 ) ); setLocalVarString "loadoutStreak3" ( getplayerdata( "killstreaks" , 2 ) ); setLocalVarString "loadoutDeathStreak" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 4 ) ); setLocalVarString "loadoutOffhandSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "specialGrenade" ) ); setLocalVarString "loadoutClassName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "name" ) ); } } else { if ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) == "specialty_bling" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 , "none" ) ;; } if ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) == "specialty_bling" && getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 17 ) ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 , "none" ) ;; } setLocalVarString "tempName" ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 17 ) ); setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 , "localVarString" ( "tempName" ) ); if ( 1 == 0 ) { open "popup_cac_primary_camo"; } else { close "popup_cac_weapon_primary"; close "popup_primary_attachments" close "popup_secondary_attachments" close "popup_cac_weapon_secondary"; close "popup_cac_handgun_secondary"; close "popup_cac_machinePistols_secondary"; close "popup_cac_assault_primary"; close "popup_cac_SMG_primary"; close "popup_cac_LMG_primary"; close "popup_cac_sniper_primary"; close "popup_cac_shotgun_primary"; close "popup_cac_assault_secondary"; close "popup_cac_SMG_secondary"; close "popup_cac_LMG_secondary"; close "popup_cac_sniper_secondary"; close "popup_cac_shotgun_secondary"; close "popup_cac_template"; close "popup_cac_primary_camo"; close "popup_cac_secondary_camo"; close "popup_cac_bling"; close "popup_cac_perk2"; close "popup_cac_rocket_secondary"; close "popup_primary_attachments_bling"; close "popup_secondary_attachments_bling"; close "popup_cac_other_primary"; } if ( !( tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) , 12 ) != "" || tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) , 12 ) != "" ) && ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_gl" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_grip" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_shotgun" ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_heartbeat" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "perks" , 0 , "specialty_null" ); } setLocalVarString "loadoutPrimary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "weapon" ) ); setLocalVarString "loadoutPrimaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) ); setLocalVarString "loadoutPrimaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 1 ) ); if ( localvarstring( "loadoutPrimaryAttachment2" ) == "" ) { setLocalVarString "loadoutPrimaryAttachment2" ( "none" ); } setLocalVarString "loadoutPrimaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "camo" ) ); setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "loadoutSecondaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "loadoutSecondaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); if ( localvarstring( "loadoutSecondaryAttachment2" ) == "" ) { setLocalVarString "loadoutSecondaryAttachment2" ( "none" ); } setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutEquipment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) ); setLocalVarString "loadoutPerk1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) ); setLocalVarString "loadoutPerk2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 2 ) ); setLocalVarString "loadoutPerk3" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 3 ) ); setLocalVarString "loadoutStreak1" ( getplayerdata( "killstreaks" , 0 ) ); setLocalVarString "loadoutStreak2" ( getplayerdata( "killstreaks" , 1 ) ); setLocalVarString "loadoutStreak3" ( getplayerdata( "killstreaks" , 2 ) ); setLocalVarString "loadoutDeathStreak" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 4 ) ); setLocalVarString "loadoutOffhandSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "specialGrenade" ) ); setLocalVarString "loadoutClassName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "name" ) ); } } onFocus { play "mouse_over"; if ( dvarstring( "gameMode" ) != "mp" ) { setItemColor "mw2_popup_button" backcolor 0 0 0 0; } setItemColor self backcolor 0 0 0 1; setLocalVarBool "ui_popupAButton" ( 1 ); setLocalVarString "ui_attachment_hint" ( "" ); setLocalVarString "ui_selected_ref" ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 17 ) ); setLocalVarString "ui_weapon_ref" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "ui_unlock_ref" ( localvarstring( "ui_weapon_ref" ) + " " + tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 17 ) ); setLocalVarString "ui_challenge_ref" ( tablelookup( "mp/unlockTable.csv" , 0 , localvarstring( "ui_unlock_ref" ) , 3 ) ); setLocalVarInt "ui_challenge_state" ( 1 ); if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_2" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 2 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_3" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 3 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_4" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 4 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_5" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 5 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_6" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 6 ); } if ( ( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 17 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 17 ) ) ) { setItemColor self backcolor 0 0 0 "0.35"; } else { if ( !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 17 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment1" ) ) ) != "no" ) ) { setLocalVarString "ui_attachment_hint" ( localvarstring( "ui_attachment1" ) ); } if ( !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 17 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment2" ) ) ) != "no" ) ) { setLocalVarString "ui_attachment_hint" ( localvarstring( "ui_attachment2" ) ); } } } leaveFocus { setItemColor self backcolor 1 1 1 0; setLocalVarBool "ui_popupAButton" ( 0 ); setLocalVarString "tempName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); if ( localvarstring( "ui_selected_ref" ) != "" ) { setPlayerData( "attachmentNew" , "localVarString" ( "tempName" ) , "localVarString" ( "ui_selected_ref" ) , "false" ) ;; } } } itemDef { rect 162 144 40 20 1 1 decoration visible 1 style 3 forecolor 1 1 1 1 background "specialty_new" textscale 0.55 exp forecolor a ( 1 * getplayerdata( "attachmentNew" , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 17 ) ) ) visible when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 17 ) != "" ) } itemDef { rect 162 144 40 20 1 1 decoration visible 1 style 3 forecolor 1 1 1 1 background "specialty_locked" textscale 0.55 visible when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 17 ) != "" && isitemunlocked( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) + " " + tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 17 ) ) == 0 ) } itemDef { rect -64 164 336 20 1 1 decoration visible 1 style 3 forecolor 0.8 0.6 0.1 1 background "popup_button_selected_bar_bling" textscale 0.55 visible when ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 18 ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 18 ) ) } itemDef { name "cac_attachment_7" rect -64 164 336 20 1 1 visible 1 group "mw2_popup_button" style 1 forecolor 1 1 1 1 disablecolor 0.6 0.55 0.55 1 background "popup_button_selection_bar_bling" type 1 textfont 3 textalign 4 textalignx 68 textscale 0.375 visible when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 18 ) != "" ) disabled when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 18 ) != "" && ( !isitemunlocked( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) + " " + ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 18 ) ) ) || ( !( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 18 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 18 ) ) && ( ( !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 18 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment1" ) ) ) != "no" ) || !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 18 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment2" ) ) ) != "no" ) || localvarint( "ui_numAttachments" ) == 2 ) ) ) ) ) exp text ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 18 ) , 3 ) ) action { play "mouse_click"; if ( localvarint( "ui_tabDepth" ) == 0 ) { setLocalVarString "ui_tab1Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 18 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 1 ) { setLocalVarString "ui_tab2Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 18 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 2 ) { setLocalVarString "ui_tab3Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 18 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 3 ) { setLocalVarString "ui_tab4Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 18 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 4 ) { setLocalVarString "ui_tab5Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 18 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 5 ) { setLocalVarString "ui_tab6Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 18 ) , 3 ) ); } setLocalVarString "tempName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setPlayerData( "attachmentNew" , "localVarString" ( "tempName" ) , "localVarString" ( "ui_selected_ref" ) , "false" ) ;; if ( menuisopen( "popup_primary_attachments_bling" ) || menuisopen( "popup_secondary_attachments_bling" ) ) { setLocalVarString "tempName" ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 18 ) ); if ( ( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 18 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 18 ) ) ) { setLocalVarInt "tempInt" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 18 ) ); setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , "localVarInt" ( "tempInt" ) , "none" ); } else { setLocalVarInt "tempInt" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) != "none" ); setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , "localVarInt" ( "tempInt" ) , "localVarString" ( "tempName" ) ); } setLocalVarString "ui_attachment1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "ui_attachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); setLocalVarInt "ui_numAttachments" ( 0 ); if ( localvarstring( "ui_attachment1" ) != "none" ) { setLocalVarInt "ui_numAttachments" ( localvarint( "ui_numAttachments" ) + 1 ); } if ( localvarstring( "ui_attachment2" ) != "none" ) { setLocalVarInt "ui_numAttachments" ( localvarint( "ui_numAttachments" ) + 1 ); } if ( !( tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) , 12 ) != "" || tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) , 12 ) != "" ) && ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_gl" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_grip" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_shotgun" ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_heartbeat" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "perks" , 0 , "specialty_null" ); } setLocalVarString "loadoutPrimary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "weapon" ) ); setLocalVarString "loadoutPrimaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) ); setLocalVarString "loadoutPrimaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 1 ) ); if ( localvarstring( "loadoutPrimaryAttachment2" ) == "" ) { setLocalVarString "loadoutPrimaryAttachment2" ( "none" ); } setLocalVarString "loadoutPrimaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "camo" ) ); setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "loadoutSecondaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "loadoutSecondaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); if ( localvarstring( "loadoutSecondaryAttachment2" ) == "" ) { setLocalVarString "loadoutSecondaryAttachment2" ( "none" ); } setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutEquipment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) ); setLocalVarString "loadoutPerk1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) ); setLocalVarString "loadoutPerk2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 2 ) ); setLocalVarString "loadoutPerk3" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 3 ) ); setLocalVarString "loadoutStreak1" ( getplayerdata( "killstreaks" , 0 ) ); setLocalVarString "loadoutStreak2" ( getplayerdata( "killstreaks" , 1 ) ); setLocalVarString "loadoutStreak3" ( getplayerdata( "killstreaks" , 2 ) ); setLocalVarString "loadoutDeathStreak" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 4 ) ); setLocalVarString "loadoutOffhandSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "specialGrenade" ) ); setLocalVarString "loadoutClassName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "name" ) ); if ( ( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 18 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 18 ) ) ) { setItemColor self backcolor 0 0 0 "0.35"; } else { setItemColor self backcolor 0 0 0 1; } if ( localvarint( "ui_numAttachments" ) == 2 ) { if ( 1 == 0 ) { if ( localvarint( "ui_tabDepth" ) == 0 ) { setLocalVarString "ui_tab1Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 1 ) { setLocalVarString "ui_tab2Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 2 ) { setLocalVarString "ui_tab3Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 3 ) { setLocalVarString "ui_tab4Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 4 ) { setLocalVarString "ui_tab5Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 5 ) { setLocalVarString "ui_tab6Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } open "popup_cac_primary_camo"; } else { close "popup_cac_weapon_primary"; close "popup_primary_attachments" close "popup_secondary_attachments" close "popup_cac_weapon_secondary"; close "popup_cac_handgun_secondary"; close "popup_cac_machinePistols_secondary"; close "popup_cac_assault_primary"; close "popup_cac_SMG_primary"; close "popup_cac_LMG_primary"; close "popup_cac_sniper_primary"; close "popup_cac_shotgun_primary"; close "popup_cac_assault_secondary"; close "popup_cac_SMG_secondary"; close "popup_cac_LMG_secondary"; close "popup_cac_sniper_secondary"; close "popup_cac_shotgun_secondary"; close "popup_cac_template"; close "popup_cac_primary_camo"; close "popup_cac_secondary_camo"; close "popup_cac_bling"; close "popup_cac_perk2"; close "popup_cac_rocket_secondary"; close "popup_primary_attachments_bling"; close "popup_secondary_attachments_bling"; close "popup_cac_other_primary"; } if ( !( tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) , 12 ) != "" || tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) , 12 ) != "" ) && ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_gl" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_grip" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_shotgun" ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_heartbeat" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "perks" , 0 , "specialty_null" ); } setLocalVarString "loadoutPrimary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "weapon" ) ); setLocalVarString "loadoutPrimaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) ); setLocalVarString "loadoutPrimaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 1 ) ); if ( localvarstring( "loadoutPrimaryAttachment2" ) == "" ) { setLocalVarString "loadoutPrimaryAttachment2" ( "none" ); } setLocalVarString "loadoutPrimaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "camo" ) ); setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "loadoutSecondaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "loadoutSecondaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); if ( localvarstring( "loadoutSecondaryAttachment2" ) == "" ) { setLocalVarString "loadoutSecondaryAttachment2" ( "none" ); } setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutEquipment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) ); setLocalVarString "loadoutPerk1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) ); setLocalVarString "loadoutPerk2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 2 ) ); setLocalVarString "loadoutPerk3" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 3 ) ); setLocalVarString "loadoutStreak1" ( getplayerdata( "killstreaks" , 0 ) ); setLocalVarString "loadoutStreak2" ( getplayerdata( "killstreaks" , 1 ) ); setLocalVarString "loadoutStreak3" ( getplayerdata( "killstreaks" , 2 ) ); setLocalVarString "loadoutDeathStreak" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 4 ) ); setLocalVarString "loadoutOffhandSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "specialGrenade" ) ); setLocalVarString "loadoutClassName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "name" ) ); } } else { if ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) == "specialty_bling" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 , "none" ) ;; } if ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) == "specialty_bling" && getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 18 ) ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 , "none" ) ;; } setLocalVarString "tempName" ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 18 ) ); setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 , "localVarString" ( "tempName" ) ); if ( 1 == 0 ) { open "popup_cac_primary_camo"; } else { close "popup_cac_weapon_primary"; close "popup_primary_attachments" close "popup_secondary_attachments" close "popup_cac_weapon_secondary"; close "popup_cac_handgun_secondary"; close "popup_cac_machinePistols_secondary"; close "popup_cac_assault_primary"; close "popup_cac_SMG_primary"; close "popup_cac_LMG_primary"; close "popup_cac_sniper_primary"; close "popup_cac_shotgun_primary"; close "popup_cac_assault_secondary"; close "popup_cac_SMG_secondary"; close "popup_cac_LMG_secondary"; close "popup_cac_sniper_secondary"; close "popup_cac_shotgun_secondary"; close "popup_cac_template"; close "popup_cac_primary_camo"; close "popup_cac_secondary_camo"; close "popup_cac_bling"; close "popup_cac_perk2"; close "popup_cac_rocket_secondary"; close "popup_primary_attachments_bling"; close "popup_secondary_attachments_bling"; close "popup_cac_other_primary"; } if ( !( tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) , 12 ) != "" || tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) , 12 ) != "" ) && ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_gl" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_grip" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_shotgun" ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_heartbeat" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "perks" , 0 , "specialty_null" ); } setLocalVarString "loadoutPrimary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "weapon" ) ); setLocalVarString "loadoutPrimaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) ); setLocalVarString "loadoutPrimaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 1 ) ); if ( localvarstring( "loadoutPrimaryAttachment2" ) == "" ) { setLocalVarString "loadoutPrimaryAttachment2" ( "none" ); } setLocalVarString "loadoutPrimaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "camo" ) ); setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "loadoutSecondaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "loadoutSecondaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); if ( localvarstring( "loadoutSecondaryAttachment2" ) == "" ) { setLocalVarString "loadoutSecondaryAttachment2" ( "none" ); } setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutEquipment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) ); setLocalVarString "loadoutPerk1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) ); setLocalVarString "loadoutPerk2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 2 ) ); setLocalVarString "loadoutPerk3" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 3 ) ); setLocalVarString "loadoutStreak1" ( getplayerdata( "killstreaks" , 0 ) ); setLocalVarString "loadoutStreak2" ( getplayerdata( "killstreaks" , 1 ) ); setLocalVarString "loadoutStreak3" ( getplayerdata( "killstreaks" , 2 ) ); setLocalVarString "loadoutDeathStreak" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 4 ) ); setLocalVarString "loadoutOffhandSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "specialGrenade" ) ); setLocalVarString "loadoutClassName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "name" ) ); } } onFocus { play "mouse_over"; if ( dvarstring( "gameMode" ) != "mp" ) { setItemColor "mw2_popup_button" backcolor 0 0 0 0; } setItemColor self backcolor 0 0 0 1; setLocalVarBool "ui_popupAButton" ( 1 ); setLocalVarString "ui_attachment_hint" ( "" ); setLocalVarString "ui_selected_ref" ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 18 ) ); setLocalVarString "ui_weapon_ref" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "ui_unlock_ref" ( localvarstring( "ui_weapon_ref" ) + " " + tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 18 ) ); setLocalVarString "ui_challenge_ref" ( tablelookup( "mp/unlockTable.csv" , 0 , localvarstring( "ui_unlock_ref" ) , 3 ) ); setLocalVarInt "ui_challenge_state" ( 1 ); if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_2" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 2 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_3" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 3 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_4" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 4 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_5" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 5 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_6" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 6 ); } if ( ( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 18 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 18 ) ) ) { setItemColor self backcolor 0 0 0 "0.35"; } else { if ( !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 18 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment1" ) ) ) != "no" ) ) { setLocalVarString "ui_attachment_hint" ( localvarstring( "ui_attachment1" ) ); } if ( !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 18 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment2" ) ) ) != "no" ) ) { setLocalVarString "ui_attachment_hint" ( localvarstring( "ui_attachment2" ) ); } } } leaveFocus { setItemColor self backcolor 1 1 1 0; setLocalVarBool "ui_popupAButton" ( 0 ); setLocalVarString "tempName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); if ( localvarstring( "ui_selected_ref" ) != "" ) { setPlayerData( "attachmentNew" , "localVarString" ( "tempName" ) , "localVarString" ( "ui_selected_ref" ) , "false" ) ;; } } } itemDef { rect 162 164 40 20 1 1 decoration visible 1 style 3 forecolor 1 1 1 1 background "specialty_new" textscale 0.55 exp forecolor a ( 1 * getplayerdata( "attachmentNew" , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 18 ) ) ) visible when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 18 ) != "" ) } itemDef { rect 162 164 40 20 1 1 decoration visible 1 style 3 forecolor 1 1 1 1 background "specialty_locked" textscale 0.55 visible when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 18 ) != "" && isitemunlocked( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) + " " + tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 18 ) ) == 0 ) } itemDef { rect -64 184 336 20 1 1 decoration visible 1 style 3 forecolor 0.8 0.6 0.1 1 background "popup_button_selected_bar_bling" textscale 0.55 visible when ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 19 ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 19 ) ) } itemDef { name "cac_attachment_8" rect -64 184 336 20 1 1 visible 1 group "mw2_popup_button" style 1 forecolor 1 1 1 1 disablecolor 0.6 0.55 0.55 1 background "popup_button_selection_bar_bling" type 1 textfont 3 textalign 4 textalignx 68 textscale 0.375 visible when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 19 ) != "" ) disabled when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 19 ) != "" && ( !isitemunlocked( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) + " " + ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 19 ) ) ) || ( !( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 19 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 19 ) ) && ( ( !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 19 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment1" ) ) ) != "no" ) || !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 19 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment2" ) ) ) != "no" ) || localvarint( "ui_numAttachments" ) == 2 ) ) ) ) ) exp text ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 19 ) , 3 ) ) action { play "mouse_click"; if ( localvarint( "ui_tabDepth" ) == 0 ) { setLocalVarString "ui_tab1Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 19 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 1 ) { setLocalVarString "ui_tab2Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 19 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 2 ) { setLocalVarString "ui_tab3Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 19 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 3 ) { setLocalVarString "ui_tab4Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 19 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 4 ) { setLocalVarString "ui_tab5Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 19 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 5 ) { setLocalVarString "ui_tab6Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 19 ) , 3 ) ); } setLocalVarString "tempName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setPlayerData( "attachmentNew" , "localVarString" ( "tempName" ) , "localVarString" ( "ui_selected_ref" ) , "false" ) ;; if ( menuisopen( "popup_primary_attachments_bling" ) || menuisopen( "popup_secondary_attachments_bling" ) ) { setLocalVarString "tempName" ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 19 ) ); if ( ( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 19 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 19 ) ) ) { setLocalVarInt "tempInt" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 19 ) ); setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , "localVarInt" ( "tempInt" ) , "none" ); } else { setLocalVarInt "tempInt" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) != "none" ); setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , "localVarInt" ( "tempInt" ) , "localVarString" ( "tempName" ) ); } setLocalVarString "ui_attachment1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "ui_attachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); setLocalVarInt "ui_numAttachments" ( 0 ); if ( localvarstring( "ui_attachment1" ) != "none" ) { setLocalVarInt "ui_numAttachments" ( localvarint( "ui_numAttachments" ) + 1 ); } if ( localvarstring( "ui_attachment2" ) != "none" ) { setLocalVarInt "ui_numAttachments" ( localvarint( "ui_numAttachments" ) + 1 ); } if ( !( tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) , 12 ) != "" || tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) , 12 ) != "" ) && ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_gl" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_grip" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_shotgun" ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_heartbeat" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "perks" , 0 , "specialty_null" ); } setLocalVarString "loadoutPrimary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "weapon" ) ); setLocalVarString "loadoutPrimaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) ); setLocalVarString "loadoutPrimaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 1 ) ); if ( localvarstring( "loadoutPrimaryAttachment2" ) == "" ) { setLocalVarString "loadoutPrimaryAttachment2" ( "none" ); } setLocalVarString "loadoutPrimaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "camo" ) ); setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "loadoutSecondaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "loadoutSecondaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); if ( localvarstring( "loadoutSecondaryAttachment2" ) == "" ) { setLocalVarString "loadoutSecondaryAttachment2" ( "none" ); } setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutEquipment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) ); setLocalVarString "loadoutPerk1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) ); setLocalVarString "loadoutPerk2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 2 ) ); setLocalVarString "loadoutPerk3" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 3 ) ); setLocalVarString "loadoutStreak1" ( getplayerdata( "killstreaks" , 0 ) ); setLocalVarString "loadoutStreak2" ( getplayerdata( "killstreaks" , 1 ) ); setLocalVarString "loadoutStreak3" ( getplayerdata( "killstreaks" , 2 ) ); setLocalVarString "loadoutDeathStreak" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 4 ) ); setLocalVarString "loadoutOffhandSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "specialGrenade" ) ); setLocalVarString "loadoutClassName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "name" ) ); if ( ( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 19 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 19 ) ) ) { setItemColor self backcolor 0 0 0 "0.35"; } else { setItemColor self backcolor 0 0 0 1; } if ( localvarint( "ui_numAttachments" ) == 2 ) { if ( 1 == 0 ) { if ( localvarint( "ui_tabDepth" ) == 0 ) { setLocalVarString "ui_tab1Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 1 ) { setLocalVarString "ui_tab2Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 2 ) { setLocalVarString "ui_tab3Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 3 ) { setLocalVarString "ui_tab4Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 4 ) { setLocalVarString "ui_tab5Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 5 ) { setLocalVarString "ui_tab6Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } open "popup_cac_primary_camo"; } else { close "popup_cac_weapon_primary"; close "popup_primary_attachments" close "popup_secondary_attachments" close "popup_cac_weapon_secondary"; close "popup_cac_handgun_secondary"; close "popup_cac_machinePistols_secondary"; close "popup_cac_assault_primary"; close "popup_cac_SMG_primary"; close "popup_cac_LMG_primary"; close "popup_cac_sniper_primary"; close "popup_cac_shotgun_primary"; close "popup_cac_assault_secondary"; close "popup_cac_SMG_secondary"; close "popup_cac_LMG_secondary"; close "popup_cac_sniper_secondary"; close "popup_cac_shotgun_secondary"; close "popup_cac_template"; close "popup_cac_primary_camo"; close "popup_cac_secondary_camo"; close "popup_cac_bling"; close "popup_cac_perk2"; close "popup_cac_rocket_secondary"; close "popup_primary_attachments_bling"; close "popup_secondary_attachments_bling"; close "popup_cac_other_primary"; } if ( !( tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) , 12 ) != "" || tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) , 12 ) != "" ) && ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_gl" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_grip" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_shotgun" ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_heartbeat" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "perks" , 0 , "specialty_null" ); } setLocalVarString "loadoutPrimary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "weapon" ) ); setLocalVarString "loadoutPrimaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) ); setLocalVarString "loadoutPrimaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 1 ) ); if ( localvarstring( "loadoutPrimaryAttachment2" ) == "" ) { setLocalVarString "loadoutPrimaryAttachment2" ( "none" ); } setLocalVarString "loadoutPrimaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "camo" ) ); setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "loadoutSecondaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "loadoutSecondaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); if ( localvarstring( "loadoutSecondaryAttachment2" ) == "" ) { setLocalVarString "loadoutSecondaryAttachment2" ( "none" ); } setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutEquipment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) ); setLocalVarString "loadoutPerk1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) ); setLocalVarString "loadoutPerk2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 2 ) ); setLocalVarString "loadoutPerk3" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 3 ) ); setLocalVarString "loadoutStreak1" ( getplayerdata( "killstreaks" , 0 ) ); setLocalVarString "loadoutStreak2" ( getplayerdata( "killstreaks" , 1 ) ); setLocalVarString "loadoutStreak3" ( getplayerdata( "killstreaks" , 2 ) ); setLocalVarString "loadoutDeathStreak" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 4 ) ); setLocalVarString "loadoutOffhandSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "specialGrenade" ) ); setLocalVarString "loadoutClassName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "name" ) ); } } else { if ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) == "specialty_bling" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 , "none" ) ;; } if ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) == "specialty_bling" && getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 19 ) ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 , "none" ) ;; } setLocalVarString "tempName" ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 19 ) ); setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 , "localVarString" ( "tempName" ) ); if ( 1 == 0 ) { open "popup_cac_primary_camo"; } else { close "popup_cac_weapon_primary"; close "popup_primary_attachments" close "popup_secondary_attachments" close "popup_cac_weapon_secondary"; close "popup_cac_handgun_secondary"; close "popup_cac_machinePistols_secondary"; close "popup_cac_assault_primary"; close "popup_cac_SMG_primary"; close "popup_cac_LMG_primary"; close "popup_cac_sniper_primary"; close "popup_cac_shotgun_primary"; close "popup_cac_assault_secondary"; close "popup_cac_SMG_secondary"; close "popup_cac_LMG_secondary"; close "popup_cac_sniper_secondary"; close "popup_cac_shotgun_secondary"; close "popup_cac_template"; close "popup_cac_primary_camo"; close "popup_cac_secondary_camo"; close "popup_cac_bling"; close "popup_cac_perk2"; close "popup_cac_rocket_secondary"; close "popup_primary_attachments_bling"; close "popup_secondary_attachments_bling"; close "popup_cac_other_primary"; } if ( !( tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) , 12 ) != "" || tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) , 12 ) != "" ) && ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_gl" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_grip" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_shotgun" ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_heartbeat" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "perks" , 0 , "specialty_null" ); } setLocalVarString "loadoutPrimary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "weapon" ) ); setLocalVarString "loadoutPrimaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) ); setLocalVarString "loadoutPrimaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 1 ) ); if ( localvarstring( "loadoutPrimaryAttachment2" ) == "" ) { setLocalVarString "loadoutPrimaryAttachment2" ( "none" ); } setLocalVarString "loadoutPrimaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "camo" ) ); setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "loadoutSecondaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "loadoutSecondaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); if ( localvarstring( "loadoutSecondaryAttachment2" ) == "" ) { setLocalVarString "loadoutSecondaryAttachment2" ( "none" ); } setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutEquipment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) ); setLocalVarString "loadoutPerk1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) ); setLocalVarString "loadoutPerk2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 2 ) ); setLocalVarString "loadoutPerk3" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 3 ) ); setLocalVarString "loadoutStreak1" ( getplayerdata( "killstreaks" , 0 ) ); setLocalVarString "loadoutStreak2" ( getplayerdata( "killstreaks" , 1 ) ); setLocalVarString "loadoutStreak3" ( getplayerdata( "killstreaks" , 2 ) ); setLocalVarString "loadoutDeathStreak" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 4 ) ); setLocalVarString "loadoutOffhandSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "specialGrenade" ) ); setLocalVarString "loadoutClassName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "name" ) ); } } onFocus { play "mouse_over"; if ( dvarstring( "gameMode" ) != "mp" ) { setItemColor "mw2_popup_button" backcolor 0 0 0 0; } setItemColor self backcolor 0 0 0 1; setLocalVarBool "ui_popupAButton" ( 1 ); setLocalVarString "ui_attachment_hint" ( "" ); setLocalVarString "ui_selected_ref" ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 19 ) ); setLocalVarString "ui_weapon_ref" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "ui_unlock_ref" ( localvarstring( "ui_weapon_ref" ) + " " + tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 19 ) ); setLocalVarString "ui_challenge_ref" ( tablelookup( "mp/unlockTable.csv" , 0 , localvarstring( "ui_unlock_ref" ) , 3 ) ); setLocalVarInt "ui_challenge_state" ( 1 ); if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_2" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 2 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_3" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 3 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_4" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 4 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_5" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 5 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_6" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 6 ); } if ( ( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 19 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 19 ) ) ) { setItemColor self backcolor 0 0 0 "0.35"; } else { if ( !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 19 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment1" ) ) ) != "no" ) ) { setLocalVarString "ui_attachment_hint" ( localvarstring( "ui_attachment1" ) ); } if ( !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 19 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment2" ) ) ) != "no" ) ) { setLocalVarString "ui_attachment_hint" ( localvarstring( "ui_attachment2" ) ); } } } leaveFocus { setItemColor self backcolor 1 1 1 0; setLocalVarBool "ui_popupAButton" ( 0 ); setLocalVarString "tempName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); if ( localvarstring( "ui_selected_ref" ) != "" ) { setPlayerData( "attachmentNew" , "localVarString" ( "tempName" ) , "localVarString" ( "ui_selected_ref" ) , "false" ) ;; } } } itemDef { rect 162 184 40 20 1 1 decoration visible 1 style 3 forecolor 1 1 1 1 background "specialty_new" textscale 0.55 exp forecolor a ( 1 * getplayerdata( "attachmentNew" , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 19 ) ) ) visible when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 19 ) != "" ) } itemDef { rect 162 184 40 20 1 1 decoration visible 1 style 3 forecolor 1 1 1 1 background "specialty_locked" textscale 0.55 visible when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 19 ) != "" && isitemunlocked( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) + " " + tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 19 ) ) == 0 ) } itemDef { rect -64 204 336 20 1 1 decoration visible 1 style 3 forecolor 0.8 0.6 0.1 1 background "popup_button_selected_bar_bling" textscale 0.55 visible when ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 20 ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 20 ) ) } itemDef { name "cac_attachment_9" rect -64 204 336 20 1 1 visible 1 group "mw2_popup_button" style 1 forecolor 1 1 1 1 disablecolor 0.6 0.55 0.55 1 background "popup_button_selection_bar_bling" type 1 textfont 3 textalign 4 textalignx 68 textscale 0.375 visible when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 20 ) != "" ) disabled when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 20 ) != "" && ( !isitemunlocked( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) + " " + ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 20 ) ) ) || ( !( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 20 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 20 ) ) && ( ( !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 20 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment1" ) ) ) != "no" ) || !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 20 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment2" ) ) ) != "no" ) || localvarint( "ui_numAttachments" ) == 2 ) ) ) ) ) exp text ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 20 ) , 3 ) ) action { play "mouse_click"; if ( localvarint( "ui_tabDepth" ) == 0 ) { setLocalVarString "ui_tab1Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 20 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 1 ) { setLocalVarString "ui_tab2Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 20 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 2 ) { setLocalVarString "ui_tab3Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 20 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 3 ) { setLocalVarString "ui_tab4Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 20 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 4 ) { setLocalVarString "ui_tab5Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 20 ) , 3 ) ); } if ( localvarint( "ui_tabDepth" ) == 5 ) { setLocalVarString "ui_tab6Name" ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 20 ) , 3 ) ); } setLocalVarString "tempName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setPlayerData( "attachmentNew" , "localVarString" ( "tempName" ) , "localVarString" ( "ui_selected_ref" ) , "false" ) ;; if ( menuisopen( "popup_primary_attachments_bling" ) || menuisopen( "popup_secondary_attachments_bling" ) ) { setLocalVarString "tempName" ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 20 ) ); if ( ( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 20 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 20 ) ) ) { setLocalVarInt "tempInt" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 20 ) ); setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , "localVarInt" ( "tempInt" ) , "none" ); } else { setLocalVarInt "tempInt" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) != "none" ); setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , "localVarInt" ( "tempInt" ) , "localVarString" ( "tempName" ) ); } setLocalVarString "ui_attachment1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "ui_attachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); setLocalVarInt "ui_numAttachments" ( 0 ); if ( localvarstring( "ui_attachment1" ) != "none" ) { setLocalVarInt "ui_numAttachments" ( localvarint( "ui_numAttachments" ) + 1 ); } if ( localvarstring( "ui_attachment2" ) != "none" ) { setLocalVarInt "ui_numAttachments" ( localvarint( "ui_numAttachments" ) + 1 ); } if ( !( tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) , 12 ) != "" || tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) , 12 ) != "" ) && ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_gl" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_grip" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_shotgun" ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_heartbeat" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "perks" , 0 , "specialty_null" ); } setLocalVarString "loadoutPrimary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "weapon" ) ); setLocalVarString "loadoutPrimaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) ); setLocalVarString "loadoutPrimaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 1 ) ); if ( localvarstring( "loadoutPrimaryAttachment2" ) == "" ) { setLocalVarString "loadoutPrimaryAttachment2" ( "none" ); } setLocalVarString "loadoutPrimaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "camo" ) ); setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "loadoutSecondaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "loadoutSecondaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); if ( localvarstring( "loadoutSecondaryAttachment2" ) == "" ) { setLocalVarString "loadoutSecondaryAttachment2" ( "none" ); } setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutEquipment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) ); setLocalVarString "loadoutPerk1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) ); setLocalVarString "loadoutPerk2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 2 ) ); setLocalVarString "loadoutPerk3" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 3 ) ); setLocalVarString "loadoutStreak1" ( getplayerdata( "killstreaks" , 0 ) ); setLocalVarString "loadoutStreak2" ( getplayerdata( "killstreaks" , 1 ) ); setLocalVarString "loadoutStreak3" ( getplayerdata( "killstreaks" , 2 ) ); setLocalVarString "loadoutDeathStreak" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 4 ) ); setLocalVarString "loadoutOffhandSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "specialGrenade" ) ); setLocalVarString "loadoutClassName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "name" ) ); if ( ( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 20 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 20 ) ) ) { setItemColor self backcolor 0 0 0 "0.35"; } else { setItemColor self backcolor 0 0 0 1; } if ( localvarint( "ui_numAttachments" ) == 2 ) { if ( 1 == 0 ) { if ( localvarint( "ui_tabDepth" ) == 0 ) { setLocalVarString "ui_tab1Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 1 ) { setLocalVarString "ui_tab2Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 2 ) { setLocalVarString "ui_tab3Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 3 ) { setLocalVarString "ui_tab4Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 4 ) { setLocalVarString "ui_tab5Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } if ( localvarint( "ui_tabDepth" ) == 5 ) { setLocalVarString "ui_tab6Name" ( "@" + tablelookup( "mp/perkTable.csv" , 1 , "specialty_bling" , 2 ) ); } open "popup_cac_primary_camo"; } else { close "popup_cac_weapon_primary"; close "popup_primary_attachments" close "popup_secondary_attachments" close "popup_cac_weapon_secondary"; close "popup_cac_handgun_secondary"; close "popup_cac_machinePistols_secondary"; close "popup_cac_assault_primary"; close "popup_cac_SMG_primary"; close "popup_cac_LMG_primary"; close "popup_cac_sniper_primary"; close "popup_cac_shotgun_primary"; close "popup_cac_assault_secondary"; close "popup_cac_SMG_secondary"; close "popup_cac_LMG_secondary"; close "popup_cac_sniper_secondary"; close "popup_cac_shotgun_secondary"; close "popup_cac_template"; close "popup_cac_primary_camo"; close "popup_cac_secondary_camo"; close "popup_cac_bling"; close "popup_cac_perk2"; close "popup_cac_rocket_secondary"; close "popup_primary_attachments_bling"; close "popup_secondary_attachments_bling"; close "popup_cac_other_primary"; } if ( !( tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) , 12 ) != "" || tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) , 12 ) != "" ) && ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_gl" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_grip" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_shotgun" ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_heartbeat" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "perks" , 0 , "specialty_null" ); } setLocalVarString "loadoutPrimary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "weapon" ) ); setLocalVarString "loadoutPrimaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) ); setLocalVarString "loadoutPrimaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 1 ) ); if ( localvarstring( "loadoutPrimaryAttachment2" ) == "" ) { setLocalVarString "loadoutPrimaryAttachment2" ( "none" ); } setLocalVarString "loadoutPrimaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "camo" ) ); setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "loadoutSecondaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "loadoutSecondaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); if ( localvarstring( "loadoutSecondaryAttachment2" ) == "" ) { setLocalVarString "loadoutSecondaryAttachment2" ( "none" ); } setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutEquipment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) ); setLocalVarString "loadoutPerk1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) ); setLocalVarString "loadoutPerk2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 2 ) ); setLocalVarString "loadoutPerk3" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 3 ) ); setLocalVarString "loadoutStreak1" ( getplayerdata( "killstreaks" , 0 ) ); setLocalVarString "loadoutStreak2" ( getplayerdata( "killstreaks" , 1 ) ); setLocalVarString "loadoutStreak3" ( getplayerdata( "killstreaks" , 2 ) ); setLocalVarString "loadoutDeathStreak" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 4 ) ); setLocalVarString "loadoutOffhandSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "specialGrenade" ) ); setLocalVarString "loadoutClassName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "name" ) ); } } else { if ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) == "specialty_bling" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 , "none" ) ;; } if ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) == "specialty_bling" && getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 20 ) ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 , "none" ) ;; } setLocalVarString "tempName" ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 20 ) ); setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 , "localVarString" ( "tempName" ) ); if ( 1 == 0 ) { open "popup_cac_primary_camo"; } else { close "popup_cac_weapon_primary"; close "popup_primary_attachments" close "popup_secondary_attachments" close "popup_cac_weapon_secondary"; close "popup_cac_handgun_secondary"; close "popup_cac_machinePistols_secondary"; close "popup_cac_assault_primary"; close "popup_cac_SMG_primary"; close "popup_cac_LMG_primary"; close "popup_cac_sniper_primary"; close "popup_cac_shotgun_primary"; close "popup_cac_assault_secondary"; close "popup_cac_SMG_secondary"; close "popup_cac_LMG_secondary"; close "popup_cac_sniper_secondary"; close "popup_cac_shotgun_secondary"; close "popup_cac_template"; close "popup_cac_primary_camo"; close "popup_cac_secondary_camo"; close "popup_cac_bling"; close "popup_cac_perk2"; close "popup_cac_rocket_secondary"; close "popup_primary_attachments_bling"; close "popup_secondary_attachments_bling"; close "popup_cac_other_primary"; } if ( !( tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) , 12 ) != "" || tablelookup( "mp/attachmentTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) , 12 ) != "" ) && ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_gl" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_grip" || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_shotgun" ) || getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) == "specialty_null_heartbeat" ) { setPlayerData( "customClasses" , "localVarInt" ( "classIndex" ) , "perks" , 0 , "specialty_null" ); } setLocalVarString "loadoutPrimary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "weapon" ) ); setLocalVarString "loadoutPrimaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 0 ) ); setLocalVarString "loadoutPrimaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "attachment" , 1 ) ); if ( localvarstring( "loadoutPrimaryAttachment2" ) == "" ) { setLocalVarString "loadoutPrimaryAttachment2" ( "none" ); } setLocalVarString "loadoutPrimaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 0 , "camo" ) ); setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "loadoutSecondaryAttachment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 0 ) ); setLocalVarString "loadoutSecondaryAttachment2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "attachment" , 1 ) ); if ( localvarstring( "loadoutSecondaryAttachment2" ) == "" ) { setLocalVarString "loadoutSecondaryAttachment2" ( "none" ); } setLocalVarString "loadoutSecondaryCamo" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "camo" ) ); setLocalVarString "loadoutEquipment" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 0 ) ); setLocalVarString "loadoutPerk1" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 1 ) ); setLocalVarString "loadoutPerk2" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 2 ) ); setLocalVarString "loadoutPerk3" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 3 ) ); setLocalVarString "loadoutStreak1" ( getplayerdata( "killstreaks" , 0 ) ); setLocalVarString "loadoutStreak2" ( getplayerdata( "killstreaks" , 1 ) ); setLocalVarString "loadoutStreak3" ( getplayerdata( "killstreaks" , 2 ) ); setLocalVarString "loadoutDeathStreak" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "perks" , 4 ) ); setLocalVarString "loadoutOffhandSecondary" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "specialGrenade" ) ); setLocalVarString "loadoutClassName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "name" ) ); } } onFocus { play "mouse_over"; if ( dvarstring( "gameMode" ) != "mp" ) { setItemColor "mw2_popup_button" backcolor 0 0 0 0; } setItemColor self backcolor 0 0 0 1; setLocalVarBool "ui_popupAButton" ( 1 ); setLocalVarString "ui_attachment_hint" ( "" ); setLocalVarString "ui_selected_ref" ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 20 ) ); setLocalVarString "ui_weapon_ref" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); setLocalVarString "ui_unlock_ref" ( localvarstring( "ui_weapon_ref" ) + " " + tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 20 ) ); setLocalVarString "ui_challenge_ref" ( tablelookup( "mp/unlockTable.csv" , 0 , localvarstring( "ui_unlock_ref" ) , 3 ) ); setLocalVarInt "ui_challenge_state" ( 1 ); if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_2" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 2 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_3" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 3 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_4" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 4 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_5" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 5 ); } if ( ( localvarstring( "ui_challenge_ref" ) == "ch_marksman_" + localvarstring( "ui_weapon_ref" ) + "_6" ) ) { setLocalVarString "ui_challenge_ref" ( "ch_marksman_" + localvarstring( "ui_weapon_ref" ) ); setLocalVarInt "ui_challenge_state" ( 6 ); } if ( ( localvarstring( "ui_attachment1" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 20 ) || localvarstring( "ui_attachment2" ) == tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 20 ) ) ) { setItemColor self backcolor 0 0 0 "0.35"; } else { if ( !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 20 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment1" ) ) ) != "no" ) ) { setLocalVarString "ui_attachment_hint" ( localvarstring( "ui_attachment1" ) ); } if ( !( tablelookup( "mp/attachmentCombos.csv" , 0 , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 20 ) , tablegetrownum( "mp/attachmentCombos.csv" , 0 , localvarstring( "ui_attachment2" ) ) ) != "no" ) ) { setLocalVarString "ui_attachment_hint" ( localvarstring( "ui_attachment2" ) ); } } } leaveFocus { setItemColor self backcolor 1 1 1 0; setLocalVarBool "ui_popupAButton" ( 0 ); setLocalVarString "tempName" ( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) ); if ( localvarstring( "ui_selected_ref" ) != "" ) { setPlayerData( "attachmentNew" , "localVarString" ( "tempName" ) , "localVarString" ( "ui_selected_ref" ) , "false" ) ;; } } } itemDef { rect 162 204 40 20 1 1 decoration visible 1 style 3 forecolor 1 1 1 1 background "specialty_new" textscale 0.55 exp forecolor a ( 1 * getplayerdata( "attachmentNew" , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 20 ) ) ) visible when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 20 ) != "" ) } itemDef { rect 162 204 40 20 1 1 decoration visible 1 style 3 forecolor 1 1 1 1 background "specialty_locked" textscale 0.55 visible when ( tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 20 ) != "" && isitemunlocked( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) + " " + tablelookup( "mp/statsTable.csv" , 4 , localvarstring( "loadoutSecondary" ) , 20 ) ) == 0 ) } itemDef { rect -64 224 336 20 1 1 decoration visible 1 group "mw2_popup_button" style 1 forecolor 1 1 1 1 disablecolor 0.6 0.55 0.55 1 background "menu_button_selection_bar" type 1 textfont 3 textalign 4 textalignx 68 textscale 0.375 exp text ( "@PLATFORM_UI_CLEAR_ATTACHMENTS" ) action { play "mouse_click"; } onFocus { play "mouse_over"; if ( dvarstring( "gameMode" ) != "mp" ) { setItemColor "mw2_popup_button" backcolor 0 0 0 0; } setItemColor self backcolor 0 0 0 1; setLocalVarBool "ui_popupAButton" ( 1 ); } leaveFocus { setItemColor self backcolor 1 1 1 0; setLocalVarBool "ui_popupAButton" ( 0 ); } } itemDef { rect -56 0 200 244 2 1 decoration visible 1 style 3 forecolor 1 1 1 0.5 background "small_box_lightfx" textscale 0.55 } itemDef { rect -56 0 200 244 2 1 decoration visible 1 forecolor 1 1 1 1 textfont 9 textalign 4 textalignx 4 textscale 0.375 exp text ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , localvarstring( "ui_selected_ref" ) , 3 ) ) } itemDef { rect 12 20 64 64 2 1 decoration visible 1 style 3 forecolor 1 1 1 1 textscale 0.55 visible when ( localvarstring( "ui_selected_ref" ) != "" ) exp material ( tablelookup( "mp/attachmentTable.csv" , 4 , localvarstring( "ui_selected_ref" ) , 6 ) ) } itemDef { rect -56 0 200 244 2 1 decoration autowrapped visible 1 forecolor 1 1 1 0.65 textfont 3 textalign 6 textalignx -4 textaligny 84 textscale 0.375 visible when ( isitemunlocked( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) + " " + localvarstring( "ui_selected_ref" ) ) ) exp text ( "@" + tablelookup( "mp/attachmentTable.csv" , 4 , localvarstring( "ui_selected_ref" ) , 7 ) ) } itemDef { rect -56 0 200 244 2 1 decoration autowrapped visible 1 forecolor 1 1 1 0.65 textfont 3 textalign 6 textalignx -4 textaligny 84 textscale 0.375 text "@MPUI_UNLOCKED_BY_CHALLENGE_PRE" visible when ( !isitemunlocked( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) + " " + localvarstring( "ui_selected_ref" ) ) ) } itemDef { rect -56 0 200 244 2 1 decoration autowrapped visible 1 forecolor 1 1 1 0.65 textfont 3 textalign 6 textalignx -4 textaligny 102 textscale 0.375 visible when ( !isitemunlocked( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) + " " + localvarstring( "ui_selected_ref" ) ) ) exp text ( locstring( "@" + tablelookup( "mp/allChallengesTable.csv" , 0 , localvarstring( "ui_challenge_ref" ) , 1 ) ) + locstring( "@" + tablelookup( "mp/allChallengesTable.csv" , 0 , localvarstring( "ui_challenge_ref" ) , 3 ) + "_" + localvarint( "ui_challenge_state" ) ) ) } itemDef { rect -56 0 200 244 2 1 decoration autowrapped visible 1 forecolor 1 1 1 1 textfont 3 textalign 6 textalignx -4 textaligny 102 textscale 0.375 visible when ( !isitemunlocked( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) + " " + localvarstring( "ui_selected_ref" ) ) ) exp text ( locstring( "@" + tablelookup( "mp/allChallengesTable.csv" , 0 , localvarstring( "ui_challenge_ref" ) , 1 ) ) + locstring( "@" + tablelookup( "mp/allChallengesTable.csv" , 0 , localvarstring( "ui_challenge_ref" ) , 3 ) + "_" + localvarint( "ui_challenge_state" ) ) ) } itemDef { rect -56 0 200 244 2 1 decoration autowrapped visible 1 forecolor 1 1 1 0.65 textfont 3 textalign 6 textalignx -4 textaligny 164 textscale 0.375 text "@PLATFORM_VIEW_CHALLENGE_DETAILS" visible when ( !isitemunlocked( getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) + " " + localvarstring( "ui_selected_ref" ) ) ) } itemDef { rect -128 22 120 4 3 1 decoration visible 1 style 1 forecolor 1 1 1 0.65 backcolor 0 0 0 1 background "gradient_fadein" textfont 3 textalign 6 textaligny -20 textscale 0.375 text "@MPUI_ACCURACY" visible when ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 22 ) && 1 ) } itemDef { rect -128 22 120 2 3 1 decoration visible 1 style 3 forecolor 0.75 1 0.7 0.85 background "white" textscale 0.55 exp rect w ( ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 22 ) / 100 ) * 120 ) visible when ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 22 ) && 1 ) } itemDef { rect -128 22 120 2 3 1 decoration visible 1 style 3 forecolor 0.85 0.85 0.85 1 background "gradient_fadein" textscale 0.55 exp rect w ( ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 22 ) / 100 ) * 120 ) visible when ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 22 ) && 1 ) } itemDef { rect -128 22 120 2 3 1 decoration visible 1 style 3 forecolor 1 1 0.25 0.65 background "white" textscale 0.55 exp rect x ( - 64 + ( 0 - 120 * ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 22 ) / 100 ) ) + ( ( 0 - 120 * ( tablelookup( "mp/attachmentTable.csv" , 4 , localvarstring( "ui_selected_ref" ) , 14 ) / 100 ) ) * ( tablelookup( "mp/attachmentTable.csv" , 4 , localvarstring( "ui_selected_ref" ) , 14 ) < 0 ) ) ) exp rect w ( min( 120 * ( tablelookup( "mp/attachmentTable.csv" , 4 , localvarstring( "ui_selected_ref" ) , 14 ) / 100 ) , ( 1 - ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 22 ) / 100 ) ) * 120 ) ) exp forecolor r ( ( tablelookup( "mp/attachmentTable.csv" , 4 , localvarstring( "ui_selected_ref" ) , 14 ) < 0 ) * 0.45 + 0.25 ) exp forecolor g ( ( tablelookup( "mp/attachmentTable.csv" , 4 , localvarstring( "ui_selected_ref" ) , 14 ) > 0 ) * 0.45 + 0.25 ) visible when ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 22 ) && 1 ) } itemDef { rect -128 48 120 4 3 1 decoration visible 1 style 1 forecolor 1 1 1 0.65 backcolor 0 0 0 1 background "gradient_fadein" textfont 3 textalign 6 textaligny -20 textscale 0.375 text "@MPUI_DAMAGE" visible when ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 23 ) && 1 ) } itemDef { rect -128 48 120 2 3 1 decoration visible 1 style 3 forecolor 0.75 1 0.7 0.85 background "white" textscale 0.55 exp rect w ( ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 23 ) / 100 ) * 120 ) visible when ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 23 ) && 1 ) } itemDef { rect -128 48 120 2 3 1 decoration visible 1 style 3 forecolor 0.85 0.85 0.85 1 background "gradient_fadein" textscale 0.55 exp rect w ( ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 23 ) / 100 ) * 120 ) visible when ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 23 ) && 1 ) } itemDef { rect -128 48 120 2 3 1 decoration visible 1 style 3 forecolor 1 1 0.25 0.65 background "white" textscale 0.55 exp rect x ( - 64 + ( 0 - 120 * ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 23 ) / 100 ) ) + ( ( 0 - 120 * ( tablelookup( "mp/attachmentTable.csv" , 4 , localvarstring( "ui_selected_ref" ) , 15 ) / 100 ) ) * ( tablelookup( "mp/attachmentTable.csv" , 4 , localvarstring( "ui_selected_ref" ) , 15 ) < 0 ) ) ) exp rect w ( min( 120 * ( tablelookup( "mp/attachmentTable.csv" , 4 , localvarstring( "ui_selected_ref" ) , 15 ) / 100 ) , ( 1 - ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 23 ) / 100 ) ) * 120 ) ) exp forecolor r ( ( tablelookup( "mp/attachmentTable.csv" , 4 , localvarstring( "ui_selected_ref" ) , 15 ) < 0 ) * 0.45 + 0.25 ) exp forecolor g ( ( tablelookup( "mp/attachmentTable.csv" , 4 , localvarstring( "ui_selected_ref" ) , 15 ) > 0 ) * 0.45 + 0.25 ) visible when ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 23 ) && 1 ) } itemDef { rect -128 74 120 4 3 1 decoration visible 1 style 1 forecolor 1 1 1 0.65 backcolor 0 0 0 1 background "gradient_fadein" textfont 3 textalign 6 textaligny -20 textscale 0.375 text "@MPUI_RANGE" visible when ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 24 ) && 1 ) } itemDef { rect -128 74 120 2 3 1 decoration visible 1 style 3 forecolor 0.75 1 0.7 0.85 background "white" textscale 0.55 exp rect w ( ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 24 ) / 100 ) * 120 ) visible when ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 24 ) && 1 ) } itemDef { rect -128 74 120 2 3 1 decoration visible 1 style 3 forecolor 0.85 0.85 0.85 1 background "gradient_fadein" textscale 0.55 exp rect w ( ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 24 ) / 100 ) * 120 ) visible when ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 24 ) && 1 ) } itemDef { rect -128 74 120 2 3 1 decoration visible 1 style 3 forecolor 1 1 0.25 0.65 background "white" textscale 0.55 exp rect x ( - 64 + ( 0 - 120 * ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 24 ) / 100 ) ) + ( ( 0 - 120 * ( tablelookup( "mp/attachmentTable.csv" , 4 , localvarstring( "ui_selected_ref" ) , 16 ) / 100 ) ) * ( tablelookup( "mp/attachmentTable.csv" , 4 , localvarstring( "ui_selected_ref" ) , 16 ) < 0 ) ) ) exp rect w ( min( 120 * ( tablelookup( "mp/attachmentTable.csv" , 4 , localvarstring( "ui_selected_ref" ) , 16 ) / 100 ) , ( 1 - ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 24 ) / 100 ) ) * 120 ) ) exp forecolor r ( ( tablelookup( "mp/attachmentTable.csv" , 4 , localvarstring( "ui_selected_ref" ) , 16 ) < 0 ) * 0.45 + 0.25 ) exp forecolor g ( ( tablelookup( "mp/attachmentTable.csv" , 4 , localvarstring( "ui_selected_ref" ) , 16 ) > 0 ) * 0.45 + 0.25 ) visible when ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 24 ) && 1 ) } itemDef { rect -128 100 120 4 3 1 decoration visible 1 style 1 forecolor 1 1 1 0.65 backcolor 0 0 0 1 background "gradient_fadein" textfont 3 textalign 6 textaligny -20 textscale 0.375 text "@MPUI_FIRE_RATE" visible when ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 25 ) && 1 ) } itemDef { rect -128 100 120 2 3 1 decoration visible 1 style 3 forecolor 0.75 1 0.7 0.85 background "white" textscale 0.55 exp rect w ( ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 25 ) / 100 ) * 120 ) visible when ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 25 ) && 1 ) } itemDef { rect -128 100 120 2 3 1 decoration visible 1 style 3 forecolor 0.85 0.85 0.85 1 background "gradient_fadein" textscale 0.55 exp rect w ( ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 25 ) / 100 ) * 120 ) visible when ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 25 ) && 1 ) } itemDef { rect -128 100 120 2 3 1 decoration visible 1 style 3 forecolor 1 1 0.25 0.65 background "white" textscale 0.55 exp rect x ( - 64 + ( 0 - 120 * ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 25 ) / 100 ) ) + ( ( 0 - 120 * ( tablelookup( "mp/attachmentTable.csv" , 4 , localvarstring( "ui_selected_ref" ) , 17 ) / 100 ) ) * ( tablelookup( "mp/attachmentTable.csv" , 4 , localvarstring( "ui_selected_ref" ) , 17 ) < 0 ) ) ) exp rect w ( min( 120 * ( tablelookup( "mp/attachmentTable.csv" , 4 , localvarstring( "ui_selected_ref" ) , 17 ) / 100 ) , ( 1 - ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 25 ) / 100 ) ) * 120 ) ) exp forecolor r ( ( tablelookup( "mp/attachmentTable.csv" , 4 , localvarstring( "ui_selected_ref" ) , 17 ) < 0 ) * 0.45 + 0.25 ) exp forecolor g ( ( tablelookup( "mp/attachmentTable.csv" , 4 , localvarstring( "ui_selected_ref" ) , 17 ) > 0 ) * 0.45 + 0.25 ) visible when ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 25 ) && 1 ) } itemDef { rect -128 126 120 4 3 1 decoration visible 1 style 1 forecolor 1 1 1 0.65 backcolor 0 0 0 1 background "gradient_fadein" textfont 3 textalign 6 textaligny -20 textscale 0.375 text "@MPUI_MOBILITY" visible when ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 26 ) && 0 ) } itemDef { rect -128 126 120 2 3 1 decoration visible 1 style 3 forecolor 0.75 1 0.7 0.85 background "white" textscale 0.55 exp rect w ( ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 26 ) / 100 ) * 120 ) visible when ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 26 ) && 0 ) } itemDef { rect -128 126 120 2 3 1 decoration visible 1 style 3 forecolor 0.85 0.85 0.85 1 background "gradient_fadein" textscale 0.55 exp rect w ( ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 26 ) / 100 ) * 120 ) visible when ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 26 ) && 0 ) } itemDef { rect -128 126 120 2 3 1 decoration visible 1 style 3 forecolor 1 1 0.25 0.65 background "white" textscale 0.55 exp rect x ( - 64 + ( 0 - 120 * ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 26 ) / 100 ) ) + ( ( 0 - 120 * ( tablelookup( "mp/attachmentTable.csv" , 4 , localvarstring( "ui_selected_ref" ) , 18 ) / 100 ) ) * ( tablelookup( "mp/attachmentTable.csv" , 4 , localvarstring( "ui_selected_ref" ) , 18 ) < 0 ) ) ) exp rect w ( min( 120 * ( tablelookup( "mp/attachmentTable.csv" , 4 , localvarstring( "ui_selected_ref" ) , 18 ) / 100 ) , ( 1 - ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 26 ) / 100 ) ) * 120 ) ) exp forecolor r ( ( tablelookup( "mp/attachmentTable.csv" , 4 , localvarstring( "ui_selected_ref" ) , 18 ) < 0 ) * 0.45 + 0.25 ) exp forecolor g ( ( tablelookup( "mp/attachmentTable.csv" , 4 , localvarstring( "ui_selected_ref" ) , 18 ) > 0 ) * 0.45 + 0.25 ) visible when ( tablelookup( "mp/statsTable.csv" , 4 , getplayerdata( "customClasses" , localvarint( "classIndex" ) , "weaponSetups" , 1 , "weapon" ) , 26 ) && 0 ) } } }