CO
script

Tp monster

Por cocazul, 09 de dez. de 2013 em NPCs, monsters e raids

tp monster
otserv
tibia
5
2k
cocazulC
09 de dezembro de 2013 às 17:52
  • Ola to Trazendo um Script Para Algumas pessoas que Estão querendo Fazer Quest e não sabem Muito De Scripts .

  • Esse script quando voce mata Um bixo Um teleport nasce.

  1. creaturescripts/script/Criei um arquivo lua com o nome tpmonster.

  1. Cole isso dentro do Arquivo tpmonster.

Alexclusive, em 10 Dez 2013 - 02:13, disse:snapback.png

local config = {
message = "Congrulations. Teleport close in 1 minute", -- mensagem quando você mata o boss
timeToRemove = 60, -- seconds -- tempo Que o teleport sera removido 1 min
teleportId = 1387, -- Id do Teleport usado.
bosses = {
["Magician"] = { x = 1521, y = 1149, z = 7 }, -- Posição onde o teleport Levara o player
}
}
local function removal(position)
doRemoveThing(getTileItemById(position, config.teleportId).uid, 1)
return TRUE
end
function onDeath(cid, corpse, killer)
registerCreatureEvent(cid, "teleportmonster")
local position = getCreaturePosition(cid)
for name, pos in pairs(config.bosses) do
if name == getCreatureName(cid) then
teleport = doCreateTeleport(config.teleportId, pos, position)
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
addEvent(removal, config.timeToRemove * 1000, position)
doSendMagicEffect(position,10)
end
end
return TRUE
end

 

 

 

Agora vai em Creaturescripts.xml

E cole Esta parte = <event type="death" name="teleportmonster" script="tpmonster.lua"/>

Alexclusive, em 10 Dez 2013 - 02:13, disse:snapback.png

 

 

  • Agora va ate creaturescripts.xml. e cole Isso. ===> <event type="death" name="teleportmonster" script="tpmonster.lua"/>

 

Agora vamo para outra parte configurando no monster.
Va na pasta monster data/monster/demon bosses
Abra seu Magician.xml.
e delete tudo o que esta dentro e cole isto.

Alexclusive, em 10 Dez 2013 - 02:13, disse:snapback.png

<?xml version="1.0" encoding="UTF-8"?>
<monster name="Magician" nameDescription="a magician" race="blood" experience="15000" speed="330" manacost="0">
<health now="200000" max="200000"/>
<look type="133" head="39" body="0" legs="19" feet="20" addons="3" corpse="3058"/>
<targetchange interval="5000" chance="8"/>
<strategy attack="100" defense="0"/>
<flags>
<flag summonable="0"/>
<flag attackable="1"/>
<flag hostile="1"/>
<flag illusionable="0"/>
<flag convinceable="0"/>
<flag pushable="0"/>
<flag canpushitems="1"/>
<flag canpushcreatures="0"/>
<flag targetdistance="4"/>
<flag staticattack="90"/>
<flag runonhealth="0"/>
</flags>
<attacks>
<attack name="melee" interval="2000" skill="105" attack="120"/>
<attack name="energy" interval="1000" chance="20" range="7" min="-1200" max="-3205">
<attribute key="shootEffect" value="energy"/>
</attack>
<attack name="fire" interval="1000" chance="15" range="7" min="-1500" max="-3100">
<attribute key="shootEffect" value="fire"/>
</attack>
</attacks>
<defenses armor="20" defense="20">
<defense name="healing" interval="1000" chance="13" min="35" max="75">
<attribute key="areaEffect" value="blueshimmer"/>
</defense>
<defense name="speed" interval="1000" chance="10" speedchange="900" duration="2000">
<attribute key="areaEffect" value="redshimmer"/>
</defense>
</defenses>
<elements>
<element deathPercent="-10"/>
<element firePercent="10"/>
<element earthPercent="20"/>
<element energyPercent="20"/>
<element icePercent="10"/>
<element holyPercent="20"/>
</elements>
<immunities>
<immunity invisible="1"/>
</immunities>
<voices interval="5000" chance="10">
<voice sentence="Feel the power of my runes!"/>
<voice sentence="Killing you is getting expensive"/>
<voice sentence="My secrets are mine alone!"/>
</voices>
<loot>
<item id="2148" countmax="60" chance1="100000" chancemax="0"/> --gps
<item id="7620" chance="3200"/> --mana potion
<item id="1987" chance="100000">
<inside>
<item id="5934" chance="50000"/> --dead frog
<item id="2260" chance="30000"/> --blank rune
<item id="2260" chance="20000"/> --blank rune
<item id="2260" chance="20000"/> --blank rune
<item id="7762" chance="600"/> --enchanted amethyst
</inside>
</item>
</loot>
<script>
<event name="teleportmonster"/> <<<<<<<<<<<<<<<<<<< como pode ver isso e na Parte do Creaturescript.xml
</script>
</monster>

 

então Para n buga teu ot Use com um monster que você só usara ele para Quest.
=======================================================================================================================================
Então +rep Se gosta de conseguir Se não conseguir Manda pm ou Poste suas duvidas Obg

 

aI MNW ARRUMEI

Editado Dezembro 15 por cocazul

vital900V
09 de dezembro de 2013 às 18:14

Organize o tópico.

AlexclusiveA
10 de dezembro de 2013 às 02:13

Dicas para um bom tutorial...

  • Organização, crie um tópico bem organizado.
  • Use imagens, o leitor agradece!
  • Procure organizar com negrito os títulos e sub-títulos
  • Peça a um amigo para ler e pergunte ... o que você entendeu?
  • Use listas ao invés de um pergaminho de texto!
  • Quer ser o pikadasgalaxias em tutoriais? Leia o artigo Aprenda a criar um bom tutorial!

    Voce tem 7 dias para melhorar a formatação de seu tópico.
    Só assim os próximos e esse serão aprovado.
cocazulC
10 de dezembro de 2013 às 17:47

Ola to Trazendo um Script Para Algumas pessoas que Estão querendo Fazer Quest e não sabem Muito De Scripts .

 

Esse script quando voce mata Um bixo Um teleport nasce.

 

 

 

creaturescripts/script/Criei um arquivo lua com o nome tpmonster.

 

 

Cole isso dentro do Arquivo tpmonster.

 

 

 

local config = {
message = "Congrulations. Teleport close in 1 minute", -- mensagem quando você mata o boss
timeToRemove = 60, -- seconds -- tempo Que o teleport sera removido 1 min
teleportId = 1387, -- Id do Teleport usado.
bosses = {
["Magician"] = { x = 1521, y = 1149, z = 7 }, -- Posição onde o teleport Levara o player
}
}
local function removal(position)
doRemoveThing(getTileItemById(position, config.teleportId).uid, 1)
return TRUE
end
function onDeath(cid, corpse, killer)
registerCreatureEvent(cid, "teleportmonster")
local position = getCreaturePosition(cid)
for name, pos in pairs(config.bosses) do
if name == getCreatureName(cid) then
teleport = doCreateTeleport(config.teleportId, pos, position)
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
addEvent(removal, config.timeToRemove * 1000, position)
doSendMagicEffect(position,10)
end
end
return TRUE
end

 

 

 

 

 

Agora vai em Creaturescripts.xml

E cole Esta parte = <event type="death" name="teleportmonster" script="tpmonster.lua"/>

 

 

 

  • Agora va ate creaturescripts.xml. e cole Isso. ===> <event type="death" name="teleportmonster" script="tpmonster.lua"/>

 

 

Agora vamo para outra parte configurando no monster.
Va na pasta monster data/monster/demon bosses
Abra seu Magician.xml.
e delete tudo o que esta dentro e cole isto.

 

<?xml version="1.0" encoding="UTF-8"?>
<monster name="Magician" nameDescription="a magician" race="blood" experience="15000" speed="330" manacost="0">
<health now="200000" max="200000"/>
<look type="133" head="39" body="0" legs="19" feet="20" addons="3" corpse="3058"/>
<targetchange interval="5000" chance="8"/>
<strategy attack="100" defense="0"/>
<flags>
<flag summonable="0"/>
<flag attackable="1"/>
<flag hostile="1"/>
<flag illusionable="0"/>
<flag convinceable="0"/>
<flag pushable="0"/>
<flag canpushitems="1"/>
<flag canpushcreatures="0"/>
<flag targetdistance="4"/>
<flag staticattack="90"/>
<flag runonhealth="0"/>
</flags>
<attacks>
<attack name="melee" interval="2000" skill="105" attack="120"/>
<attack name="energy" interval="1000" chance="20" range="7" min="-1200" max="-3205">
<attribute key="shootEffect" value="energy"/>
</attack>
<attack name="fire" interval="1000" chance="15" range="7" min="-1500" max="-3100">
<attribute key="shootEffect" value="fire"/>
</attack>
</attacks>
<defenses armor="20" defense="20">
<defense name="healing" interval="1000" chance="13" min="35" max="75">
<attribute key="areaEffect" value="blueshimmer"/>
</defense>
<defense name="speed" interval="1000" chance="10" speedchange="900" duration="2000">
<attribute key="areaEffect" value="redshimmer"/>
</defense>
</defenses>
<elements>
<element deathPercent="-10"/>
<element firePercent="10"/>
<element earthPercent="20"/>
<element energyPercent="20"/>
<element icePercent="10"/>
<element holyPercent="20"/>
</elements>
<immunities>
<immunity invisible="1"/>
</immunities>
<voices interval="5000" chance="10">
<voice sentence="Feel the power of my runes!"/>
<voice sentence="Killing you is getting expensive"/>
<voice sentence="My secrets are mine alone!"/>
</voices>
<loot>
<item id="2148" countmax="60" chance1="100000" chancemax="0"/> --gps
<item id="7620" chance="3200"/> --mana potion
<item id="1987" chance="100000">
<inside>
<item id="5934" chance="50000"/> --dead frog
<item id="2260" chance="30000"/> --blank rune
<item id="2260" chance="20000"/> --blank rune
<item id="2260" chance="20000"/> --blank rune
<item id="7762" chance="600"/> --enchanted amethyst
</inside>
</item>
</loot>
<script>
<event name="teleportmonster"/> <<<<<<<<<<<<<<<<<<< como pode ver isso e na Parte do Creaturescript.xml
</script>
</monster>

 

 

então Para n buga teu ot Use com um monster que você só usara ele para Quest.
=======================================================================================================================================
Então +rep Se gosta de conseguir Se não conseguir Manda pm ou Poste suas duvidas Obg

aI MNW ARRUMEI

Editado Dezembro 15 por cocazul

3 semanas depois...
vital900V
26 de dezembro de 2013 às 07:35

Local incorreto, movido!