ok heres the script...
-- Scripted by Leon Zawodowiec / Mag Egzorcysta --
function onUse(cid, item, frompos, item2, topos)
local skull = getCreatureSkullType(cid)
if skull == SKULL_NONE then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't have any skull !")
return 0
end
if skull == SKULL_YELLOW then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can't remove yellow skull !")
return 0
end
if skull == SKULL_GREEN then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can't remove green skull !")
return 0
end
if skull == SKULL_WHITE then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can't remove white skull !")
return 0
end
if skull == SKULL_RED then
(doPlayerRemoveItem(cid, 9969, 1) == TRUE)
doCreatureSetSkullType(cid, SKULL_NONE)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Red Skull has been removed !")
db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
return 0
else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Take your Frag Remover to your BackPack !")
return 0
end
if skull == SKULL_BLACK then
(doPlayerRemoveItem(cid, 9969, 1) == TRUE)
doCreatureSetSkullType(cid, SKULL_NONE)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Black Skull has been removed !")
db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
return 0
else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Take your Frag Remover to your BackPack !")
return 0
end
end
if i wannna make the skull remover with only 1 charge and then the skull remover desapear i edit it in items.xml or maybe i have to add something in this script ?
if someone can modify this script so it can only have one charge and then deseapear
