Jump to content

Mod Not Working


Masochist

Recommended Posts

I am not sure why my function is not working...I am sure it is some sort of silly stupid issue I am missing...but perhaps someone else can see it. I can't seem to find very good information on functions and stuff.

 

The goal is to have professions that start with XP and items...I have only put in the XP for carpenter for testing but that wont work nor do the items.

function giveItemsAndXP()    if getPlayer():HasTrait("Axeman") == true then        getPlayer():getInventory():AddItems("Base.Axe", 1),    end    if getPlayer():HasTrait("Marksman") == true then        getPlayer():getinventory():AddItems("Base.Shotgun", 1);            end    if getPlayer():HasTrait("Outdoorsman") == true then        getPlayer():getInventory():AddItems("Base.Matches", 1);        getPlayer():getInventory():AddItems("camping.CampfireKit", 1);        getPlayer():getInventory():AddItems("camping.CampingTentKit", 1);        getPlayer():getInventory():AddItems("camping.FireWoodKit", 1);        getPlayer():getInventory():AddItems("camping.WaterBottleFull", 2);    end    if getPlayer():HasTrait("Handy") == true then        getPlayer():getXp():AddXP(Perks.Woodwork, 1900);        getPlayer():getInventory():AddItems("Base.Hammer", 1);        getPlayer():getInventory():AddItems("Base.NailsBox", 1);        getPlayer():getInventory():AddItems("Base.ScrewsBox", 1);        getPlayer():getInventory():AddItems("Base.Saw", 1);        getPlayer():getInventory():AddItems("Base.Screwdriver", 1);    end    if getPlayer():HasTrait("NightOwl") == true then        getPlayer():getInventory():AddItems("Base.Battery", 1);        getPlayer():getInventory():AddItems("Base.Torch", 1);        getPlayer():getInventory():AddItems("Base.Pistol", 1);        getPlayer():getInventory():AddItems("Base.Bullets9mm", 2);    endendEvents.OnGameStart.Add(giveItemsAndXP)
Link to comment
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
×
×
  • Create New...