function onUse(cid, item, fromPosition, item2, toPosition)
--by KanciaK
local outfit = {lookType=8,lookHead=0,lookAddons=0,lookLegs=0,lookBody=0,lookFeet=0} --Outfit, w ktory bedziesz sie zmienial po uzyciu runy
local outfit_time = 300 --czas trwania efektu runy (w sek.)
local outfit_storage = 14010 --storageValue (koniecznie nieuzywany!)
if item.itemid == 2298 then
if item.type > 1 then
if(os.time() > getPlayerStorageValue(cid, outfit_storage)
doSetCreatureOutfit(cid, outfit, outfit_time)
setPlayerStorageValue(cid, outfit_storage, os.time + outfit_time)
doChangeTypeItem(item.uid, item.type - 1)
elseif(os.time() < getPlayerStorageValue(cid, outfit_storage)
doSendMagicEffect(cid,3)
doPlayerSendTextMessage(cid,20,'You are exchaused.')
end
elseif item.type == 1 then
if(os.time() > getPlayerStorageValue(cid, outfit_storage)
doSetCreatureOutfit(cid, outfit, outfit_time)
setPlayerStorageValue(cid, outfit_storage, os.time + outfit_time)
doPlayerRemoveItem(item.uid)
elseif(os.time() < getPlayerStorageValue(cid, outfit_storage)
doSendMagicEffect(cid,3)
doPlayerSendTextMessage(cid,20,'You are exchaused.')
end
end
end
end