Ir para conteúdo

Featured Replies

Postado

@Nother n sou mto bom com spells, não manjo nada, mas vamo seguindo os testes... é que estou pelo celular e o computador do escritório kkkk sem tibia nem nada, só bloco de nota msm xD

 

local from, to = {x=980, y=980, z=15}, {x=1050, y=1050, z=15} -- area total do kamui
local teleport = {x=1000, y=1000, z=15} -- para onde vai
local blocks = {"demon", "hydra"} -- defina o nome dos monstro em minusculo
local storage = 753159
function isInKamuiArea(cid)
	return isInRange(getCreaturePosition(cid), from, to) and true or false
end
function TeleportToKamui(alvo, pos)
	if not isCreature(alvo) then return LUA_ERROR end
	doTeleportThing(alvo, pos)
	doSendMagicEffect(getThingPos(alvo), 40) -- effect target ao entrar no kamui
end
function onCastSpell(cid, var)
	local target = getCreatureTarget(cid)
	if not target then -- executa no cid
		if isInKamuiArea(cid) then
			doPlayerSendCancel(cid, "voce nao pode usar a spell dentro do kamui") return true
		end
		setPlayerStorageValue(cid, storage, ":".. getCreaturePosition(cid).x ..",:".. getCreaturePosition(cid).y ..",:".. getCreaturePosition(cid).z)
		doSendMagicEffect(getCreaturePosition(cid), 4) -- cid
		addEvent(TeleportToKamui, 300, cid, teleport)
	elseif target and isCreature(target) then -- se tiver target
		if isMonster(target) then
			if isInArray(blocks, getCreatureName(target):lower()) then
				doPlayerSendCancel(cid, "voce nao pode usar a spell neste monstro") return true
			end
			doSendMagicEffect(getCreaturePosition(cid), 4) -- cid
			doSendMagicEffect(getThingPos(target), 10) -- effect target ao usar kamui
			addEvent(TeleportToKamui, 300, target,teleport) 
		elseif isPlayer(target) then
			if isInKamuiArea(target) then
				doPlayerSendCancel(cid, "voce nao pode usar a spell em um target dentro do kamui") return true
			end
			setPlayerStorageValue(target, storage, ":".. getCreaturePosition(target).x ..",:".. getCreaturePosition(target).y ..",:".. getCreaturePosition(target).z)
			doSendMagicEffect(getCreaturePosition(cid), 4) -- cid
			doSendMagicEffect(getThingPos(target), 10) -- effect target ao usar kamui
			addEvent(TeleportToKamui, 300, target, teleport)
		end	
	end
	return true
end

 

 

(nao botei dano ainda)

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

  • Respostas 12
  • Visualizações 705
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Que isso, so oque vc ja fez aqui e mais doque eu faria em um ano kkk, seguinte, agora a spell com needtarget 0 pega no alvo mas não pega em mim, o effect agora esta funcionando nos 2.

  • testa o dano   local from, to = {x=980, y=980, z=15}, {x=1050, y=1050, z=15} -- area total do kamui local teleport = {x=1000, y=1000, z=15} -- para onde vai local blocks = {"demon", "hydra"}

  • mandei mensagem la kkk, quando tiver ok eu posto aqui para o pessoal Ai galera, consegui editar o effect e o cooldown tbm, a spell ta muito boa, @Vodkart muito obrigado mesmo.   Deixei o

Postado
  • Autor
6 minutos atrás, Vodkart disse:

@Nother n sou mto bom com spells, não manjo nada, mas vamo seguindo os testes... é que estou pelo celular e o computador do escritório kkkk sem tibia nem nada, só bloco de nota msm xD

 


local from, to = {x=980, y=980, z=15}, {x=1050, y=1050, z=15} -- area total do kamui
local teleport = {x=1000, y=1000, z=15} -- para onde vai
local blocks = {"demon", "hydra"} -- defina o nome dos monstro em minusculo
local storage = 753159
function isInKamuiArea(cid)
	return isInRange(getCreaturePosition(cid), from, to) and true or false
end
function TeleportToKamui(alvo, pos)
	if not isCreature(alvo) then return LUA_ERROR end
	doTeleportThing(alvo, pos)
	doSendMagicEffect(getThingPos(alvo), 40) -- effect target ao entrar no kamui
end
function onCastSpell(cid, var)
	local target = getCreatureTarget(cid)
	if not target then -- executa no cid
		if isInKamuiArea(cid) then
			doPlayerSendCancel(cid, "voce nao pode usar a spell dentro do kamui") return true
		end
		setPlayerStorageValue(cid, storage, ":".. getCreaturePosition(cid).x ..",:".. getCreaturePosition(cid).y ..",:".. getCreaturePosition(cid).z)
		doSendMagicEffect(getCreaturePosition(cid), 4) -- cid
		addEvent(TeleportToKamui, 300, cid, teleport)
	elseif target and isCreature(target) then -- se tiver target
		if isMonster(target) then
			if isInArray(blocks, getCreatureName(target):lower()) then
				doPlayerSendCancel(cid, "voce nao pode usar a spell neste monstro") return true
			end
			doSendMagicEffect(getCreaturePosition(cid), 4) -- cid
			doSendMagicEffect(getThingPos(target), 10) -- effect target ao usar kamui
			addEvent(TeleportToKamui, 300, target,teleport) 
		elseif isPlayer(target) then
			if isInKamuiArea(target) then
				doPlayerSendCancel(cid, "voce nao pode usar a spell em um target dentro do kamui") return true
			end
			setPlayerStorageValue(target, storage, ":".. getCreaturePosition(target).x ..",:".. getCreaturePosition(target).y ..",:".. getCreaturePosition(target).z)
			doSendMagicEffect(getCreaturePosition(cid), 4) -- cid
			doSendMagicEffect(getThingPos(target), 10) -- effect target ao usar kamui
			addEvent(TeleportToKamui, 300, target, teleport)
		end	
	end
	return true
end

 

 

(nao botei dano ainda)

Que isso, so oque vc ja fez aqui e mais doque eu faria em um ano kkk, seguinte, agora a spell com needtarget 0 pega no alvo mas não pega em mim, o effect agora esta funcionando nos 2.

Postado

@Nother

 

 

local from, to = {x=980, y=980, z=15}, {x=1050, y=1050, z=15} -- area total do kamui
local teleport = {x=1000, y=1000, z=15} -- para onde vai
local blocks = {"demon", "hydra"} -- defina o nome dos monstro em minusculo
local storage = 753159
function isInKamuiArea(cid)
	return isInRange(getCreaturePosition(cid), from, to) and true or false
end
function TeleportToKamui(alvo, pos)
	if not isCreature(alvo) then return LUA_ERROR end
	doTeleportThing(alvo, pos)
	doSendMagicEffect(getThingPos(alvo), 40) -- effect target ao entrar no kamui
end
function onCastSpell(cid, var)
	local target = getCreatureTarget(cid)	
	if target > 0 and isCreature(target) then -- se tiver target
		if isMonster(target) then
			if isInArray(blocks, getCreatureName(target):lower()) then
				doPlayerSendCancel(cid, "voce nao pode usar a spell neste monstro") return true
			end
			doSendMagicEffect(getCreaturePosition(cid), 4) -- cid
			doSendMagicEffect(getThingPos(target), 10) -- effect target ao usar kamui
			addEvent(TeleportToKamui, 300, target,teleport) 
		elseif isPlayer(target) then
			if isInKamuiArea(target) then
				doPlayerSendCancel(cid, "voce nao pode usar a spell em um target dentro do kamui") return true
			end
			setPlayerStorageValue(target, storage, ":".. getCreaturePosition(target).x ..",:".. getCreaturePosition(target).y ..",:".. getCreaturePosition(target).z)
			doSendMagicEffect(getCreaturePosition(cid), 4) -- cid
			doSendMagicEffect(getThingPos(target), 10) -- effect target ao usar kamui
			addEvent(TeleportToKamui, 300, target, teleport)
		end	
	else
		if isInKamuiArea(cid) then
			doPlayerSendCancel(cid, "voce nao pode usar a spell dentro do kamui") return true
		end
		setPlayerStorageValue(cid, storage, ":".. getCreaturePosition(cid).x ..",:".. getCreaturePosition(cid).y ..",:".. getCreaturePosition(cid).z)
		doSendMagicEffect(getCreaturePosition(cid), 4) -- cid
		addEvent(TeleportToKamui, 300, cid, teleport)
	end
	return true
end

 

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

Postado
  • Autor
3 minutos atrás, Vodkart disse:

@Nother

 

 


local from, to = {x=980, y=980, z=15}, {x=1050, y=1050, z=15} -- area total do kamui
local teleport = {x=1000, y=1000, z=15} -- para onde vai
local blocks = {"demon", "hydra"} -- defina o nome dos monstro em minusculo
local storage = 753159
function isInKamuiArea(cid)
	return isInRange(getCreaturePosition(cid), from, to) and true or false
end
function TeleportToKamui(alvo, pos)
	if not isCreature(alvo) then return LUA_ERROR end
	doTeleportThing(alvo, pos)
	doSendMagicEffect(getThingPos(alvo), 40) -- effect target ao entrar no kamui
end
function onCastSpell(cid, var)
	local target = getCreatureTarget(cid)	
	if target > 0 and isCreature(target) then -- se tiver target
		if isMonster(target) then
			if isInArray(blocks, getCreatureName(target):lower()) then
				doPlayerSendCancel(cid, "voce nao pode usar a spell neste monstro") return true
			end
			doSendMagicEffect(getCreaturePosition(cid), 4) -- cid
			doSendMagicEffect(getThingPos(target), 10) -- effect target ao usar kamui
			addEvent(TeleportToKamui, 300, target,teleport) 
		elseif isPlayer(target) then
			if isInKamuiArea(target) then
				doPlayerSendCancel(cid, "voce nao pode usar a spell em um target dentro do kamui") return true
			end
			setPlayerStorageValue(target, storage, ":".. getCreaturePosition(target).x ..",:".. getCreaturePosition(target).y ..",:".. getCreaturePosition(target).z)
			doSendMagicEffect(getCreaturePosition(cid), 4) -- cid
			doSendMagicEffect(getThingPos(target), 10) -- effect target ao usar kamui
			addEvent(TeleportToKamui, 300, target, teleport)
		end	
	else
		if isInKamuiArea(cid) then
			doPlayerSendCancel(cid, "voce nao pode usar a spell dentro do kamui") return true
		end
		setPlayerStorageValue(cid, storage, ":".. getCreaturePosition(cid).x ..",:".. getCreaturePosition(cid).y ..",:".. getCreaturePosition(cid).z)
		doSendMagicEffect(getCreaturePosition(cid), 4) -- cid
		addEvent(TeleportToKamui, 300, cid, teleport)
	end
	return true
end

 

Perfeito, dessa vez deu direitinho, agora só falta os detalhezinhos do effect pois ele fica na cabeça a esquerda dos personagens, e o dano no alvo, mas já esta ótimo, não precisa fazer com pressa se estiver ocupado.

Postado
  • Solução

testa o dano

 

local from, to = {x=980, y=980, z=15}, {x=1050, y=1050, z=15} -- area total do kamui
local teleport = {x=1000, y=1000, z=15} -- para onde vai
local blocks = {"demon", "hydra"} -- defina o nome dos monstro em minusculo
local storage = 753159
function isInKamuiArea(cid)
	return isInRange(getCreaturePosition(cid), from, to) and true or false
end
function TeleportToKamui(alvo, pos)
	if not isCreature(alvo) then return LUA_ERROR end
	doTeleportThing(alvo, pos)
	doSendMagicEffect(getThingPos(alvo), 40) -- effect target ao entrar no kamui
end
function onCastSpell(cid, var)
	local target = getCreatureTarget(cid)	
	if target > 0 and isCreature(target) then -- se tiver target
		if isMonster(target) then
			if isInArray(blocks, getCreatureName(target):lower()) then
				doPlayerSendCancel(cid, "voce nao pode usar a spell neste monstro") return true
			end
			doSendMagicEffect(getCreaturePosition(cid), 4) -- cid
			doSendMagicEffect(getThingPos(target), 10) -- effect target ao usar kamui
			local min = (getPlayerLevel(cid) * 2 + getPlayerMagLevel(cid) * 20) * 5
            local max = (getPlayerLevel(cid) * 5 + getPlayerMagLevel(cid) * 50) * 8
            doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -min, -max, CONST_ME_BLOCKHIT)  -- defina combat e effect    COMBAT_PHYSICALDAMAGE / CONST_ME_BLOCKHIT
			addEvent(TeleportToKamui, 300, target,teleport) 
		elseif isPlayer(target) then
			if isInKamuiArea(target) then
				doPlayerSendCancel(cid, "voce nao pode usar a spell em um target dentro do kamui") return true
			end
			setPlayerStorageValue(target, storage, ":".. getCreaturePosition(target).x ..",:".. getCreaturePosition(target).y ..",:".. getCreaturePosition(target).z)
			doSendMagicEffect(getCreaturePosition(cid), 4) -- cid
			doSendMagicEffect(getThingPos(target), 10) -- effect target ao usar kamui
			local min = (getPlayerLevel(cid) * 2 + getPlayerMagLevel(cid) * 20) * 5
            local max = (getPlayerLevel(cid) * 5 + getPlayerMagLevel(cid) * 50) * 8
            doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -min, -max, CONST_ME_BLOCKHIT)  -- defina combat e effect    COMBAT_PHYSICALDAMAGE / CONST_ME_BLOCKHIT
			addEvent(TeleportToKamui, 300, target, teleport)
		end	
	else
		if isInKamuiArea(cid) then
			doPlayerSendCancel(cid, "voce nao pode usar a spell dentro do kamui") return true
		end
		setPlayerStorageValue(cid, storage, ":".. getCreaturePosition(cid).x ..",:".. getCreaturePosition(cid).y ..",:".. getCreaturePosition(cid).z)
		doSendMagicEffect(getCreaturePosition(cid), 4) -- cid
		addEvent(TeleportToKamui, 300, cid, teleport)
		doCreatureAddHealth(cid, -100)
	end
	return true
end

 

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

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.6k

Informação Importante

Confirmação de Termo