Aqui he modificado un mod que te funcionara perfectamente.
Solo creas un archivo lua en tu carpeta de (( mods )) ( si no sabes crearlo, solo copia y pega uno de los que esten en esa carpeta y borras todo lo que tenga )
y dentro de ese archivo pegas este codigo:
- Código:
<?xml version="1.0" encoding="ISO-8859-1"?>
<mod name="Loot System" version="1.0" author="Sevu Entertainment" contact="sevuot@hotmail.com" enabled="yes">
<config name="Advertencia_func"><![CDATA[
local itemAdvertencia = {
2696,
3976
}
function isContainerByItemId(itemid) -- By SevuEntertainment
return getItemInfo(itemid).group == 2 and true or false
end
function onAdvertenciaItems(pos) -- @The_Pain
local tile = { uid = 0, itemid = 0 }
local check = false
for i = 0, 255 do
pos.stackpos = i
tile = getTileThingByPos(pos)
if tile.uid > 0 and isCorpse(tile.uid) then
check = true
break
end
end
if check == true then
for index = 0, getContainerSize(tile.uid) do
local item = getContainerItem(tile.uid, index)
if item.uid > 0 then
if isInArray(itemAdvertencia, item.itemid) then
doSendMagicEffect(pos, CONST_ME_TUTORIALARROW)
break
end
end
end
end
return true
end
]]></config>
<event type="login" name="LootLoginAd" event="script"><![CDATA[
function onLogin(cid)
registerCreatureEvent(cid, "MonsterAttackAd")
return true
end]]></event>
<event type="death" name="onDropLoot" event="script"><![CDATA[
domodlib('Advertencia_func')
function onDeath(cid, corpse, deathList)
if isPlayer(cid) then
return true
end
local lookCorpse = getMonsterInfo(getCreatureName(cid)).lookCorpse
if isContainerByItemId(lookCorpse) then
addEvent(onAdvertenciaItems, 1, getCreaturePosition(cid))
end
return true
end]]></event>
<event type="combat" name="MonsterAttackAd" event="script"><![CDATA[
domodlib('Advertencia_func')
if isPlayer(cid) and isMonster(target) then
registerCreatureEvent(target, "onDropLoot")
end
return true]]></event>
</mod>
Última edición por The_Pain el Jue Mayo 24, 2018 9:35 am, editado 1 vez (Razón : Un detalle que se me olvido colocar XD)