Jump to content

[Tutorial] Clickable self-bloodbag with configurable limitations (Updated 02/21/2014)


adg

Recommended Posts

  On 2/5/2014 at 12:57 PM, adg said:

This is my first tutorial, so please bear with me. Any changes, improvements and comments are welcome.

 

 

It's so good, hard to believe it is your first! 

 

  On 2/7/2014 at 7:52 PM, Gregarious said:

This is one beautiful tutorial. Color-coordinated, well-formatted, clear, and concise. I wish more people doing releases used your example.

Well put!

 

 

Thanks adg! It's installed on my server now...

Link to comment
Share on other sites

This script worked perfectly for me up until I upgraded to Epoch 105 today. I'm guessing (really guessing as I'm not technical) that it may have something to do with the change of '&&' and 'and' amongst other things.... 

 

I have no errors in my rpt, other right click functions are working fine just, nothing happens when I right click on the bloodbag.

 

Any help would be greatly appreciated..

Link to comment
Share on other sites

Add this to init.sqf in your mission file

 

My settings give 6000 blood, a 10 minute cooldown before you can bag again and a 10% chance of infection (I think!!)

DZE_selfTransfuse = true;
DZE_selfTransfuse_Values = [6000, 10, 600];
Link to comment
Share on other sites

  On 6/25/2014 at 7:52 PM, Brockie said:

1.0.5 has self bloodbag built-in.  look at the changelogs for how to activate it.

 

 

  On 6/25/2014 at 7:57 PM, MGT said:

 

Add this to init.sqf in your mission file

 

My settings give 6000 blood, a 10 minute cooldown before you can bag again and a 10% chance of infection (I think!!)

DZE_selfTransfuse = true;
DZE_selfTransfuse_Values = [6000, 10, 600];

Done! Thanks guys. I'd noticed it in the change log but didn't think it would be right click so left if off. 

 

Have now changed to this and found out it's right click anyway... lol

 

Thanks again.

Link to comment
Share on other sites

  • 2 months later...

This is great for a fresh install, but it doesnt really shed any light where to put things if the directories have already been installed (Such as description.ext, UI_Selectslot, and Extra_rc.hpp)  Would be great if you could add in where/what using Examples ( like Custom/example.sqf in your script layout or something like that. )

 

also, after trying to get this to work, now my right clicks for any items wont work at all..  Before i tried to add this script, all my other ones worked perfect, So its not them :P

 

Extra_RC.hpp

  Reveal hidden contents

UI_SelectSlot.sqf

  Reveal hidden contents

 

Description.ext

  Reveal hidden contents

 

SelfBB.sqf

  Reveal hidden contents

 

Also My server gives me these error codes in the console when i load in, dont know what it means but it wasn't doing it before this script.. and it does it about 8 times per second.

12:44:50 Message not sent - error 0, message ID = ffffffff, to 322266401 (MooTactics #SiN)
12:44:50 NetServer: trying to send too large non-guaranteed message (3107 bytes long, max 1348 allowed)
12:44:50 Message not sent - error 0, message ID = ffffffff, to 322266401 (MooTactics #SiN)
12:44:50 NetServer: trying to send too large non-guaranteed message (3107 bytes long, max 1348 allowed)
12:44:50 Message not sent - error 0, message ID = ffffffff, to 322266401 (MooTactics #SiN)
12:44:50 NetServer: trying to send too large non-guaranteed message (3166 bytes long, max 1348 allowed)
12:44:50 Message not sent - error 0, message ID = ffffffff, to 322266401 (MooTactics #SiN)
12:44:50 NetServer: trying to send too large non-guaranteed message (3166 bytes long, max 1348 allowed)
12:44:50 Message not sent - error 0, message ID = ffffffff, to 322266401 (MooTactics #SiN)
12:44:50 NetServer: trying to send too large non-guaranteed message (3166 bytes long, max 1348 allowed)
12:44:50 Message not sent - error 0, message ID = ffffffff, to 322266401 (MooTactics #SiN)
12:44:50 NetServer: trying to send too large non-guaranteed message (3166 bytes long, max 1348 allowed)
12:44:50 Message not sent - error 0, message ID = ffffffff, to 322266401 (MooTactics #SiN)

Link to comment
Share on other sites

I stopped using this because players were reporting when the first login they can't use a bloodbag because of the time wait for continuous uses and as i had my time set to like 30 mins or so to stop rehealing constantly it was a pain for the players who wanted to heal up first time after joining

Link to comment
Share on other sites

  • 2 months later...

Hi,

 

I still get the message that you must be in a hospital to use the bloodbag, my script looks like this

 

//------------------------------------------------------------------------------------------------------------------------------------------------------------------\\
// CONFIG START \\
//------------------------------------------------------------------------------------------------------------------------------------------------------------------\\
_useTime = 50; //Time in seconds before being able to use again.
_bloodAmount = 4000; //Amount of blood the bloodbag gives to player (gets multiplied in hosp/ambulance, so 4000 = 8000 in hospital and 6000 near ambulance)
_infectionChance = 30; //Chance of getting infected while using the bloodbag (0 = disabled, 40 = 40%, 100 = 100% etc)
_disallowinVehicle = true; //Do not allow usage in a vehicle. true = cannot use, false = can use in vehicle
 
_giveHumanity = false; //Give players humanity for self bloodbag. true = give humanity, false = do not give
_humanityAmount = 50; //Amount of humanity to give, if _giveHumanity = true
 
_hospitalDistance = 21; //Max distance within Hospital
_ambulanceDistance = 5; // Max. distance from ambulance (medical hmmwv, medical vodnik or medic van)
_hospitalEnable = 1; // 1 enables SelfBloodbag in hospitals (leave as 1 if you have _anywhereEnable = 1; and want to get bonuses near hospital)
_ambulanceEnable = 1; // 1 enables SelfBloodbag near ambulances (leave as 1 if you have _anywhereEnable = 1; and want to get bonuses near med vehicles)
_anywhereEnable = 1; // 1 enables SelfBloodBag anywhere (turns automatically on if _hospitalEnable = 0 and _ambulanceEnable = 0;)
 
 
I also tried setting it as
 
//------------------------------------------------------------------------------------------------------------------------------------------------------------------\\
// CONFIG START \\
//------------------------------------------------------------------------------------------------------------------------------------------------------------------\\
_useTime = 50; //Time in seconds before being able to use again.
_bloodAmount = 4000; //Amount of blood the bloodbag gives to player (gets multiplied in hosp/ambulance, so 4000 = 8000 in hospital and 6000 near ambulance)
_infectionChance = 30; //Chance of getting infected while using the bloodbag (0 = disabled, 40 = 40%, 100 = 100% etc)
_disallowinVehicle = true; //Do not allow usage in a vehicle. true = cannot use, false = can use in vehicle
 
_giveHumanity = false; //Give players humanity for self bloodbag. true = give humanity, false = do not give
_humanityAmount = 50; //Amount of humanity to give, if _giveHumanity = true
 
_hospitalDistance = 21; //Max distance within Hospital
_ambulanceDistance = 5; // Max. distance from ambulance (medical hmmwv, medical vodnik or medic van)
_hospitalEnable = 0; // 1 enables SelfBloodbag in hospitals (leave as 1 if you have _anywhereEnable = 1; and want to get bonuses near hospital)
_ambulanceEnable = 0; // 1 enables SelfBloodbag near ambulances (leave as 1 if you have _anywhereEnable = 1; and want to get bonuses near med vehicles)
_anywhereEnable = 1; // 1 enables SelfBloodBag anywhere (turns automatically on if _hospitalEnable = 0 and _ambulanceEnable = 0;)
 
Any ideas? What if I change my distance to something really high like 10000. That will probably be silly to do, I don't know really what to do
 
Thanks
Dave
 

 

Link to comment
Share on other sites

  On 11/23/2014 at 3:33 AM, Davep122 said:

 

Hi,

 

I still get the message that you must be in a hospital to use the bloodbag, my script looks like this

 

  Reveal hidden contents

//------------------------------------------------------------------------------------------------------------------------------------------------------------------\\
// CONFIG START \\
//------------------------------------------------------------------------------------------------------------------------------------------------------------------\\
_useTime = 50; //Time in seconds before being able to use again.
_bloodAmount = 4000; //Amount of blood the bloodbag gives to player (gets multiplied in hosp/ambulance, so 4000 = 8000 in hospital and 6000 near ambulance)
_infectionChance = 30; //Chance of getting infected while using the bloodbag (0 = disabled, 40 = 40%, 100 = 100% etc)
_disallowinVehicle = true; //Do not allow usage in a vehicle. true = cannot use, false = can use in vehicle
 
_giveHumanity = false; //Give players humanity for self bloodbag. true = give humanity, false = do not give
_humanityAmount = 50; //Amount of humanity to give, if _giveHumanity = true
 
_hospitalDistance = 21; //Max distance within Hospital
_ambulanceDistance = 5; // Max. distance from ambulance (medical hmmwv, medical vodnik or medic van)
_hospitalEnable = 1; // 1 enables SelfBloodbag in hospitals (leave as 1 if you have _anywhereEnable = 1; and want to get bonuses near hospital)
_ambulanceEnable = 1; // 1 enables SelfBloodbag near ambulances (leave as 1 if you have _anywhereEnable = 1; and want to get bonuses near med vehicles)
_anywhereEnable = 1; // 1 enables SelfBloodBag anywhere (turns automatically on if _hospitalEnable = 0 and _ambulanceEnable = 0;)
 
 
I also tried setting it as
 
//------------------------------------------------------------------------------------------------------------------------------------------------------------------\\
// CONFIG START \\
//------------------------------------------------------------------------------------------------------------------------------------------------------------------\\
_useTime = 50; //Time in seconds before being able to use again.
_bloodAmount = 4000; //Amount of blood the bloodbag gives to player (gets multiplied in hosp/ambulance, so 4000 = 8000 in hospital and 6000 near ambulance)
_infectionChance = 30; //Chance of getting infected while using the bloodbag (0 = disabled, 40 = 40%, 100 = 100% etc)
_disallowinVehicle = true; //Do not allow usage in a vehicle. true = cannot use, false = can use in vehicle
 
_giveHumanity = false; //Give players humanity for self bloodbag. true = give humanity, false = do not give
_humanityAmount = 50; //Amount of humanity to give, if _giveHumanity = true
 
_hospitalDistance = 21; //Max distance within Hospital
_ambulanceDistance = 5; // Max. distance from ambulance (medical hmmwv, medical vodnik or medic van)
_hospitalEnable = 0; // 1 enables SelfBloodbag in hospitals (leave as 1 if you have _anywhereEnable = 1; and want to get bonuses near hospital)
_ambulanceEnable = 0; // 1 enables SelfBloodbag near ambulances (leave as 1 if you have _anywhereEnable = 1; and want to get bonuses near med vehicles)
_anywhereEnable = 1; // 1 enables SelfBloodBag anywhere (turns automatically on if _hospitalEnable = 0 and _ambulanceEnable = 0;)
 

Any ideas? What if I change my distance to something really high like 10000. That will probably be silly to do, I don't know really what to do
 
Thanks
Dave
 

 

 

Hi, if you are running Epoch version 1.0.5+, you can turn your script off now as self bloodbag was integrated in vanilla epoch.

 

All you need to do is add these lines below to your mission init.sqf in the section that starts with // DayZ Epoch config:

// DayZ Epoch config
DZE_SelfTransfuse = true;
DZE_selfTransfuse_Values = [4000, 20, 180];

You can then adjust the values to what you want. 4000 is the amount of blood received from the bloodbag, 20 is the % chance of infection and 180 is the cooldown time in seconds before a player can self BB again.

 

Hope this helps :)

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
×
×
  • Create New...