Jump to content

spawn from ELUNA not saved


toha

Recommended Posts

if possible to save spawn to DB then what i do wrong?

local cr = p:SpawnCreature( 6491, p:GetX(), p:GetY(), p:GetZ(), p:GetO(), 8);      -- 5 i;ve tried different SummonType
cr:SaveToDB();

local sp = PerformIngameSpawn( 1,6491, p:GetMapId(), p:GetInstanceId(), p:GetX(), p:GetY(), p:GetZ(), p:GetO() )
sp:SaveToDB();

local go = p:SummonGameObject( 187653, p:GetX()+5, p:GetY(), p:GetZ(), p:GetO() )
go.SaveToDB();

but spawn dissapear after server restart. creatures spawned by GM command save properly and exist after srv restart.

Link to comment
Share on other sites

thanks its workig but then what doing SaveToDB(); ?

Also

how to despawn? i try

        local objs = p:GetGameObjectsInRange( 30 )
        if (objs ~= nil) then
            for i,val in ipairs(objs) do
                val:SetRespawnTime(0);
                val:Despawn();
            end
        end

object in val but :Despawn() doesn't remove it. i guess i can delete it from DB world.gameobject but maybe it's possible by ELUNA?

Despawn() working if was spawned by SpawnCreature()

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use