xNMExReject
Member
- Joined
- Oct 31, 2009
- Messages
- 33
- Reaction score
- 11
I added a few custom items that I want to make all monsters drop, considering the fact that I don't want to go through and add these items to every single monster I made an event script, however it doesn't work because it doesn't acknowledge that the corpse is a container, or perhaps it checks for the corpse too soon, either way I need some assistance:
Script:
Error:
Script:
Code:
function onKill(cid, target)
if(100 >= math.random(1, 100)) then
if(1 == math.random(1, 4)) then
doAddContainerItem(corpse, 11389)
return true
elseif(2 == math.random(1, 4)) then
doAddContainerItem(corpse, 11390)
return true
elseif(3 == math.random(1, 4)) then
doAddContainerItem(corpse, 11391)
return true
elseif(4 == math.random(1, 4)) then
doAddContainerItem(corpse, 11392)
return true
end
end
return false
end
Error:
Code:
[29/01/2010 21:40:43] [Error - CreatureScript Interface]
[29/01/2010 21:40:43] data/creaturescripts/scripts/enchantdrop.lua:onKill
[29/01/2010 21:40:43] Description:
[29/01/2010 21:40:44] (luaDoAddContainerItem) Container not found