Ir para conteúdo
  • Cadastre-se

(Resolvido)Script Buff


Ir para solução Resolvido por Fabi Marzan,

Posts Recomendados

local tempo = 300 -- tempo em segundos.

local ml = 30 -- quantos ira aumentar o skill de ML
local skillclub = 35 -- quantos ira aumentar o skill de Club
local skillshield = 15 -- quantos ira aumentar o skill de Shield
local health = 5000 -- A cada 1 segundo quantos aumentar de vida
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
setCombatParam(combat, COMBAT_PARAM_EFFECT, Effect00)
     
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_SUBID, 100)
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)
setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, ml)
setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, skillclub)
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, skillshield)
setConditionParam(condition, CONDITION_PARAM_OUTFIT, outfit)
setCombatCondition(combat, condition)
     
local condition = createConditionObject(CONDITION_HASTE)
setConditionParam(condition, CONDITION_PARAM_SPEED, 250)
setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)
setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)
setCombatCondition(combat, condition)
     
local condition = createConditionObject(CONDITION_REGENERATION)
setConditionParam(condition, CONDITION_PARAM_SUBID, 1)
setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)
setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)
setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, health)
setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 1000)
setCombatCondition(combat, condition)
                           
function onCastSpell(cid, var)

    if not getCreatureCondition(cid, CONDITION_ATTRIBUTES, 100) then
        doCombat(cid, combat, var)

        repeateffect00(cid, 0, {x=0,y=0,z=0}, tempo)

        local effect00 = {x=getPlayerPosition(cid).x+2, y=getPlayerPosition(cid).y+2, z=getPlayerPosition(cid).z}

           doSendMagicEffect(effect00, 130)
        doCreatureSay(cid, "Kyuubi Furie", TALKTYPE_MONSTER)
        addEvent(doSendAnimatedText, 0, getThingPos(cid), "Ninj 30%", COLOR_WHITE)
        addEvent(doSendAnimatedText, 1000, getThingPos(cid), "Taiju 35%", COLOR_WHITE)
        addEvent(doSendAnimatedText, 1800, getThingPos(cid), "Health 5%", COLOR_WHITE)
    else
        doPlayerSendCancel(cid, "Sorry, you are transformed.")
    end
end

agora vai mlk!

Link para o post
Compartilhar em outros sites

local tempo = 300 -- tempo em segundos.

local ml = 30 -- quantos ira aumentar o skill de ML
local skillclub = 35 -- quantos ira aumentar o skill de Club
local skillshield = 15 -- quantos ira aumentar o skill de Shield
local health = 5000 -- A cada 1 segundo quantos aumentar de vida
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
setCombatParam(combat, COMBAT_PARAM_EFFECT, Effect)
     
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_SUBID, 100)
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)
setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, ml)
setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, skillclub)
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, skillshield)
setConditionParam(condition, CONDITION_PARAM_OUTFIT, outfit)
setCombatCondition(combat, condition)
     
local condition = createConditionObject(CONDITION_HASTE)
setConditionParam(condition, CONDITION_PARAM_SPEED, 250)
setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)
setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)
setCombatCondition(combat, condition)
     
local condition = createConditionObject(CONDITION_REGENERATION)
setConditionParam(condition, CONDITION_PARAM_SUBID, 1)
setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)
setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)
setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, health)
setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 1000)
setCombatCondition(combat, condition)
                           
function onCastSpell(cid, var)

    if not getCreatureCondition(cid, CONDITION_ATTRIBUTES, 100) then
        doCombat(cid, combat, var)

        repeateffect(cid, 0, {x=0,y=0,z=0}, tempo)

        local effect = {x=getPlayerPosition(cid).x+2, y=getPlayerPosition(cid).y+2, z=getPlayerPosition(cid).z}

           doSendMagicEffect(effect, 130)
        doCreatureSay(cid, "Kyuubi Furie", TALKTYPE_MONSTER)
        addEvent(doSendAnimatedText, 0, getThingPos(cid), "Ninj 30%", COLOR_WHITE)
        addEvent(doSendAnimatedText, 1000, getThingPos(cid), "Taiju 35%", COLOR_WHITE)
        addEvent(doSendAnimatedText, 1800, getThingPos(cid), "Health 5%", COLOR_WHITE)
    else
        doPlayerSendCancel(cid, "Sorry, you are transformed.")
    end
end

Link para o post
Compartilhar em outros sites

local tempo = 300 -- tempo em segundos.

local ml = 30 -- quantos ira aumentar o skill de ML
local skillclub = 35 -- quantos ira aumentar o skill de Club
local skillshield = 15 -- quantos ira aumentar o skill de Shield
local health = 5000 -- A cada 1 segundo quantos aumentar de vida
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
setCombatParam(combat, COMBAT_PARAM_EFFECT, Effect)
     
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_SUBID, 100)
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)
setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, ml)
setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, skillclub)
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, skillshield)
setConditionParam(condition, CONDITION_PARAM_OUTFIT, outfit)
setCombatCondition(combat, condition)
     
local condition = createConditionObject(CONDITION_HASTE)
setConditionParam(condition, CONDITION_PARAM_SPEED, 250)
setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)
setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)
setCombatCondition(combat, condition)
     
local condition = createConditionObject(CONDITION_REGENERATION)
setConditionParam(condition, CONDITION_PARAM_SUBID, 1)
setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)
setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)
setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, health)
setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 1000)
setCombatCondition(combat, condition)
                           
function onCastSpell(cid, var)

    if not getCreatureCondition(cid, CONDITION_ATTRIBUTES, 100) then
        doCombat(cid, combat, var)

        repeateffect(cid, 0, {x=0,y=0,z=0}, tempo)
        doCreatureSay(cid, "Kyuubi Furie", TALKTYPE_MONSTER)
        addEvent(doSendAnimatedText, 0, getThingPos(cid), "Ninj 30%", COLOR_WHITE)
        addEvent(doSendAnimatedText, 1000, getThingPos(cid), "Taiju 35%", COLOR_WHITE)
        addEvent(doSendAnimatedText, 1800, getThingPos(cid), "Health 5%", COLOR_WHITE)

        local effect = {x=getPlayerPosition(cid).x+2, y=getPlayerPosition(cid).y+2, z=getPlayerPosition(cid).z}

           doSendMagicEffect(effect, 130)
    else
        doPlayerSendCancel(cid, "Sorry, you are transformed.")
    end
end

Link para o post
Compartilhar em outros sites

local tempo = 300 -- tempo em segundos.

local ml = 30 -- quantos ira aumentar o skill de ML
local skillclub = 35 -- quantos ira aumentar o skill de Club
local skillshield = 15 -- quantos ira aumentar o skill de Shield
local health = 5000 -- A cada 1 segundo quantos aumentar de vida
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
setCombatParam(combat, COMBAT_PARAM_EFFECT, Effect)
     
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_SUBID, 100)
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)
setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, ml)
setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, skillclub)
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, skillshield)
setConditionParam(condition, CONDITION_PARAM_OUTFIT, outfit)
setCombatCondition(combat, condition)
     
local condition = createConditionObject(CONDITION_HASTE)
setConditionParam(condition, CONDITION_PARAM_SPEED, 250)
setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)
setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)
setCombatCondition(combat, condition)
     
local condition = createConditionObject(CONDITION_REGENERATION)
setConditionParam(condition, CONDITION_PARAM_SUBID, 1)
setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)
setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)
setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, health)
setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 1000)
setCombatCondition(combat, condition)
                           
function onCastSpell(cid, var)

    if not getCreatureCondition(cid, CONDITION_ATTRIBUTES, 100) then
        doCombat(cid, combat, var)
        repeateffect(cid, 0, {x=0,y=0,z=0}, tempo)
        doCreatureSay(cid, "Kyuubi Furie", TALKTYPE_MONSTER)
        addEvent(doSendAnimatedText, 0, getThingPos(cid), "Ninj 30%", COLOR_WHITE)
        addEvent(doSendAnimatedText, 1000, getThingPos(cid), "Taiju 35%", COLOR_WHITE)
        addEvent(doSendAnimatedText, 1800, getThingPos(cid), "Health 5%", COLOR_WHITE)
    else
        local effect = {x=getPlayerPosition(cid).x+2, y=getPlayerPosition(cid).y+2, z=getPlayerPosition(cid).z}
           doSendMagicEffect(effect, 130)
        doPlayerSendCancel(cid, "Sorry, you are transformed.")
    end
end

 

 

por que nao experimenta pegar outra script de buff?

Link para o post
Compartilhar em outros sites

@H3ITORR 

Era pra esse script tá tudo funcionando, só que, o effect é novo no cliente, e só por isso não centraliza, mas se for qualquer efeito antigo, ele centraliza... (Sobre sua pergunta do script, é que eu gostei das mensagenszinha que ele solta em branco rsrs, eu até mudaria, mas nem sei mexer muito com script...)

 

image.thumb.png.3a34a0ccab1a0d282f37e41f8af1fb1f.png

Link para o post
Compartilhar em outros sites

desculpa nao sei ajeitar nao manin mais sei que uma coisa ajuda isso aqui

sei que isso aqui eu adiciono no meu e pega perfeitamente

 

setCombatParam(combat, COMBAT_PARAM_EFFECT, position)

 

        local position = {x=getPlayerPosition(cid).x+2, y=getPlayerPosition(cid).y+2, z=getPlayerPosition(cid).z}
           doSendMagicEffect(position, 130)

Link para o post
Compartilhar em outros sites

@H3ITORR 

Aah, tudo bem então. 

O seu script, teria como adicionar essas mensagens que sai ao usar? As mensagens em branco? Pq se der, eu substituo o meu.

 

Link para o post
Compartilhar em outros sites

@Kevin Araujo 

local tempo = 300 -- tempo em segundos.

local ml = 30 -- quantos ira aumentar o skill de ML
local skillclub = 35 -- quantos ira aumentar o skill de Club
local skillshield = 15 -- quantos ira aumentar o skill de Shield
local health = 5000 -- A cada 1 segundo quantos aumentar de vida
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
setCombatParam(combat, COMBAT_PARAM_EFFECT, Effect)
     
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_SUBID, 100)
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)
setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, ml)
setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, skillclub)
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, skillshield)
setConditionParam(condition, CONDITION_PARAM_OUTFIT, outfit)
setCombatCondition(combat, condition)
     
local condition = createConditionObject(CONDITION_HASTE)
setConditionParam(condition, CONDITION_PARAM_SPEED, 250)
setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)
setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)
setCombatCondition(combat, condition)
     
local condition = createConditionObject(CONDITION_REGENERATION)
setConditionParam(condition, CONDITION_PARAM_SUBID, 1)
setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)
setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)
setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, health)
setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 1000)
setCombatCondition(combat, condition)
                           
function onCastSpell(cid, var)

    if not getCreatureCondition(cid, CONDITION_ATTRIBUTES, 100) then
        doCombat(cid, combat, var)

        repeateffect(cid, 130, {x=0,y=0,z=0}, tempo)

        local effect = {x=getPlayerPosition(cid).x+3, y=getPlayerPosition(cid).y+3, z=getPlayerPosition(cid).z}

           doSendMagicEffect(effect, repeateffect)
        doCreatureSay(cid, "Kyuubi Furie", TALKTYPE_MONSTER)
        addEvent(doSendAnimatedText, 0, getThingPos(cid), "Ninj 30%", COLOR_WHITE)
        addEvent(doSendAnimatedText, 1000, getThingPos(cid), "Taiju 35%", COLOR_WHITE)
        addEvent(doSendAnimatedText, 1800, getThingPos(cid), "Health 5%", COLOR_WHITE)
    else
        doPlayerSendCancel(cid, "Sorry, you are transformed.")
    end
end

 

 

 

 

 

 

 

 

 

 

 

 

-- se funciona da rp+

Link para o post
Compartilhar em outros sites

@Kevin Araujo 

local tempo = 300 -- tempo em segundos.

local ml = 30 -- quantos ira aumentar o skill de ML
local skillclub = 35 -- quantos ira aumentar o skill de Club
local skillshield = 15 -- quantos ira aumentar o skill de Shield
local health = 5000 -- A cada 1 segundo quantos aumentar de vida
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
setCombatParam(combat, COMBAT_PARAM_EFFECT, Effect)
     
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_SUBID, 100)
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)
setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, ml)
setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, skillclub)
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, skillshield)
setConditionParam(condition, CONDITION_PARAM_OUTFIT, outfit)
setCombatCondition(combat, condition)
     
local condition = createConditionObject(CONDITION_HASTE)
setConditionParam(condition, CONDITION_PARAM_SPEED, 250)
setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)
setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)
setCombatCondition(combat, condition)
     
local condition = createConditionObject(CONDITION_REGENERATION)
setConditionParam(condition, CONDITION_PARAM_SUBID, 1)
setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)
setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)
setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, health)
setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 1000)
setCombatCondition(combat, condition)
                           
function onCastSpell(cid, var)

    if not getCreatureCondition(cid, CONDITION_ATTRIBUTES, 100) then
        doCombat(cid, combat, var)

        local effect = {x=getPlayerPosition(cid).x+2, y=getPlayerPosition(cid).y+2, z=getPlayerPosition(cid).z}

           doSendMagicEffect(effect, 130)
        doCreatureSay(cid, "Kyuubi Furie", TALKTYPE_MONSTER)
        addEvent(doSendAnimatedText, 0, getThingPos(cid), "Ninj 30%", COLOR_WHITE)
        addEvent(doSendAnimatedText, 1000, getThingPos(cid), "Taiju 35%", COLOR_WHITE)
        addEvent(doSendAnimatedText, 1800, getThingPos(cid), "Health 5%", COLOR_WHITE)
    else
        doPlayerSendCancel(cid, "Sorry, you are transformed.")
    end
end

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

@Kevin Araujo

 

Ussa melhor esse:

 

 

--By:Fabi:--


local tempo = 300 -- tempo em segundos.
local EffPerma = {130} -- effect no player, caso queira apenas 1, basta remover os outros numeros.
local EffOnUse = 130
     
local ml = 15 -- quantos ira aumentar o skill de ML
local skillfist = 10 -- quantos ira aumentar o skill de Fist
local skillsword = 10 -- quantos ira aumentar o skill de Sword
local skillshield = 10 -- quantos ira aumentar o skill de Shield
local health = 250-- A cada 1 segundo quantos aumentar de vida
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
     
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)
setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, ml)
setConditionParam(condition, CONDITION_PARAM_SKILL_FIST, skillfist)
setConditionParam(condition, CONDITION_PARAM_SKILL_SWORD, skillsword)
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, skillshield)
setConditionParam(condition, CONDITION_PARAM_OUTFIT, outfit)
setCombatCondition(combat, condition)
     
local condition = createConditionObject(CONDITION_REGENERATION)
setConditionParam(condition, CONDITION_PARAM_SUBID, 1)
setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)
setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)
setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, health)
setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 1000)
setCombatCondition(combat, condition)
            
function Susanookakashi(tempo2,tempo3,cid) -- Altera aqui o nome da funçao pelo nome do personagem
	if (isCreature(cid)) then
		for i=1, #EffPerma do
			local position = {x=getPlayerPosition(cid).x+2, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z}
			doSendMagicEffect(position, EffPerma[i])
		end
	end
end
function Susanoo(cid, text)
    if not isPlayer(cid) then
        return
    end
 doSendAnimatedText(getCreaturePosition(cid), "Ninj+10", 215)
end
function Susanoo2(cid, text)
    if not isPlayer(cid) then
        return
    end
 doSendAnimatedText(getCreaturePosition(cid), "Taij+10", 215)
end
function Susanoo3(cid, text)
    if not isPlayer(cid) then
        return
    end
 doSendAnimatedText(getCreaturePosition(cid), "Def+10", 215)
end

                  
function onCastSpell(cid, var)
if getPlayerStorageValue(cid, 1500) ~= 1 or getCreatureCondition(cid, CONDITION_REGENERATION, 1) == false then
    doCombat(cid, combat, var)
    tempo2 = 0
    while (tempo2 ~= (tempo*1000)) do
        addEvent(Susanookakashi, tempo2, tempo2, tempo*1000, cid) -- Altere aqui pelo nome da função criada acima
        tempo2 = tempo2 + 300
    end
    setPlayerStorageValue(cid, 1500,1) -- storage verifica transformado, quando = 1 player esta transformado.
    doCreatureSay(cid, "Susanoo!", TALKTYPE_ORANGE_1)
	addEvent(Susanoo, 100, cid, "Ninj")
	addEvent(Susanoo2, 600, cid, "Taij")
	addEvent(Susanoo3, 1200, cid, "Def")
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Buff activado por "..tempo.." segundos!")
	local PosOnUse = {x=getPlayerPosition(cid).x, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z}
    doSendMagicEffect(PosOnUse, EffOnUse)
else
    doPlayerSendCancel(cid, "Sorry, you are transformed.")
end
end

 

Link para o post
Compartilhar em outros sites

@Senju uchira 

Não deu erro na distro, mas o effect não ficou em cima do player direto sabe, ele só aparece e some.

@Fabi Marzan 

Funcionou ! REP+

 

Só mais um pedido dentro desse tópico, teria como por outfit nele? Nesse script seu aí.

Link para o post
Compartilhar em outros sites
36 minutos atrás, Kevin Araujo disse:

@Senju uchira 

Não deu erro na distro, mas o effect não ficou em cima do player direto sabe, ele só aparece e some.

@Fabi Marzan 

Funcionou ! REP+

 

Só mais um pedido dentro desse tópico, teria como por outfit nele? Nesse script seu aí.

local tempo = 300 -- tempo em segundos.
local EffPerma = {637} -- effect no player, caso queira apenas 1, basta remover os outros numeros.
local EffOnUse = 628
     
local ml = 15 -- quantos ira aumentar o skill de ML
local skillfist = 10 -- quantos ira aumentar o skill de Fist
local skillsword = 10 -- quantos ira aumentar o skill de Sword
local skillshield = 10 -- quantos ira aumentar o skill de Shield
local health = 250-- A cada 1 segundo quantos aumentar de vida
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
     
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)
setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, ml)
setConditionParam(condition, CONDITION_PARAM_SKILL_FIST, skillfist)
setConditionParam(condition, CONDITION_PARAM_SKILL_SWORD, skillsword)
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, skillshield)
setConditionParam(condition, CONDITION_PARAM_OUTFIT, outfit)
setCombatCondition(combat, condition)
     
local condition = createConditionObject(CONDITION_REGENERATION)
setConditionParam(condition, CONDITION_PARAM_SUBID, 1)
setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)
setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)
setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, health)
setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 1000)
setCombatCondition(combat, condition)
            
function Susanookakashi(tempo2,tempo3,cid) -- Altera aqui o nome da funçao pelo nome do personagem
	if (isCreature(cid)) then
		for i=1, #EffPerma do
			local position = {x=getPlayerPosition(cid).x+2, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z}
			doSendMagicEffect(position, EffPerma[i])
		end
	end
end
function Susanoo(cid, text)
    if not isPlayer(cid) then
        return
    end
 doSendAnimatedText(getCreaturePosition(cid), "Ninj+10", 215)
end
function Susanoo2(cid, text)
    if not isPlayer(cid) then
        return
    end
 doSendAnimatedText(getCreaturePosition(cid), "Taij+10", 215)
end
function Susanoo3(cid, text)
    if not isPlayer(cid) then
        return
    end
 doSendAnimatedText(getCreaturePosition(cid), "Def+10", 215)
end

                  
function onCastSpell(cid, var)
if getPlayerStorageValue(cid, 1500) ~= 1 or getCreatureCondition(cid, CONDITION_REGENERATION, 1) == false then
    doCombat(cid, combat, var)
    tempo2 = 0
    while (tempo2 ~= (tempo*1000)) do
        addEvent(Susanookakashi, tempo2, tempo2, tempo*1000, cid) -- Altere aqui pelo nome da função criada acima
        tempo2 = tempo2 + 300
    end
    setPlayerStorageValue(cid, 1500,1) -- storage verifica transformado, quando = 1 player esta transformado.
    doCreatureSay(cid, "Susanoo!", TALKTYPE_ORANGE_1)
	addEvent(Susanoo, 100, cid, "Ninj")
	addEvent(Susanoo2, 600, cid, "Taij")
	addEvent(Susanoo3, 1200, cid, "Def")
	-------------AQUI VC TROCA DO OUTFIT--------------
	local outfit = {lookType = 55}
                 doSetCreatureOutfit(cid, outfit, 15000)----------------------AQUI E TEMPO, 15000 E 15 SEGUNDOS----EJEMPLO--2000 E 2 SEGUNDOS----
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Buff activado por "..tempo.." segundos!")
	local PosOnUse = {x=getPlayerPosition(cid).x, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z}
    doSendMagicEffect(PosOnUse, EffOnUse)
else
    doPlayerSendCancel(cid, "Sorry, you are transformed.")
end
end

-------------AQUI VC TROCA DO OUTFIT--------------
    local outfit = {lookType = 55}
                 doSetCreatureOutfit(cid, outfit, 15000)----------------------AQUI E TEMPO, 15000 E 15 SEGUNDOS----EJEMPLO--2000 E 2 SEGUNDOS----

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