function onUse(cid, item, fromPosition, itemEx, toPosition)
if(getPlayerRedSkullEnd(cid) == 0) then
doCreatureSay(cid, "You dont have any frags!", TALKTYPE_ORANGE_1)
else
doCreatureSay(cid, "Frags sucesfully removed.", TALKTYPE_ORANGE_1)
doPlayerSetRedSkullEnd(cid, 0)
doTransformItem(item.uid, 2300)
end
end
-- Skull remove by Gelio
-- With little Gesior's help (frags remove)
function onUse(cid, item, frompos, item2, topos)
local zabieraLadunki = "tak" -- Czy zabiera ladunki runy
local usuwaRedSkulla = "tak" -- Czy usuwa red skulla
if((getPlayerSkullType(cid) ~= SKULL_RED or usuwaRedSkulla == "tak") or getPlayerSkullType(cid) ~= SKULL_GREEN) then
doCreatureSetSkullType(cid, SKULL_NONE)
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,"You don't have any skull now.")
doSendMagicEffect(getPlayerPosition(cid),CONST_ME_MAGIC_RED)
doPlayerSetRedSkullTicks(cid, 0) -- Usuwanie fragow. Usuniesz ta linijkę to nie będzie brać fragów
else
doPlayerSendCancel(cid,"You can't remove red or green skull.")
end
if(zabieraLadunki == "tak") then
if(item.type > 1) then
doChangeTypeItem(item.uid, item.type-1)
else
doRemoveItem(item.uid,1)
end
end
end
i w scripts stwórz plik 'skullremover.lua'<action itemid="2300" event="script" value="skullremover.lua"/>
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(getPlayerRedSkullEnd(cid) == 0) then
doCreatureSay(cid, "You dont have any frags!", TALKTYPE_ORANGE_1)
else
doCreatureSay(cid, "Frags sucesfully removed.", TALKTYPE_ORANGE_1)
doPlayerSetRedSkullEnd(cid, 0)
doChangeTypeItem(item.uid, item.type-1)
doRemoveItem(item.uid,1)
end
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(getPlayerSkullType(cid) ~= SKULL_RED) then
doCreatureSetSkullType(cid, SKULL_NONE)
doCreatureSetRedSkullTime(cid, 0)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "jestes lysym chujem i nie masz red skuula")
end
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(getPlayerSkullType(cid) == SKULL_RED) then
doCreatureSetSkullType(cid, SKULL_NONE)
doCreatureSetRedSkullTime(cid, 0)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "tfuj skull has ben dilejt")
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "jestes lysym chujem i nie masz red skuula")
end
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(getPlayerRedSkullEnd(cid) == 0) then
doCreatureSay(cid, "You dont have any frags!", TALKTYPE_ORANGE_1)
else
doCreatureSay(cid, "Frags sucesfully removed.", TALKTYPE_ORANGE_1)
doPlayerSetRedSkullEnd(cid, 0)
doTransformItem(item.uid, 2300)
end
end