BetterDeadThanZed Posted January 26, 2016 Report Share Posted January 26, 2016 I'm trying to install this script on a new Epoch server: http://opendayz.net/threads/release-drink-water-v2-0.13493/ I am not getting the option in the scroll menu to drink water. Is this script still compatible with Epoch 1.0.5.1? I wonder if something in this fn_selfaction.sqf code is old and not compatible? private["_playerPos","_canDrink","_isPond","_isWell","_pondPos","_objectsWell","_objectsPond","_display"]; _playerPos = getPosATL player; _canDrink = count nearestObjects [_playerPos, ["Land_pumpa","Land_water_tank","Land_Barrel_water"], 4] > 0; _isPond = false; _isWell = false; _pondPos = []; _objectsWell = []; if (!_canDrink) then { _objectsWell = nearestObjects [_playerPos, [], 4]; { //Check for Well _isWell = ["_well",str(_x),false] call fnc_inString; if (_isWell) then {_canDrink = true}; } forEach _objectsWell; }; if (!_canDrink) then { _objectsPond = nearestObjects [_playerPos, [], 50]; { //Check for pond _isPond = ["pond",str(_x),false] call fnc_inString; if (_isPond) then { _pondPos = (_x worldToModel _playerPos) select 2; if (_pondPos < 0) then { _canDrink = true; }; }; } forEach _objectsPond; }; if (_canDrink) then { if (s_player_drinkWater < 0) then { s_player_drinkWater = player addaction[("<t color=""#0000c7"">" + (localize "STR_action_drink") +"</t>"),"custom\drink_water\drink_water.sqf"]; }; } else { player removeAction s_player_drinkWater; s_player_drinkWater = -1; }; Link to comment Share on other sites More sharing options...
0 ElDubya Posted January 26, 2016 Report Share Posted January 26, 2016 Change the two instances of this : (!_canDrink) into this : (_canDrink) maybe? Link to comment Share on other sites More sharing options...
0 theduke Posted January 26, 2016 Report Share Posted January 26, 2016 I had this installed, it worked, used it for a while. Players complained about slow trader access. Did a bit of research and one thread mentioned that, that script caused the slow traders. So i removed it for fun and sure enough it went from 15-20 seconds to almost instantly. This was version 1 I just installed this on my test server and it does the same thing. Traders are incredibly slow. And the only way i got the scroll wheel to show the action "drink water" was to replace the player addaction line in the fn_selfactions to this s_player_drinkWater = player addAction ["<t color=""#0000c7"">Drink Water</t>","custom\drink_water\drink_water.sqf","",5,false,true,"",""]; Of course change the path (localize "STR_action_drink") <<< is what i removed from that line. All it does is tell you that you had water with text i also added "",5,false,true,"","". Not sure if that has anything to do with it. would like to know what the numbers and true/false means lol If you can fix the trader menu lag let me know, i would like to run this script Link to comment Share on other sites More sharing options...
0 BetterDeadThanZed Posted January 26, 2016 Author Report Share Posted January 26, 2016 theduke, are you using config based traders or database traders? Link to comment Share on other sites More sharing options...
0 BetterDeadThanZed Posted January 26, 2016 Author Report Share Posted January 26, 2016 6 hours ago, ElDubya said: Change the two instances of this : (!_canDrink) into this : (_canDrink) maybe? Still no option to drink with that change. Link to comment Share on other sites More sharing options...
0 theduke Posted January 26, 2016 Report Share Posted January 26, 2016 21 minutes ago, BetterDeadThanZed said: theduke, are you using config based traders or database traders? config Link to comment Share on other sites More sharing options...
0 ElDubya Posted January 26, 2016 Report Share Posted January 26, 2016 7 hours ago, BetterDeadThanZed said: Still no option to drink with that change. Yeah, was just a wild stab in the dark :) Link to comment Share on other sites More sharing options...
0 theduke Posted January 26, 2016 Report Share Posted January 26, 2016 the player addaction that i posted works for me...i was able to drink from a well and a pond with the link BDTZ posted. But again the trader menu is incredibly slow Link to comment Share on other sites More sharing options...
0 leegreaves Posted September 27, 2016 Report Share Posted September 27, 2016 Bit of a stab in the dark by bumping this topic after a while. Does anyone know where a copy of these files for the drink water script v2.0 by clark17 could be found. His github link returns a 404. So im just hoping someone has a copy of the files. Im trying to get V1 by manu to work but doesnt seem to be working for me in Epoch even with following everything to the word. So if anyone knows anywhere else the files can be downloaded I would really appreciate this. Alternately, IF someone happens to still have a copy of the files maybe attaching them in a reply, again i would really appreciate it. If my knowldge of sqf was way better id attempt to create a fully working compatible script for Epoch myself but it isnt so i wont attempt that as id make a fool of myself :) Link to comment Share on other sites More sharing options...
0 juandayz Posted September 27, 2016 Report Share Posted September 27, 2016 1 hour ago, leegreaves said: Bit of a stab in the dark by bumping this topic after a while. Does anyone know where a copy of these files for the drink water script v2.0 by clark17 could be found. His github link returns a 404. So im just hoping someone has a copy of the files. Im trying to get V1 by manu to work but doesnt seem to be working for me in Epoch even with following everything to the word. So if anyone knows anywhere else the files can be downloaded I would really appreciate this. Alternately, IF someone happens to still have a copy of the files maybe attaching them in a reply, again i would really appreciate it. If my knowldge of sqf was way better id attempt to create a fully working compatible script for Epoch myself but it isnt so i wont attempt that as id make a fool of myself :) i not sure if uare looking for it but this is the drink of any source sqf Spoiler private["_playerPos","_canDrink","_isPond","_isWell","_pondPos","_objectsWell","_objectsPond","_display"]; call gear_ui_init; _playerPos = getPosATL player; _canDrink = count nearestObjects [_playerPos, ["Land_pumpa","Land_water_tank"], 4] > 0; _isPond = false; _isWell = false; _pondPos = []; _objectsWell = []; if (!_canDrink) then { _objectsWell = nearestObjects [_playerPos, [], 4]; { //Check for Well _isWell = ["_well",str(_x),false] call fnc_inString; if (_isWell) then {_canDrink = true}; } forEach _objectsWell; }; if (!_canDrink) then { _objectsPond = nearestObjects [_playerPos, [], 50]; { //Check for pond _isPond = ["pond",str(_x),false] call fnc_inString; if (_isPond) then { _pondPos = (_x worldToModel _playerPos) select 2; if (_pondPos < 0) then { _canDrink = true; }; }; } forEach _objectsPond; }; if (_canDrink) then { if ((floor (random 100) < 25)) then { player playActionNow "PutDown"; r_player_infected = true; player setVariable["USEC_infected",true,true]; player setVariable ["messing",[dayz_hunger,dayz_thirst],true]; dayz_lastDrink = time; dayz_thirst = 0; //Ensure Control is visible _display = uiNamespace getVariable 'DAYZ_GUI_display'; (_display displayCtrl 1302) ctrlShow true; //cutText ["Das Wasser ist lauwarm und schmeckt irgendwie komisch, aber dein Durst ist gestillt.", "PLAIN DOWN"]; cutText ["The water is warm and tastes kinda strange, but your thirst is quenched.", "PLAIN DOWN"]; } else { player playActionNow "PutDown"; dayz_lastDrink = time; dayz_thirst = 0; //Ensure Control is visible _display = uiNamespace getVariable 'DAYZ_GUI_display'; (_display displayCtrl 1302) ctrlShow true; //cutText ["Das Wasser ist kühl und schmeckt etwas schal, aber dein Durst ist gestillt.", "PLAIN DOWN"]; cutText ["The water is cool and tastes a bit stale, but your thirst is quenched.", "PLAIN DOWN"]; }; }; Link to comment Share on other sites More sharing options...
0 leegreaves Posted September 27, 2016 Report Share Posted September 27, 2016 Yes thats PART of the drink water script V2.0 i need the entire script ie all the instructions and files etc as I cannot find any other sources to download a copy of it anywhere on the forums and the script has been removed from its Github repo. Link to comment Share on other sites More sharing options...
0 Airwaves Man Posted September 27, 2016 Report Share Posted September 27, 2016 Hey, Ive uploaded my old version from that script. Should work well. https://mega.nz/#!l0JAFASQ!K0yuwxR7tSLyGm8AYdzee8WcoQrM0CKn9u0HNJRNo3o juandayz 1 Link to comment Share on other sites More sharing options...
0 juandayz Posted September 28, 2016 Report Share Posted September 28, 2016 also you can try at buttom of your custom fn_selfActions.sqf Spoiler //------------------- Drink Water -------------------------------- private["_playerPos","_canDrink","_isPond","_isWell","_pondPos","_objectsWell","_objectsPond","_display"]; _playerPos = getPosATL player; _canDrink = count nearestObjects [_playerPos, ["Land_pumpa","Land_water_tank"], 4] > 0; _isPond = false; _isWell = false; _pondPos = []; _objectsWell = []; if (!_canDrink) then { _objectsWell = nearestObjects [_playerPos, [], 4]; { //Check for Well _isWell = ["_well",str(_x),false] call fnc_inString; if (_isWell) then {_canDrink = true}; } forEach _objectsWell; }; if (!_canDrink) then { _objectsPond = nearestObjects [_playerPos, [], 50]; { //Check for pond _isPond = ["pond",str(_x),false] call fnc_inString; if (_isPond) then { _pondPos = (_x worldToModel _playerPos) select 2; if (_pondPos < 0) then { _canDrink = true; }; }; } forEach _objectsPond; }; if (_canDrink) then { if (s_player_drinkWater < 0) then { s_player_drinkWater = player addaction[("<t color=""#0000c7"">" + ("Drink water") +"</t>"),"custom\drink_water.sqf"]; }; } else { player removeAction s_player_drinkWater; s_player_drinkWater = -1; }; drink_water.sqf (mpmissions\instance\custom\ ) Spoiler private["_playerPos","_canDrink","_isPond","_isWell","_pondPos","_objectsWell","_objectsPond","_display"]; call gear_ui_init; _playerPos = getPosATL player; _canDrink = count nearestObjects [_playerPos, ["Land_pumpa","Land_water_tank"], 4] > 0; _isPond = false; _isWell = false; _pondPos = []; _objectsWell = []; if (!_canDrink) then { _objectsWell = nearestObjects [_playerPos, [], 4]; { //Check for Well _isWell = ["_well",str(_x),false] call fnc_inString; if (_isWell) then {_canDrink = true}; } forEach _objectsWell; }; if (!_canDrink) then { _objectsPond = nearestObjects [_playerPos, [], 50]; { //Check for pond _isPond = ["pond",str(_x),false] call fnc_inString; if (_isPond) then { _pondPos = (_x worldToModel _playerPos) select 2; if (_pondPos < 0) then { _canDrink = true; }; }; } forEach _objectsPond; }; if (_canDrink) then { if ((floor (random 100) < 25)) then { player playActionNow "PutDown"; r_player_infected = true; player setVariable["USEC_infected",true,true]; player setVariable ["messing",[dayz_hunger,dayz_thirst],true]; dayz_lastDrink = time; dayz_thirst = 0; //Ensure Control is visible _display = uiNamespace getVariable 'DAYZ_GUI_display'; (_display displayCtrl 1302) ctrlShow true; //cutText ["Das Wasser ist lauwarm und schmeckt irgendwie komisch, aber dein Durst ist gestillt.", "PLAIN DOWN"]; cutText ["The water is warm and tastes kinda strange, but your thirst is quenched.", "PLAIN DOWN"]; } else { player playActionNow "PutDown"; dayz_lastDrink = time; dayz_thirst = 0; //Ensure Control is visible _display = uiNamespace getVariable 'DAYZ_GUI_display'; (_display displayCtrl 1302) ctrlShow true; //cutText ["Das Wasser ist kühl und schmeckt etwas schal, aber dein Durst ist gestillt.", "PLAIN DOWN"]; cutText ["The water is cool and tastes a bit stale, but your thirst is quenched.", "PLAIN DOWN"]; }; }; Link to comment Share on other sites More sharing options...
0 KELLEY Posted September 29, 2016 Report Share Posted September 29, 2016 You can and probably should change the 50. I have mine at 35, works better. if (!_canDrink) then { _objectsPond = nearestObjects [_playerPos, [], 50]; Link to comment Share on other sites More sharing options...
Question
BetterDeadThanZed
I'm trying to install this script on a new Epoch server: http://opendayz.net/threads/release-drink-water-v2-0.13493/
I am not getting the option in the scroll menu to drink water. Is this script still compatible with Epoch 1.0.5.1?
I wonder if something in this fn_selfaction.sqf code is old and not compatible?
Link to comment
Share on other sites
13 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now