Jump to content
  • 0

Overwrite the List of Players (Pressing J)


Guest

Question

Hi,

I was trying to overwrite that list when you press J or P, to kinda add more stuff in to it, so i tried creating a new task, very basic just with test standing in it. But nothing seems to work. Createsimpletask, settask etc.. i think it actually is a task, because it's showing in the top left corner "current" tasks.

So umm my guess is, that maybe it is inside a while loop or something so that it'll be overwritten. I didn't find that loop anywhere and i don't know where to search..

Anybody ever tryed to do this?

Link to comment
Share on other sites

15 answers to this question

Recommended Posts

  • 0

to overwrite them you could use your dayz_spaceinterrupt and some keyactions:

 

https://community.bistudio.com/wiki/ArmA_2:_CfgDefaultKeysMapping

 

and 

 

https://community.bistudio.com/wiki/ArmA:_CfgDefaultKeysMapping

 

see how i did it with the flashlight script. I used there the "headlights" action to grab on whatever key a player has defined this key.

 

the same thing you can use to overwrite those action, at least i hope so :)

Link to comment
Share on other sites

  • 0

Thanks. Umm the is no problem with the Menu, that exists and is showing up fine, it's just not adding any entries to that... Just go ingame and Press J, you'll see your Tasks.

If you do it in the editor and create a task, it will be shown without any problem, but it won't work in Multiplayer for somehow.

Link to comment
Share on other sites

  • 0

if its antihack, then you probalby could creat task from the server.

 

I will have look in the dayz_code to see if there is something in there.

 

edit:

 

Somewhere in the dayz_code:


_REMOVED_LIB = ["addAction", "addEventhandler", "addMagazine", "addMagazineCargo", "addWeapon","addWeaponCargo", "addWPCur", "animate", "callVar", "clearMagazineCargo", "clearWeaponCargo", "createDiaryRecord","createMarkerLocal", "createSimpleTask", "createTaskSet", "debugLog", "deleteWP", "enablesimulation", "endMission","execfsm", "fadeMusic", "fadeSound", "failMission", "globalChat", "globalRadio", "groupChat", "groupRadio","hideObject", "hint", "hintC", "kbAddTopic", "kbreact", "kbRemoveTopic", "kbtell", "land", "move", "moveIn","playAction", "playActionnow", "playmovenow", "playMusic", "playsound", "removeAction","removeAllWeapons", "setCaptive", "setCurrentTask", "setCurrentTaskArrays", "setDate", "setDir", "setGroupID","setMarkerPosLocal", "setObjectTexture", "setSimpleTaskDescription", "setTaskState", "setWPdesc", "setWPtype","showCommandingMenu", "sideChat", "sideRadio", "skiptime", "spawn", "switchAction", "switchCamera", "taskHint","titleCut", "Hangender"];
_TRACED_LIB = ["execVM", "JIPexec", "JIPrequest", "say", "playmove", "switchmove", "titleText"];

waitUntil{!isNil "BIS_MPF_InitDone"};

private["_ofn","_nfn","_REMOVED_LIB","_TRACED_LIB"];
{
	_ofn=format["r%1code",_x];
	_nfn=format["r%1code%2",_x,round(random(100000))];
	if(_x=="execVM")then{
		call compile format["%1=%2;%2={if((count _this>=3)&&{(!((_this select 2)IN%3))})then{diag_log(""WARNING RE %2 with illegal args:""+str(_this));}else{_this call %1}};",_nfn,_ofn,["ca\Modules\Functions\init.sqf"]];
	}else{
		#ifdef RESEC_VERBOSE
		call compile format ["%1=%2;%2={diag_log(""RE %2 args:""+str(_this));_this call %1};",_nfn,_ofn];
		#endif
	};
}count _TRACED_LIB;
{
	_ofn=format["r%1code",_x];
	call compile format["%1={diag_log(""WARNING illegal RE %1 with args:""+str(_this));};",_ofn];
}count _REMOVED_LIB;
Link to comment
Share on other sites

  • 0

Just for the refs.. (I will not give support for this!)

if ( (!isServer) && (player != player) ) then
{
	waitUntil {player == player};
	waitUntil {time > 10};
};

initialized = player getVariable["BriefingInit",false];

if !(isnull player) then {
	private["_currentTask","_childTask","_banditKills","_banditKillsCompareUpdate","_banditKillsCompareEasy","_banditKillsCompareNormal","_banditKillsCompareHard","_reward1","_reward2","_reward3"];
	
	_reward1 = player getVariable["reward1",false];
	_reward2 = player getVariable["reward2",false];
	_reward3 = player getVariable["reward3",false];
	
	if (!initialized) then {
		
		tsk1 = player createSimpleTask ["Stary Medic"];
		tsk1 setSimpleTaskDescription ["Bring 5 Bandages to the Medic in Stary City. <br/><br/>0 of 5 Bandages delivered <br/><br/>", "Stary Medic", "Stary Medic"];
		tsk1 setSimpleTaskDestination (getMarkerPos "Tradercitystary");
		tsk1 setTaskState "CREATED";

		tsk2 = player createSimpleTask ["Wholesale Supplier"];
		tsk2 setSimpleTaskDescription ["The Wholesale Supplier ran out of crates, go bring him some! <br/><br/>0 of 5 Bulks delivered <br/><br/>", "Wholesale Supplier", "Wholesale Supplier"];
		tsk2 setSimpleTaskDestination (getMarkerPos "wholesaleSouth");
		tsk2 setTaskState "CREATED";

		tsk3 = player createSimpleTask ["AI Slaughter (easy)"];
		tsk3 setSimpleTaskDescription ["Kill 25 AI Units <br/><br/>0 of 25 AI Units Killed<br/><br/>", "AI Slaughter", "AI Slaughter"];
		tsk3 setTaskState "CREATED";
		
		tsk4 = player createSimpleTask ["AI Slaughter (normal)"];
		tsk4 setSimpleTaskDescription ["Kill 50 AI Units <br/><br/>0 of 25 AI Units Killed<br/><br/>", "AI Slaughter", "AI Slaughter"];
		tsk4 setTaskState "CREATED";
		
		tsk5 = player createSimpleTask ["AI Slaughter (hard)"];
		tsk5 setSimpleTaskDescription ["Kill 100 AI Units <br/><br/>0 of 25 AI Units Killed<br/><br/>", "AI Slaughter", "AI Slaughter"];
		tsk5 setTaskState "CREATED";

		tsk6 = player createSimpleTask ["Hostage Hero"];
		tsk6 setSimpleTaskDescription ["Rescue at least one Hostage <br/><br/>", "Hostage Rescue", "Hostage Rescue"];
		tsk6 setTaskState "CREATED";
		
		player setVariable["BriefingInit",true,true];
		initialized = true;
		
		banditKills = player getVariable["banditKills", 0];
		banditKillsCompareEasy = banditKills + 25;
		banditKillsCompareNormal = banditKills + 50;
		banditKillsCompareHard = banditKills + 100;
	};
	
	while {true} do {
		_banditKillsCompareUpdate = player getVariable["banditKills", 0];
		
		if(!_reward1) then {
			tsk3 setSimpleTaskDescription [format["Kill 25 AI Units<br/><br/>%1 of 25 AI Units Killed<br/><br/>",(_banditKillsCompareUpdate - banditKills)], "AI Slaughter", "AI Slaughter"];
		};
		if(!_reward2) then {
			tsk4 setSimpleTaskDescription [format["Kill 50 AI Units<br/><br/>%1 of 50 AI Units Killed<br/><br/>",(_banditKillsCompareUpdate - banditKills)], "AI Slaughter", "AI Slaughter"];
		};
		if(!_reward3) then {
			tsk5 setSimpleTaskDescription [format["Kill 100 AI Units<br/><br/>%1 of 100 AI Units Killed<br/><br/>",(_banditKillsCompareUpdate - banditKills)], "AI Slaughter", "AI Slaughter"];
		};

		if (_banditKillsCompareUpdate >= banditKillsCompareEasy) then {
			if(!_reward1) then {
				tsk3 setTaskState "Succeeded";
				tsk3 setSimpleTaskDescription ["Kill 25 AI Units <br/><br/>25 of 25 AI Units Killed<br/><br/>", "AI Slaughter", "AI Slaughter"];
				[player, 2500] call SC_fnc_addCoins;
				_reward1 = true;
				player setVariable["reward1",true,true];
			};
		};
		if (_banditKillsCompareUpdate >= banditKillsCompareNormal) then {
			if(!_reward2) then {
				tsk4 setTaskState "Succeeded";
				tsk4 setSimpleTaskDescription ["Kill 50 AI Units <br/><br/>50 of 50 AI Units Killed<br/><br/>", "AI Slaughter", "AI Slaughter"];
				[player, 5000] call SC_fnc_addCoins;
				_reward2 = true;
				player setVariable["reward2",true,true];
			};
		};
		if (_banditKillsCompareUpdate >= banditKillsCompareHard) then {
			if(!_reward3) then {
				tsk5 setTaskState "Succeeded";
				tsk5 setSimpleTaskDescription ["Kill 100 AI Units <br/><br/>100 of 100 AI Units Killed<br/><br/>", "AI Slaughter", "AI Slaughter"];
				[player, 10000] call SC_fnc_addCoins;
				_reward3 = true;
				player setVariable["reward3",true,true];
			};
		};
		
		sleep 10;
		
	};
	
	fnc_set_task_state = {
		private ["_task","_param1","_reward4"];
		_task = _this select 0;
		_param1 = _this select 1;
		
		systemchat("Setting Task State for Hostage Rescue");
		
		_reward4 = player getVariable["reward4",false];
		
		if (_task == "hostage") then {
			if (_param1 == "success") then {
				if(!_reward4) then {
					tsk6 setTaskState "Succeeded";
					[player, 5000] call SC_fnc_addCoins;
					_reward4 = true;
					player setVariable["reward4",true,true];
				};
			};
			if (_param1 == "failed") then {
				tsk6 setTaskState "Failed";
			};
		};

	}; "PVDZE_set_task_state" addPublicVariableEventHandler {(_this select 1) call fnc_set_task_state;};
};
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...