Beleza, já vou testar aqui. Poderia da uma força para adicionar ''TIME'' no item que for usado ?
Exemplo: ele durar apenas 2h e depois sumir, ou virar outro item quebrado algo do tipo
Deu esse erro
[3:15:52.147] [Error - CreatureScript Interface]
[3:15:52.150] In a timer event called from:
[3:15:52.151] local t = {
[3:15:52.153] item = 12759,
[3:15:52.154] slot = CONST_SLOT_RING,
[3:15:52.155] newRate = 5
[3:15:52.156] }
[3:15:52.157]
[3:15:52.158] local rate = getConfigInfo('rateLoot')
[3:15:52.159]
[3:15:52.160] function getContentDescription(uid, comma)
[3:15:52.160] local ret, i, containers = '', 0, {}
[3:15:52.161] while i < getContainerSize(uid) do
[3:15:52.162] local v, s = getContainerItem(uid, i), ''
[3:15:52.165] local k = getItemInfo(v.itemid)
[3:15:52.166] if k.name ~= '' then
[3:15:52.167] if v.type > 1 and k.stackable and k.showCount then
[3:15:52.167] s = v.type .. ' ' .. getItemInfo(v.itemid).plural
[3:15:52.168] else
[3:15:52.169] local article = k.article
[3:15:52.170] s = (article == '' and '' or article .. ' ') .. k.name
[3:15:52.172] end
[3:15:52.173] ret = ret .. (i == 0 and not comma and '' or ', ') .. s
[3:15:52.175] if isContainer(v.uid) and getContainerSize(v.uid) > 0 then
[3:15:52.176] table.insert(containers, v.uid)
[3:15:52.176] end
[3:15:52.177] else
[3:15:52.179] ret = ret .. (i == 0 and not comma and '' or ', ') .. 'an item of type ' .. v.itemid .. ', please report it to gamemaster'
[3:15:52.185] end
[3:15:52.186] i = i + 1
[3:15:52.187] end
[3:15:52.188] for i = 1, #containers do
[3:15:52.189] ret = ret .. getContentDescription(containers, true)
[3:15:52.190] end
[3:15:52.190] return ret
[3:15:52.191] end
[3:15:52.192]
[3:15:52.193] local function send(cid, pos, corpseid, monster, party)
[3:15:52.194] local corpse = getTileItemById(pos, corpseid).uid
[3:15:52.200] local ret = isContainer(corpse) and getContentDescription(corpse)
[3:15:52.201] doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Loot of ' .. monster .. ': ' .. (ret ~= '' and ret or 'nothing'))
[3:15:52.202] if party then
[3:15:52.203] for _, pid in ipairs(getPartyMembers(party)) do
[3:15:52.205] doPlayerSendChannelMessage(pid, '', 'Loot of ' .. monster .. ': ' .. (ret ~= '' and ret or 'nothing'), TALKTYPE_CHANNEL_W, CHANNEL_PARTY)
[3:15:52.205] end
[3:15:52.206] end
[3:15:52.208] end
[3:15:52.209]
[3:15:52.215] local function createLoot(i, ext)
[3:15:52.216] local item = type(i.id) == 'table' and i.id[math.random(#i.id)] or i.id
[3:15:52.217] local random = math.ceil(math.random(100000) / (ext and t.newRate or rate))
[3:15:52.218] local tmpItem
[3:15:52.219]
[3:15:52.220] if random < i.chance then
[3:15:52.221] tmpItem = doCreateItemEx(item, getItemInfo(item).stackable and random % i.count + 1 or 1)
[3:15:52.222] end
[3:15:52.223]
[3:15:52.223] if not tmpItem then
[3:15:52.225] return
[3:15:52.226] end
[3:15:52.231]
[3:15:52.231] if i.subType ~= -1 then
[3:15:52.232] doItemSetAttribute(tmpItem, 'subType', i.subType)
[3:15:52.234] end
[3:15:52.235]
[3:15:52.236] if i.actionId ~= -1 then
[3:15:52.239] doItemSetAttribute(tmpItem, 'aid', i.actionId)
[3:15:52.240] end
[3:15:52.241]
[3:15:52.247] if i.uniqueId ~= -1 then
[3:15:52.248] doItemSetAttribute(tmpItem, 'uid', i.uniqueId)
[3:15:52.249] end
[3:15:52.252]
[3:15:52.253] if i.text ~= '' then
[3:15:52.254] doItemSetAttribute(tmpItem, 'text', i.text)
[3:15:52.255] end
[3:15:52.256]
[3:15:52.257] return tmpItem
[3:15:52.260] end
[3:15:52.261]
[3:15:52.262] local function createChildLoot(parent, i, ext)
[3:15:52.263] if #i == 0 then
[3:15:52.266] return true
[3:15:52.267] end
[3:15:52.268]
[3:15:52.269] local size, cap = 0, getContainerCap(parent)
[3:15:52.269] for k = 1, #i do
[3:15:52.270] if size == cap then
[3:15:52.271] break
[3:15:52.272] end
[3:15:52.272] local tmp = createLoot(i[k], ext)
[3:15:52.273] if tmp then
[3:15:52.280] if isContainer(tmp) then
[3:15:52.282] if createChildLoot(tmp, i[k].child, ext) then
[3:15:52.283] doAddContainerItemEx(parent, tmp)
[3:15:52.285] size = size + 1
[3:15:52.285] else
[3:15:52.286] doRemoveItem(tmp)
[3:15:52.287] end
[3:15:52.288] else
[3:15:52.291] doAddContainerItemEx(parent, tmp)
[3:15:52.294] size = size + 1
[3:15:52.295] end
[3:15:52.296] end
[3:15:52.297] end
[3:15:52.298]
[3:15:52.298] return size > 0
[3:15:52.299] end
[3:15:52.300]
[3:15:52.301] local function dropLoot(pos, v, ext)
[3:15:52.302] local corpse = getTileItemById(pos, v.lookCorpse).uid
[3:15:52.303] if isContainer(corpse) then
[3:15:52.304] for i = 1, getContainerSize(corpse) do
[3:15:52.305] doRemoveItem(getContainerItem(corpse, 0).uid)
[3:15:52.306] end
[3:15:52.309] local size, cap = 0, getContainerCap(corpse)
[3:15:52.310] for i = 1, #v.loot do
[3:15:52.311] if size == cap then
[3:15:52.312] break
[3:15:52.313] end
[3:15:52.313] local tmp = createLoot(v.loot, ext)
[3:15:52.314] if tmp then
[3:15:52.315] if isContainer(tmp) then
[3:15:52.316] if createChildLoot(tmp, v.loot.child, ext) then
[3:15:52.316] doAddContainerItemEx(corpse, tmp)
[3:15:52.319] size = size + 1
[3:15:52.319] else
[3:15:52.320] doRemoveItem(tmp)
[3:15:52.320] end
[3:15:52.320] else
[3:15:52.320] doAddContainerItemEx(corpse, tmp)
[3:15:52.320] size = size + 1
[3:15:52.320] end
[3:15:52.320] end
[3:15:52.321] end
[3:15:52.321] end
[3:15:52.321] end
[3:15:52.322]
[3:15:52.327] function onKill(cid, target, lastHit)
[3:15:52.328] if lastHit and isMonster(target) then
[3:15:52.331] local v = getMonsterInfo(getCreatureName(target))
[3:15:52.332] if v.lookCorpse > 0 then
[3:15:52.333] local master = getCreatureMaster(target)
[3:15:52.335] if not master or master == target then
[3:15:52.336] addEvent(dropLoot, 0, getThingPos(target), v, getPlayerSlotItem(cid, t.slot).itemid == t.item)
[3:15:52.336] end
[3:15:52.337] addEvent(send, 100, cid, getThingPos(target), v.lookCorpse, v.description, getPlayerParty(cid))
[3:15:52.340] end
[3:15:52.342] end
[3:15:52.344] return true
[3:15:52.345] end
Esse mods que vc me passou deu error, então fui no mods do outro forum citado no script e peguei o original e funcionou.
Só gostaria de fazer o ring sumir após algumas horas, alguém sabe como posso fazeR?