function spawn_item(spawn_item, pos, gv, lv)
if gv == nil then
gv=db.actor:game_vertex_id()
end
if lv == nil then
lv=db.actor:level_vertex_id()
end
return alife():create(spawn_item, pos, lv, gv)
end
function spawn_item_in_inv(spawn_item, npc)
if npc == nil then
npc = db.actor
end
return alife():create(spawn_item, npc:position(), npc:level_vertex_id(), npc:game_vertex_id(), npc:id())
end
function spawn_ammo_in_inv(spawn_item, number, npc)
if npc==nil then
npc=db.actor
end
if number > 0 then
return se_respawn.create_ammo(spawn_item, npc:position(), npc:level_vertex_id(), npc:game_vertex_id(), npc:id(), number)
end
end
function remove_item(remove_item)
if remove_item~=nil then
alife():release(alife():object(remove_item:id()), true)
return true
end
return false
end
function drop_item(npc,item)
if item ~= nil then
npc:drop_item(item)
end
end
function remove_item_from_inventory_by_name(remove_item_name, npc)
return remove_item(npc:object(remove_item_name))
end
function remove_item_from_slot(slot)
if slot ~= nil then
local iis = db.actor:item_in_slot(slot)
local wpn = iis:section()
recheck = iis:id()
alife():release(alife():object(iis:id()), true)
end
end
Użytkownicy przeglądający to forum: Brak zarejestrowanych użytkowników oraz 3 gości