Ir para conteúdo
  • 0

Complicação com Buffs


Treevo

Pergunta

Galera, eu estava fazendo novos buffs para minhas vocações novas, como eu n manjo muito de script eu fui na arte de copiar e colar , eu fiz isso em um buff ja existente, editei os efeitos e as skills, mas quando fui testar eles estavam com o mesmo efeito, n sei oque aconteceu mas alguem pode me ajudar ??


aki os scripts

1 -
local tempo = 60 -- tempo em segundos.
local effect = {210} -- effect no player, caso queira apenas 1, basta remover os outros numeros.

local ml = 60 -- quantos ira aumentar o skill de ML
local skillfist = 60 -- quantos ira aumentar o skill de Fist
local skillsword = 60 -- quantos ira aumentar o skill de Sword
local skillaxe = 60 -- quantos ira aumentar o skill de Axe
local skillclub = 60 -- quantos ira aumentar o skill de Club
local skilldistance = 60 -- quantos ira aumentar o skill de Distance
local skillshield = 60 -- quantos ira aumentar o skill de Shield
local health = 500 -- 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_AXE, skillaxe)
setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, skillclub)
setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, skilldistance)
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, 150)
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)
setConditionParam(condition, CONDITION_PARAM_MANAGAIN, health)
setConditionParam(condition, CONDITION_PARAM_MANATICKS, 1000)
setCombatCondition(combat, condition)

function magicEffect210(tempo2,tempo3,cid)
if (isCreature(cid)) then
if getPlayerStorageValue(cid, 1023453) > 0 and getCreatureCondition(cid, CONDITION_REGENERATION, 1) then
for i=1, #effect do
local position = {x=getPlayerPosition(cid).x, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z}
doSendMagicEffect(position, effect)
end
end
end
end

function onCastSpell(cid, var)
local position127 = {x=getPlayerPosition(cid).x, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z}
if getPlayerStorageValue(cid, 1023453) ~= 1 or getCreatureCondition(cid, CONDITION_REGENERATION, 1) == false then
doCombat(cid, combat, var)
tempo2 = 0
while (tempo2 ~= (tempo*1000)) do
addEvent(magicEffect1458, tempo2, tempo2, tempo*1000, cid)
tempo2 = tempo2 + 300
end
setPlayerStorageValue(cid, 1023453,1) -- storage verifica transformado, quando = 1 player esta transformado.
doCreatureSay(cid, "Fuumetsu !", TALKTYPE_MONSTER)
doSendMagicEffect(position127, 210)
else
doPlayerSendCancel(cid, "Sorry, you are buffed.")
end

end

 

 

2-

local tempo = 60 -- tempo em segundos.

local effect = {118} -- effect no player, caso queira apenas 1, basta remover os outros numeros.
local ml = 65 -- quantos ira aumentar o skill de ML
local skillfist = 65 -- quantos ira aumentar o skill de Fist
local skillsword = 65 -- quantos ira aumentar o skill de Sword
local skillaxe = 65 -- quantos ira aumentar o skill de Axe
local skillclub = 65 -- quantos ira aumentar o skill de Club
local skilldistance = 65 -- quantos ira aumentar o skill de Distance
local skillshield = 65 -- quantos ira aumentar o skill de Shield
local health = 100 -- 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_AXE, skillaxe)
setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, skillclub)
setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, skilldistance)
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 magicEffect16(tempo2,tempo3,cid)
if (isCreature(cid)) then
if getPlayerStorageValue(cid, 102053) > 0 and getCreatureCondition(cid, CONDITION_REGENERATION, 1) then
for i=1, #effect do
local position = {x=getPlayerPosition(cid).x, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z}
doSendMagicEffect(position, effect)
end
end
end
end
function onCastSpell(cid, var)
if getPlayerStorageValue(cid, 102053) ~= 1 or getCreatureCondition(cid, CONDITION_REGENERATION, 1) == false then
doCombat(cid, combat, var)
doPlayerSendTextMessage(cid,27,'Magic esta ativado.')
doPlayerSay(cid, 'Rinnegan!', TALKTYPE_ORANGE_1)
tempo2 = 0
while (tempo2 ~= (tempo*1000)) do
addEvent(magicEffect16, tempo2, tempo2, tempo*1000, cid)
tempo2 = tempo2 + 300
end
setPlayerStorageValue(cid, 102053,1) -- storage verifica transformado, quando = 1 player esta transformado.
else
doPlayerSendCancel(cid, "Sorry, you are transformed.")
end
end
Link para o comentário
Compartilhar em outros sites

7 respostass a esta questão

Posts Recomendados

  • 0

tenta esse :

local tempo = 60 -- tempo em segundos.
local effect = {118} -- effect no player, caso queira apenas 1, basta remover os outros numeros.
     
local ml = 65 -- quantos ira aumentar o skill de ML
local skillfist = 65 -- quantos ira aumentar o skill de Fist
local skillsword = 65 -- quantos ira aumentar o skill de Sword
local skillaxe = 65 -- quantos ira aumentar o skill de Axe
local skillclub = 65 -- quantos ira aumentar o skill de Club
local skilldistance = 65 -- quantos ira aumentar o skill de Distance
local skillshield = 65 -- quantos ira aumentar o skill de Shield
local health = 100 -- 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_AXE, skillaxe)
setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, skillclub)
setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, skilldistance)
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 magicEffect72(tempo2,tempo3,cid)
if (isCreature(cid)) then
    if getPlayerStorageValue(cid, 102053) > 0 and getCreatureCondition(cid, CONDITION_REGENERATION, 1) then
        for i=1, #effect do
        local position = {x=getPlayerPosition(cid).x, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z}
doSendMagicEffect(position, effect[i])  
        end
    end
end
end
                  
function onCastSpell(cid, var)
if getPlayerStorageValue(cid, 102053) ~= 1 or getCreatureCondition(cid, CONDITION_REGENERATION, 1) == false then
    doCombat(cid, combat, var)
doPlayerSendTextMessage(cid,27,'Rinnegan esta ativado.') 
    doPlayerSay(cid, 'Rinnegan!', TALKTYPE_ORANGE_1)
    tempo2 = 0
    while (tempo2 ~= (tempo*1000)) do
        addEvent(magicEffect72, tempo2, tempo2, tempo*1000, cid)
        tempo2 = tempo2 + 300
    end
    setPlayerStorageValue(cid, 102053,1) -- storage verifica transformado, quando = 1 player esta transformado.
else
    doPlayerSendCancel(cid, "Sorry, you are transformed.")
end
end

Editado por Jesteer
Link para o comentário
Compartilhar em outros sites

  • 0

Funcionou mas , eu posso usar esse para fazer outro buff apenas copiando , colando e editando os efeitos ??

copia cola e edita essa parte:

 

 

function magicEffect(coloque aqui um numero que nenhum outro buff tenha)(tempo2,tempo3,cid)

if (isCreature(cid)) then

if getPlayerStorageValue(cid, 102053) > 0 and getCreatureCondition(cid, CONDITION_REGENERATION, 1) then

for i=1, #effect do

local position = {x=getPlayerPosition(cid).x, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z}

doSendMagicEffect(position, effect)

end

end

end

end

 

function onCastSpell(cid, var)

if getPlayerStorageValue(cid, 102053) ~= 1 or getCreatureCondition(cid, CONDITION_REGENERATION, 1) == false then

doCombat(cid, combat, var)

doPlayerSendTextMessage(cid,27,'Rinnegan esta ativado.')

doPlayerSay(cid, 'Rinnegan!', TALKTYPE_ORANGE_1)

tempo2 = 0

while (tempo2 ~= (tempo*1000)) do

addEvent(magicEffect(coloque aqui um numero que nenhum outro buff tenha), tempo2, tempo2, tempo*1000, cid)

tempo2 = tempo2 + 300

end

setPlayerStorageValue(cid, 102053,1) -- storage verifica transformado, quando = 1 player esta transformado.

else

doPlayerSendCancel(cid, "Sorry, you are transformed.")

end

end

Editado por Jesteer
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...