WiLDTuRTLE
Member
- Joined
- Feb 26, 2011
- Messages
- 478
- Reaction score
- 5
Lua Script Error: [Action Interface]
data/actions/scripts/new/hydra egg.luanUse
luaDoRemoveItem(). Item not found
The egg disapear tho, i wasnt having that error on 9.6 but id like to remove it from my console anyways!
data/actions/scripts/new/hydra egg.luanUse
luaDoRemoveItem(). Item not found
Code:
local config = {
eff = 30,
chance = 50, --50% chance spawn the monster
breakchance = 25, -- 25% chance to break
monster = 'Hydra', -- monster which will spawn
msg = "Sorry the monster was dead in your egg.", --msg that will be sent to the player IF the egg 'fails'
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(fromPosition.x == CONTAINER_POSITION) then
return doPlayerSendCancel(cid, "Please, first put your egg on the floor.")
end
if math.random(100) <= config.breakchance then
doPlayerSendTextMessage(cid, 27, config.msg)
doRemoveItem(item.uid, 1)
end
if math.random(100) <= config.chance then
doSendMagicEffect(fromPosition, config.eff)
doSummonCreature(config.monster, fromPosition)
doRemoveItem(item.uid, 1)
else
doSendMagicEffect(fromPosition, 3)
end
return true
end
The egg disapear tho, i wasnt having that error on 9.6 but id like to remove it from my console anyways!