Ir para conteúdo
  • 0

Adaptar Spell


nbb147

Pergunta

gente, eu queria que alguém adaptasse esse script para que fica-se retirando 5 de mana, de 3 em 3 segundos, e que quando a mana acabace o player destransformase, e perde-se os atribultos de skills, que a spell da, abaixo o script:

 

 

local outfit = {lookType = 8}

local tempo = 600 * 1000

local efeito = 7

 

local ml = 6 -- quantos ira aumentar o skill de ML

local skillfist = 6 -- quantos ira aumentar o skill de Fist

local skillsword = 6 -- quantos ira aumentar o skill de Sword

local skillaxe = 6 -- quantos ira aumentar o skill de Axe

local skillclub = 6 -- quantos ira aumentar o skill de Club

local skilldistance = 0 -- quantos ira aumentar o skill de Distance

local skillshield = 6 -- quantos ira aumentar o skill de Shield

local health = 50 -- A cada 1 segundo quantos aumentar de vida

 

local combat = createCombatObject()

setCombatParam(combat, COMBAT_PARAM_EFFECT, efeito)

setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

 

local condition = createConditionObject(CONDITION_ATTRIBUTES)

setConditionParam(condition, CONDITION_PARAM_TICKS, tempo)

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)

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)

setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, health)

setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 50)

setCombatCondition(combat, condition)

 

local sys = createConditionObject(CONDITION_OUTFIT)

setConditionParam(sys, CONDITION_PARAM_TICKS, tempo)

addOutfitCondition(sys, outfit)

setCombatCondition(combat, sys)

 

function onCastSpell(cid, var)

doCombat(cid, combat, var)

setPlayerStorageValue(cid, 21598, 1)

return true

end

 

flw smile_positivo.gif

Link para o comentário
Compartilhar em outros sites

15 respostass a esta questão

Posts Recomendados

  • 0

local outfit = {lookType = 8}
local tempo = 600 * 1000
local efeito = 7

local ml = 6 -- quantos ira aumentar o skill de ML
local skillfist = 6 -- quantos ira aumentar o skill de Fist
local skillsword = 6 -- quantos ira aumentar o skill de Sword
local skillaxe = 6 -- quantos ira aumentar o skill de Axe
local skillclub = 6 -- quantos ira aumentar o skill de Club
local skilldistance = 0 -- quantos ira aumentar o skill de Distance
local skillshield = 6 -- quantos ira aumentar o skill de Shield
local health = 50 -- A cada 1 segundo quantos aumentar de vida

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, efeito)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, tempo)
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)
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)
setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, health)
setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 50)
setCombatCondition(combat, condition)

local sys = createConditionObject(CONDITION_OUTFIT)
setConditionParam(sys, CONDITION_PARAM_TICKS, tempo)
addOutfitCondition(sys, outfit)
setCombatCondition(combat, sys)

function onCastSpell(cid, var)
doCombat(cid, combat, var)
setPlayerStorageValue(cid, 21598, 1)
setPlayerStorageValue(cid, 8099, 1)
doHealPlayer(cid)
return true
end

function doHealPlayer(cid)
local delay = 3 -- de quanto em quanto tempo irá tirar (no caso, 3 segundos)
local minmana = getCreatureMana(cid)

if getPlayerStorageValue(cid, 8099) == 1 then
doCreatureAddMana(cid, -5)
addEvent(doHealPlayer, delay*1000, cid)
end

if minmana == 0 then
doRemoveCondition(cid, CONDITION_OUTFIT)
doRemoveCondition(cid, CONDITION_REGENERATION)
doRemoveCondition(cid, CONDITION_HASTE)
doRemoveCondition(cid, CONDITION_ATRIBUTES)
return 1
end

 

 

Olha que vai tirar 5 de hp em 3 segundos e remover a outfit é de certeza, o de remover os outros atributos eu nao testei.

Demorei um poquinho pra fazer isso, mas ta ae!

Link para o comentário
Compartilhar em outros sites

  • 0

ae cara deu um errinho ai:

 

 

[03/05/2012 20:28:43] [Error - LuaScriptInterface::loadFile] data/spells/scripts/guerreiro/berserker.lua:72: 'end' expected (to close 'function' at line 57) near '<eof>'

[03/05/2012 20:28:43] [Warning - Event::loadScript] Cannot load script (data/spells/scripts/guerreiro/berserker.lua)

[03/05/2012 20:28:43] data/spells/scripts/guerreiro/berserker.lua:72: 'end' expected (to close 'function' at line 57) near '<eof>'

 

e funçao da linha 57

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

  • 0
local outfit = {lookType = 8}
local tempo = 600 * 1000
local efeito = 7

local ml = 6 -- quantos ira aumentar o skill de ML
local skillfist = 6 -- quantos ira aumentar o skill de Fist
local skillsword = 6 -- quantos ira aumentar o skill de Sword
local skillaxe = 6 -- quantos ira aumentar o skill de Axe
local skillclub = 6 -- quantos ira aumentar o skill de Club
local skilldistance = 0 -- quantos ira aumentar o skill de Distance
local skillshield = 6 -- quantos ira aumentar o skill de Shield
local health = 50 -- A cada 1 segundo quantos aumentar de vida

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, efeito)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, tempo)
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)
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)
setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, health)
setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 50)
setCombatCondition(combat, condition)

local sys = createConditionObject(CONDITION_OUTFIT)
setConditionParam(sys, CONDITION_PARAM_TICKS, tempo)
addOutfitCondition(sys, outfit)
setCombatCondition(combat, sys)

function onCastSpell(cid, var)
doCombat(cid, combat, var)
setPlayerStorageValue(cid, 21598, 1)
setPlayerStorageValue(cid, 8099, 1)
doHealPlayer(cid)
return true
end

function doHealPlayer(cid)
local delay = 3 -- de quanto em quanto tempo irá tirar (no caso, 3 segundos)
local minmana = getCreatureMana(cid)

if getPlayerStorageValue(cid, 8099) == 1 then
doCreatureAddMana(cid, -5)
addEvent(doHealPlayer, delay*1000, cid)
end

if minmana == 0 then
doRemoveCondition(cid, CONDITION_OUTFIT)
doRemoveCondition(cid, CONDITION_REGENERATION)
doRemoveCondition(cid, CONDITION_HASTE)
doRemoveCondition(cid, CONDITION_ATRIBUTES)
end
return 1
end

Link para o comentário
Compartilhar em outros sites

  • 0

ae cara funcionou valeu vou dar seu rep+

 

iiii cara tem um pequeno erro que ainda ficou pq assim, ela e so pra acabar quando o mana acaba nao com o tempo, eu queria que tu tira-se isso de ter o tempo e pra acabar quando acaba a mana, dou outro rep++

Link para o comentário
Compartilhar em outros sites

  • 0

Ok.Obrigado

local outfit = {lookType = 8}
local tempo = 600 * 1000
local efeito = 7

local ml = 6 -- quantos ira aumentar o skill de ML
local skillfist = 6 -- quantos ira aumentar o skill de Fist
local skillsword = 6 -- quantos ira aumentar o skill de Sword
local skillaxe = 6 -- quantos ira aumentar o skill de Axe
local skillclub = 6 -- quantos ira aumentar o skill de Club
local skilldistance = 0 -- quantos ira aumentar o skill de Distance
local skillshield = 6 -- quantos ira aumentar o skill de Shield
local health = 50 -- A cada 1 segundo quantos aumentar de vida

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, efeito)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, tempo)
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)
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)
setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, health)
setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 50)
setCombatCondition(combat, condition)

local sys = createConditionObject(CONDITION_OUTFIT)
setConditionParam(sys, CONDITION_PARAM_TICKS, tempo)
addOutfitCondition(sys, outfit)
setCombatCondition(combat, sys)

function onCastSpell(cid, var)
doCombat(cid, combat, var)
setPlayerStorageValue(cid, 21598, 1)
setPlayerStorageValue(cid, 8099, 1)
doHealPlayer(cid)
return true
end

function doHealPlayer(cid)
local delay = 3 -- de quanto em quanto tempo irá tirar (no caso, 3 segundos)
local minmana = getCreatureMana(cid)

if getPlayerStorageValue(cid, 8099) == 1 then
doCreatureAddMana(cid, -5)
addEvent(doHealPlayer, delay*1000, cid)
end

if minmana == 0 then


setPlayerStorageValue(cid, 8099, -1)
doRemoveCondition(cid, CONDITION_OUTFIT)
doRemoveCondition(cid, CONDITION_REGENERATION)
doRemoveCondition(cid, CONDITION_HASTE)
doRemoveCondition(cid, CONDITION_ATRIBUTES)
end
return 1
end

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

  • 0

Nao tenho certeza se vai dar certo, eu nao intendi aquele time, se nao der certo pode me explicar ele?

 

aqui vai, tenta ae:

 

 

local outfit = {lookType = 8}
local tempo = 600 * 1000
local efeito = 7

local ml = 6 -- quantos ira aumentar o skill de ML
local skillfist = 6 -- quantos ira aumentar o skill de Fist
local skillsword = 6 -- quantos ira aumentar o skill de Sword
local skillaxe = 6 -- quantos ira aumentar o skill de Axe
local skillclub = 6 -- quantos ira aumentar o skill de Club
local skilldistance = 0 -- quantos ira aumentar o skill de Distance
local skillshield = 6 -- quantos ira aumentar o skill de Shield
local health = 50 -- A cada 1 segundo quantos aumentar de vida

local ml1 = -6
local skillfist1 = -6 
local skillsword1 = -6 
local skillaxe1 = -6 
local skillclub1 = -6 
local skilldistance1 = 0 
local skillshield1 = -6 

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, efeito)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, tempo)
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)
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)
setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, health)
setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 50)
setCombatCondition(combat, condition)

local sys = createConditionObject(CONDITION_OUTFIT)
setConditionParam(sys, CONDITION_PARAM_TICKS, tempo)
addOutfitCondition(sys, outfit)
setCombatCondition(combat, sys)

function onCastSpell(cid, var)
doCombat(cid, combat, var)
setPlayerStorageValue(cid, 21598, 1)
setPlayerStorageValue(cid, 8099, 1)
doHealPlayer(cid)
return true
end

function doHealPlayer(cid)
local delay = 3 -- de quanto em quanto tempo irá tirar (no caso, 3 segundos)
local minmana = getCreatureMana(cid)

if getPlayerStorageValue(cid, 8099) == 1 then
doCreatureAddMana(cid, -5)
addEvent(doHealPlayer, delay*1000, cid)
end

if minmana == 0 then
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, ml1)
setConditionParam(condition, CONDITION_PARAM_SKILL_FIST, skillfist1)
setConditionParam(condition, CONDITION_PARAM_SKILL_SWORD, skillsword1)
setConditionParam(condition, CONDITION_PARAM_SKILL_AXE, skillaxe1)
setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, skillclub1)
setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, skilldistance1)
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, skillshield1)
setCombatCondition(combat, condition)
setPlayerStorageValue(cid, 8099, -1)
doRemoveCondition(cid, CONDITION_OUTFIT)
doRemoveCondition(cid, CONDITION_REGENERATION)
doRemoveCondition(cid, CONDITION_HASTE)
end
return 1
end

Link para o comentário
Compartilhar em outros sites

  • 0

ainda continua so tirando o addon, e agora tem um erro, e quando deslogo aparece esse erro:

 

 

[04/05/2012 19:03:30] [Error - Spell Interface]

[04/05/2012 19:03:30] In a timer event called from:

[04/05/2012 19:03:30] data/spells/scripts/sasuke/sasuke shippuden curse one.lua:onCastSpell

[04/05/2012 19:03:30] Description:

[04/05/2012 19:03:30] (luaSetCombatCondition) This function can only be used while loading the script.

Link para o comentário
Compartilhar em outros sites

  • 0

não, cara é tipo assim eu uso a spell mim transformo ganho os skills e tudo mais, fica tirando da mana, mais quando a mana chega a zero ela tira o addon, mais os skills ficam, os skills não saem, so esse o problema...

Link para o comentário
Compartilhar em outros sites

  • 0

Substitua tudo por isso:

 

 

 

local outfit = {lookType = 8}

local tempo = 600 * 1000

local efeito = 7

 

local ml = 6 -- quantos ira aumentar o skill de ML

local skillfist = 6 -- quantos ira aumentar o skill de Fist

local skillsword = 6 -- quantos ira aumentar o skill de Sword

local skillaxe = 6 -- quantos ira aumentar o skill de Axe

local skillclub = 6 -- quantos ira aumentar o skill de Club

local skilldistance = 0 -- quantos ira aumentar o skill de Distance

local skillshield = 6 -- quantos ira aumentar o skill de Shield

local health = 50 -- A cada 1 segundo quantos aumentar de vida

 

local ml1 = -6

local skillfist1 = -6

local skillsword1 = -6

local skillaxe1 = -6

local skillclub1 = -6

local skilldistance1 = 0

local skillshield1 = -6

 

local combat = createCombatObject()

setCombatParam(combat, COMBAT_PARAM_EFFECT, efeito)

setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

 

local condition = createConditionObject(CONDITION_ATTRIBUTES)

setConditionParam(condition, CONDITION_PARAM_TICKS, tempo)

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)

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)

setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, health)

setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 50)

setCombatCondition(combat, condition)

 

local sys = createConditionObject(CONDITION_OUTFIT)

setConditionParam(sys, CONDITION_PARAM_TICKS, tempo)

addOutfitCondition(sys, outfit)

setCombatCondition(combat, sys)

 

function onCastSpell(cid, var)

doCombat(cid, combat, var)

setPlayerStorageValue(cid, 21598, 1)

setPlayerStorageValue(cid, 8099, 1)

doHealPlayer(cid)

return true

end

 

function doHealPlayer(cid)

local delay = 3 -- de quanto em quanto tempo irá tirar (no caso, 3 segundos)

local minmana = getCreatureMana(cid)

 

if getPlayerStorageValue(cid, 8099) == 1 then

doCreatureAddMana(cid, -5)

addEvent(doHealPlayer, delay*1000, cid)

end

 

if minmana == 0 then

local condition2 = createConditionObject(CONDITION_ATTRIBUTES)

setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, ml1)

setConditionParam(condition, CONDITION_PARAM_SKILL_FIST, skillfist1)

setConditionParam(condition, CONDITION_PARAM_SKILL_SWORD, skillsword1)

setConditionParam(condition, CONDITION_PARAM_SKILL_AXE, skillaxe1)

setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, skillclub1)

setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, skilldistance1)

setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, skillshield1)

setCombatCondition(combat, condition2)

setPlayerStorageValue(cid, 8099, -1)

doRemoveCondition(cid, CONDITION_OUTFIT)

doRemoveCondition(cid, CONDITION_REGENERATION)

doRemoveCondition(cid, CONDITION_HASTE)

end

return 1

end

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

  • 0

local outfit = {lookType = 8}
local tempo = 600 * 1000
local efeito = 7

local ml = 6 -- quantos ira aumentar o skill de ML
local skillfist = 6 -- quantos ira aumentar o skill de Fist
local skillsword = 6 -- quantos ira aumentar o skill de Sword
local skillaxe = 6 -- quantos ira aumentar o skill de Axe
local skillclub = 6 -- quantos ira aumentar o skill de Club
local skilldistance = 0 -- quantos ira aumentar o skill de Distance
local skillshield = 6 -- quantos ira aumentar o skill de Shield
local health = 50 -- A cada 1 segundo quantos aumentar de vida

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, efeito)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, tempo)
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)
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)
setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, health)
setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 50)
setCombatCondition(combat, condition)

local sys = createConditionObject(CONDITION_OUTFIT)
setConditionParam(sys, CONDITION_PARAM_TICKS, tempo)
addOutfitCondition(sys, outfit)
setCombatCondition(combat, sys)

function onCastSpell(cid, var)
doCombat(cid, combat, var)
setPlayerStorageValue(cid, 21598, 1)
setPlayerStorageValue(cid, 8099, 1)
doHealPlayer(cid)
return true
end

function doHealPlayer(cid)
local delay = 3 -- de quanto em quanto tempo irá tirar (no caso, 3 segundos)
local minmana = getCreatureMana(cid)

if getPlayerStorageValue(cid, 8099) == 1 then
doCreatureAddMana(cid, -5)
addEvent(doHealPlayer, delay*1000, cid)
end

if minmana == 0 then
doRemoveCondition(cid, CONDITION_OUTFIT)
doRemoveCondition(cid, CONDITION_REGENERATION)
doRemoveCondition(cid, CONDITION_HASTE)
doRemoveCondition(cid, CONDITION_ATRIBUTES)
end
return 1
end

 

Nessa maneira ela desativa sozinha com X segundos levando consigo todos seus beneficios correto? Gostaria de usar ela, mas queria que fizesse uma pequena adaptaçao, deixa do jeito que tá, apenas tirar a funçao de Outfit, ou seja, vai dar todos os beneficios pelo X tempo tirando Y de mana, mas nao vai trocar minha outfit..

 

EDIT: Não vi a DATA... Peço desculpas a moderação ...

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

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...