SHARE
TWEET

Untitled

a guest Sep 6th, 2019 99 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3.  
  4. private["_type","_index","_price","_amount","_name"];if((lbCurSel 2402) isEqualTo-1) exitWith{};_type=lbData[2402,(lbCurSel 2402)];_price=-2;_flag=switch(playerSide) do{case west:{"cop"};case civilian:{"civ"};case independent:{"med"};case east:{"syn"};};_itemNameToSearchFor=_type;if(_price isEqualTo-1) exitWith{};if(_price isEqualTo-2) then{_price=getNumber(missionConfigFile>>"VirtualItems">>_type>>"sellPrice");if(_price isEqualTo-1) exitWith{};};_amount=ctrlText 2405;if(!([_amount]call RR_fnc_isNumber)) exitWith{["You didn't enter an actual number",true,"fast"]call RR_fnc_notificationSystem;};_amount=parseNumber(_amount);if(_amount>(missionNamespace getVariable[format["life_inv_%1",getText(missionConfigFile>>"VirtualItems">>_type>>"variable")],0])) exitWith{["You don't have that many items to sell!",true,"fast"]call RR_fnc_notificationSystem;};if((time-life_action_delay)<0.2) exitWith{["You're doing it too fast!",true,"fast"]call RR_fnc_notificationSystem;};life_action_delay=time;_illegalVar=switch(playerSide) do{case west:{"RR_talent_cop_dodgy"};case civilian:{"RR_talent_civ_dodgy"};case independent:{"RR_talent_med_dodgy"};case east:{"RR_talent_syn_dodgy"};};_illegalLevel=missionNamespace getVariable[_illegalVar,0];_illegalMultiplyer=switch(_illegalLevel) do{case 0:{1};case 1:{1.05};case 2:{1.1};case 3:{1.15};case 4:{1.2};case 5:{1.25};};_legalVar=switch(playerSide) do{case west:{"RR_talent_cop_legal"};case civilian:{"RR_talent_civ_legal"};case independent:{"RR_talent_med_legal"};case east:{"RR_talent_syn_legal"};};_legalLevel=missionNamespace getVariable[_legalVar,0];_legalMultiplyer=switch(_legalLevel) do{case 0:{1};case 1:{1.05};case 2:{1.1};case 3:{1.15};case 4:{1.2};case 5:{1.25};};_goldVar=switch(playerSide) do{case west:{"RR_talent_cop_goldsell"};case civilian:{"RR_talent_civ_goldsell"};case independent:{"RR_talent_med_goldsell"};case east:{"RR_talent_syn_goldsell"};};_goldLevel=missionNamespace getVariable[_goldVar,0];_goldMultiplyer=switch(_goldLevel) do{case 0:{1};case 1:{1.05};case 2:{1.1};case 3:{1.15};case 4:{1.2};case 5:{1.25};};if(life_shop_type isEqualTo"dealer1") then{_price=(_price*1.4)*_illegalMultiplyer;};if(life_shop_type isEqualTo"dealer2") then{_price=(_price*1)*_illegalMultiplyer;};if(life_shop_type isEqualTo"dealer3") then{_price=(_price*1.4)*_illegalMultiplyer;};if(life_shop_type isEqualTo"labdealer") then{_price=(_price*4)*_illegalMultiplyer;};if(life_shop_type isEqualTo"moonshine") then{_price=(_price*1)*_illegalMultiplyer;
  5. };if(life_shop_type isEqualTo"contrabandDealer") then{_price=(_price*1)*_illegalMultiplyer;};if(life_shop_type isEqualTo"grinch") then{_price=(_price*1)*_illegalMultiplyer;};if(life_shop_type isEqualTo"ecstasy") then{_price=(_price*1)*_illegalMultiplyer;};if(life_shop_type isEqualTo"weapons") then{_price=(_price*1)*_illegalMultiplyer;};if(life_shop_type isEqualTo"gold") then{_price=_price*_goldMultiplyer};if(!(life_shop_type isEqualTo"dealer1"||life_shop_type isEqualTo"dealer2"||life_shop_type isEqualTo"dealer3"||life_shop_type isEqualTo"labdealer"||life_shop_type isEqualTo"gold"||life_shop_type isEqualTo"moonshine")) then{_price=_price*_legalMultiplyer;};_price=(_price*_amount);_name=getText(missionConfigFile>>"VirtualItems">>_type>>"displayName");if([false,_type,_amount]call RR_fnc_handleInv) then{private _xpEach=1;private _found=false;{private _itemsSoldArray=getArray(missionConfigFile>>"Professions">>configName _x>>"itemsSold");if(_type in _itemsSoldArray) exitWith{private _var=getText(missionConfigFile>>"Professions">>configName _x>>"variable");_xpEach=getNumber(missionConfigFile>>"Professions">>configName _x>>"xpEach");private _newAmount=_amount*_xpEach;[_var,_newAmount]call RR_fnc_addXP;_found=true;};}forEach(format["getText(_x >> 'side') isEqualTo '%1'",_flag]configClasses(missionConfigFile>>"Professions"));if(_found) then{[format["You sold %1 %2 for £%3",_amount,(localize _name),[_price]call RR_fnc_numberToString],true,"fast"]call RR_fnc_notificationSystem;}else{[format["You sold %1 %2 for £%3",_amount,(localize _name),[_price]call RR_fnc_numberToString],true,"fast"]call RR_fnc_notificationSystem;};RR_treasure=RR_treasure+_price;private _text=format["+ £%1, Sold %2 %3.",[_price]call RR_fnc_numberToString,_amount,(localize _name)];private _log=format["%1 - %2 sold %3 %4 for £%5 BANK Balance: £%6  On Hand Balance: £%7",profileName,(getPlayerUID player),_amount,(localize _name),[_price]call RR_fnc_numberToString,[RR_chest]call RR_fnc_numberToString,[RR_treasure]call RR_fnc_numberToString];[_log,"Money"]remoteExecCall["A3Log",2];RR_Interactions pushBack _text;if(RR_HC_isActive) then{[2,_price]remoteExecCall["RR_HC_fnc_organisationCash",HC_Life];}else{[2,_price]remoteExecCall["RR_server_fnc_organisationCash",2];};[0]call RR_fnc_updatePartial;[]call RRP_fnc_virt_update;};if(life_shop_type isEqualTo"gold"&&(getNumber(missionConfigFile>>"Life_Settings">>"noatm_timer"))>0) then{[]spawn{life_use_atm=false;uisleep((getNumber(missionConfigFile>>"Life_Settings">>"noatm_timer"))*60);life_use_atm=true;};};[0]call RR_fnc_updatePartial;[7]call RR_fnc_updatePartial;[]call RR_fnc_hudUpdate;
  6. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top