local PETS = { ["Rat"] = {0, 250}, } function onUse(cid, item, fromPosition, itemEx, toPosition) if getTileInfo(getCreaturePosition(cid)).protection then return doPlayerSendCancel(cid, "Você não pode invocar dentro de zonas de proteção.") end if getCreatureStorage(cid, 11548) > os.time() then return
function onUse(cid, item, fromPosition, itemEx, toPosition) if itemEx.itemid == 2157 then if itemEx.type == 100 then doTransformItem(itemEx.uid, 7762, itemEx.type) else doPlayerSendCancel(cid, "You need 100 gold nuggets.") end else doPlayerSendCancel(cid, "You can only use the battle hammer in gold
info
Grupo: Campones
Registrado: 17/11/12
Posts: 25
Reputação: +5
Tá aqui mano, só faltava um end ^^
function onCastSpell(cid, var) local tp_pos = {x = 100, y = 100, z = 7} -- Posição que o target será levado local effect_player = 10 -- Efeito que sairá no player local effect_target = 15 -- Efeito que sairá no target local exhaustion_time = 2 -- Exhaustion (em segundos) local exhaust = 18501 -- Storage da exhaustion if getTileInfo(getCreaturePosition(cid)).hardcore then doPlayerSendCancel(cid, "Você não pode usar essa magia em arenas.") return false end if getCreatureTarget(cid) <= 0 then doPlayerSendCancel(cid, "Você precisa selecionar um alvo.") return false elseif exhaustion.check(cid, exhaust) then doSendMagicEffect(getCreaturePosition(cid), 2) doPlayerSendCancel(cid, "Aguarde "..(exhaustion.get(cid, exhaust)).." segundos para usar a magia novamente.") return false end local target = getCreatureTarget(cid) doSendMagicEffect(getCreaturePosition(cid), effect_player) doSendMagicEffect(getCreaturePosition(target), effect_target) setPlayerStorageValue(target, 18500, "x = "..(getCreaturePosition(target).x)..",y = "..(getCreaturePosition(target).y)..",z = "..(getCreaturePosition(target).z)..",") doTeleportThing(target, tp_pos) exhaustion.set(cid, exhaust, exhaustion_time) return true end function onStepIn(cid, item) local storage = getPlayerStorageValue(cid, 18500) local pos = {x = string.match(storage, "x = (.-),"), y = string.match(storage, "y = (.-),"), z = string.match(storage, "z = (.-),")} doTeleportThing(cid, pos) return true endE sim, eu tenho a autorização do Luck pra postar no tópico, ele quer que eu treine ajudando vocês..
Vou tentar realizar alguns pedidos dentro da minha limitação de noobice e pulso torcido.
Abraços.