hey daruis I just found a weird recreatable situration when you use this .... wait item creation and egg hatching.
function rum_tools.zombiearmy()
local trgs=selectwoundead()
for k,v in pairs(trgs) do
--indx=GetCreatureAtPos(v)
--indx=engine.peek(v,ptr_creature.ID)
print("Zombie:"..k)
v2=engine.peek(v,ptr_Creature.hurt1)
for i=0,v2:size()-1 do
v2:setval(i,0)
end
v2=engine.peek(v,ptr_Creature.hurt2)
v2.type=DWORD
for i=0,v2:size()-1 do
v2:setval(i,0)
end
--engine.poke(creatureptr,ptr_Creature.legends,-1)
myoff=offsets.getEx("AdvCreatureVec")
vector=engine.peek(myoff+16,ptr_vector)
local trgs=selectall()
for k,v in pairs(trgs) do
trgid=engine.peek(vector:getval(0),ptr_Creature.ID) --get players ID
engine.peek(v,ptr_Creature.followID) -- get target creatures "now following ID"
engine.poke(v,ptr_Creature.followID,trgid) -- if not just write the players ID.
end
engine.poke(v,ptr_Creature.bloodlvl,60000) --give blood
engine.poke(v,ptr_Creature.bleedlvl,0) --stop some bleeding...
local flags=engine.peek(v,ptr_Creature.flags)
flags:set(1,false) -- alive!
flags:set(12,true) --zombie
engine.poke(v,ptr_Creature.flags,flags)
local flags=engine.peek(vector:getval(0),ptr_Creature.flags)
flags:set(1,false) -- alive!
flags:set(12,false) --zombie
engine.poke(vector:getval(0),ptr_Creature.flags,flags)
end
end
function selectwoundead()
local retvec={} --return vector (or a list)
myoff=offsets.getEx("AdvCreatureVec")
vector=engine.peek(myoff,ptr_vector) --standart start
for i=0,vector:size()-1 do --check all creatures
local off
off=vector:getval(i)
local v2=engine.peek(off,ptr_Creature.hurt1)
if v2:getval(12)>=1 then
table.insert(retvec,off)--... add it to return vector
end
local flags=engine.peek(off,ptr_Creature.flags)
if flags:get(1)==true then --if dead ...
table.insert(retvec,off)--... add it to return vector
end
end
return retvec --return the "return vector" :)
end
rum_tools.menu:add("zomarmy",rum_tools.zombiearmy)
wait never mind these are nested eggs not spawn in mid air ones shoot. If only there was a way to take adventure reaction eggs and hatch them instantly. oh well we are SOooo close to summons it's crazy,
so is this making natural birth eggs hatch and not the spawn kind.
edit: looks like the eggs has to be lay in the building and not just in the nest box that and item destroying seems to not work well.