Ir para conteúdo

Odranoel S.S

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Curtir
    Odranoel S.S recebeu reputação de sirmagna em AJUDA COM SKILLL POR FAVOR   
    dessa forma?
     
    local config = { efeitoTele = 3, -- efeito que irá aparecer a cada teleport. efeitoDamage = 134, -- efeito que irá aparecer ao acertar o alvo hits = 10, -- quantos hits serão dados delay = 500, -- intervalo de tempo entre cada hit min = 2000, -- dano mínimo max = 2400, -- dano máximo damage = COMBAT_PHYSICALDAMAGE, -- tipo de dano animation = 138 -- animação do feitiço } function isWalkable(pos, creature, pz, proj) -- nord / fixed: odranoels.s if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end if getTopCreature(pos).uid > 0 and creature then return false end if getTileInfo(pos).protection and not pz then return false end local n = not proj and 3 or 2 for i = 0, 255 do pos.stackpos = i local tile = getTileThingByPos(pos) if tile.itemid ~= 0 and not isCreature(tile.uid) then if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then return true end end end return true end function getPosDirs(p, dir) -- mkalo / fixed: odranoels.s return dir == 1 and {x=p.x-1, y=p.y, z=p.z} or dir == 2 and {x=p.x-1, y=p.y+1, z=p.z} or dir == 3 and {x=p.x, y=p.y+1, z=p.z} or dir == 4 and {x=p.x+1, y=p.y+1, z=p.z} or dir == 5 and {x=p.x+1, y=p.y, z=p.z} or dir == 6 and {x=p.x+1, y=p.y-1, z=p.z} or dir == 7 and {x=p.x, y=p.y-1, z=p.z} or dir == 8 and {x=p.x-1, y=p.y-1, z=p.z} end function validPos(pos) local tb = {} for i = 1, 8 do local newpos = getPosDirs(pos, i) if isWalkable(newpos) then table.insert(tb, newpos) end end table.insert(tb, pos) return tb end spell = { -- fixed: odranoels.s start = function (cid, target, markpos, hits) if not isCreature(cid) then return true end if not isCreature(target) or hits < 1 then doTeleportThing(cid, markpos) doSendMagicEffect(getThingPos(cid), config.efeitoTele) return true end local posAv = validPos(getThingPos(target)) local rand = #posAv == 1 and 1 or #posAv - 1 doSendMagicEffect(getThingPos(cid), config.efeitoTele) local playerOutfit = getCreatureOutfit(cid) setCreatureOutfit(cid, {lookType = 0}) local hitCount = 0 local originalPos = getThingPos(cid) local function doHit() hitCount = hitCount + 1 if hitCount <= config.hits then addEvent(function() doTeleportThing(cid, posAv[math.random(1, rand)]) addEvent(doAreaCombatHealth, config.delay, cid, config.damage, getThingPos(target), 0, -config.min, -config.max, config.efeitoDamage) addEvent(doHit, config.delay) end, config.delay) else addEvent(function() if isCreature(cid) then doTeleportThing(cid, originalPos) setCreatureOutfit(cid, playerOutfit) end end, config.delay) end end doHit() end } function onCastSpell(cid) local target = getCreatureTarget(cid) if target then local position1 = {x = getThingPosition(target).x + 1, y = getThingPosition(target).y + 1, z = getThingPosition(target).z} spell.start(cid, target, getThingPos(cid), config.hits) doSendMagicEffect(position1, config.animation) end return true end function setCreatureOutfit(cid, outfit) -- odranoels.s if outfit.lookType == nil then return end local lookType = outfit.lookType local lookHead = outfit.lookHead or 0 local lookBody = outfit.lookBody or 0 local lookLegs = outfit.lookLegs or 0 local lookFeet = outfit.lookFeet or 0 local addons = outfit.addons or 0 doCreatureChangeOutfit(cid, {lookType = lookType, lookHead = lookHead, lookBody = lookBody, lookLegs = lookLegs, lookFeet = lookFeet, addons = addons}) end  
  2. Obrigado
    Odranoel S.S deu reputação a Gustavots em [Talkaction] Ban por Comando   
    Mais organizado e com um salve de registro em logs:
     
     
    function onSay(cid, words, param, channel) local t = string.explode(param, ",") if #t < 3 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Digite /ban nome, dias, motivo.") return true end local name, days, motivo = t[1], tonumber(t[2]), t[3] local acc = getAccountIdByName(name) if acc ~= 0 then local tempo = days * 24 * 3600 local target = getCreatureByName(name) if target then doAddAccountBanishment(acc, target, os.time() + tempo, 5, 2, "Você foi banido por " .. motivo .. ", por " .. tempo .. " segundos.", 0) doBroadcastMessage("O jogador " .. getCreatureName(target) .. " foi banido por " .. getCreatureName(cid) .. ". Motivo: " .. motivo .. ".", 25) addEvent(doRemoveCreature, 3 * 1000, target, true) -- Registro no arquivo de log local bansFile = "data/logs/bans.txt" local playerName = getCreatureName(cid) local currentTime = os.date("%Y-%m-%d %H:%M:%S") local file = io.open(bansFile, "a") if file then file:write(currentTime .. " - " .. playerName .. " baniu " .. name .. " por " .. days .. " dias. Motivo: " .. motivo .. "\n") file:close() else print("Erro ao abrir o arquivo de log de bans.") end return true else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Jogador não encontrado.") return true end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Jogador não encontrado.") return true end end  
     
    Creditos: Odranoel
  3. Obrigado
    Odranoel S.S deu reputação a Gustavots em Global Effect   
    --[[> ODRANOEL S.S <]]-- function onSay(cid, words, param, channel) local params = string.explode(param, " ") if #params < 2 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Use o comando da seguinte forma: !efeito 1, Sua Mensagem") return true end local effect = tonumber(params[1]) local message = table.concat(params, " ", 2) for _, pid in ipairs(getPlayersOnline()) do addEvent(sendEffectToPlayer, math.random(0, 200), pid, effect, message) end return true end function sendEffectToPlayer(pid, effect, message) if isPlayer(pid) then local position = getCreaturePosition(pid) for i = 1, 30 do doSendDistanceShoot(position, {x = position.x + math.random(-7, 7), y = position.y + math.random(-5, 5), z = position.z}, effect) end doCreatureSay(pid, message, TALKTYPE_ORANGE_1) end end  

Informação Importante

Confirmação de Termo