function doCopyItem(item, attributes)
local attributes = attributes or false
local ret = doCreateItemEx(item.itemid, item.type)
if(attributes) then
if(item.actionid > 0) then
doItemSetAttribute(ret, "aid", item.actionid)
end
end
if(isContainer(item.uid)) then
for i = (getContainerSize(item.uid) - 1), 0, -1 do
local tmp = getContainerItem(item.uid, i)
if(tmp.itemid > 0) then
doAddContainerItemEx(ret, doCopyItem(tmp, true).uid)
end
end
end
return getThing(ret)
end
local cloneObject = doCopyItem(item, true --[[jeśli dasz "true", skopiuje także "actionid"]])
Ok, a gdzie ten item znajdzie się. Jak zrobić żeby wpadał graczowi do BP?
Od razu żeby nie zakładać nowego tematu:
Jak to jest z CONDITION_ATTRIBUTES, przykładowo dam żeby dodawało 100 HPMAX.
A chcąc inną runą dodać np. 100 MPMAX to poprzednia kondycja znika.
Da rady jakoś zrobić by kolejna nie usuwała poprzedniej?
doRemoveCondition(cid, type[, subId])
doPlayerAddItemEx(cid, uid[, canDropOnMap = FALSE])