Ir para conteúdo
  • 0

[Ajuda] Spell de buff nto


willian12345

Pergunta

Ola pessoal do xtibia queria perdi a ajuda de voces numa spell de buff para naruto, eu criei a script mais o efeito n sai "coloca um feito e sai outro".

 

Spell:

local tempo = 120 -- tempo em segundos.
local effect = {284} -- effect no player, caso queira apenas 1, basta remover os outros numeros.
     
local ml = 500 -- quantos ira aumentar o skill de ML
local skillfist = 150 -- quantos ira aumentar o skill de Fist
local skillsword = 150 -- quantos ira aumentar o skill de Sword
local skillaxe = 150 -- quantos ira aumentar o skill de Axe
local skillclub = 150 -- quantos ira aumentar o skill de Club
local skilldistance = 150 -- quantos ira aumentar o skill de Distance
local skillshield = 150 -- quantos ira aumentar o skill de Shield
local health = 1000 -- 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, 300)
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 magicEffect2244(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(magicEffect2244, tempo2, tempo2, tempo*1000, cid)
        tempo2 = tempo2 + 300
    end
    setPlayerStorageValue(cid, 102053,1) -- storage verifica transformado, quando = 1 player esta transformado.
        doCreatureSay(cid, "Susano", TALKTYPE_MONSTER)
    doSendMagicEffect(position127, 110)
else
    doPlayerSendCancel(cid, "Sorry, you are transformed.")
end
end 

print:

2e3qq76.png<<<< deveria ser essa

Link para o comentário
Compartilhar em outros sites

13 respostass a esta questão

Posts Recomendados

  • 0

Tenta assim :

 

local tempo = 120 -- tempo em segundos.

local effect = {284} -- effect no player, caso queira apenas 1, basta remover os outros numeros.

local ml = 500 -- quantos ira aumentar o skill de ML
local skillfist = 150 -- quantos ira aumentar o skill de Fist
local skillsword = 150 -- quantos ira aumentar o skill de Sword
local skillaxe = 150 -- quantos ira aumentar o skill de Axe
local skillclub = 150 -- quantos ira aumentar o skill de Club
local skilldistance = 150 -- quantos ira aumentar o skill de Distance
local skillshield = 150 -- quantos ira aumentar o skill de Shield
local health = 1000 -- 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, 300)
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 magicEffect(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)
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(magicEffect, tempo2, tempo2, tempo*1000, cid)
tempo2 = tempo2 + 300
end
setPlayerStorageValue(cid, 102053,1) -- storage verifica transformado, quando = 1 player esta transformado.
doCreatureSay(cid, "Susano", TALKTYPE_MONSTER)
doSendMagicEffect(position127, 110)
else
doPlayerSendCancel(cid, "Sorry, you are transformed.")
end
end

 

 

ps: sprite manera ^^

Link para o comentário
Compartilhar em outros sites

  • 0

olha o seguinte é esse kara, eu n seii como tira o limite dos sprite effects. agora se vc tiro era pra funcionar, mais se n tirou n vaii funcionar pq o limite é só ate 254 ID

Link para o comentário
Compartilhar em outros sites

  • 0

itemtype 284 vc esta certo

mais os efeito tem limete pow só poder ser ate 254.


só se vc sober tira o limite ai sim poder pega

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

×
×
  • Criar Novo...