ED
dúvida

[Ajuda] Spell Bug

Por EduziTow, 30 de nov. de 2012 em Scripts

script
15
1.6k
EduziTowE
30 de novembro de 2012 às 20:57

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

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, 11)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE)
function onCastSpell(cid, var)
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

 

Aqui O Do .xml

<instant name="Manatrain" words="!manatrain" lvl="" mana="0" aggressive="0" selftarget="1" exhaustion="4000" needlearn="0" script="manatrain.lua">

SmiXS
01 de dezembro de 2012 às 12:32
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

EduziTowE
04 de dezembro de 2012 às 14:06

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

SmiXS
05 de dezembro de 2012 às 09:59

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

EduziTowE
05 de dezembro de 2012 às 14:42

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

gonorreiaswatG
06 de dezembro de 2012 às 01:06

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

EduziTowE
06 de dezembro de 2012 às 01:28

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

LuckOakeL
06 de dezembro de 2012 às 12:13

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

EduziTowE
06 de dezembro de 2012 às 16:27

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

LuckOakeL
07 de dezembro de 2012 às 00:23

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

 

EduziTowE
08 de dezembro de 2012 às 22:38

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?

LuckOakeL
08 de dezembro de 2012 às 22:40

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

 

EduziTowE
09 de dezembro de 2012 às 00:28

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

LuckOakeL
09 de dezembro de 2012 às 10:41

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

EduziTowE
09 de dezembro de 2012 às 18:44

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