SHARE
TWEET

Untitled

a guest Feb 16th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. []spawn{
  2.     while{true}do{
  3.         waitUntil{!isNull(finddisplay 129)};
  4.         _Dialog=[
  5.             [2200,"",[1,"",[0.29375 * safezoneW + safezoneX,0.225 * safezoneH + safezoneY,0.413531 * safezoneW,0.3872 * safezoneH],[-1,-1,-1,-1],[0.749,0.749,0.749,1],[0,0,0,0],"","-1"],[]],
  6.             [1100,"",[1,"",[0.29375 * safezoneW + safezoneX,0.225 * safezoneH + safezoneY,0.4125 * safezoneW,0.0022 * safezoneH],[-1,-1,-1,-1],[0.6,0,0,1],[0,0,0,0],"","-1"],[]],
  7.             [1101,"",[1,"",[0.29375 * safezoneW + safezoneX,0.61 * safezoneH + safezoneY,0.413531 * safezoneW,0.0022 * safezoneH],[-1,-1,-1,-1],[0.6,0,0,1],[0,0,0,0],"","-1"],[]],
  8.             [1102,"",[1,"",[0.70625 * safezoneW + safezoneX,0.225 * safezoneH + safezoneY,0.00103125 * safezoneW,0.385 * safezoneH],[-1,-1,-1,-1],[0.6,0,0,1],[0,0,0,0],"","-1"],[]],
  9.             [1103,"",[1,"",[0.29375 * safezoneW + safezoneX,0.225 * safezoneH + safezoneY,0.00103125 * safezoneW,0.385 * safezoneH],[-1,-1,-1,-1],[0.6,0,0,1],[0,0,0,0],"","-1"],[]],
  10.             [1104,"",[1,"",[0.29375 * safezoneW + safezoneX,0.258 * safezoneH + safezoneY,0.4125 * safezoneW,0.0022 * safezoneH],[-1,-1,-1,-1],[0.6,0,0,1],[0,0,0,0],"","-1"],[]],
  11.             [1105,"",[1,"<t align='center'size='1.5'>Variable Scanner<t/>",[0.29375 * safezoneW + safezoneX,0.225 * safezoneH + safezoneY,0.4125 * safezoneW,0.033 * safezoneH],[0.6,0,0,1],[0,0,0,0],[0,0,0,0],"","-1"],[]],
  12.             [2100,"",[1,"",[0.355625 * safezoneW + safezoneX,0.313 * safezoneH + safezoneY,0.345469 * safezoneW,0.022 * safezoneH],[0.6,0,0,1],[0,0,0,0.7],[0,0,0,0],"","-1"],[]],
  13.             [1106,"",[1,"Type:",[0.298906 * safezoneW + safezoneX,0.313 * safezoneH + safezoneY,0.0515625 * safezoneW,0.022 * safezoneH],[0.6,0,0,1],[0,0,0,0],[0,0,0,0],"","-1"],[]],
  14.             [1108,"",[1,"Search:",[0.298906 * safezoneW + safezoneX,0.346 * safezoneH + safezoneY,0.0515625 * safezoneW,0.022 * safezoneH],[0.6,0,0,1],[0,0,0,0],[0,0,0,0],"","-1"],[]],
  15.             [1400,"",[1,"",[0.355625 * safezoneW + safezoneX,0.346 * safezoneH + safezoneY,0.345469 * safezoneW,0.022 * safezoneH],[0.6,0,0,1],[0,0,0,0],[0,0,0,0],"","-1"],[]],
  16.             [1107,"",[1,"",[0.29375 * safezoneW + safezoneX,0.412 * safezoneH + safezoneY,0.4125 * safezoneW,0.0022 * safezoneH],[-1,-1,-1,-1],[0.6,0,0,1],[0,0,0,0],"","-1"],[]],
  17.             [1600,"",[1,"Start Search",[0.443281 * safezoneW + safezoneX,0.379 * safezoneH + safezoneY,0.108281 * safezoneW,0.022 * safezoneH],[1,1,1,1],[0.6,0,0,1],[0,0,0,0],"[]spawn(player getVariable['Startsearch',{}])","-1"],[]],
  18.             [1500,"",[1,"",[0.29375 * safezoneW + safezoneX,0.412 * safezoneH + safezoneY,0.4125 * safezoneW,0.1562 * safezoneH],[0.6,0,0,1],[0,0,0,0.7],[0,0,0,0],"","-1"],[]],
  19.             [1109,"",[1,"",[0.29375 * safezoneW + safezoneX,0.566 * safezoneH + safezoneY,0.4125 * safezoneW,0.0022 * safezoneH],[-1,-1,-1,-1],[0.6,0,0,1],[0,0,0,0],"","-1"],[]],
  20.             [1401,"",[1,"",[0.355625 * safezoneW + safezoneX,0.577 * safezoneH + safezoneY,0.232031 * safezoneW,0.022 * safezoneH],[0.6,0,0,1],[0,0,0,0],[0,0,0,0],"","-1"],[]],
  21.             [1110,"",[1,"New Value:",[0.298906 * safezoneW + safezoneX,0.577 * safezoneH + safezoneY,0.0567187 * safezoneW,0.022 * safezoneH],[0.6,0,0,1],[0,0,0,0],[0,0,0,0],"","-1"],[]],
  22.             [1601,"",[1,"Change Value",[0.592812 * safezoneW + safezoneX,0.577 * safezoneH + safezoneY,0.108281 * safezoneW,0.022 * safezoneH],[1,1,1,1],[0.6,0,0,1],[0,0,0,0],"[]spawn(player getVariable['ChangeValue',{}])","-1"],[]],
  23.             [1111,"",[1,"Namespace:",[0.298906 * safezoneW + safezoneX,0.28 * safezoneH + safezoneY,0.0567187 * safezoneW,0.022 * safezoneH],[0.6,0,0,1],[0,0,0,0],[0,0,0,0],"","-1"],[]],
  24.             [2101,"",[1,"",[0.355625 * safezoneW + safezoneX,0.28 * safezoneH + safezoneY,0.345469 * safezoneW,0.022 * safezoneH],[0.6,0,0,1],[0,0,0,0.7],[0,0,0,0],"","-1"],[]],
  25.             [1602,"",[1,"Close",[0.29375 * safezoneW + safezoneX,0.61 * safezoneH + safezoneY,0.0464063 * safezoneW,0.022 * safezoneH],[1,1,1,1],[0.6,0,0,1],[0,0,0,0],"(finddisplay 129)closeDisplay 0","-1"],[]]
  26.         ];
  27.  
  28.         {  
  29.             disableSerialization;
  30.             private["_ctrl","_buttonaction","_text","_secondarray","_activecolor","_textcolor","_backcolor","_pos","_idc","_classname","_ctrltype"];
  31.             _idc = _x select 0;
  32.             _classname = _x select 1;
  33.             _secondarray = (_x select 2);
  34.             _text = _secondarray select 1;
  35.             _pos = _secondarray select 2;
  36.             _textcolor = _secondarray select 3;
  37.             _backcolor = _secondarray select 4;
  38.             _activecolor = _secondarray select 5;
  39.             _buttonaction = _secondarray select 6;
  40.             _ctrltype = (format["%1",_idc] select [0,2]);
  41.             _ctrltype = call compile _ctrltype;
  42.             _ctrltype = switch(_ctrltype) do {     
  43.                 case 11: {"RscStructuredText"};
  44.                 case 12: {"RscPicture"};
  45.                 case 14: {"RscEdit"};
  46.                 case 15: {"RscListBox"};
  47.                 case 16: {"RscButtonMenu"};
  48.                 case 21: {"RscCombo"};
  49.                 case 22: {"RscBackground"};
  50.             };
  51.             _ctrl = (finddisplay 129) ctrlCreate [_ctrltype, _idc];
  52.             _ctrl ctrlSetPosition _pos;
  53.             _ctrl ctrlSetTextColor _textcolor;
  54.             _ctrl ctrlSetBackgroundColor _backcolor;
  55.             _ctrl ctrlSetActiveColor _activecolor;
  56.             if(_ctrltype=="RscStructuredText")then{_ctrl ctrlSetStructuredText parseText _text}else{_ctrl ctrlSetText _text};
  57.             if!(_buttonaction == "") then {     _ctrl buttonsetAction _buttonaction;
  58.             };
  59.             _ctrl ctrlCommit 0;
  60.         }
  61.         forEach _Dialog;
  62.         _namespacecombo=((finddisplay 129)displayCtrl 2101);
  63.         _searchtypecombo=((finddisplay 129)displayCtrl 2100);
  64.         {_namespacecombo lbAdd _x}forEach["missionNamespace","uiNamespace","profileNamespace"];
  65.         {_searchtypecombo lbAdd _x}forEach["Exact Value","Value contains"];
  66.         _namespacecombo lbSetCurSel 0;
  67.         _searchtypecombo lbSetCurSel 0;
  68.         waitUntil{isNull(finddisplay 129)};
  69.     };
  70. };
  71.  
  72. player setVariable["StartSearch",{
  73.     private["_nms","_typ","_val","_vars"];
  74.     _nms=(((finddisplay 129)displayCtrl 2101)lbText lbCurSel((finddisplay 129)displayCtrl 2101));
  75.     _typ=lbCurSel((finddisplay 129)displayCtrl 2100);
  76.     _val=ctrlText((finddisplay 129)displayCtrl 1400);
  77.     player setVariable["nms",_nms];
  78.  
  79.     _vars=[];
  80.     switch(_typ)do{
  81.         case 0:{
  82.             [_nms,_typ,_val]call compile format['
  83.             private["_all","_nms","_typ","_val"];
  84.             _nms=_this select 0;
  85.             _typ=_this select 1;
  86.             _val=_this select 2;
  87.             if(_val=="")then{_all=true}else{_all=false};
  88.             {if(format["%2",(%1 getVariable _x)]==_val||_all)then{_vars pushBack[_x,%1 getVariable _x]}}forEach allVariables %1;
  89.             if(count _vars<1)exitWith{hint "[FAILED] No Variables with this value...";lbClear ((finddisplay 129) displayCtrl 1500)};
  90.             lbClear ((finddisplay 129) displayCtrl 1500);
  91.             {      
  92.                 ((finddisplay 129) displayCtrl 1500) lbAdd format["%2 | %3 | %4",_x select 0,typeName(%1 getVariable(_x select 0)),format["%2",_x select 1]];
  93.                 ((finddisplay 129) displayCtrl 1500) lbSetData [(lbSize((finddisplay 129) displayCtrl 1500))-1,_x select 0];
  94.             }
  95.             forEach _vars;
  96.             hint format["[SUCCESS] Variables found (%2)",count _vars]',_nms,"%1","%2","%3"];
  97.         };
  98.         case 1:{
  99.             [_nms,_typ,_val]call compile format['
  100.             private["_all","_nms","_typ","_val"];
  101.             _nms=_this select 0;
  102.             _typ=_this select 1;
  103.             _val=_this select 2;
  104.             if(_val=="")then{_all=true}else{_all=false};
  105.             {if(((format["%2",(%1 getVariable _x)])find _val)>-1||_all)then{_vars pushBack[_x,%1 getVariable _x]}}forEach allVariables %1;
  106.             if(count _vars<1)exitWith{hint "[FAILED] No Variables with this value...";lbClear ((finddisplay 129) displayCtrl 1500)};
  107.             lbClear ((finddisplay 129) displayCtrl 1500);
  108.             {      
  109.                 ((finddisplay 129) displayCtrl 1500) lbAdd format["%2 | %3 | %4",_x select 0,typeName(%1 getVariable(_x select 0)),format["%2",_x select 1]];
  110.                 ((finddisplay 129) displayCtrl 1500) lbSetData [(lbSize((finddisplay 129) displayCtrl 1500))-1,_x select 0];
  111.             }
  112.             forEach _vars;
  113.             hint format["[SUCCESS] Variables found (%2)",count _vars]',_nms,"%1","%2","%3"];
  114.         };
  115.     };
  116. }];
  117. player setVariable["ChangeValue",{
  118.     _var=(((finddisplay 129)displayCtrl 1500)lbData lbCurSel((finddisplay 129)displayCtrl 1500));
  119.     _val=ctrlText((finddisplay 129)displayCtrl 1401);
  120.  
  121.     [_var,_val]call compile format[
  122.         '
  123.             _var=_this select 0;
  124.             _val=_this select 1;
  125.             _typ=typeName(%1 getVariable _var);
  126.             _val=switch(_typ)do{
  127.                 case"STRING":{_val};
  128.                 case"SCALAR":{call compile _val};
  129.                 case"CODE":{compile _val};
  130.             };
  131.             %1 setVariable[_var,_val];
  132.         ',
  133.         (player getVariable["nms","missionNamespace"])
  134.     ];
  135. }];
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