ItemZed Help Bitten Status
1 1

1 post in this topic

Recommended Posts

Posted (edited)

Hello I am more or less a beginner to code and wanted to give modding a shot by trying to making a zombie cure that requires level 10 first aid (because the skill is largely a waste of effort) and a set of random ingredients along with constant ingredients and perhaps a vial of a player's blood. I am using ItemZed but I don't see anything that even suggests the bitten or infected status (zombie virus). I only see things for colds, flus, etc. More specifically, if I could get help with making a script to add a key for the bitten status in ItemZed, that would be great.

 

**Edit: This is what I have so far but it doesn't seem to work. It does add a key and it does seem to have relevant boolean variables, but I really don't know what I am doing tbh.

 

-- change local variables accordingly and run script.
local objType = "item";
local itemType = "Food";
local addKey = "Zcure";
local addVal = "1";

function run()
  for w in DataManager.Objects do
    if w.ObjectType.Name==objType then
      if w.HasKey("Type") and w.GetFirstKey("Type").Value==itemType then
        w.AddKeyValuePair(addKey, addVal);
    end

    if IsBitten(Foot_L)==true then
        setBitten(Foot_L, false)
    end
    if IsBitten(Foot_R)==true then
        setBitten(Foot_R, false)
    end
    if IsBitten(ForeArm_L)==true then
        setBitten(ForeArm_L, false)
    end
    if IsBitten(ForeArm_R)==true then
        setBitten(ForeArm_R, false)
    end
    if IsBitten(Groin)==true then
        setBitten(Groin, false)
    end
    if IsBitten(Hand_L)==true then
        setBitten(Hand_L, false)
    end
    if IsBitten(Hand_R)==true then
        setBitten(Hand_R, false)
    end
    if IsBitten(Head)==true then
        setBitten(Head, false)
    end
    if IsBitten(LowerLeg_L)==true then
        setBitten(LowerLeg_R, false)
    end
    if IsBitten(Torso_Lower)==true then
        setBitten(Torso_Lower, false)
    end
    if IsBitten(Torso_Upper)==true then
        setBitten(Torso_Upper, false)
    end
    if IsBitten(UpperArm_L)==true then
        setBitten(UpperArm_L, false)
    end
    if IsBitten(UpperArm_R)==true then
        setBitten(UpperArm_R, false)
    end
    if IsBitten(UpperLeg_L)==true then
        setBitten(UpperLeg_L, false)
    end
    if IsBitten(UpperLeg_R)==true then
        setBitten(UpperLeg_R, false)
    end
    if IsBitten(MAX)==true then
        setBitten(MAX, false)
    end
    
    end
    end
end
 

Edited by ThyHolyNoodle
more info

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
1 1