Ir para conteúdo

Featured Replies

  • Respostas 28
  • Visualizações 4.6k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Essa spell foi pensada pra ser um dobrador de agua removendo agua da grama e fazendo ela morrer... não sei se combinaria.

  • Só coloca needtarget = "1" no xml e troca o script:

Postado
function onCastSpell(cid, var)
local config = {
spins = 1,
delay = 120
}


local k = checkGroundInArray(getPositionsByDirection(cid), grass)
	
		
	for i = 1, #k do
	addEvent(function()
				if isPlayer(cid) then
				local pos = k[i]
						local grama = getThingFromPos(pos)						
						doTransformItem(grama.uid, driedgrass[math.random(1, #driedgrass)])
						a = (i < 9) and doSendMagicEffect(pos, 1) or doSendMagicEffect(pos, 53)
						doSendDistanceShoot(pos, getThingPos(cid), 36)
				end
			end, (config.delay/2) * i)	
	end	
	range = #k > 4 and 7 or 5
	
	addEvent(function()
		if isPlayer(cid) then
			local pos = k[i]
			local lastPos = false
			for i = 1, range do
				local position = getPositionByDirection(getCreaturePosition(cid), getCreatureLookDirection(cid), i)					
				if isWalkable(position, false, true, true) then
					local creature = getTopCreature(position)
					if (creature.uid > 0) then
						doSendDistanceShoot(getCreaturePosition(cid), getCreaturePosition(creature.uid), 36)
						doTargetCombatHealth(cid, creature.uid, COMBAT_PHYSICALDAMAGE, -142 * (#k - 1), -150 * (#k - 1), CONST_ME_NONE)
					break
					end
					lastPos = position
				end
				
				if lastPos then
					doSendDistanceShoot(getCreaturePosition(cid), lastPos, 36)
				end
			end
		end
	end, (config.delay + (4 * config.delay * config.spins)) )		
			
	addEvent(function()
		for j = 1, #k do			
			addEvent(function()
				local pos = k[j]
				local grama = getThingFromPos(pos)	
				if isInArray(driedgrass, grama.itemid) then
					doTransformItem(grama.uid, grass[math.random(1, #grass)])
				end	
			end, (config.delay/2) * j)									
		end
	end, config.delay * 100)			
	spinRotate(cid, config.spins, config.delay)
return true
end
Postado
  • Autor

Só coloca needtarget = "1" no xml e troca o script:

function onCastSpell(cid, var)
local config = {
spins = 1,
delay = 120
}


local k = checkGroundInArray(getPositionsByDirection(cid), grass)
	
		
	for i = 1, #k do
	addEvent(function()
				if isPlayer(cid) then
				local pos = k[i]
						local grama = getThingFromPos(pos)						
						doTransformItem(grama.uid, driedgrass[math.random(1, #driedgrass)])
						a = (i < 9) and doSendMagicEffect(pos, 1) or doSendMagicEffect(pos, 53)
						doSendDistanceShoot(pos, getThingPos(cid), 36)
				end
			end, (config.delay/2) * i)	
	end	
	range = #k > 4 and 7 or 5
	
	addEvent(function()
		if isPlayer(cid) then
			local creature = variantToNumber(var)
			if (creature > 0) then
				doSendDistanceShoot(getCreaturePosition(cid), getCreaturePosition(creature), 36)
				doTargetCombatHealth(cid, creature, COMBAT_PHYSICALDAMAGE, -142 * (#k + 1), -150 * (#k + 1), CONST_ME_NONE)
			end
		end
	end, (config.delay + (4 * config.delay * config.spins)) )		
			
	addEvent(function()
		for j = 1, #k do			
			addEvent(function()
				local pos = k[j]
				local grama = getThingFromPos(pos)	
				if isInArray(driedgrass, grama.itemid) then
					doTransformItem(grama.uid, grass[math.random(1, #grass)])
				end	
			end, (config.delay/2) * j)									
		end
	end, config.delay * 100)			
	spinRotate(cid, config.spins, config.delay)
return true
end

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.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo