Ir para conteúdo
  • Cadastre-se

(Resolvido)Algum Scripter ajuda?


Ir para solução Resolvido por gabriel28,

Posts Recomendados

Alguem sabe alguma function pra usar aqui?

 

quero que quem usar essa magia só possa andar depois de 1 seg ou 2

 

 

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1)

local combat_2 = createCombatObject()
setCombatParam(combat_2, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatFormula(combat_2, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1)

local combat_3 = createCombatObject()
setCombatParam(combat_3, COMBAT_PARAM_TYPE, CONST_ME_MORTAREA)
setCombatParam(combat_3, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatFormula(combat_3, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1)

local combat_4 = createCombatObject()
setCombatParam(combat_4, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat_4, COMBAT_PARAM_EFFECT, 69)
setCombatParam(combat_4, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
setCombatFormula(combat_4, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1)

local combat_5 = createCombatObject()
setCombatParam(combat_5, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat_5, COMBAT_PARAM_EFFECT, CONST_ANI_ENERGY)
setCombatFormula(combat_5, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1)

setCombatArea(combat_5,createCombatArea({{0, 0, 0, 0},
{0, 0, 0, 1},
{0, 0, 0, 1},
{0, 0, 0, 1},
{0, 0, 0, 3},
{0, 0, 0, 0},
{0, 0, 0, 0},
{0, 0, 0, 0}}))

function onCastSpell(cid, var, time)
local mninja = {lookType = 49, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3}
local fninja = {lookType = 49, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3}

local sex = getPlayerSex(cid)
    if sex == 0 then
        doSetCreatureOutfit(cid, mninja, 200)
    else 
        doSetCreatureOutfit(cid, fninja, 200)
    end
    direction = getCreatureLookDirection(cid)
    if direction == SOUTH then
        doCombat (cid, combat, var)
    elseif direction == NORTH then
        doCombat (cid, combat_2, var)
    elseif direction == EAST then
        doCombat (cid, combat_3, var)
        doCombat (cid, combat_5, var)
    elseif direction == WEST then
        doCombat (cid, combat_4, var)
    else
        return false
    end
    return true
end

Link para o post
Compartilhar em outros sites

@Jeanzim
Acho que seria assim:
 

Spoiler

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1)

local combat_2 = createCombatObject()
setCombatParam(combat_2, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatFormula(combat_2, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1)

local combat_3 = createCombatObject()
setCombatParam(combat_3, COMBAT_PARAM_TYPE, CONST_ME_MORTAREA)
setCombatParam(combat_3, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatFormula(combat_3, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1)

local combat_4 = createCombatObject()
setCombatParam(combat_4, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat_4, COMBAT_PARAM_EFFECT, 69)
setCombatParam(combat_4, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
setCombatFormula(combat_4, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1)

local combat_5 = createCombatObject()
setCombatParam(combat_5, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat_5, COMBAT_PARAM_EFFECT, CONST_ANI_ENERGY)
setCombatFormula(combat_5, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1)

setCombatArea(combat_5,createCombatArea({{0, 0, 0, 0},
{0, 0, 0, 1},
{0, 0, 0, 1},
{0, 0, 0, 1},
{0, 0, 0, 3},
{0, 0, 0, 0},
{0, 0, 0, 0},
{0, 0, 0, 0}}))

function onCastSpell(cid, var, time)
local mninja = {lookType = 49, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3}
local fninja = {lookType = 49, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3}

local sex = getPlayerSex(cid)
    if sex == 0 then
        doSetCreatureOutfit(cid, mninja, 200)
    else 
        doSetCreatureOutfit(cid, fninja, 200)
    end
    direction = getCreatureLookDirection(cid)
    if direction == SOUTH then
        doCombat (cid, combat, var)
    elseif direction == NORTH then
        doCombat (cid, combat_2, var)
    elseif direction == EAST then
        doCombat (cid, combat_3, var)
        doCombat (cid, combat_5, var)
    elseif direction == WEST then
        doCombat (cid, combat_4, var)
    else
        return false
    end
	addEvent(doCreatureSetNoMove(cid), 2000)
    return true
end

 


Testa ai.

Editado por gabriel28 (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

depois que usasse a magia ficaria certo tempo sem poder andar .. tipo soltei a magia ai fico 2 seg sem poder se mover.. hehe

nenhum erro no executavel ..

Link para o post
Compartilhar em outros sites
  • Solução

@Jeanzim Testa:
 

Spoiler

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1)

local combat_2 = createCombatObject()
setCombatParam(combat_2, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatFormula(combat_2, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1)

local combat_3 = createCombatObject()
setCombatParam(combat_3, COMBAT_PARAM_TYPE, CONST_ME_MORTAREA)
setCombatParam(combat_3, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatFormula(combat_3, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1)

local combat_4 = createCombatObject()
setCombatParam(combat_4, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat_4, COMBAT_PARAM_EFFECT, 69)
setCombatParam(combat_4, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
setCombatFormula(combat_4, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1)

local combat_5 = createCombatObject()
setCombatParam(combat_5, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat_5, COMBAT_PARAM_EFFECT, CONST_ANI_ENERGY)
setCombatFormula(combat_5, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1)

setCombatArea(combat_5,createCombatArea({{0, 0, 0, 0},
{0, 0, 0, 1},
{0, 0, 0, 1},
{0, 0, 0, 1},
{0, 0, 0, 3},
{0, 0, 0, 0},
{0, 0, 0, 0},
{0, 0, 0, 0}}))

function onCastSpell(cid, var, time)
local mninja = {lookType = 49, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3}
local fninja = {lookType = 49, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3}
local time = 2

local sex = getPlayerSex(cid)
    if sex == 0 then
        doSetCreatureOutfit(cid, mninja, 200)
    else 
        doSetCreatureOutfit(cid, fninja, 200)
    end
	doCreatureSetNoMove(cid, true)
    direction = getCreatureLookDirection(cid)
    if direction == SOUTH then
        doCombat (cid, combat, var)
    elseif direction == NORTH then
        doCombat (cid, combat_2, var)
    elseif direction == EAST then
        doCombat (cid, combat_3, var)
        doCombat (cid, combat_5, var)
    elseif direction == WEST then
        doCombat (cid, combat_4, var)
    else
        return false
    end
	addEvent(function()
        if not isCreature(cid) then return true end
        doCreatureSetNoMove(cid, false)
    end, time * 1000)
    return true
end

 

 

Link para o post
Compartilhar em outros sites
1 minuto atrás, gabriel28 disse:

@Jeanzim Testa:
 

  Ocultar conteúdo


local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1)

local combat_2 = createCombatObject()
setCombatParam(combat_2, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatFormula(combat_2, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1)

local combat_3 = createCombatObject()
setCombatParam(combat_3, COMBAT_PARAM_TYPE, CONST_ME_MORTAREA)
setCombatParam(combat_3, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatFormula(combat_3, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1)

local combat_4 = createCombatObject()
setCombatParam(combat_4, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat_4, COMBAT_PARAM_EFFECT, 69)
setCombatParam(combat_4, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
setCombatFormula(combat_4, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1)

local combat_5 = createCombatObject()
setCombatParam(combat_5, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat_5, COMBAT_PARAM_EFFECT, CONST_ANI_ENERGY)
setCombatFormula(combat_5, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1)

setCombatArea(combat_5,createCombatArea({{0, 0, 0, 0},
{0, 0, 0, 1},
{0, 0, 0, 1},
{0, 0, 0, 1},
{0, 0, 0, 3},
{0, 0, 0, 0},
{0, 0, 0, 0},
{0, 0, 0, 0}}))

function onCastSpell(cid, var, time)
local mninja = {lookType = 49, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3}
local fninja = {lookType = 49, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3}
local time = 2

local sex = getPlayerSex(cid)
    if sex == 0 then
        doSetCreatureOutfit(cid, mninja, 200)
    else 
        doSetCreatureOutfit(cid, fninja, 200)
    end
	doCreatureSetNoMove(cid, true)
    direction = getCreatureLookDirection(cid)
    if direction == SOUTH then
        doCombat (cid, combat, var)
    elseif direction == NORTH then
        doCombat (cid, combat_2, var)
    elseif direction == EAST then
        doCombat (cid, combat_3, var)
        doCombat (cid, combat_5, var)
    elseif direction == WEST then
        doCombat (cid, combat_4, var)
    else
        return false
    end
	addEvent(function()
        if not isCreature(cid) then return true end
        doCreatureSetNoMove(cid, false)
    end, time * 1000)
    return true
end

 

 

obrigado deu certo , ótimo trabalho +rep

Link para o post
Compartilhar em outros sites

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.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo