Aew galera, o juan500 me deu a ideia de adicionar "clones" no "outro mundo":
(O vídeo se encontra no final do tópico).
Em data/monster crie um arquivo.xml nomeie para Tsukuyomi e adicione:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Tsukuyomi" nameDescription="a Tsukuyomi" race="blood" experience="0" speed="0" manacost="0">
<health now="99999999999" max="99999999999"/>
<look type="130" head="0" body="114" legs="114" feet="0" addons="3" corpse="0"/>
<targetchange interval="10000" chance="1"/>
<strategy attack="200" defense="10"/>
<flags>
<flag summonable="0"/>
<flag attackable="1"/>
<flag hostile="0"/>
<flag illusionable="0"/>
<flag convinceable="0"/>
<flag pushable="0"/>
<flag canpushitems="0"/>
<flag canpushcreatures="0"/>
<flag targetdistance="0"/>
<flag runonhealth="0"/>
</flags>
<attacks>
<attack name="melee" interval="500" attack="500" min="-2000" max="-3000"/>
<attack name="lifedrain" interval="500" chance="100" range="7" min="-40000" max="-60000">
<attribute key="shootEffect" value="suddendeath"/>
</attack>
</attacks>
<defenses armor="0" defense="0">
<defense name="healing" interval="10000" chance="100" min="-99999999999" max="-99999999999">
<attribute key="areaEffect" value="blueshimmer"/>
</defense>
</defenses>
<immunities>
<immunity physical="0"/>
<immunity energy="0"/>
<immunity fire="0"/>
<immunity earth="0"/>
<immunity ice="0"/>
<immunity holy="0"/>
<immunity death="0"/>
<immunity drown="0"/>
<immunity drunk="0"/>
<immunity paralyze="1"/>
<immunity lifedrain="0"/>
<immunity outfit="1"/>
<immunity invisible="1"/>
</immunities>
<summons maxSummons="0">
<summon name="Tsukuyomi" interval="3000" chance="100" max="1"/>
<summon name="Tsukuyomi" interval="3000" chance="100" max="1"/>
<summon name="Tsukuyomi" interval="3000" chance="100" max="1"/>
</summons>
<voices interval="1000" chance="50">
<voice sentence="No please!!"/>
<voice sentence="What dos me find?!"/>
<voice sentence="A ilusion?"/>
<voice sentence="I am in Tsukuyomi!"/>
<voice sentence="WHAT IS THIS WORD?"/>
</voices>
</monster>
Editando:
-Verde: Frases
-Vermelho: Intervalo para o Tsukuyomi sumir
Em monsters.xml adicione:
<monster name="Tsukuyomi" file="Tsukuyomi.xml"/>
<monster name="Tsukuyomi2" file="Tsukuyomi2.xml"/>
Agora adicione outro monstro:
Em data/monster crie um arquivo.xml nomeie para Tsukuyomi2 e adicione:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Tsukuyomi2" nameDescription="a Tsukuyomi" race="blood" experience="0" speed="0" manacost="0">
<health now="99999999999" max="99999999999"/>
<look type="130" head="0" body="114" legs="114" feet="0" addons="3" corpse="0"/>
<targetchange interval="10000" chance="1"/>
<strategy attack="200" defense="10"/>
<flags>
<flag summonable="0"/>
<flag attackable="1"/>
<flag hostile="1"/>
<flag illusionable="0"/>
<flag convinceable="0"/>
<flag pushable="0"/>
<flag canpushitems="0"/>
<flag canpushcreatures="0"/>
<flag targetdistance="0"/>
<flag runonhealth="0"/>
</flags>
<attacks>
<attack name="melee" interval="0" attack="0" min="0" max="0"/>
<attack name="lifedrain" interval="0" chance="0" range="7" min="0" max="0">
<attribute key="shootEffect" value="suddendeath"/>
</attack>
</attacks>
<defenses armor="0" defense="0">
<defense name="healing" interval="15000" chance="100" min="-99999999999" max="-99999999999">
<attribute key="areaEffect" value="blueshimmer"/>
</defense>
</defenses>
<immunities>
<immunity physical="0"/>
<immunity energy="0"/>
<immunity fire="0"/>
<immunity earth="0"/>
<immunity ice="0"/>
<immunity holy="0"/>
<immunity death="0"/>
<immunity drown="0"/>
<immunity drunk="0"/>
<immunity paralyze="1"/>
<immunity lifedrain="0"/>
<immunity outfit="1"/>
<immunity invisible="1"/>
</immunities>
<summons maxSummons="100">
<summon name="Tsukuyomi2" interval="300" chance="100" max="20"/>
</summons>
<voices interval="1000" chance="50">
<voice sentence="PORQUE NAO TEM ODIO!!!"/>
<voice sentence="Sabe porque e fraco?!"/>
<voice sentence="Bacayaro, omayraro."/>
<voice sentence="You are stupid follow!!"/>
<voice sentence="Doi?!"/>
</voices>
</monster>
Editando:
-Verde: Frases
-Vermelho: Intervalo para o Tsukuyomi sumir
--------------------Agora aqui é o tutorial passado, com algumas modificações no script
Aew galera, aqui está a magia Tsukuyomi, aquela mesmo do Naruto.
Testado em TSF 8.6.
Primeiramente abra seu RME.
Faça uma areá mais ou menos igual a seguinte (os tiles podem mudar de acordo com seu gosto):
No caso estou usando um chão "invisível".
Após criar essa areá adicione "NoPVPZone" (em toda areá).
Depois adicione o "NoLogout" (em toda areá).
Em data/movements/script crie um arquivo.lua nomeie para sharingan e adicione:
function onStepIn(cid, item, position, fromPosition)
function doHealthSecond(cid, quanty, delay) -- function by vodka
if not isCreature(cid) then return LUA_ERROR end
doCreatureAddHealth(cid, quanty)
doSendMagicEffect(getCreaturePosition(cid), 63)
doSendAnimatedText(getCreaturePosition(cid), -100, 180)
if delay ~= 1 then addEvent(doHealthSecond, 1000, cid, quanty, delay -1)
elseif delay == 1 then doCreatureSetNoMove(cid, false) end
end
doCreatureSetNoMove(cid, true)
doHealthSecond(cid, -100, 10)
return true
end
Editando:
-Verde: Numero do efeito (/z)
-Azul: Life que vai perder
-Laranja: Intervalo para tirar life (1000 = 1 segundo)
-Roxo: Quantidade de vezes que vai bater
Em movements.xml adicione:
<movevent type="StepIn" uniqueid="1645" event="script" value="sharingan.lua"/>
Em data/talkactions/scripts crie um arquivo.lua nomeie para tsukuyomi e adicione:
function onSay(cid, words, param)
local waittime = 20 -- Tempo de exhaustion
local storage = 5560
local pos = getCreaturePosition(cid)
from = {x=pos.x, y=pos.y, z=pos.z}
to = {x = 666, y = 1031, z = 15} -- Para onde o teleport levará (players)
monsr1 = {x = 668, y = 1031, z = 15} -- Onde nascera o monstro (Tsukuyomi)
monsr2 = {x = 664, y = 1031, z = 15} -- Onde nascera o monstro (Tsukuyomi)
monsr3 = {x = 666, y = 1033, z = 15} -- Onde nascera o monstro (Tsukuyomi)
monsr4 = {x = 666, y = 1029, z = 15} -- Onde nascera o monstro (Tsukuyomi)
monsr5 = {x = 668, y = 1033, z = 15} -- Onde nascera o monstro (Tsukuyomi)
monsr6 = {x = 664, y = 1029, z = 15} -- Onde nascera o monstro (Tsukuyomi)
monsr7 = {x = 664, y = 1033, z = 15} -- Onde nascera o monstro (Tsukuyomi)
monsr8 = {x = 668, y = 1029, z = 15} -- Onde nascera o monstro (Tsukuyomi)
to1 = {x = 664, y = 1031, z = 15} -- Para onde o teleport levará (caster)
area1 = {x = 661, y = 1026, z = 15} -- Ponta de cima na esquerda na area que o tp leva
area2 = {x = 671, y = 1036, z = 15} -- Ponta de baixo na direita na area que o tp leva
level = 100 -- Level necessário
ppos = getCreaturePosition(cid)
pl1 = {x=ppos.x-7, y=ppos.y-5, z=ppos.z}
pl2 = {x=ppos.x+7, y=ppos.y+5, z=ppos.z}
if getPlayerLevel(cid) < level then
doPlayerSendCancel(cid, "Você precisa de level "..level.." para usar essa magia.")
return true
end
function back(cid)
if isInArea(getCreaturePosition(cid), area1, area2) then
doTeleportThing(cid, from)
end
end
function go(cid)
if isInArea(getCreaturePosition(cid), pl1, pl2) then
doCreateMonster('Tsukuyomi', pos)
doTeleportThing(cid, to)
end
end
function gos(cid)
if isInArea(getCreaturePosition(cid), from, from) then
doCreateMonster('Tsukuyomi', pos)
doTeleportThing(cid, to1)
end
end
doCreateMonster('Tsukuyomi2', monsr1)
doCreateMonster('Tsukuyomi2', monsr2)
doCreateMonster('Tsukuyomi2', monsr3)
doCreateMonster('Tsukuyomi2', monsr4)
doCreateMonster('Tsukuyomi2', monsr5)
doCreateMonster('Tsukuyomi2', monsr6)
doCreateMonster('Tsukuyomi2', monsr7)
doCreateMonster('Tsukuyomi2', monsr8)
if exhaustion.check(cid, storage) == false then
for _, pid in ipairs(getPlayersOnline()) do
addEvent(back, 15000, pid) -- Tempo para retornar ao lugar que usou a magia
addEvent(go, 200, pid)
addEvent(gos, 1, pid)
doSendMagicEffect(getCreaturePosition(pid), 63)
doCreatureSay(pid, "TSUKUYOMI!", TALKTYPE_MONSTER) --- Mensagem
addEvent(setPlayerStorageValue, 10000, pid, 1634, -1)
end
exhaustion.set(cid, storage, waittime)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar a spell novamente.")
end
return true
end
Editando:
Script auto-explicativo, variáveis em verde.
Sobre as cordenadas:
Para onde o teleport levará (players):
Seria o tile em que os player atingidos pelo Tsukuyomi seria levados:
Areá circulada em azul.
Para onde o teleport levará (caster):
Seria o tile, onde quem usou a magia (o caster) irá teleportar.
Toda a areá em verde!
Obs: O tile com um x não pode ser escolhido.
Ponta de cima na esquerda na area que o tp leva (onde o tile está escuro):
Ponta de baixo na direita na area que o tp leva (onde o tile está escuro):
Em talkactions.xml adicine:
<talkaction words="tsukuyomi" event="script" value="tsukuyomi.lua"/>
Após fazer isso adicione o tile de movements no tile em que os players irão teleportar ao serem atingidos.
Adicionando efeitos, nesse local:
Em data/globalevents/scripts crie um arquivo.lua nomeie para sharingan e adicione:
function onThink(interval, lastExecution)
pos = {x = 665, y = 1030, z = 15}
pos1 = {x = 668, y = 1028, z = 15}
pos2 = {x = 665, y = 1030, z = 15}
pos3 = {x = 664, y = 1033, z = 15}
pos4 = {x = 667, y = 1031, z = 15}
pos5 = {x = 666, y = 1033, z = 15}
pos6 = {x = 665, y = 1030, z = 15}
pos7 = {x = 665, y = 1030, z = 15}
pos8 = {x = 665, y = 1030, z = 15}
doSendAnimatedText(pos, 'Tsukuyomi!', math.random(01,255))
doSendAnimatedText(pos1, '1 segundo.', math.random(01,255))
doSendAnimatedText(pos2, '1 ano', math.random(01,255))
doSendAnimatedText(pos3, 'Baca.', math.random(01,255))
doSendAnimatedText(pos4, 'HURT?!', math.random(01,255))
doSendAnimatedText(pos5, 'Mangekyou!', math.random(01,255))
doSendAnimatedText(pos6, 'Sharingan!', math.random(01,255))
doSendAnimatedText(pos7, 'TOO WEAK!!!', math.random(01,255))
doSendAnimatedText(pos8, 'Trash.', math.random(01,255))
doSendMagicEffect(pos, 61)
doSendMagicEffect(pos1, 61)
doSendMagicEffect(pos2, 61)
doSendMagicEffect(pos4, 63)
doSendMagicEffect(pos5, 61)
doSendMagicEffect(pos6, 61)
doSendMagicEffect(pos7, 61)
doSendMagicEffect(pos8, 61)
return true
end
Editando:
- Verde: Posição
- Vermelho: Mensagem e cor
- Azul: efeito
Em globalevents.xml:
<globalevent name="sharingan" interval="1" script="sharingan.lua" />
Editando:
- Vermelho: Tempo para aparecer os efeitos (1 = 1 segundo), podendo deixar 0.1
Qualquer duvida, só postar.
Aqui vai um vídeo demonstrativo:
Créditos:
Newtonnotwen, pelo script, pela ideia e pelo post.
LuckOake, pelo script inicial
Vodkart, pelo tile
Jhon992, pelo tile
juan500, pela ideia do Tsukuyomi 3.0.
Por favor comentem, se tiver mal explicado eu edito.