Postado Fevereiro 23, 2015 10 anos local config = { storage = 66669, storage_time = 66668, interval = 10, -- SEGUNDOS effect = 30, --EFEITO NO PLAYER effect_target = 17, -- EFEITO NO TARGET } function onUse(cid, item, fromPos, itemEx, toPos) if item.uid == itemEx.uid then if getPlayerStorageValue(cid, config.storage) < 1 then doPlayerSendTextMessage(cid, 19, "ATIVADO!!") setPlayerStorageValue(cid, config.storage, 1) doSendMagicEffect(getThingPos(cid), config.effect) else setPlayerStorageValue(cid, config.storage, -1) doPlayerSendTextMessage(cid, 19, "DESATIVADO!!") doSendMagicEffect(getThingPos(cid), config.effect) end return true end local mana = getCreatureMana(itemEx.uid) if not isPlayer(itemEx.uid) and cid ~= itemEx.uid then return true and doPlayerSendTextMessage(cid, 19, "Você só pode usar isso em jogadores.") end if getPlayerStorageValue(cid, config.storage) == 1 then if getPlayerStorageValue(cid, config.storage_time) <= os.time() then doCreatureAddMana(cid, mana) doPlayerSendTextMessage(cid, 19, "Perfect Copy!!") doSendMagicEffect(toPos, config.effect_target) setPlayerStorageValue(cid, config.storage_time, os.time() + config.interval) else doPlayerSendTextMessage(cid, 19, "Falta " .. getPlayerStorageValue(cid, config.storage_time) - os.time() .. "segundos pra usar novamente..." ) end else doPlayerSendTextMessage(cid, 19, "Você precisa ativar o sharingan para usa-lo.") end return true end <action itemid="IDDOITEM" event="script" value="ARQUIVO.lua"/> Editado Fevereiro 23, 2015 10 anos por Shizuo Silva (veja o histórico de edições)
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.