Ir para conteúdo

Featured Replies

Postado
  • Este é um post popular.

Fala galera do TK, trago hoje a vocês uma magia que pode ser usada tanto em servidores normais como derivados!

Não vou ficar falando muito pois fiz um vídeo rápido demonstrativo de como funciona esta magia.

 

divisor.png

 

Vídeo:

https://www.youtube.com/watch?v=nuHvbo9THaM&feature=youtu.be

 

 

Este vídeo diz mais que mil palavras, entenderam?

Com o ctrl do seu mouse você irá controlar o TRAP no player, player's ou monsters, seja onde usar.

 

Observação:

Os traps não entram em área pz ou no-pvp

Caso ande um sqm com seu char, a magia stopa.

Não saia da "tela" com a magia, a mesma irá parar.

Pós 30 segundos os traps sumiram do mapa.

 


 

 

Sem blábláblá vamos a fácil instalação:

 

 

 

Em data/spell/scripts crie um arquivo com o nome de exevoflorest.lua e dentro adicione:

--<Script by Jhon992, XWhiteWolf and Absolute>--

local stonesId = {2700,2767,2708,2712}
local timeRemove = 30

function createObject(cid, position, stonesPosition)
if (isPlayer(cid)) then
	if getPlayerLookDir(cid) == 0 then
		positions = {x=position.x, y=position.y-1, z=position.z}
	elseif getPlayerLookDir(cid) == 1 then
		positions = {x=position.x+1, y=position.y, z=position.z}
	elseif getPlayerLookDir(cid) == 2 then
		positions = {x=position.x, y=position.y+1, z=position.z}
	elseif getPlayerLookDir(cid) == 3 then
		positions = {x=position.x-1, y=position.y, z=position.z}
	end
	
	if canWalk(positions) then
		createStone(stonesPosition, positions, stonesId[math.random(1,#stonesId)], cid)
		addEvent(createObject, 500, cid, positions, stonesPosition)
	else
		addEvent(removeStones, timeRemove*1000, stonesPosition)
	end
end
end

function createStone(stonesPosition, positions, stone, cid)
	doCreateItem(stone, 1, positions)
	stonesPosition[(#stonesPosition)+1] = {x=positions.x, y=positions.y, z=positions.z, stackpos=1}
end

function removeStones(stonesPosition)
for i=1, #stonesPosition do
	for o=1, 2 do
		stonesPosition[i] = {x=stonesPosition[i].x, y=stonesPosition[i].y, z=stonesPosition[i].z, stackpos=o}
		if isInArray(stonesId, getThingfromPos(stonesPosition[i]).itemid) then
			doRemoveItem(getThingfromPos(stonesPosition[i]).uid)
		end
	end
end
end

function canWalk(pos, creature, pz, proj) -- nord
	if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end
	local creature = getTopCreature(pos)
	if creature.type > 0 then	return false end
	if getTilePzInfo(pos) and not pz then return false end
	local n = not proj and 3 or 2
	for i = 0, 255 do
		pos.stackpos = i
		local tile = getTileThingByPos(pos)
		if tile.itemid ~= 0 and not isCreature(tile.uid) then
			if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then
				return false
			end
		end
	end
return true
end

function onCastSpell(cid, var)
	local stonesPosition = {}
	local position = getPlayerPosition(cid)
	createObject(cid, position, stonesPosition)
    return true
end

Em data/spells/spells.xml adicione a seguinte tag:

<instant name="Florest Wall" words="exevo florest" lvl="45" mana="600" prem="1" blockwalls="1" exhaustion="3000" groups="3,2000" icon="127" needlearn="0" event="script" value="exevoflorest.lua">
<vocation id="1"/>
<vocation id="2"/>
<vocation id="3"/>
<vocation id="4"/>
<vocation id="5"/>
<vocation id="6"/>
<vocation id="7"/>
<vocation id="8"/>
</instant>

Configurando:

local stonesId = {2700,2767,2708,2712} = ID RANDOM DAS ÁRVORES QUE IRÃO SER "SUMONADAS" PARA A TRAP
local timeRemove = 30 = TEMPO EM SEGUNDOS PARA REMOVER AS TRAPS

 


 

 

 

 

Bom, é isso aí galera, espero que tenham gostado.

Qualquer dúvida, sugestão, crítica construtiva poste aqui no tópico que irei ajuda-lo.

Não tenha vergonha ninguém nasceu sabendo, estamos aqui pra isto :D

 

 

 

Créditos:

Jhon

XWhiteWolf

Absolute

 

 

 

 

Até a próxima galera!

Absolute.

YDmXTU2.png

 

Entenda tudo sobre VPS, DEDICADOS & HOSPEDAGENS. => Clique aqui

Global Full Download 10.9x - TFS 1.2/FERUMBRAS/KRAILOS. => Clique aqui

 

Muitos querem aquilo que você tem, 
mas vão desistir quando souberem o preço que você pagou.

 

skype-favicon.png lu.lukinha

message-16.png [email protected]

  • Respostas 8
  • Visualizações 2.1k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

Postado

ah seu safadinho auheuhauheuha não esperava que vc fosse colocar meus créditos kkk valeu jovem.. essa spell é realmente muito legal

Todos os meus trabalhos importantes estão na seção "Sobre mim" no meu perfil; Dá uma passada lá!

"Há três caminhos para o fracasso: não ensinar o que se sabe, não praticar o que se ensina, e não perguntar o que se ignora." - São Beda

I7Pm6ih.png

(obg ao @Beeny por fazer essa linda sign <3)

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