• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved Sloved

Status
Not open for further replies.
where is write ITEMID change for the id of you want

Lua:
local config = {
	monsters = {
		['Demon'] = {}
		}
	}
 
function onCastSpell(cid, var)
if isMonster(getTopCreature(var.pos).uid) then
if config.monsters[getCreatureName(getTopCreature(var.pos).uid)] then
if math.random(10) == 1 then
local container = doPlayerAddItem(cid, 2299)-- change to right itemid
doItemSetAttribute(container, "description", "It contains a " .. getCreatureName(getTopCreature(var.pos).uid) .. ".")
doRemoveCreature(getTopCreature(var.pos).uid)
doPlayerRemoveItem(cid, ITEMID, 1)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "sorry you failed.") -- remove if you want
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry you cant use with this animal.") -- remove if you want
return false
end
end
return true

REP++ please
 
Speak english next time stop using translators.

Here you are.
just change the ITEMID

Lua:
local config = {
	monsters = {
		['Demon'] = {}
		}
	}
 
function onCastSpell(cid, var)
if isMonster(getTopCreature(var.pos).uid) then
if config.monsters[getCreatureName(getTopCreature(var.pos).uid)] then
if math.random(10) == 1 then
local container = doPlayerAddItem(cid, 2299)-- change to right itemid
doItemSetAttribute(container, "description", "It contains a " .. getCreatureName(getTopCreature(var.pos).uid) .. ".")
doRemoveCreature(getTopCreature(var.pos).uid)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "sorry you failed.") -- remove if you want
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry you cant use with this animal.") -- remove if you want
return false
end
doPlayerRemoveItem(cid, ITEMID, 1)
end
return true
 
Status
Not open for further replies.
Back
Top