Krixes - Self Bloodbag Script

Discussion in 'Script/Addon help' started by Krixes, Apr 8, 2013.

  1. Krixes

    Krixes Moderator Staff Member

    Joined:
    Oct 22, 2012
    Messages:
    232
    Likes Received:
    110
    Krixes - Self Bloodbag Script help and discussion goes here
     
  2. Manatee Hunter

    Manatee Hunter Valued Member!

    Joined:
    Dec 24, 2012
    Messages:
    620
    Likes Received:
    90
    Oh snap nice, time to switch to using this.. I like the ability to customize it. Would it be possible to have different infection rates for self blood bag and bagging others?
     
  3. Krixes

    Krixes Moderator Staff Member

    Joined:
    Oct 22, 2012
    Messages:
    232
    Likes Received:
    110
    My script only effects bagging yourself, infection rates for bagging others is handled in another script.

    You may change the chance for self bloodbag via the _infectionChance variable at the top of player_selfBloodbag.sqf :)
     
  4. Vilemouse

    Vilemouse Well-Known Member

    Joined:
    Jan 15, 2013
    Messages:
    137
    Likes Received:
    6
    Im curious is there a way to add a timer so they can only do this once every x amount of minute?
     
  5. Manatee Hunter

    Manatee Hunter Valued Member!

    Joined:
    Dec 24, 2012
    Messages:
    620
    Likes Received:
    90
    Personally I'd like to increase the time it takes to actually complete the selfBB
     
  6. Vilemouse

    Vilemouse Well-Known Member

    Joined:
    Jan 15, 2013
    Messages:
    137
    Likes Received:
    6
    Hmm true.. like a 30 second timer or something
     
  7. Krixes

    Krixes Moderator Staff Member

    Joined:
    Oct 22, 2012
    Messages:
    232
    Likes Received:
    110
    Both these suggestions taken into account, I will look into adding these and update when I get a chance(expect later tonight or tomorrow)!

    Thanks for your suggestions!
     
  8. Vilemouse

    Vilemouse Well-Known Member

    Joined:
    Jan 15, 2013
    Messages:
    137
    Likes Received:
    6
    Actually both would make it way better, it makes it more balanced and not so over powered
     
  9. Mekoz

    Mekoz New Member

    Joined:
    Feb 24, 2013
    Messages:
    18
    Likes Received:
    2
    Works perfectly, many thanks!
     
  10. Krixes

    Krixes Moderator Staff Member

    Joined:
    Oct 22, 2012
    Messages:
    232
    Likes Received:
    110
    You are quite welcome sir!

    As I cannot sleep and have much free time I am adding the suggested changes as we speak! :D
     
  11. Vilemouse

    Vilemouse Well-Known Member

    Joined:
    Jan 15, 2013
    Messages:
    137
    Likes Received:
    6
    AWESOME! then i can add this to my server :D
     
  12. Manatee Hunter

    Manatee Hunter Valued Member!

    Joined:
    Dec 24, 2012
    Messages:
    620
    Likes Received:
    90
    If I put this in the fn_selfactions.sqf will it work:

    Code:
    PlayerHumanity = (player getVariable"humanity");
    if ((getPlayerUID player) in ["XXXXXXXX"] or (PlayerHumanity < -15000) or (PlayerHumanity > 7000)) then {
        _mags = magazines player;
        // Krixes Self Bloodbag
        if ("ItemBloodbag" in _mags) then {
            hasBagItem = true;
        } else { hasBagItem = false;};
        if((speed player <= 1) && hasBagItem && _canDo) then {
            if (s_player_selfBloodbag < 0) then {
                s_player_selfBloodbag = player addaction[("<t color=""#c70000"">" + ("Self Bloodbag") +"</t>"),"scripts\bloodbag.sqf","",5,false,true,"", ""];
            };
        } else {
            player removeAction s_player_selfBloodbag;
            s_player_selfBloodbag = -1;
        };
        };
    Basically the old self BB I was using I had a humanity or UID requirement.. Would like to preserve that.
     
  13. Krixes

    Krixes Moderator Staff Member

    Joined:
    Oct 22, 2012
    Messages:
    232
    Likes Received:
    110
    That looks like it should work, I have not changed anything related to fn_selfActions so your old method should work fine!


    Version 1.4 is up.... changelog at top and file player_selfbloodbag.sqf updated appropriately!
     
  14. Vilemouse

    Vilemouse Well-Known Member

    Joined:
    Jan 15, 2013
    Messages:
    137
    Likes Received:
    6
    So what other things you going to make?:p if your a good scripter i got a awesome idea
     
  15. Manatee Hunter

    Manatee Hunter Valued Member!

    Joined:
    Dec 24, 2012
    Messages:
    620
    Likes Received:
    90
    Man you work fast...
     
  16. kaotix

    kaotix Member

    Joined:
    Jan 9, 2013
    Messages:
    38
    Likes Received:
    4
    I'm having trouble getting this to work. I'm using DayZ Epoch and the missions aren't in PBO files, they're just in a folder structure in the MPMission directory. I've added all relevant items into there and extracted the fn_selfActions.sqf from the Epoch files since it is different but I still can't get anything to show up in game.
    I'm also not seeing any error messages in the logs. Any ideas?
    I can attach any files you need to check.
     
  17. Krixes

    Krixes Moderator Staff Member

    Joined:
    Oct 22, 2012
    Messages:
    232
    Likes Received:
    110
    Im an ok scripter... i get by lawl :p On my server I have 3 working trains and a special tent sleep healing script I have made myself with custom snoring and animations. :D

    I would love to hear your idea! hehe
    You will need to let me see what the files look like. I have not looked into DayZ Epoch's code.
    Thanks lawl!
     
  18. kaotix

    kaotix Member

    Joined:
    Jan 9, 2013
    Messages:
    38
    Likes Received:
    4
    Thanks, I've attached the files I've been using in their structure.
    Also players have told me that most of the other functionality in the game has stopped working. I'm guessing that something is stopping the scripts from progressing.

    The file can be found here:
    http://www.filedropper.com/bloogbags

    Please let me know if you want me to upload it via a different source.
    Thanks.
     
  19. Krixes

    Krixes Moderator Staff Member

    Joined:
    Oct 22, 2012
    Messages:
    232
    Likes Received:
    110
    Did you clothes script work before adding my script?
     
  20. kaotix

    kaotix Member

    Joined:
    Jan 9, 2013
    Messages:
    38
    Likes Received:
    4
    I haven't tested it, but I'm inclined to say no...do you think I should remove it just to make sure?
     

Share This Page