Ir para conteúdo

Featured Replies

Postado
  • Autor

mais um UP ai pra galera, sou insistente não vou desistir alguém vai vir ajudar eu sei disso

 

#UPatémorrer

  • Respostas 19
  • Visualizações 916
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

Postado
  • Autor

#UP #UP #UP #UP #UP #UP cde o lendário mestre dos scripts pra me salvar aqui ja disse sou brasileiro e n desisto nunca vou insistir com esse post até o lendário scripter (seja quem for rs) me ajudar

Postado

Não testei nenhuma delas.

1° Spell:

Spoiler

local area = createCombatArea({
	{0, 0, 0},
	{0, 3, 0},
	{0, 0, 0}
})

local function sendHealingEffect(cid, position, loopCount)
	if(not isPlayer(cid)) then
		return
	end
	
	local pos = getThingPos(cid)
	doSendDistanceShoot(position, pos, CONST_ANI_SMALLHOLY)
	doCreatureAddHealth(cid, math.max(100, 150))
	doSendMagicEffect(pos, CONST_ME_MAGIC_BLUE)
	if(loopCount == 0) then
		doSendMagicEffect(pos, CONST_ME_HOLYAREA)
	end
end

function onCastSpell(cid, var)
	local playerPos = getThingPos(cid)
	local loopCount = 12
	
	doCreatureSay(cid, 'Heal me my brothers!', TALKTYPE_MONSTER_SAY)
	
	for i = 1, loopCount do
		local pos = {x = (playerPos.x + math.random(-4, 3)), y = (playerPos.y + math.random(-3, 2)), z = playerPos.z}
		addEvent(doCombatAreaHealth, (i * 75), cid, COMBAT_PHYSICALDAMAGE, pos, area, 0, 0, CONST_ME_ASSASSIN)
		addEvent(sendHealingEffect, (i * 75), cid, pos, (loopCount - i))
	end
	return false
end

 

 

2° Spell:

Spoiler

local function targetEffect(cid)
	if(not isPlayer(cid)) then
		return
	end
	
	local effect = CONST_ANI_REDSTAR
	local orig = getThingPos(cid)
	local d1, d2 = {z = orig.z}, {z = orig.z}
	
	d1.x = orig.x - 5
	d2.x = orig.x + 5
	for i = -2, 2 do
		d1.y = orig.y + i
		d2.y = d1.y
		doSendDistanceShoot(orig, d1, effect)
		doSendDistanceShoot(orig, d2, effect)
	end
	
	d1.y = orig.y - 3
	d2.y = orig.y + 3
	for i = -4, 4 do
		d1.x = orig.x + i
		d2.x = d1.x
		doSendDistanceShoot(orig, d1, effect)
		doSendDistanceShoot(orig, d2, effect)
	end
end

local function backOldPosition(cid, oldPosition)
	if(not isPlayer(cid)) then
		return
	end
	
	doTeleportThing(cid, oldPosition)
	--player:setGhostMode(false) -- not exists in TFS 0.4
end

local function jumpEffect(cid, target)
	if(not isPlayer(cid)) then
		return
	end
	
	if(isCreature(target)) then
		doSendDistanceShoot(getThingPos(cid), getThingPos(target), CONST_ANI_EXPLOSION)
	end
end

local function jumpOnTarget(cid, target, targetCount, oldPosition)
	if(not isPlayer(cid)) then
		return
	end
	
	if(isCreature(target)) then
		addEvent(targetEffect, 100, cid)
		doTeleportThing(cid, getThingPos(target))
		--player:setGhostMode(true) -- not exists in TFS 0.4
		doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -1, -100, CONST_ME_ASSASSIN)
		if(targetCount == 0) then
			addEvent(backOldPosition, 400, cid, oldPosition)
		end
	end
end

local function extractRandomValuesFromTable(tbl) --By Printer(This will make sure not to select a value twice from the table)
	if(#tbl == 0) then
		return false
	end
	return table.remove(tbl, math.random(#tbl))
end

function onCastSpell(cid, var)
	local targets = {}
	
	local playerPos = getThingPos(cid)
	local spectators = getSpectators(playerPos, 10, 10)
	for i = 1, #spectators do
		local specs = spectators[i]
		if(specs ~= cid and not isNpc(specs)) then
			targets[#targets+1] = specs
		end
	end
	
	if(#targets == 0) then
		doPlayerSendCancel(cid, 'There is no targets in sight.')
		doSendMagicEffect(playerPos, CONST_ME_POFF)
		return false
	end
	
	local targetCount = #targets
	for i = 1, #targets do
		local randTarget = extractRandomValuesFromTable(targets)
		addEvent(jumpOnTarget, (i * 400), cid, randTarget, (targetCount - i), playerPos)
		addEvent(jumpEffect, (i * 300), cid, randTarget)
	end
	return false
end

 

 

 

3° Spell:

Spoiler

local function sendDistanceEffectDelay(cid, fromPos, toPos, effect)
	if(not isPlayer(cid)) then
		return
	end
	
	doSendDistanceShoot(fromPos, toPos, effect)
end

local function ninjaJumpDash(cid, target, oldPos, lastJump, back)
	if(not isPlayer(cid)) then
		return
	end
	
	if(not isCreature(target)) then
		--player:setGhostMode(false) -- not exists in TFS 0.4
		return
	end
	
	if(lastJump) then
		--player:setGhostMode(false) -- not exists in TFS 0.4
	end
	
	if(back) then
		doTeleportThing(cid, oldPos)
	else
		doTeleportThing(cid, getThingPos(target))
	end
	doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -1, -100, CONST_ME_ENERGYAREA) -- CONST_ME_THUNDER not exists in TFS 0.4
end

function onCastSpell(cid, var)
	local playerPos = getThingPos(cid)
	local target = variantToNumber(var)
	
	--creature:setGhostMode(true) -- not exists in TFS 0.4
	addEvent(ninjaJumpDash, 0, cid, target, playerPos, false, false)
	addEvent(sendDistanceEffectDelay, 100, cid, playerPos, getThingPos(target), CONST_ANI_ENERGY)
	addEvent(sendDistanceEffectDelay, 300, cid, getThingPos(target), playerPos, CONST_ANI_ENERGY)
	addEvent(ninjaJumpDash, 400, cid, target, playerPos, false, true)
	
	addEvent(ninjaJumpDash, 600, cid, target, playerPos, false, false)
	addEvent(sendDistanceEffectDelay, 700, cid, playerPos, getThingPos(target), CONST_ANI_ENERGY)
	addEvent(sendDistanceEffectDelay, 1000, cid, getThingPos(target), playerPos, CONST_ANI_ENERGY)
	addEvent(ninjaJumpDash, 1100, cid, target, playerPos, false, true)
	
	addEvent(ninjaJumpDash, 1300, cid, target, playerPos, false, false)
	addEvent(sendDistanceEffectDelay, 1400, cid, playerPos, getThingPos(target), CONST_ANI_ENERGY)
	addEvent(sendDistanceEffectDelay, 1700, cid, getThingPos(target), playerPos, CONST_ANI_ENERGY)
	addEvent(ninjaJumpDash, 1800, cid, target, playerPos, true, true)
	return false
end

 

 

4° Spell:

Spoiler

function isWalkable(cid, pos)
	pos.stackpos = 0
	local tile = getTileThingByPos(pos)
	if(tile.itemid == 0) then
		return false
	end
	
	if(doTileQueryAdd(cid, pos) == 1 and not getTilePzInfo(pos)) then
		return true
	end
	return false
end

local function jumpBehindTarget(cid, target)
	local targetPos = getThingPos(target)
	local targetPositions = {
		north = {x = targetPos.x, y = (targetPos.y - 1), targetPos.z},
		east = {x = (targetPos.x + 1), y = targetPos.y, z = targetPos.z},
		west = {x = (targetPos.x - 1), y = targetPos.y, z = targetPos.z},
		south = {x = targetPos.x, y = (targetPos.y + 1), z = targetPos.z}
	}
	
	local targetDir = getCreatureLookDirection(target)
	if(targetDir == NORTH) then
		dir = targetPositions.south
	elseif(targetDir == EAST) then
		dir = targetPositions.west
	elseif(targetDir == WEST) then
		dir = targetPositions.east
	elseif(targetDir == SOUTH) then
		dir = targetPositions.north
	end
	return dir
end

local function backOldPos(cid, oldPos)
	if(not isPlayer(cid)) then
		return
	end
	
	doTeleportThing(cid, oldPos)
end

local function checkHasTarget(cid, count, oldPos)
	if(not isPlayer(cid)) then
		return
	end
	
	if(count < 1) then
		--player:setGhostMode(false) -- not exists in TFS 0.4
		return
	end
	
	local target = getCreatureTarget(cid)
	if(isCreature(target)) then
		local behindTarget = jumpBehindTarget(cid, target)
		if(isWalkable(cid, behindTarget)) then
			doTeleportThing(cid, behindTarget)
		else
			doTeleportThing(cid, getThingPos(target))
			addEvent(backOldPos, 100, cid, oldPos)
		end
		doCreatureSetLookDirection(cid, getCreatureLookDirection(target))
		--player:setGhostMode(false) -- not exists in TFS 0.4
		doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -20, -100, CONST_ME_FIREATTACK)
		return true
	end
	addEvent(checkHasTarget, (1 * 100), cid, (count - 1))
end

function onCastSpell(cid, var)
	local playerPos = getThingPos(cid)
	
	--creature:setGhostMode(true) -- not exists in TFS 0.4
	doSendMagicEffect(playerPos, CONST_ME_POFF)
	addEvent(checkHasTarget, (1 * 250), cid, 50, playerPos)
	return false
end

 

 

Editado por MaTTch (veja o histórico de edições)

Postado
  • Autor
1 hora atrás, MaTTch disse:

Não testei nenhuma delas.

1° Spell:

  Mostrar conteúdo oculto


local area = {
	{0, 0, 0},
	{0, 3, 0},
	{0, 0, 0}
}

local function sendHealingEffect(cid, position, loopCount)
	if(not isPlayer(cid)) then
		return
	end
	
	local pos = getThingPos(cid)
	doSendDistanceShoot(position, pos, CONST_ANI_SMALLHOLY)
	doCreatureAddHealth(cid, math.max(100, 150))
	doSendMagicEffect(pos, CONST_ME_MAGIC_BLUE)
	if(loopCount == 0) then
		doSendMagicEffect(pos, CONST_ME_HOLYAREA)
	end
end

function onCastSpell(cid, var)
	local playerPos = getThingPos(cid)
	local loopCount = 12
	
	doCreatureSay(cid, 'Heal me my brothers!', TALKTYPE_MONSTER_SAY)
	
	for i = 1, loopCount do
		local pos = Position(playerPos.x + math.random(-4, 3), playerPos.y + math.random(-3, 2), playerPos.z)
		addEvent(doCombatAreaHealth, (i * 75), cid, COMBAT_PHYSICALDAMAGE, pos, createCombatArea(area), 0, 0, CONST_ME_ASSASSIN)
		addEvent(sendHealingEffect, (i * 75), cid, pos, (loopCount - i))
	end
	return false
end

 

 

2° Spell:

  Mostrar conteúdo oculto


local function targetEffect(cid)
	if(not isPlayer(cid)) then
		return
	end
	
	local effect = CONST_ANI_REDSTAR
	local orig = getThingPos(cid)
	local d1, d2 = {z = orig.z}, {z = orig.z}
	
	d1.x = orig.x - 5
	d2.x = orig.x + 5
	for i = -2, 2 do
		d1.y = orig.y + i
		d2.y = d1.y
		doSendDistanceShoot(orig, d1, effect)
		doSendDistanceShoot(orig, d2, effect)
	end
	
	d1.y = orig.y - 3
	d2.y = orig.y + 3
	for i = -4, 4 do
		d1.x = orig.x + i
		d2.x = d1.x
		doSendDistanceShoot(orig, d1, effect)
		doSendDistanceShoot(orig, d2, effect)
	end
end

local function backOldPosition(cid, oldPosition)
	if(not isPlayer(cid)) then
		return
	end
	
	doTeleportThing(cid, oldPosition)
	--player:setGhostMode(false) -- not exists in TFS 0.4
end

local function jumpEffect(cid, target)
	if(not isPlayer(cid)) then
		return
	end
	
	if(isCreature(target)) then
		doSendDistanceShoot(getThingPos(cid), getThingPos(target), CONST_ANI_EXPLOSION)
	end
end

local function jumpOnTarget(cid, target, targetCount, oldPosition)
	if(not isPlayer(cid)) then
		return
	end
	
	if(isCreature(target)) then
		addEvent(targetEffect, 100, cid)
		doTeleportThing(cid, getThingPos(target))
		--player:setGhostMode(true) -- not exists in TFS 0.4
		doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -1, -100, CONST_ME_ASSASSIN)
		if(targetCount == 0) then
			addEvent(backOldPosition, 400, cid, oldPosition)
		end
	end
end

local function extractRandomValuesFromTable(tbl) --By Printer(This will make sure not to select a value twice from the table)
	if(#tbl == 0) then
		return false
	end
	return table.remove(tbl, math.random(#tbl))
end

function onCastSpell(cid, var)
	local targets = {}
	
	local playerPos = getThingPos(cid)
	local spectators = getSpectators(playerPos, 10, 10)
	for i = 1, #spectators do
		local specs = spectators[i]
		if(specs ~= cid and not isNpc(specs)) then
			targets[#targets+1] = specs
		end
	end
	
	if(#targets == 0) then
		doPlayerSendCancel(cid, 'There is no targets in sight.')
		doSendMagicEffect(playerPos, CONST_ME_POFF)
		return false
	end
	
	local targetCount = #targets
	for i = 1, #targets do
		local randTarget = extractRandomValuesFromTable(targets)
		addEvent(jumpOnTarget, (i * 400), cid, randTarget, (targetCount - i), playerPos)
		addEvent(jumpEffect, (i * 300), cid, randTarget)
	end
	return false
end

 

 

 

3° Spell:

  Mostrar conteúdo oculto


local function sendDistanceEffectDelay(cid, fromPos, toPos, effect)
	if(not isPlayer(cid)) then
		return
	end
	
	doSendDistanceShoot(fromPos, toPos, effect)
end

local function ninjaJumpDash(cid, target, oldPos, lastJump, back)
	if(not isPlayer(cid)) then
		return
	end
	
	if(not isCreature(target)) then
		--player:setGhostMode(false) -- not exists in TFS 0.4
		return
	end
	
	if(lastJump) then
		--player:setGhostMode(false) -- not exists in TFS 0.4
	end
	
	if(back) then
		doTeleportThing(cid, oldPos)
	else
		doTeleportThing(cid, getThingPos(target))
	end
	doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -1, -100, CONST_ME_ENERGYAREA) -- CONST_ME_THUNDER not exists in TFS 0.4
end

function onCastSpell(cid, var)
	local playerPos = getThingPos(cid)
	local target = variantToNumber(var)
	
	--creature:setGhostMode(true) -- not exists in TFS 0.4
	addEvent(ninjaJumpDash, 0, cid, target, playerPos, false, false)
	addEvent(sendDistanceEffectDelay, 100, cid, playerPos, getThingPos(target), CONST_ANI_ENERGY)
	addEvent(sendDistanceEffectDelay, 300, cid, getThingPos(target), playerPos, CONST_ANI_ENERGY)
	addEvent(ninjaJumpDash, 400, cid, target, playerPos, false, true)
	
	addEvent(ninjaJumpDash, 600, cid, target, playerPos, false, false)
	addEvent(sendDistanceEffectDelay, 700, cid, playerPos, getThingPos(target), CONST_ANI_ENERGY)
	addEvent(sendDistanceEffectDelay, 1000, cid, getThingPos(target), playerPos, CONST_ANI_ENERGY)
	addEvent(ninjaJumpDash, 1100, cid, target, playerPos, false, true)
	
	addEvent(ninjaJumpDash, 1300, cid, target, playerPos, false, false)
	addEvent(sendDistanceEffectDelay, 1400, cid, playerPos, getThingPos(target), CONST_ANI_ENERGY)
	addEvent(sendDistanceEffectDelay, 1700, cid, getThingPos(target), playerPos, CONST_ANI_ENERGY)
	addEvent(ninjaJumpDash, 1800, cid, target, playerPos, true, true)
	return false
end

 

 

4° Spell:

  Mostrar conteúdo oculto


function isWalkable(cid, pos)
	pos.stackpos = 0
	local tile = getTileThingByPos(pos)
	if(tile.itemid == 0) then
		return false
	end
	
	if(doTileQueryAdd(cid, pos) == 1 and not getTilePzInfo(pos)) then
		return true
	end
	return false
end

local function jumpBehindTarget(cid, target)
	local targetPos = getThingPos(target)
	local targetPositions = {
		north = Position(targetPos.x, targetPos.y-1, targetPos.z),
		east = Position(targetPos.x+1, targetPos.y, targetPos.z),
		west = Position(targetPos.x-1, targetPos.y, targetPos.z),
		south = Position(targetPos.x, targetPos.y+1, targetPos.z)
	}
	
	local targetDir = getCreatureLookDirection(target)
	if(targetDir == NORTH) then
		dir = targetPositions.south
	elseif(targetDir == EAST) then
		dir = targetPositions.west
	elseif(targetDir == WEST) then
		dir = targetPositions.east
	elseif(targetDir == SOUTH) then
		dir = targetPositions.north
	end
	return dir
end

local function oldPos(cid, oldPos)
	if(not isPlayer(cid)) then
		return
	end
	
	doTeleportThing(cid, oldPos)
end

local function checkHasTarget(cid, count, oldPos)
	if(not isPlayer(cid)) then
		return
	end
	
	if(count < 1) then
		--player:setGhostMode(false) -- not exists in TFS 0.4
		return
	end
	
	local target = getCreatureTarget(cid)
	if(isCreature(target)) then
		local behindTarget = jumpBehindTarget(cid, target)
		if(isWalkable(cid, behindTarget)) then
			doTeleportThing(cid, behindTarget)
		else
			doTeleportThing(cid, getThingPos(target))
			addEvent(backOldPos, 100, cid, oldPos)
		end
		doCreatureSetLookDirection(cid, getCreatureLookDirection(target))
		--player:setGhostMode(false) -- not exists in TFS 0.4
		doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -20, -100, CONST_ME_FIREATTACK)
		return true
	end
	addEvent(checkHasTarget, (1 * 100), cid, (count - 1))
end

function onCastSpell(cid, var)
	local playerPos = getThingPos(cid)
	
	--creature:setGhostMode(true) -- not exists in TFS 0.4
	doSendMagicEffect(playerPos, CONST_ME_POFF)
	addEvent(checkHasTarget, (1 * 250), cid, 50, playerPos)
	return false
end

 

 

 

manoooooooooooooo se não existe sério, se é o chuck norris dos scripts PARABENSNEI, só um probleminha a  primeira spell e a quarta spell de acordo com a ordem das spell que vc posto esta dando esse erro na distro;

 

Spoiler

PRIMEIRA SPELL

[15/04/2016 21:04:13] [Error - Spell Interface] 
[15/04/2016 21:04:13] data/spells/scripts/especiais/healbrothers.lua:onCastSpell
[15/04/2016 21:04:13] Description: 
[15/04/2016 21:04:13] data/spells/scripts/especiais/healbrothers.lua:28: attempt to call global 'Position' (a nil value)
[15/04/2016 21:04:13] stack traceback:
[15/04/2016 21:04:13] 	data/spells/scripts/especiais/healbrothers.lua:28: in function <data/spells/scripts/especiais/healbrothers.lua:21>
  
  
QUARTA SPELL
  
[15/04/2016 21:06:14] [Error - Spell Interface] 
[15/04/2016 21:06:14] In a timer event called from: 
[15/04/2016 21:06:14] data/spells/scripts/especiais/silenceattack.lua:onCastSpell
[15/04/2016 21:06:14] Description: 
[15/04/2016 21:06:14] data/spells/scripts/especiais/silenceattack.lua:17: attempt to call global 'Position' (a nil value)
[15/04/2016 21:06:14] stack traceback:
[15/04/2016 21:06:14] 	data/spells/scripts/especiais/silenceattack.lua:17: in function 'jumpBehindTarget'
[15/04/2016 21:06:14] 	data/spells/scripts/especiais/silenceattack.lua:56: in function <data/spells/scripts/especiais/silenceattack.lua:44>

 

se puder ajudar ficarei eternamente agradecido com sua pessoa ja vou dar uns rep aqui pelas spells que estão funfando.

Editado por rheynkhen (veja o histórico de edições)

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo