Jump to content
ThyHolyNoodle

ItemZed Help Bitten Status

Recommended Posts

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...