Tenta isso
Red Skull
function onUse(cid, item, fromPosition, item2, toPosisition)
local config={
RemoveOnUse = "yes" -- remover o item ao usar ("yes" or "no")
}
if getCreatureSkullType(cid) == SKULL_RED then
db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
doCreatureSetSkullType(cid, 0)
doCreatureSay(cid, "Your frags and skulls is cleaned!", 19)
doSendMagicEffect(getPlayerPosition(cid), 26)
if (config.RemoveOnUse == "yes") then
doRemoveItem(item.uid, 1)
end
else
doPlayerSendCancel(cid,"You don't have red skull.")
doSendMagicEffect(getPlayerPosition(cid), 2)
end
return TRUE
end
Black Skull
function onUse(cid, item, fromPosition, item2, toPosisition)
local config={
RemoveOnUse = "yes" -- remover o item ao usar ("yes" or "no")
}
if getCreatureSkullType(cid) == SKULL_BLACK then
db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
doCreatureSetSkullType(cid, 0)
doCreatureSay(cid, "Your frags and skulls is cleaned!", 19)
doSendMagicEffect(getPlayerPosition(cid), 26)
if (config.RemoveOnUse == "yes") then
doRemoveItem(item.uid, 1)
end
else
doPlayerSendCancel(cid,"You don't have Black Skull.")
doSendMagicEffect(getPlayerPosition(cid), 2)
end
return TRUE
end
Tag em Actions.xml
<action itemid="ITEM ID" script="nome do arquivo red skull.lua" />
<action itemid="ITEM ID" script="nome do arquivo black skull.lua" />




info
Grupo: Barão
Registrado: 29/03/13
Posts: 215
Reputação: +4
Char no Tibia: gm
gente quero um scripter para quando clicar no item remova black e a red skull e um item para os dois se tiver com red skull tira e se tiver com black tambem o item so pode ser usado 1 vez apos isar ele some