local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_EFFECT, 11) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE) function onCastSpell(cid, var) storage = 34534 if(exhaustion.check(cid, storage) == TRUE) then doPlayerSendCancel(cid, "You can only use after [" .. exhaustion.get(cid, 34534).."] seconds.") return false end local playerMana = getPlayerMana(cid) local inFight = hasCondition(cid, CONDITION_INFIGHT) if playerMana > -0 then doPlayerAddSpentMana(cid, playerMana) doCreatureAddMana(cid,-3100) doCombat(cid, combat, var) if not inFight then end end end
local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_EFFECT, 11) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE) function onCastSpell(cid, var) storage = 34534 if(exhaustion.check(cid, storage) == TRUE) then doPlayerSendCancel(cid, "You can only use after [" .. exhaustion.get(cid, 34534).."] seconds.") return false end local playerMana = getPlayerMana(cid) local inFight = hasCondition(cid, CONDITION_INFIGHT) if playerMana > -0 then doPlayerAddSpentMana(cid, playerMana) doCreatureAddMana(cid,-3100) doCombat(cid, combat, var) if not inFight then end end end
Continua A Mesma Coisa
Por Favor Me Ajudem
Editado Dezembro 4 por EduziTow
Foi mal, erro bobo(corrido):
local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_EFFECT, 11) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE) function onCastSpell(cid, var) local exausth = exhaustion.get(cid, 8872) if not exausth then exausth = 0 end if exausth > 0 then doPlayerSendCancel(cid, "You are exhausted.") return true end local playerMana = getPlayerMana(cid) local inFight = hasCondition(cid, CONDITION_INFIGHT) if playerMana > -0 then doPlayerAddSpentMana(cid, playerMana) doCreatureAddMana(cid,-3100) doCombat(cid, combat, var) exhaustion.set(cid, 8872, 2) if not inFight then end end end
Foi mal, erro bobo(corrido):
local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_EFFECT, 11) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE) function onCastSpell(cid, var) local exausth = exhaustion.get(cid, 8872) if not exausth then exausth = 0 end if exausth > 0 then doPlayerSendCancel(cid, "You are exhausted.") return true end local playerMana = getPlayerMana(cid) local inFight = hasCondition(cid, CONDITION_INFIGHT) if playerMana > -0 then doPlayerAddSpentMana(cid, playerMana) doCreatureAddMana(cid,-3100) doCombat(cid, combat, var) exhaustion.set(cid, 8872, 2) if not inFight then end end end
Mais Agora,Ela Fica Aparecendo O Nome E Eu Nao Quero Isso
e tambem,se ele tiver mana menos que 3100 ele pode soltar a magia
Editado Dezembro 5 por EduziTow
info
Grupo: Conde
Registrado: 16/09/07
Posts: 600
Reputação: +151
Gênero: Masculino
Char no Tibia: NãoJogoMais

Sobre a mana, é porque no XML você também precisa configurar.
No seu "Spells.xml", procure pela Tag que você mesma citou e add mana.
<instant name="Manatrain" words="!manatrain" lvl="" mana="0" aggressive="0" selftarget="1" exhaustion="4000" needlearn="0" script="manatrain.lua">
Este é o seu Script.
Note onde deixei anotado de vermelho.
É o level mínimo para usar a magia e a mana que a mesma gastará.
<instant name="Manatrain" words="!manatrain" lvl="10" mana="3100" aggressive="0" selftarget="1" exhaustion="4000" needlearn="0" script="manatrain.lua">
Coloque esta tag no lugar da sua.
Sem falar que no seu Script.lua da magia, creio que não seja preciso esta tag "doCreatureAddMana(cid,-3100)", pois isso já se configura no "Spells.xml".
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, 11)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE)
function onCastSpell(cid, var)
local exausth = exhaustion.get(cid, 8872)
if not exausth then
exausth = 0
end
if exausth > 0 then
doPlayerSendCancel(cid, "You are exhausted.")
return true
end
local playerMana = getPlayerMana(cid)
local inFight = hasCondition(cid, CONDITION_INFIGHT)
if playerMana > -0 then
doPlayerAddSpentMana(cid, playerMana)
doCreatureAddMana(cid,-3100)
doCombat(cid, combat, var)
exhaustion.set(cid, 8872, 2)
if not inFight then
end
end
end
E é claro, se for remover, pode remover seus afins também, "doPlayerAddSpentMana(cid, playerMana)", "if playerMana > -0 then" e "local playerMana = getPlayerMana(cid)"... enfim.
Creio que isso corrija seu problema.
Editado Dezembro 6 por Gonorreia
Sobre a mana, é porque no XML você também precisa configurar.
No seu "Spells.xml", procure pela Tag que você mesma citou e add mana.
<instant name="Manatrain" words="!manatrain" lvl="" mana="0" aggressive="0" selftarget="1" exhaustion="4000" needlearn="0" script="manatrain.lua">
Este é o seu Script.
Note onde deixei anotado de vermelho.
É o level mínimo para usar a magia e a mana que a mesma gastará.
<instant name="Manatrain" words="!manatrain" lvl="10" mana="3100" aggressive="0" selftarget="1" exhaustion="4000" needlearn="0" script="manatrain.lua">
Coloque esta tag no lugar da sua.
Sem falar que no seu Script.lua da magia, creio que não seja preciso esta tag "doCreatureAddMana(cid,-3100)", pois isso já se configura no "Spells.xml".
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, 11)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE)
function onCastSpell(cid, var)
local exausth = exhaustion.get(cid, 8872)
if not exausth then
exausth = 0
end
if exausth > 0 then
doPlayerSendCancel(cid, "You are exhausted.")
return true
end
local playerMana = getPlayerMana(cid)
local inFight = hasCondition(cid, CONDITION_INFIGHT)
if playerMana > -0 then
doPlayerAddSpentMana(cid, playerMana)
doCreatureAddMana(cid,-3100)
doCombat(cid, combat, var)
exhaustion.set(cid, 8872, 2)
if not inFight then
end
end
end
E é claro, se for remover, pode remover seus afins também, "doPlayerAddSpentMana(cid, playerMana)", "if playerMana > -0 then" e "local playerMana = getPlayerMana(cid)"... enfim.
Creio que isso corrija seu problema.
Não É Isso Que Eu Quero,Eu So Quero Que Tenha Exasth,E Que Tambem O Nome Quando Conjugada Nao Fica Aparecendo
info
Grupo: Marquês
Registrado: 22/07/12
Posts: 1.1k
Reputação: +400
Gênero: Masculino
Char no Tibia: Luck Oake

Vê se é isso que você quer:
local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_EFFECT, 11) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE) local wait = 2 -- Tempo de exhaustion em segundos local stor = 3711 function onCastSpell(cid, var) local playerMana = getPlayerMana(cid) if exhaustion.check(cid, stor) then doPlayerSendCancel(cid, "You are exhausted.") doSendMagicEffect(getCreaturePos(cid), 2) return false elseif hasCondition(cid, CONDITION_INFIGHT) then doPlayerSendCancel(cid, "You can't use this spell while fighting!") doSendMagicEffect(getCreaturePos(cid), 2) return false elseif playerMana > 0 then doPlayerAddSpentMana(cid, playerMana) doCreatureAddMana(cid, -3100) exhaustion.set(cid, stor, wait) doCombat(cid, combat, var) end return true end
Configure aqui:
local wait = 2 -- Tempo de exhaustion em segundos
Vê se é isso que você quer:
local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_EFFECT, 11) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE) local wait = 2 -- Tempo de exhaustion em segundos local stor = 3711 function onCastSpell(cid, var) local playerMana = getPlayerMana(cid) if exhaustion.check(cid, stor) then doPlayerSendCancel(cid, "You are exhausted.") doSendMagicEffect(getCreaturePos(cid), 2) return false elseif hasCondition(cid, CONDITION_INFIGHT) then doPlayerSendCancel(cid, "You can't use this spell while fighting!") doSendMagicEffect(getCreaturePos(cid), 2) return false elseif playerMana > 0 then doPlayerAddSpentMana(cid, playerMana) doCreatureAddMana(cid, -3100) exhaustion.set(cid, stor, wait) doCombat(cid, combat, var) end return true end
Configure aqui:
local wait = 2 -- Tempo de exhaustion em segundos
Não,Eu Quero Que A Magia,Quando Usada,Não Apareça O Nome,Tipo Exori Frigo,Dai Aparece La Em Baixo Do Nome DO Player Exori Frigo,Eu Não Quero Isso,
E Quero Tambem,Que Ela Tenha Exhath De 1 Segundo E Meio,E Quando Tiver Com Exasth Não Aparecer Akela Fumaça Branca,E Quando O Player Tiver Sem Mana SOltar O Rainho Mais Sem Tirar Mana
info
Grupo: Marquês
Registrado: 22/07/12
Posts: 1.1k
Reputação: +400
Gênero: Masculino
Char no Tibia: Luck Oake

Não entendi direito o que você quis dizer, mas vê se é isso:
local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_EFFECT, 11) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE) local wait = 1.5 -- Tempo de exhaustion em segundos local stor = 3711 function onCastSpell(cid, var) local playerMana = getPlayerMana(cid) if exhaustion.check(cid, stor) then doPlayerSendCancel(cid, "You are exhausted.") return false elseif hasCondition(cid, CONDITION_INFIGHT) then doPlayerSendCancel(cid, "You can't use this spell while fighting!") return false end doPlayerAddSpentMana(cid, playerMana) exhaustion.set(cid, stor, wait) doCombat(cid, combat, var) return true end
Não entendi direito o que você quis dizer, mas vê se é isso:
local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_EFFECT, 11) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE) local wait = 1.5 -- Tempo de exhaustion em segundos local stor = 3711 function onCastSpell(cid, var) local playerMana = getPlayerMana(cid) if exhaustion.check(cid, stor) then doPlayerSendCancel(cid, "You are exhausted.") return false elseif hasCondition(cid, CONDITION_INFIGHT) then doPlayerSendCancel(cid, "You can't use this spell while fighting!") return false end doPlayerAddSpentMana(cid, playerMana) exhaustion.set(cid, stor, wait) doCombat(cid, combat, var) return true end
Tipo Sabe Quando Você Solta !manatrain,Dai Aparece Akele Nome Em Cima Do Nome,Em Laranja OU Amarelo No Caso
É Isso Que Eu Quero,Entende?
info
Grupo: Marquês
Registrado: 22/07/12
Posts: 1.1k
Reputação: +400
Gênero: Masculino
Char no Tibia: Luck Oake

Tó:
local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_EFFECT, 11) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE) local wait = 1.5 -- Tempo de exhaustion em segundos local stor = 3711 function onCastSpell(cid, var) local playerMana = getPlayerMana(cid) if exhaustion.check(cid, stor) then doPlayerSendCancel(cid, "You are exhausted.") return false elseif hasCondition(cid, CONDITION_INFIGHT) then doPlayerSendCancel(cid, "You can't use this spell while fighting!") return false end doPlayerAddSpentMana(cid, playerMana) exhaustion.set(cid, stor, wait) doCombat(cid, combat, var) doCreatureSay(cid, "!manatrain", TALKTYPE_MONSTER) return true end
Tó:
local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_EFFECT, 11) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE) local wait = 1.5 -- Tempo de exhaustion em segundos local stor = 3711 function onCastSpell(cid, var) local playerMana = getPlayerMana(cid) if exhaustion.check(cid, stor) then doPlayerSendCancel(cid, "You are exhausted.") return false elseif hasCondition(cid, CONDITION_INFIGHT) then doPlayerSendCancel(cid, "You can't use this spell while fighting!") return false end doPlayerAddSpentMana(cid, playerMana) exhaustion.set(cid, stor, wait) doCombat(cid, combat, var) doCreatureSay(cid, "!manatrain", TALKTYPE_MONSTER) return true end
Filho De Deus,Agora Quando Eu Solto a Magia Aparece 2 Vezes,Eu Nao Quero Que Apareça Nenhuma
local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_EFFECT, 11) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0) local wait = 2 -- Tempo de exhaustion em segundos local stor = 3711 function onCastSpell(cid, var) local playerMana = getPlayerMana(cid) if exhaustion.check(cid, stor) then doPlayerSendCancel(cid, "You are exhausted.") end doPlayerAddSpentMana(cid, playerMana) doCreatureAddMana(cid, -3100) exhaustion.set(cid, stor, wait) doCombat(cid, combat, var) return false end
Para Ajudar,Quero A Magia Assim /\ So Que Com Exasth
Se For Possivel Passar Ele Para Talkactions,Agradeço
Editado Dezembro 9 por EduziTow
info
Grupo: Marquês
Registrado: 22/07/12
Posts: 1.1k
Reputação: +400
Gênero: Masculino
Char no Tibia: Luck Oake

Pronto, tá aqui.
function onSay(cid, words) local wait = 1.5 -- Tempo de exhaustion em segundos local stor = 3711 local mana = 3100 -- Quanta mana vai gastar if exhaustion.check(cid, stor) then doPlayerSendCancel(cid, "You are exhausted.") return true elseif getPlayerMana(cid) < mana then doPlayerSendCancel(cid, "Sorry, not enough mana.") return true end doCreatureAddMana(cid, -mana) doPlayerAddSpentMana(cid, getPlayerMana(cid)) exhaustion.set(cid, stor, wait) doSendMagicEffect(getCreaturePos(cid), 11) doCreatureSay(cid, "!manatrain", TALKTYPE_MONSTER) return true end
Em talkactions.xml você coloca a Tag que quiser.
Editado Dezembro 9 por LuckOake
Pronto, tá aqui.
function onSay(cid, words) local wait = 1.5 -- Tempo de exhaustion em segundos local stor = 3711 local mana = 3100 -- Quanta mana vai gastar if exhaustion.check(cid, stor) then doPlayerSendCancel(cid, "You are exhausted.") return true elseif getPlayerMana(cid) < mana then doPlayerSendCancel(cid, "Sorry, not enough mana.") return true end doCreatureAddMana(cid, -mana) doPlayerAddSpentMana(cid, getPlayerMana(cid)) exhaustion.set(cid, stor, wait) doSendMagicEffect(getCreaturePos(cid), 11) doCreatureSay(cid, "!manatrain", TALKTYPE_MONSTER) return true end
Em talkactions.xml você coloca a Tag que quiser.
Obrigado Cara,Você Me Ajudou MuitO,Obrigado
REP +
Editado Dezembro 9 por EduziTow





info
Grupo: Artesão
Registrado: 06/08/11
Posts: 110
Reputação: -2
Tenho Uma Spell Que O Nome Dela Quando Conjugada Não Aparece,E Eu Quero Assim,Mais Ela Não Tem Exasth
Aqui Esta O Script Da Spell
Aqui O Do .xml