Jump to content

inkko

Member
  • Posts

    26
  • Joined

  • Last visited

Posts posted by inkko

  1. https://www.dropbox.com/s/54u6hcqyfkdwazj/Mission.rar?dl=0 

     

    I packed it into a rar file. I have this somewhat working on my server, it gives me the option to combine the keys but it doesn't take the coins away. I don't get the option to claim vehicles either.

    Well it looks just like my file only difference I see is in the VehicleKeyChanger_init.sqf the addactions point towards the Custom folder which yours is custom without the capitalization.

  2. Sorry for not replying. I was unable to get it to accept my coins, it told me I was trying to trick the system and disabled the ability. The ability to claim vehicles did not show up also. Is this set up to work with soul's version of single currency? Thanks!

    It is setup for single currency 3.0 but should be cross compatible with souls currency. In the init file did you change the cost of both options? and did you leave the costs in quotes? Any errors showing up? Maybe souls currency stores currency with quotes, not sure tho...

  3. Okay after looking around for a working single currency conversion for this I decided to make my own since I couldn't seem to find one...

     

    Tested with single currency 3.0

     

    Followed the install on the

     

    Use these files instead of the supplied:

    VehicleKeyChanger.sqf

    VehicleKeyChanger_init.sqf

     

    *Don't forget the server_updateObject.sqf portion stated in the first post insall

     

    Additionally to remove some RPT spam do the following:

     

    (spam caused by undefined variable s_player_claimvehicle/s_player_copyToKey)

     

    In your variables.sqf add these to the dayz_resetSelfActions  portion:

     

    s_player_claimvehicle = -1;
    s_player_copyToKey = -1;
     
  4. what nil weapon issue? I have no issue with these kill messages at all.

     

    I followed the instructions on the first post, the kill messages show up but it will be like killer - victim [distance] and a popup will come up saying nil picture not found. I had skimmed through the entire thread but didn't really see any posts that people were saying worked.

  5. Anyone ever find a fix for that nil weapon issue? I read through the entire thread and didn't really see anything about a working fix...

     

    I just kinda made my own fix for weapons... but was seeing if there was a better way to do it...

    _message = format["%1 was killed by %2 with weapon %3 from %4m",_victimName, _killerName, _weapon, _distance];
    _loc_message = format["PKILL: %1 was killed by %2 with weapon %3 from %4m", _victimName, _killerName, _weapon, _distance];
    //_pic = _victim getVariable["AttackedByWeaponImg", "nil"];
    _picture = getText (configFile >> 'cfgWeapons' >> (currentWeapon _killer) >> 'picture'); // get weapon picture of killer
    // not tested from here...
    if (vehicle _killer != _killer) then {
    _picture = getText (configFile >> 'cfgVehicles' >> (vehicle _killer) >> 'picture');
    };
    //.... to here
            if ((gettext (configFile >> 'cfgWeapons' >> (currentWeapon _killer) >> 'displayName')) != "Throw") then {
    if (!isNil "_picture") then {
    _kill_txt = format ["<t align='left' size='0.9'>%1 </t>",_killerName,_picture,_victimName,(ceil _distance)];
    _kill_txt = _kill_txt + format ["<img size='1.0' align='left' image='%2'/>",_killerName,_picture,_victimName,(ceil _distance)];
    _kill_txt = _kill_txt + format ["<t align='left' size='0.9'> %3 </t>",_killerName,_picture,_victimName,(ceil _distance)];
    _kill_txt = _kill_txt + format ["<t align='left' size='0.9'>[%4m]</t>",_killerName,_picture,_victimName,(ceil _distance)];
     
    customkillMessage = [_kill_txt];
    publicVariable "customkillMessage";
    };
    };
  6. Could any one actually tell me which files that have been edited to make this script work? Trying not to use the pbo's that were given.

     

     

     

    Thanks.

    I believe its compiles.sqf, variables.sqf, init.sqf, mission.sqm, description.ext, switchmodel, fn_selfaction mission side that have changes that point to all the files. Then server side I think it is playersync and playersetup server side that have changes. I had a custom compiles, variables, fn_selfaction, and mission.sqm so I just scrolled through each and found what was added. I could be missing some files but I believe thats all.

  7. I think this problem has to do with the Check Wallet option on AI.

    My players started complaining about the money not being saved on them.

     

    So did some test.

     

    It happends on my server sometimes when you check an AI's wallet and it says 0 coins taken from ID Unknown.

     

    So i adjusted the AI coins to always be at least 1 and haven't had the problem since!

    I had an issue with the check wallet where it would bug out and you would get null value. You could then go to the bank and put in 999,999 over and over forever.

  8. Love the script having an issue with some stuff not saving sometimes.

     

    Banking data seems to randomly disappear, sometimes it saves and works, sometimes it doesn't.

     

    Same for the money on the player, sometimes it saves properly, sometimes it doesn't and the end up with negative money a lot of the time.

     

    Any ideas?

    I'm having this issue as well, I have the transaction limit fix but players banks/gold on hand will sometimes just completely get wiped when they login.

  9. Okay I installed this using the first post and that only. I added the lines to SERVER_FUNCTIONS.SQF and added the time_control.sqf etc to my init.sqf where its called in the mission file. I am having an issue where time is sped up but it is skipping back. I took a video with fraps and added it to my drop box to show what it is doing. Hopefully you don't have to download the file... it lets me load it in the browser. https://www.dropbox.com/s/ftuyy9ga47pux2n/a2.avi?dl=0

  10. Heres an updated version of what I am using, I added some additional things in the config portion for percentages.

     

    // new variable to track used time on script. set to nil initially as time is set to it on use.
    // 
    if (isnil "lastLockpick") then {
    lastLockpick = nil;
    };
     
    _ctarget = _this select 3;
     
    // ----------------------- config -----------------------
    _lockpickUseTime = 10; // Amount of time it takes in second for the player to lockpick
    _lockpickLastUsedTime = 30; // Amount of time in seconds before player can use lockpick again after a succesful use
    // _percentfailrange/_percentfail %chance
    _percentfailrange = 1000; // random number between 0 and 1000
    _percentfail = 10; // greater number will result in higher chance of sucess
    //percentbreakrange/_percentbreak %chance 
    _percentbreakrange = 100; // random number between 0 and 100
    _percentbreak = 20; // lower number will result in a lower chance of breaking your tool.
    // ---------------------- config end ---------------------
     
     
    _lockpickTime = time - lastLockpick; // Variable used for easy reference in determining the self bloodbag cooldown
    _lockpickUsageTime = time;
    _timeout = player getVariable["combattimeout", 0];
    _inCombat = if (_timeout >= diag_tickTime) then { true } else { false };
     
    if(_lockpickTime < _lockpickLastUsedTime) exitWith { // If cooldown is not done then exit script
    cutText [format["You may not pick a lock so soon please wait %1 more seconds!",round((_lockpickTime - _lockpickLastUsedTime)*-1)], "PLAIN DOWN"]; //display text at bottom center of screen when players cooldown is not done
    };
     
    if (_inCombat) then { // Check if in combat
        cutText [format["You are in Combat and cannot continue your action!"], "PLAIN DOWN"]; //display text at bottom center of screen when in combat
    } else {
     
    player removeAction s_player_selfLockpick; //remove the action from users scroll menu <- necessary?
     
    player playActionNow "Medic"; //play animation
     
    ////////////////////////////////////////////////
    // Fancy cancel if interrupted addition start //
    ////////////////////////////////////////////////
    r_interrupt = false; 
    _animState = animationState player; 
    r_doLoop = true; 
    _started = false; 
    _finished = false;
    while {r_doLoop} do {
    _animState = animationState player;
    _isMedic = ["medic",_animState] call fnc_inString;
    if (_isMedic) then {
    _started = true;
    };
    if(!_isMedic && !r_interrupt && (time - _lockpickUsageTime) < _lockpickUseTime) then {
    player playActionNow "Medic";
    _isMedic = true;
    };
    if (_started && !_isMedic && (time - _lockpickUsageTime) > _lockpickUseTime) then {
    r_doLoop = false;
    _finished = true;
    lastBloodbag = time;
    };
    if (r_interrupt) then {
    r_doLoop = false;
    };
    sleep 0.1;
    };
    r_doLoop = false;
    ///////////////////////////////////////////////
    // Fancy cancel if interrupted addition end //
    //////////////////////////////////////////////
     
    if (_finished) then {
    _numbergenerator = round (random _percentfailrange);
    if (_numbergenerator <= _percentfail) then {
    cutText [format["You have successfully lockpicked the door."], "PLAIN DOWN"];
    {_ctarget animate [_x,1];} forEach ["Open_hinge","Open_latch","Lights_1","Lights_2","Open_door","DoorR","LeftShutter","RightShutter"];
    } else { 
    cutText [format["You have failed lockpicking."], "PLAIN DOWN"];
    };
    sleep 3;
    _numbergenerator2 = round (random _percentbreakrange);
    if (_numbergenerator2 < _percentbreak) then {
    cutText [format["You have broken your lockpicking tool."], "PLAIN DOWN"];
    player removeMagazine "ItemHotwireKit";
    };
    lastLockpick = time;
    } else {
    // this is for handling if interrupted
    r_interrupt = false;
    player switchMove "";
    player playActionNow "stop";
    cutText [format["You have interrupted picking a lock!"], "PLAIN DOWN"]; //display text at bottom center of screen on interrupt
    };
    };

     

  11.  

    this works.....

     

    pickable_door = ["Land_DZE_LargeWoodDoorLocked", "Land_DZE_WoodDoorLocked", "Land_DZE_GarageWoodDoorLocked", "CinderWallDoorSmallLocked_DZ"];
    if(_typeOfCursorTarget in pickable_door && _hasHotwireKit && (player distance _cursorTarget < 5)) then {
        if (s_player_selfLockpick < 0) then {
            s_player_selfLockpick = player addAction ["lockpick attempt","custom\lockpick.sqf",cursorTarget, 0, false, true, "",""];
        };
    } else {
            player removeAction s_player_selfLockpick;
            s_player_selfLockpick = -1;
    };

     

    This worked for me but it had one issue. The scroll menu would flicker from certain distances. Also I think I need to change my code to not remove the scroll option since after using it you have to back away from the door and approach it again.

  12. I haven't tested anything new in fn_selfactions, but I know the code works fine. I might make it configurable at the top to change percentages tho instead of scrolling through to find it. Obviously I tested it with the percentage more in my favor tho since I wasn't gonna stand around forever xD I tested it with infistars admin tools on a players door. After succeeding the door still says locked but you are able to open and close the door freely. The reason I want to use the _ctarget the way I had it in my draft was so that the target of what you were looking for was passed through to the script since you should only be able to look at doors.

  13. I thought up an idea where if players had a certain item they would have an option to "lock pick" a door in an attempt to enter someones base. I have the entire script done in the manner that I want, I am just having an issue with the self actions part.

     

    The way my script works is as so, and is based of krixes self BB:

     

    Player has item in inventory and upon using the action they cannot repeat it for X ammount of seconds. There is the universal medic animation throughout the process and it is interruptable. There is a combat check as well. The actual door opening portion is based completely on luck. A random number between 0 and 1000 is chosen and if it is smaller then 25 you succeed in opening the door, otherwise you fail and have to try again. In addition a number between 0 and 100 is chosen and if the number is below 20 you break your item required to lock pick. Kind of confusing explaining it, but all I need to complete it is the self actions part where I just can't seem to find a way to get it working.

     

    Here is the code I have for it so far:

    //code by Krixes, re-purposed to other use variables re-named 
    if (isnil "lastLockpick") then {
    lastLockpick = nil;
    };
    _ctarget = _this select 3; // getting target passed from self actions
    _lockpickUseTime = 10; // Amount of time it takes in second for the player to lockpick
    _lockpickLastUsedTime = 30; // Amount of time in seconds before player can use lockpick again after a succesful use
     
     
    _lockpickTime = time - lastLockpick; // Variable used for easy reference in determining the self bloodbag cooldown
    _lockpickUsageTime = time;
    _timeout = player getVariable["combattimeout", 0];
    _inCombat = if (_timeout >= diag_tickTime) then { true } else { false };
     
    if(_lockpickTime < _lockpickLastUsedTime) exitWith { // If cooldown is not done then exit script
    cutText [format["You may not pick a lock so soon please wait %1 more seconds!",round((_lockpickTime - _lockpickLastUsedTime)*-1)], "PLAIN DOWN"]; //display text at bottom center of screen when players cooldown is not done
    };
     
    if (_inCombat) then { // Check if in combat
        cutText [format["You are in Combat and cannot continue your action"], "PLAIN DOWN"]; //display text at bottom center of screen when in combat
    } else {
     
    player removeAction s_player_selfLockpick; //remove the action from users scroll menu
     
    player playActionNow "Medic"; //play animation
     
    ////////////////////////////////////////////////
    // Fancy cancel if interrupted addition start //
    ////////////////////////////////////////////////
    r_interrupt = false; 
    _animState = animationState player; 
    r_doLoop = true; 
    _started = false; 
    _finished = false;
    while {r_doLoop} do {
    _animState = animationState player;
    _isMedic = ["medic",_animState] call fnc_inString;
    if (_isMedic) then {
    _started = true;
    };
    if(!_isMedic && !r_interrupt && (time - _lockpickUsageTime) < _lockpickUseTime) then {
    player playActionNow "Medic";
    _isMedic = true;
    };
    if (_started && !_isMedic && (time - _lockpickUsageTime) > _lockpickUseTime) then {
    r_doLoop = false;
    _finished = true;
    lastBloodbag = time;
    };
    if (r_interrupt) then {
    r_doLoop = false;
    };
    sleep 0.1;
    };
    r_doLoop = false;
    ///////////////////////////////////////////////
    // Fancy cancel if interrupted addition end //
    //////////////////////////////////////////////
     
    if (_finished) then {
    _numbergenerator = round (random 1000);
    if (_numbergenerator <= 25) then {
    cutText [format["You have successfully lockpicked the door."], "PLAIN DOWN"];
    // animate open taken from infistar, maybe a better way to do it [_ctarget ] call player_unlockDoor;?
    {_ctarget animate [_x,1];} forEach ["Open_hinge","Open_latch","Lights_1","Lights_2","Open_door","DoorR","LeftShutter","RightShutter"];
    } else { 
    cutText [format["You have failed lockpicking."], "PLAIN DOWN"];
    };
    sleep 3;
    _numbergenerator2 = round (random 100);
    if (_numbergenerator2 < 20) then {
    cutText [format["You have broken your lockpicking tool."], "PLAIN DOWN"];
    player removeMagazine "ItemHotwireKit";
    };
    lastLockpick = time;
    } else {
    // this is for handling if interrupted
    r_interrupt = false;
    player switchMove "";
    player playActionNow "stop";
    cutText [format["You have interrupted picking a lock!"], "PLAIN DOWN"]; //display text at bottom center of screen on interrupt
    };
    };
  14. For the negative currency issue would something like this fix it in the player setup? The negative currency issue is happening about 4% of the time but its still an issue.

    if (_cashMoney == 0) then {
    diag_log format["Player %1 loging in with %2 money.",_playerName,_cashMoney];
    } else {
    if (_cashMoney > 0) then {
    diag_log format["Player %1 loging in with %2 money.",_playerName,_cashMoney];
    };
    if (_cashMoney < 0) then {
    diag_log format["Player %1 loging in with %2 money.",_playerName,_cashMoney];
    _cashMoney = abs _cashMoney;
    diag_log format["Player %1 fixing currency %2 .",_playerName,_cashMoney];
    };
    };
  15. Got this installed on origin overpoch with vilayer (had to get them to change the hiveext.dll for me) and it runs perfectly fine. Had some issues at first till I read a post saying the hiveext was defaulted each restart. Was reading some of the other separate forum posts about the single currency, do the dlls files alter anything with the database maintenance wise? Was seeing that some of the dlls would break some of the functions like decay.

  16. the off portion did nothing so my second test is this:

    _vehicle = vehicle player;
    if (isnil ("sirensOn")) then {
        sirensOn = 0;
    };
    if (sirensOn == 1) then {
    	sirensOn = 0;
        cutText ["Sirens OFF!","PLAIN DOWN"];
    	sleep 10;
    	s_player_sirens_on = _vehicle addAction ["Sirens On","Scripts\sirens\sirens_on.sqf",dayz_addsirens,2,false,true,"",""];
    	} else {
    	cutText ["Sirens OFF!","PLAIN DOWN"];
    };
    

    This makes it so when off is used, the on option doesn't appear for 10 seconds. but it places it under off for some reason.

  17. Another thing my player base has told me, you can spam siren on and it'll repeat the siren noise over and over making it sound like multiple sirens.

     

    so in the on we need to remove action for on and in off, we need to add action for on, only if off has been used maybe?
     

     

    In on i have:

    _vehicle = vehicle player;
    _inVehicle = (_vehicle != player);
    _vehicle removeAction s_player_sirens_on; // removing on option since on has been used.
    If (!_inVehicle) then {
    	sirensOn = 0;
    };
    if (isnil ("sirensOn")) then {
        sirensOn = 0;
    };
    if (sirensOn == 0) then {
    	sirensOn = 1;
        cutText ["Sirens ON!","PLAIN DOWN"];
    };
    while {sirensOn == 1} do {
    	If (_inVehicle and (driver _vehicle == player)) then {
    	_nul = [objNull, _vehicle, rSAY, "siren", 120] call RE;
    	[_vehicle, 200, true, (getPosATL _vehicle)] spawn player_alertZombies;
    	for "_i" from 1 to 12 do {
    	player action ["lightOn", _vehicle];
    	sleep 0.2;
    	player action ["lightOff", _vehicle];
    	sleep 0.2;
    	};
    	sleep 0.2;
    	} else {
    	sirensOn = 0;
    	};
    };
    

    Then in off, not sure if this would work:

    _vehicle = vehicle player;
    if (isnil ("sirensOn")) then {
        sirensOn = 0;
    };
    if (sirensOn == 1) then {
    	sirensOn = 0;
        cutText ["Sirens OFF!","PLAIN DOWN"];
    	_vehicle addAction s_player_sirens_on; // re-adds on option only if siren is on and off has been used?
    	} else {
    	cutText ["Sirens OFF!","PLAIN DOWN"];
    };
    
    
  18. Just a suggestion to fix a bug I found:

    if (_inVehicle and (_vehicle isKindOf "SUV_TK_CIV_EP1") and (driver _vehicle == player)) then { 

    This makes it so only the driver can turn on and off the siren, that way you can't have a full car of people all turning on sirens.

     

    Also if the driver gets out and another person gets in the drivers seat they can't turn off the sirens the first person started but they can start up a second set of sirens.

×
×
  • Create New...