function onUse(cid, item, fromPosition, itemEx, toPosition) if fromPosition.x ~= CONTAINER_POSITION then doSendMagicEffect(fromPosition, math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE)) else doCreatureSay(cid, "Ouch! Rather place it on the ground next time.", TALKTYPE_ORANGE_1, false, cid) if getCreatureHealth(cid) <= 10 or getTilePzInfo(getCreaturePosition(cid)) then doSendMagicEffect(fromPosition, CONST_ME_HITBYFIRE) else doTargetCombatHealth(0, cid, COMBAT_FIREDAMAGE, -10, -10, CONST_ME_NONE) end doSendMagicEffect(fromPosition, CONST_ME_EXPLOSIONAREA) end doRemoveItem(item.uid) return true end