Ir para conteúdo

Featured Replies

Postado

Estou com um erro nessa script , ela da o dano normal , mais não remove o buff

Podem me ajudar ? REP++

 

Spoiler

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 192)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -40.2, 1, -40.2, 1)

function onCastSpell(cid, var)

if isCreature(cid) then
doRemoveCondition(cid,CONDITION_PARAM_BUFF)
return doCombat(cid, combat, var)
end
end

 

Editado por PedroSTT
topico resolvido (veja o histórico de edições)

giphy.gif

Resolvido por KotZletY

Ir para solução
  • Respostas 8
  • Visualizações 1k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Olha só, você é Scripter deveria saber que o Buff não é uma condição, não é nada mais que uma Spell que lhe da uns atributos.  Essa spell de remover o buff é fácil de fazer porque ? Porque é uma

  • Não existe função de remover storage, a menos que você crie uma, mais caso queria remover uma storage é só você seta em 0. Exemplo: Esse Susano de Itachi:  Veja que:  setPlayerStorageValue

Postado

Olha só, você é Scripter deveria saber que o Buff não é uma condição, não é nada mais que uma Spell que lhe da uns atributos. 

Essa spell de remover o buff é fácil de fazer porque ? Porque é uma Storage que é setada no player, geralmente em Servidores de Narutibia, é a storage 102053,

ela é setada, e fica no Player até o buff termina, quando o buff termina a storage é removida. Faça o mesmo, coloque para sua Spell remover a storage(que com certeza é a mesma em todos os Buffs), e então, seja feliz! xD

                                                              ezgif-1-98aab239f3.gif.1a897c9c3225228909e7b356a5cfb8e4.gif

Postado
  • Autor
18 horas atrás, KotZletY disse:

Olha só, você é Scripter deveria saber que o Buff não é uma condição, não é nada mais que uma Spell que lhe da uns atributos. 

Essa spell de remover o buff é fácil de fazer porque ? Porque é uma Storage que é setada no player, geralmente em Servidores de Narutibia, é a storage 102053,

ela é setada, e fica no Player até o buff termina, quando o buff termina a storage é removida. Faça o mesmo, coloque para sua Spell remover a storage(que com certeza é a mesma em todos os Buffs), e então, seja feliz! xD

Nem pensei nisso , obrigada xD

Mas mesmo assim , pode me ajudar com isso ? Não conseguir achar a function de remover storage

Editado por PedroSTT (veja o histórico de edições)

giphy.gif

Postado
  • Solução

Não existe função de remover storage, a menos que você crie uma, mais caso queria remover uma storage é só você seta em 0. Exemplo:

Esse Susano de Itachi:

Spoiler

local tempo = 60 -- tempo em segundos.
local effect = {117} -- effect no player, caso queira apenas 1, basta remover os outros numeros.
     
local ml = 45 -- quantos ira aumentar o skill de ML
local skillfist = 45 -- quantos ira aumentar o skill de Fist
local skillsword = 45 -- quantos ira aumentar o skill de Sword
local skillaxe = 45 -- quantos ira aumentar o skill de Axe
local skillclub = 45 -- quantos ira aumentar o skill de Club
local skilldistance = 45 -- quantos ira aumentar o skill de Distance
local skillshield = 45 -- 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 magicEffect552(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+1, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z}
doSendMagicEffect(position, effect[i])  
        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, 102053) ~= 1 or getCreatureCondition(cid, CONDITION_REGENERATION, 1) == false then
    doCombat(cid, combat, var)
    tempo2 = 0
    while (tempo2 ~= (tempo*1000)) do
        addEvent(magicEffect552, tempo2, tempo2, tempo*1000, cid)
        tempo2 = tempo2 + 300
    end
    setPlayerStorageValue(cid, 102053,1) -- storage verifica transformado, quando = 1 player esta transformado.
    doCreatureSay(cid, "Mangekyou Susano", TALKTYPE_MONSTER)
    doSendMagicEffect(position127, 109)
else
    doPlayerSendCancel(cid, "Desculpa você está usando o Buff.")
end
end

 

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

 

está setando 1, 1 é o valor daquela storage, quando o Buff acaba, o 1 retorna para 0, que no caso volta ao normal. 

 

Na sua Spell de remover o Buff, você tem que colocar para fazer a Storage do Buff voltar a 0, e então o Buff some. 

setPlayerStorageValue(cid, 102053, 0)

 

E seja feliz.

 

Toma ela já pronta aqui, pois coloquei para verificar se o player tem a storage, e se é Player.

Spoiler

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 192)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -40.2, 1, -40.2, 1)


function onCastSpell(cid, var)
local target = getCreatureTarget(cid)
local storage = 102053 -- Storage que ta em Todos os BUffs, alguns pode não está, então coloque a mesma storage em todos os buff.

if isPlayer(target) then

if getPlayerStorageValue(target, storage) == 1 then
setPlayerStorageValue(target, storage, 0)
return doCombat(cid, combat, var)
else 
doPlayerSendTextMessage(cid, 20, "O Player já está sem Buff.")
end

else 
doPlayerSendTextMessage(cid, 20, "Você só pode usar este Jutsu em Players, pois monstros não tem Buff.")
end

end

 

E coloca um Exhausted para não usar toda hora, fica meio zuado deixar todos sem buff o tempo todo sabe ? Kkk!

 

xD

                                                              ezgif-1-98aab239f3.gif.1a897c9c3225228909e7b356a5cfb8e4.gif

Postado
  • Autor
2 horas atrás, KotZletY disse:

Não existe função de remover storage, a menos que você crie uma, mais caso queria remover uma storage é só você seta em 0. Exemplo:

Esse Susano de Itachi:

  Mostrar conteúdo oculto


local tempo = 60 -- tempo em segundos.
local effect = {117} -- effect no player, caso queira apenas 1, basta remover os outros numeros.
     
local ml = 45 -- quantos ira aumentar o skill de ML
local skillfist = 45 -- quantos ira aumentar o skill de Fist
local skillsword = 45 -- quantos ira aumentar o skill de Sword
local skillaxe = 45 -- quantos ira aumentar o skill de Axe
local skillclub = 45 -- quantos ira aumentar o skill de Club
local skilldistance = 45 -- quantos ira aumentar o skill de Distance
local skillshield = 45 -- 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 magicEffect552(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+1, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z}
doSendMagicEffect(position, effect[i])  
        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, 102053) ~= 1 or getCreatureCondition(cid, CONDITION_REGENERATION, 1) == false then
    doCombat(cid, combat, var)
    tempo2 = 0
    while (tempo2 ~= (tempo*1000)) do
        addEvent(magicEffect552, tempo2, tempo2, tempo*1000, cid)
        tempo2 = tempo2 + 300
    end
    setPlayerStorageValue(cid, 102053,1) -- storage verifica transformado, quando = 1 player esta transformado.
    doCreatureSay(cid, "Mangekyou Susano", TALKTYPE_MONSTER)
    doSendMagicEffect(position127, 109)
else
    doPlayerSendCancel(cid, "Desculpa você está usando o Buff.")
end
end

 

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

 

está setando 1, 1 é o valor daquela storage, quando o Buff acaba, o 1 retorna para 0, que no caso volta ao normal. 

 

Na sua Spell de remover o Buff, você tem que colocar para fazer a Storage do Buff voltar a 0, e então o Buff some. 

setPlayerStorageValue(cid, 102053, 0)

 

E seja feliz.

 

Toma ela já pronta aqui, pois coloquei para verificar se o player tem a storage, e se é Player.

  Ocultar conteúdo


local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 192)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -40.2, 1, -40.2, 1)


function onCastSpell(cid, var)
local target = getCreatureTarget(cid)
local storage = 102053 -- Storage que ta em Todos os BUffs, alguns pode não está, então coloque a mesma storage em todos os buff.

if isPlayer(target) then

if getPlayerStorageValue(target, storage) == 1 then
setPlayerStorageValue(target, storage, 0)
return doCombat(cid, combat, var)
else 
doPlayerSendTextMessage(cid, 20, "O Player já está sem Buff.")
end

else 
doPlayerSendTextMessage(cid, 20, "Você só pode usar este Jutsu em Players, pois monstros não tem Buff.")
end

end

 

E coloca um Exhausted para não usar toda hora, fica meio zuado deixar todos sem buff o tempo todo sabe ? Kkk!

 

xD


Vlw cara , ta me ajudando demais , desculpa não ser mt bom , estou aprendendo ainda.

giphy.gif

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

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo