Jump to content

Some missing codes


Recommended Posts

Well i was searching for some codes. I look lots of topics, character mods but i can't find these codes i hope someone can help me.

At the new moon -night vision, run and walk faster and attack speed faster.

At the full moon -run and walk slows and attack speed slows

only eat meat and ice (some character modes has it but i don't undetstand them too complicated for me)

can eat any kind of meat without and damage from sanity or health.( means any kind of meat ( monster meat or crock pot recipes do not drop sanity or health)

when kittykit around  gain sanity regerenation (5 per 30 second)

when vargling around lose sanity (7 per 30 second)

 

 

freeze attack (press x) takes 50 hunger 80 sanity deals 50 damage and froze everthing for 10 second

i try to write it but i can't add to key i don't know how i can do it but here is my freeze attack code for modmain.lua

local function IceAttack(inst)
    if inst:HasTag("playerghost") then return end
	if inst.transformed and inst.components.hunger.current>=80 and inst.components.sanity.current>=80 then
	    inst.components.hunger:DoDelta(-80)
		inst.components.sanity:DoDelta(-80)
		inst.components.talker:Say("Everything will be frozen by my power! Nya~", 1, true)
		
			local x, y, z = inst.Transform:GetWorldPosition()
			local ents = TheSim:FindEntities(x, y, z, 20, {"freezable"}, {"player"})
			for i, v in ipairs(ents) do
				v.components.freezable:AddColdness(10)
				v.components.freezable:SpawnShatterFX()
		end
		inst.total_damage_received = 50
		
	elseif inst.transformed and inst.components.hunger.current< 80 then
		inst.components.talker:Say("I must eat something before froze everything. Nya~", 1, true)
	elseif inst.transformed and inst.components.sanity.current< 80 then
	    inst.components.talker:Say("I can't focus now give me some ice of fish-meal. Nya~", 1, true)
	end
end

AddModRPCHandler("alishia","IceAttack", IceAttack)

i don't know is this work i can't try it.

Edited by AkaiNight
Link to comment
Share on other sites

I found some of codes i just need

At the new moon -night vision, run and walk faster and attack speed faster.

At the full moon -run and walk slows and attack speed slows

only eat meat and ice (some character modes has it but i don't undetstand them too complicated for me)

when kittykit around  gain sanity regerenation (5 per 30 second)

when vargling around lose sanity (7 per 30 second)

 

Link to comment
Share on other sites

Well i find a code for make my character eats only meat but i can't make it able to eat honey, ice, egg and other things like them i only want my character can't eat vegetables and seeds.

 

oh sorry here is the code

inst.components.eater:SetDiet({ FOODGROUP.OMNI }, { FOODTYPE.MEAT, FOODTYPE.GOODIES })

 

Edited by AkaiNight
Link to comment
Share on other sites

7 hours ago, SuperDavid said:

I got something for your character to be able to do things when you press a button, you should be able to learn from reading inside this .zip file, if you have any questions about it then just ask me :D!

press a button code.zip

Oh thanks but i made it (somehow) is there any code for new and full moon? i need them

 

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
 Share

×
  • Create New...