Ir para conteúdo

[Encerrado] COMO POR RESET NA SPELL ?


lalaiaalaaa

Posts Recomendados

COMO POR RESET NA SCRIPT ? QUERIA 3 RESETS NESSA

 

-- SpellCreator generated.

-- =============== COMBAT VARS ===============
-- Areas/Combat for 0ms
local combat0_Exevo_Gran_Death = createCombatObject()
setCombatParam(combat0_Exevo_Gran_Death, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat0_Exevo_Gran_Death, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_HOLY)
setCombatParam(combat0_Exevo_Gran_Death, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat0_Exevo_Gran_Death, COMBAT_PARAM_BLOCKARMOR, true)
setCombatParam(combat0_Exevo_Gran_Death, COMBAT_PARAM_BLOCKSHIELD, true)
setCombatArea(combat0_Exevo_Gran_Death,createCombatArea({{2}}))
setCombatFormula(combat0_Exevo_Gran_Death, COMBAT_FORMULA_LEVELMAGIC, 100, 100, 100, 100)
local dfcombat0_Exevo_Gran_Death = {CONST_ANI_SUDDENDEATH}local combat0_Brush = createCombatObject()
setCombatParam(combat0_Brush, COMBAT_PARAM_EFFECT, CONST_ME_LOSEENERGY)
setCombatParam(combat0_Brush, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat0_Brush,createCombatArea({{0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0},
{1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1},
{1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1},
{0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 1, 0, 1, 2, 1, 0, 1, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0},
{1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1},
{1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1},
{0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0}}))
function getDmg_Brush(cid, level, maglevel)
	return (400000)*-1,(600000)*-1 
end
setCombatCallback(combat0_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")
local dfcombat0_Brush = {CONST_ANI_ENERGY,5,-4,4,-5,3,-5,3,-4,2,-3,-4,-5,-3,-5,-3,-4,-2,-3,-5,-4,-5,-3,-4,-3,-3,-2,-1,1,1,0,1,-1,0,1,0,-1,-1,-1,-1,0,1,1,5,-3,4,-3,3,-2,3,0,-3,0,4,3,5,3,5,4,4,5,3,5,3,4,2,3,3,2,-4,5,-3,5,-3,4,-4,3,-5,3,-5,4,-3,2,-2,3}local combat0_Brush_3 = createCombatObject()
setCombatParam(combat0_Brush_3, COMBAT_PARAM_EFFECT, CONST_ME_SOUND_RED)
setCombatParam(combat0_Brush_3, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatArea(combat0_Brush_3,createCombatArea({{1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1},
{0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0},
{1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1},
{0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0},
{1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1},
{0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0},
{1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1}}))
function getDmg_Brush_3(cid, level, maglevel)
	return (400000)*-1,(600000)*-1 
end
setCombatCallback(combat0_Brush_3, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_3")
local dfcombat0_Brush_3 = {CONST_ANI_ETHEREALSPEAR,-5,1,-4,1,-4,-1,-5,-1,4,-1,5,-1,5,1,4,1,-1,2,-2,1,-2,-1,-1,-2,1,-2,2,-1,2,1,1,2,1,5,1,4,-1,4,-1,5,0,-3,-1,-4,-1,-5,1,-4,1,-5,5,5,5,-5,-5,-5,-5,5}local combat0_Brush_2 = createCombatObject()
setCombatParam(combat0_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat0_Brush_2, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EXPLOSION)
setCombatParam(combat0_Brush_2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat0_Brush_2,createCombatArea({{0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0},
{0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0},
{0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0},
{1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1},
{0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0},
{1, 1, 0, 1, 0, 2, 0, 1, 0, 1, 1},
{0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0},
{1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1},
{0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0},
{0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0},
{0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0}}))
function getDmg_Brush_2(cid, level, maglevel)
	return (400000)*-1,(600000)*-1 
end
setCombatCallback(combat0_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2")
local dfcombat0_Brush_2 = {CONST_ANI_DEATH,-5,-2,-5,0,-5,2,-2,5,-2,4,2,4,2,5,0,5,0,4,5,2,0,-5,-4,4,0,-4,5,0,4,4,4,2,4,0,4,-2,-4,-2,-4,-4,4,-4,-2,-4,-4,2,-4,0,0,-2,2,2,2,-2,2,-4,-2,-5,2,-5,5,-2,3,1,3,3,1,3,-1,3,-3,3,-3,1,3,-1,3,-3,-2,0,-2,2,0,2,-2,-2,2,0,-3,-3,-1,-3,1,-3,-3,-1}

-- =============== CORE FUNCTIONS ===============
local function RunPart(c,cid,var,dirList,dirEmitPos) -- Part
	if (isCreature(cid)) then
		doCombat(cid, c, var)
		if (dirList ~= nil) then -- Emit distance effects
			local i = 2;
			while (i < #dirList) do
				doSendDistanceShoot(dirEmitPos,{x=dirEmitPos.x-dirList[i],y=dirEmitPos.y-dirList[i+1],z=dirEmitPos.z},dirList[1])
				i = i + 2
			end		
		end
	end
end

function onCastSpell(cid, var)
	local startPos = getCreaturePosition(cid)
	RunPart(combat0_Exevo_Gran_Death,cid,var,dfcombat0_Exevo_Gran_Death,startPos)
	RunPart(combat0_Brush,cid,var,dfcombat0_Brush,startPos)
	RunPart(combat0_Brush_3,cid,var,dfcombat0_Brush_3,startPos)
	RunPart(combat0_Brush_2,cid,var,dfcombat0_Brush_2,startPos)
	return true
	end

achei uma script que funciona no meu ot , so nao sei encorporar ela na script da spell

 

local area = createCombatArea(arr)
setCombatArea(combat, area)


function onCastSpell(cid, var)
if getPlayerStorageValue(cid, 378378) >=3 then
doCombat(cid, combat, var) 
return true 
else
doPlayerSendCancel(cid, "You need to have at least 3 resets to cast this spell.")
return false
end
end 

fiz varios testes nao consegui 

 

 

script completa q funcionou, Abaixo \/

local combat = createCombatObject()setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK)
setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 100, 120, 120, 150)


local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 20000)
setConditionParam(condition, CONDITION_PARAM_SPEED, -500)
setConditionFormula(condition, -0.9, 1, -0.9, 1)
setCombatCondition(combat, condition)


local arr = {
{0, 0, 0, 0, 0},
{0, 1, 1, 1, 0},
{0, 1, 2, 1, 0},
{0, 1, 1, 1, 0},
{0, 0, 0, 0, 0},
}


local area = createCombatArea(arr)
setCombatArea(combat, area)


function onCastSpell(cid, var)
if getPlayerStorageValue(cid, 378378) >=3 then
doCombat(cid, combat, var) 
return true 
else
doPlayerSendCancel(cid, "You need to have at least 3 resets to cast this spell.")
return false
end
end 

 

5 horas atrás, lalaiaalaaa disse:
Versão do Servidor: TFS - 0.4
Tipo de Script: spell

COMO POR RESET NA SCRIPT ? QUERIA 3 RESETS NESSA

 


-- SpellCreator generated.

-- =============== COMBAT VARS ===============
-- Areas/Combat for 0ms
local combat0_Exevo_Gran_Death = createCombatObject()
setCombatParam(combat0_Exevo_Gran_Death, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat0_Exevo_Gran_Death, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_HOLY)
setCombatParam(combat0_Exevo_Gran_Death, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat0_Exevo_Gran_Death, COMBAT_PARAM_BLOCKARMOR, true)
setCombatParam(combat0_Exevo_Gran_Death, COMBAT_PARAM_BLOCKSHIELD, true)
setCombatArea(combat0_Exevo_Gran_Death,createCombatArea({{2}}))
setCombatFormula(combat0_Exevo_Gran_Death, COMBAT_FORMULA_LEVELMAGIC, 100, 100, 100, 100)
local dfcombat0_Exevo_Gran_Death = {CONST_ANI_SUDDENDEATH}local combat0_Brush = createCombatObject()
setCombatParam(combat0_Brush, COMBAT_PARAM_EFFECT, CONST_ME_LOSEENERGY)
setCombatParam(combat0_Brush, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat0_Brush,createCombatArea({{0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0},
{1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1},
{1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1},
{0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 1, 0, 1, 2, 1, 0, 1, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0},
{1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1},
{1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1},
{0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0}}))
function getDmg_Brush(cid, level, maglevel)
	return (400000)*-1,(600000)*-1 
end
setCombatCallback(combat0_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")
local dfcombat0_Brush = {CONST_ANI_ENERGY,5,-4,4,-5,3,-5,3,-4,2,-3,-4,-5,-3,-5,-3,-4,-2,-3,-5,-4,-5,-3,-4,-3,-3,-2,-1,1,1,0,1,-1,0,1,0,-1,-1,-1,-1,0,1,1,5,-3,4,-3,3,-2,3,0,-3,0,4,3,5,3,5,4,4,5,3,5,3,4,2,3,3,2,-4,5,-3,5,-3,4,-4,3,-5,3,-5,4,-3,2,-2,3}local combat0_Brush_3 = createCombatObject()
setCombatParam(combat0_Brush_3, COMBAT_PARAM_EFFECT, CONST_ME_SOUND_RED)
setCombatParam(combat0_Brush_3, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatArea(combat0_Brush_3,createCombatArea({{1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1},
{0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0},
{1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1},
{0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0},
{1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1},
{0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0},
{1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1}}))
function getDmg_Brush_3(cid, level, maglevel)
	return (400000)*-1,(600000)*-1 
end
setCombatCallback(combat0_Brush_3, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_3")
local dfcombat0_Brush_3 = {CONST_ANI_ETHEREALSPEAR,-5,1,-4,1,-4,-1,-5,-1,4,-1,5,-1,5,1,4,1,-1,2,-2,1,-2,-1,-1,-2,1,-2,2,-1,2,1,1,2,1,5,1,4,-1,4,-1,5,0,-3,-1,-4,-1,-5,1,-4,1,-5,5,5,5,-5,-5,-5,-5,5}local combat0_Brush_2 = createCombatObject()
setCombatParam(combat0_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat0_Brush_2, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EXPLOSION)
setCombatParam(combat0_Brush_2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat0_Brush_2,createCombatArea({{0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0},
{0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0},
{0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0},
{1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1},
{0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0},
{1, 1, 0, 1, 0, 2, 0, 1, 0, 1, 1},
{0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0},
{1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1},
{0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0},
{0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0},
{0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0}}))
function getDmg_Brush_2(cid, level, maglevel)
	return (400000)*-1,(600000)*-1 
end
setCombatCallback(combat0_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2")
local dfcombat0_Brush_2 = {CONST_ANI_DEATH,-5,-2,-5,0,-5,2,-2,5,-2,4,2,4,2,5,0,5,0,4,5,2,0,-5,-4,4,0,-4,5,0,4,4,4,2,4,0,4,-2,-4,-2,-4,-4,4,-4,-2,-4,-4,2,-4,0,0,-2,2,2,2,-2,2,-4,-2,-5,2,-5,5,-2,3,1,3,3,1,3,-1,3,-3,3,-3,1,3,-1,3,-3,-2,0,-2,2,0,2,-2,-2,2,0,-3,-3,-1,-3,1,-3,-3,-1}

-- =============== CORE FUNCTIONS ===============
local function RunPart(c,cid,var,dirList,dirEmitPos) -- Part
	if (isCreature(cid)) then
		doCombat(cid, c, var)
		if (dirList ~= nil) then -- Emit distance effects
			local i = 2;
			while (i < #dirList) do
				doSendDistanceShoot(dirEmitPos,{x=dirEmitPos.x-dirList[i],y=dirEmitPos.y-dirList[i+1],z=dirEmitPos.z},dirList[1])
				i = i + 2
			end		
		end
	end
end

function onCastSpell(cid, var)
	local startPos = getCreaturePosition(cid)
	RunPart(combat0_Exevo_Gran_Death,cid,var,dfcombat0_Exevo_Gran_Death,startPos)
	RunPart(combat0_Brush,cid,var,dfcombat0_Brush,startPos)
	RunPart(combat0_Brush_3,cid,var,dfcombat0_Brush_3,startPos)
	RunPart(combat0_Brush_2,cid,var,dfcombat0_Brush_2,startPos)
	return true
	end

achei uma script que funciona no meu ot , so nao sei encorporar ela na script da spell

 


local area = createCombatArea(arr)
setCombatArea(combat, area)


function onCastSpell(cid, var)
if getPlayerStorageValue(cid, 378378) >=3 then
doCombat(cid, combat, var) 
return true 
else
doPlayerSendCancel(cid, "You need to have at least 3 resets to cast this spell.")
return false
end
end 

fiz varios testes nao consegui 

 

 

script completa q funcionou, Abaixo \/


local combat = createCombatObject()setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK)
setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 100, 120, 120, 150)


local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 20000)
setConditionParam(condition, CONDITION_PARAM_SPEED, -500)
setConditionFormula(condition, -0.9, 1, -0.9, 1)
setCombatCondition(combat, condition)


local arr = {
{0, 0, 0, 0, 0},
{0, 1, 1, 1, 0},
{0, 1, 2, 1, 0},
{0, 1, 1, 1, 0},
{0, 0, 0, 0, 0},
}


local area = createCombatArea(arr)
setCombatArea(combat, area)


function onCastSpell(cid, var)
if getPlayerStorageValue(cid, 378378) >=3 then
doCombat(cid, combat, var) 
return true 
else
doPlayerSendCancel(cid, "You need to have at least 3 resets to cast this spell.")
return false
end
end 

 

 

 

 

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

  • 3 weeks later...
A questão neste suporte foi encerrada por falta de respostas. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta.

+ Caso a dúvida não tenha sido resolvida você poderá criar outro tópico solicitando ajuda.
* Lembre-se que é permitido dar UP no tópico a cada 24 horas para assim o destacar e manter movimentado.
Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...