lol I was changing adventures and i set the cursor in the wrong spot now I'm in HFS and a Clown
Edit: every time i sleep and travel i end up as a diffrent creature now i'm a plump helmet man...
yeah best way out of that jam is to find some one that is historic like a lady or a townsmen and perma adv change into them or kill thing to make what ever body your in added to the legends and you won't jump around when you Travel.
okay time to dump.
rez companions, lycan rez, a repeating zombie function so players don't need to select it over again, and Companion race changer so one can mass convert a bunch of humans into Cave spiders.
function selectcomp()
local retvec={} --return vector (or a list)
myoff=offsets.getEx("AdvCreatureVec")
vector=engine.peek(myoff+16,ptr_vector) --standart start
for i=0,vector:size()-1 do --check all creatures
local off
off=vector:getval(i)
lfollow=engine.peek(off,ptr_Creature.followID) -- get target creatures "now following ID"
if lfollow ~=0xFFFFFFFF then --if its set
table.insert(retvec,off)--... add it to return vector
end
end
return retvec --return the "return vector" :)
end
function adv_tools.comprace()
--first three lines same as before (because we will need an offset of creature at location x,y,z)
myoff=offsets.getEx("AdvCreatureVec")
vector=engine.peek(myoff+16,ptr_vector)
--indx=GetCreatureAtPos(getxyz())
local trgs=selectcomp()
for k,v in pairs(trgs) do
--RaceTable=RaceTable or BuildNameTable() --slow.If loaded don't load again
--print("Enter race name ALL CAPS!:")
--repeat
entry=io.stdin:read() --get entry
--id=RaceTable[entry] -- find race id
--until id~=nil -- if not found repeat
engine.poke(v,ptr_Creature.race,entry)
end
end
function adv_tools.lycanressurect()
repeat
local trgs=selectall()
for k,v in pairs(trgs) do
--indx=GetCreatureAtPos(v)
--indx=engine.peek(v,ptr_creature.ID)
print("Werewolf:"..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.peek(v,ptr_Creature.civ)
engine.poke(v,ptr_Creature.civ,-1)
engine.poke(v,ptr_Creature.bloodlvl,60000) --give blood
engine.poke(v,ptr_Creature.bleedlvl,24) --stop some bleeding...
local flags=engine.peek(v,ptr_Creature.flags)
flags:set(1,0) -- alive!
flags:set(12,0) --zombie
flags:set(17,1)
flags:set(19,1)
engine.poke(v,ptr_Creature.flags,flags)
engine.poke(v,ptr_Creature.race,151)
end
until r==7
end
function adv_tools.ressurectcomp()
local trgs=selectcomp()
for k,v in pairs(trgs) do
--indx=GetCreatureAtPos(v)
--indx=engine.peek(v,ptr_creature.ID)
print("Companion:"..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(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,0) -- alive!
flags:set(39,0) -- leave body yet again
flags:set(37,0) -- something todo with wounds- lets you walk again.
engine.poke(v,ptr_Creature.flags,flags)
end
end
so far killing a creature twice will cause the killer's legend data to be buggy and will cause a crash if unless you don't have them as a companion and or didn't rekill something. so I wonder if one could remove the creature from legend mode?