Dota Event
dota event
va em data/actions/scripts e crie um arquivo chama start_dota.lua apague tudo o que esta dentro e adicione isso
function onUse(cid, item, fromPosition, itemEx, toPosition)
gatepos = {x=685, y=42, z=7, stackpos=1} -- Posição da Parede 1
getgate = getThingfromPos(gatepos)
gatepos2 = {x=601, y=42, z=7, stackpos=1} -- Posição da Parede 2
getgate2 = getThingfromPos(gatepos2)
if item.uid == 5533 and item.itemid == 1945 and getgate.itemid == 1304 and getgate2.itemid == 1304 then
doRemoveItem(getgate.uid,1)
doRemoveItem(getgate2.uid,1)
doTransformItem(item.uid,1946)
elseif item.uid == 5533 and item.itemid == 1946 and getgate.itemid == 1304 and getgate2.itemid == 1304 then
doRemoveItem(getgate.uid,1)
doRemoveItem(getgate2.uid,1)
doTransformItem(item.uid,1945)
end
return 1
end
e depois vai em actions.xml e adicione essa tag
<action uniqueid="5533" script="start_dota.lua" />
Arrume a posiçao da parece 1 e 2 para onde voce quiser contanto que esteja dentro do evento dota
o arquivo world voce baixa nesse site:
http://www.sendspace.com/file/zdf3qf
Creditos:98%OtProject (nao sei se a mais a Huriwara que disse)
2%Alberess(Eu por te trazido ao TibiaKing
CREATURESCRIPT
vá em data/creaturescript/scripts copie um arquivo .lua e adicione os nomes citados abaixo
ga1.lua
function onDeath(cid, corpse, killer)
local M ={
["Gerador Azul I"] = {Pos = {x=613,y=42,z=7},id= 1353, Pos2 = {x=613,y=41,z=7},id2= 1353, Pos3 = {x=613,y=40,z=7},id3= 1353, Pos4 = {x=613,y=43,z=7},id4= 1353, Pos5 = {x=613,y=44,z=7},id5= 1353},
}
local mensage1 = "[Evento Dota] Gerador Azul I Foi Destruido!" -- Mensagem depois que o Gerador for Destruido
local monster1 = "Gerador Azul II" -- Boss que irá aparecer na invasão!
local x = M[getCreatureName(cid)]
if x then
local parede = getTileItemById(x.Pos, x.id)
local parede2 = getTileItemById(x.Pos2, x.id2)
local parede3 = getTileItemById(x.Pos3, x.id3)
local parede4 = getTileItemById(x.Pos4, x.id4)
local parede5 = getTileItemById(x.Pos5, x.id5)
if parede then
doRemoveItem(parede.uid, 1)
doRemoveItem(parede2.uid, 1)
doRemoveItem(parede3.uid, 1)
doRemoveItem(parede4.uid, 1)
doRemoveItem(parede5.uid, 1)
doSummonCreature(monster1, {x=619, y=41, z=7})
broadcastMessage(mensage1, MESSAGE_EVENT_ADVANCE)
end
end
return TRUE
end
ga2.lua
function onDeath(cid, corpse, killer)
local M ={
["Gerador Azul II"] = {Pos = {x=625,y=42,z=7},id= 1353, Pos2 = {x=625,y=41,z=7},id2= 1353, Pos3 = {x=625,y=40,z=7},id3= 1353, Pos4 = {x=625,y=43,z=7},id4= 1353, Pos5 = {x=625,y=44,z=7},id5= 1353},
}
local mensage1 = "[Evento Dota] Gerador Azul II Foi Destruido!" -- Mensagem depois que o Gerador for Destruido
local monster1 = "Gerador Azul III" -- Boss que irá aparecer na invasão!
local x = M[getCreatureName(cid)]
if x then
local parede = getTileItemById(x.Pos, x.id)
local parede2 = getTileItemById(x.Pos2, x.id2)
local parede3 = getTileItemById(x.Pos3, x.id3)
local parede4 = getTileItemById(x.Pos4, x.id4)
local parede5 = getTileItemById(x.Pos5, x.id5)
if parede then
doRemoveItem(parede.uid, 1)
doRemoveItem(parede2.uid, 1)
doRemoveItem(parede3.uid, 1)
doRemoveItem(parede4.uid, 1)
doRemoveItem(parede5.uid, 1)
doSummonCreature(monster1, {x=631, y=42, z=7})
broadcastMessage(mensage1, MESSAGE_EVENT_ADVANCE)
end
end
return TRUE
end
ga3.lua
function onDeath(cid, corpse, killer)
local M ={
["Gerador Azul III"] = {Pos = {x=638,y=43,z=7},id= 1353,Pos2 = {x=646,y=42,z=7},id2= 1354,Pos3 = {x=661,y=42,z=7},id3= 1354,Pos4 = {x=673,y=42,z=7},id4= 1354},
}
local mensage1 = "[Evento Dota] Gerador Azul III Foi Destruido! Time Azul foi o Vencedor desta Rodada do Evento Dota! Sala dos vencedores Liberada, Comemorem!" -- Mensagem depois que o Gerador for Destruido
local v3 = {x=655, y=42, z=7, stackpos=253} -- position v3
local v2 = {x=667, y=41, z=7, stackpos=253} -- position v2
local v1 = {x=679, y=42, z=7, stackpos=253} -- position v1
local x = M[getCreatureName(cid)]
if x then
local parede = getTileItemById(x.Pos, x.id)
local parede2 = getTileItemById(x.Pos2, x.id2)
local parede3 = getTileItemById(x.Pos3, x.id3)
local parede4 = getTileItemById(x.Pos4, x.id4)
if parede then
doRemoveItem(parede.uid, 1)
doRemoveItem(parede2.uid, 1)
doRemoveItem(parede3.uid, 1)
doRemoveItem(parede4.uid, 1)
doRemoveCreature(getThingfromPos(v3).uid)
doRemoveCreature(getThingfromPos(v2).uid)
doRemoveCreature(getThingfromPos(v1).uid)
broadcastMessage(mensage1, MESSAGE_EVENT_ADVANCE)
end
end
return TRUE
end
gv1.lua
function onDeath(cid, corpse, killer)
local M ={
["Gerador Vermelho I"] = {Pos = {x=673,y=42,z=7},id= 1354, Pos2 = {x=673,y=41,z=7},id2= 1354, Pos3 = {x=673,y=40,z=7},id3= 1354, Pos4 = {x=673,y=43,z=7},id4= 1354, Pos5 = {x=673,y=44,z=7},id5= 1354},
}
local mensage1 = "[Evento Dota] Gerador Vermelho I Foi Destruido!" -- Mensagem depois que o Gerador for Destruido
local monster1 = "Gerador Vermelho II" -- Boss que irá aparecer na invasão!
local x = M[getCreatureName(cid)]
if x then
local parede = getTileItemById(x.Pos, x.id)
local parede2 = getTileItemById(x.Pos2, x.id2)
local parede3 = getTileItemById(x.Pos3, x.id3)
local parede4 = getTileItemById(x.Pos4, x.id4)
local parede5 = getTileItemById(x.Pos5, x.id5)
if parede then
doRemoveItem(parede.uid, 1)
doRemoveItem(parede2.uid, 1)
doRemoveItem(parede3.uid, 1)
doRemoveItem(parede4.uid, 1)
doRemoveItem(parede5.uid, 1)
doSummonCreature(monster1, {x=667, y=41, z=7})
broadcastMessage(mensage1, MESSAGE_EVENT_ADVANCE)
end
end
return TRUE
end
gv2.lua
function onDeath(cid, corpse, killer)
local M ={
["Gerador Vermelho II"] = {Pos = {x=661,y=42,z=7},id= 1354, Pos2 = {x=661,y=41,z=7},id2= 1354, Pos3 = {x=661,y=40,z=7},id3= 1354, Pos4 = {x=661,y=43,z=7},id4= 1354, Pos5 = {x=661,y=44,z=7},id5= 1354},
}
local mensage1 = "[Evento Dota] Gerador Vermelho II Foi Destruido!" -- Mensagem depois que o Gerador for Destruido
local monster1 = "Gerador Vermelho III" -- Boss que irá aparecer na invasão!
local x = M[getCreatureName(cid)]
if x then
local parede = getTileItemById(x.Pos, x.id)
local parede2 = getTileItemById(x.Pos2, x.id2)
local parede3 = getTileItemById(x.Pos3, x.id3)
local parede4 = getTileItemById(x.Pos4, x.id4)
local parede5 = getTileItemById(x.Pos5, x.id5)
if parede then
doRemoveItem(parede.uid, 1)
doRemoveItem(parede2.uid, 1)
doRemoveItem(parede3.uid, 1)
doRemoveItem(parede4.uid, 1)
doRemoveItem(parede5.uid, 1)
doSummonCreature(monster1, {x=655, y=42, z=7})
broadcastMessage(mensage1, MESSAGE_EVENT_ADVANCE)
end
end
return TRUE
end
gv3.lua
function onDeath(cid, corpse, killer)
local M ={
["Gerador Vermelho III"] = {Pos = {x=648,y=40,z=7},id= 1354,Pos2 = {x=640,y=42,z=7},id2= 1353,Pos3 = {x=625,y=42,z=7},id3= 1353,Pos4 = {x=613,y=42,z=7},id4= 1353},
}
local mensage1 = "[Evento Dota] Gerador Vermelho III Foi Destruido! Time Vermelho foi o Vencedor desta Rodada do Evento Dota! Sala dos vencedores Liberada, Comemorem!" -- Mensagem depois que o Gerador for Destruido
local a3 = {x=631, y=42, z=7, stackpos=253} -- position a3
local a2 = {x=619, y=41, z=7, stackpos=253} -- position a2
local a1 = {x=607, y=42, z=7, stackpos=253} -- position a1
local x = M[getCreatureName(cid)]
if x then
local parede = getTileItemById(x.Pos, x.id)
local parede2 = getTileItemById(x.Pos2, x.id2)
local parede3 = getTileItemById(x.Pos3, x.id3)
local parede4 = getTileItemById(x.Pos4, x.id4)
if parede then
doRemoveItem(parede.uid, 1)
doRemoveItem(parede2.uid, 1)
doRemoveItem(parede3.uid, 1)
doRemoveItem(parede4.uid, 1)
doRemoveCreature(getThingfromPos(a3).uid)
doRemoveCreature(getThingfromPos(a2).uid)
doRemoveCreature(getThingfromPos(a1).uid)
broadcastMessage(mensage1, MESSAGE_EVENT_ADVANCE)
end
end
return TRUE
end
arrume as position de acordo com o seu mapa e onde esta o dota event no mapa adicione as tags no creaturescript.xml
<event type="death" name="ga1" event="script" value="ga1.lua"/>
<event type="death" name="ga2" event="script" value="ga2.lua"/>
<event type="death" name="ga3" event="script" value="ga3.lua"/>
<event type="death" name="gv1" event="script" value="gv1.lua"/>
<event type="death" name="gv2" event="script" value="gv2.lua"/>
<event type="death" name="gv3" event="script" value="gv3.lua"/>
MONSTER
vá em data/monster e adicione os seguintes monstros e os nomes certos Guarda.xml
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Guarda" nameDescription="a Guarda" race="blood" experience="120000" speed="268" manacost="0">
<health now="20000" max="20000"/>
<look type="73" head="20" body="30" legs="40" feet="50" corpse="6080"/>
<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="1"/>
<flag targetdistance="1"/>
<flag staticattack="90"/>
<flag runonhealth="0"/>
</flags>
<attacks>
<attack name="melee" interval="2000" skill="80" attack="75"/>
<attack name="physical" interval="2000" chance="20" range="7" min="-200" max="-420">
<attribute key="shootEffect" value="arrow"/>
</attack>
</attacks>
<defenses armor="30" defense="20">
<defense name="healing" interval="1000" chance="10" min="200" max="350">
<attribute key="areaEffect" value="blueshimmer"/>
</defense>
</defenses>
<elements>
<element firePercent="30"/>
<element physicalPercent="25"/>
<element holyPercent="25"/>
<element deathPercent="-20"/>
<element earthPercent="50"/>
<element energyPercent="25"/>
<element icePercent="15"/>
</elements>
<immunities>
<immunity paralyze="1"/>
<immunity invisible="1"/>
</immunities>
<voices interval="5000" chance="10">
<voice sentence="Let's have a fight!"/>
<voice sentence="Welcome to my battleground."/>
<voice sentence="Have you seen princess Lumelia?"/>
<voice sentence="I will sing a tune at your grave."/>
</voices>
<loot>
<item id="2491" chance="1200"/>
<item id="2148" countmax="100" chance1="100000" chancemax="0"/>
<item id="2120" chance="20000"/>
<item id="1949" chance="10000"/>
<item id="2456" chance="10000"/>
<item id="2661" chance="12000"/>
<item id="2681" chance="10000"/>
<item id="2121" chance="6666"/>
<item id="2666" countmax="3" chance1="20000" chancemax="0"/>
<item id="5911" countmax="1" chance1="5000" chancemax="0"/>
<item id="1987" chance="100000">
<inside>
<item id="2377" chance="1500"/>
<item id="2487" chance="600"/> --crow armor
<item id="2392" chance="700"/>
<item id="2519" chance="900"/>
<item id="2488" chance="800"/>
<item id="2071" chance="10000"/>
<item id="2544" countmax="13" chance1="20000" chancemax="0"/>
<item id="2652" chance="10000"/>
<item id="2164" chance="1000"/>
<item id="7364" countmax="8" chance="2000"/>
<item id="2391" chance="1333"/>
<item id="2744" chance="20000"/>
</inside>
</item>
</loot>
</monster>
Monstro.xml
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Monstro Do Castelo" nameDescription="a monster" race="blood" experience="1200900" speed="268" manacost="0">
<health now="200000" max="200000"/>
<look type="12" head="58" body="115" legs="58" feet="115" corpse="6080"/>
<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="1"/>
<flag targetdistance="1"/>
<flag staticattack="90"/>
<flag runonhealth="0"/>
</flags>
<attacks>
<attack name="melee" interval="2000" skill="80" attack="75"/>
<attack name="physical" interval="2000" chance="20" range="7" min="-700" max="-1020">
<attribute key="shootEffect" value="arrow"/>
</attack>
</attacks>
<defenses armor="30" defense="20">
<defense name="healing" interval="1000" chance="10" min="200" max="350">
<attribute key="areaEffect" value="blueshimmer"/>
</defense>
</defenses>
<elements>
<element physicalPercent="25"/>
<immunities>
<immunity paralyze="1"/>
<immunity invisible="1"/>
</immunities>
<voices interval="5000" chance="10">
<voice sentence="Leavee!"/>
<voice sentence="Welcome to hell."/>
<voice sentence="Not can Kill-me"/>
</voices>
<loot>
<item id="2128" chance="1200"/>
</loot>
</monster>
Portao.xml
<?xml version="1.0" encoding="UTF-8"?>
<monster name="portao" nameDescription="o portao" race="undead" experience="12000" speed="0" manacost="0">
<health now="150000" max="150000"/>
<look typeex="9485" corpse="2256"/>
<targetchange interval="5000" chance="0"/>
<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="0"/>
<flag canpushcreatures="0"/>
<flag targetdistance="1"/>
<flag staticattack="90"/>
<flag runonhealth="100"/>
</flags>
<attacks>
<attack name="fire" interval="200000" chance="100" range="1" min="-10" max="-20">
<attribute key="shootEffect" value="fire"/>
</attack>
</attacks>
<defenses armor="1" defense="1"/>
<immunities>
<immunity invisible="1"/>
</immunities>
<loot>
<item id="2148" countmax="20" chance1="100000" chancemax="0"/>
</loot>
</monster>
Gerador Azul I.xml
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Gerador Azul I" nameDescription="a Gerador Azul I" race="undead" experience="10000000" speed="0" manacost="0">
<health now="1000000" max="1000000"/>
<look typeex="9785" />
<targetchange interval="5000" chance="0"/>
<strategy attack="100" defense="0"/>
<script>
<event name="ga1"/>
</script>
<flags>
<flag summonable="0"/>
<flag attackable="1"/>
<flag hostile="1"/>
<flag illusionable="0"/>
<flag convinceable="0"/>
<flag pushable="0"/>
<flag canpushitems="0"/>
<flag canpushcreatures="1"/>
<flag targetdistance="1"/>
<flag staticattack="90"/>
<flag runonhealth="100"/>
</flags>
<attacks>
<attack name="energy" interval="2000" chance="100" radius="10" target="0" min="-999" max="-1000">
<attribute key="areaEffect" value="energy"/>
</attack>
</attacks>
<defenses armor="1" defense="1"/>
<immunities>
<immunity poison="1"/>
<immunity lifedrain="1"/>
<immunity paralyze="1"/>
<immunity outfit="1"/>
<immunity drunk="1"/>
<immunity invisible="1"/>
</immunities>
</monster>
Gerador Azul II.xml
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Gerador Azul II" nameDescription="a Gerador Azul II" race="undead" experience="15000000" speed="0" manacost="0">
<health now="1500000" max="1500000"/>
<look typeex="9785" />
<targetchange interval="5000" chance="0"/>
<strategy attack="100" defense="0"/>
<script>
<event name="ga2"/>
</script>
<flags>
<flag summonable="0"/>
<flag attackable="1"/>
<flag hostile="1"/>
<flag illusionable="0"/>
<flag convinceable="0"/>
<flag pushable="0"/>
<flag canpushitems="0"/>
<flag canpushcreatures="1"/>
<flag targetdistance="1"/>
<flag staticattack="90"/>
<flag runonhealth="100"/>
</flags>
<attacks>
<attack name="energy" interval="2000" chance="100" radius="10" target="0" min="-999" max="-1000">
<attribute key="areaEffect" value="energy"/>
</attack>
</attacks>
<defenses armor="1" defense="1"/>
<immunities>
<immunity poison="1"/>
<immunity lifedrain="1"/>
<immunity paralyze="1"/>
<immunity outfit="1"/>
<immunity drunk="1"/>
<immunity invisible="1"/>
</immunities>
</monster>
Gerador Azul III.xml
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Gerador Azul III" nameDescription="a Gerador Azul III" race="undead" experience="20000000" speed="0" manacost="0">
<health now="2000000" max="2000000"/>
<look typeex="9790" />
<targetchange interval="5000" chance="0"/>
<strategy attack="100" defense="0"/>
<script>
<event name="ga3"/>
</script>
<flags>
<flag summonable="0"/>
<flag attackable="1"/>
<flag hostile="1"/>
<flag illusionable="0"/>
<flag convinceable="0"/>
<flag pushable="0"/>
<flag canpushitems="0"/>
<flag canpushcreatures="1"/>
<flag targetdistance="1"/>
<flag staticattack="90"/>
<flag runonhealth="100"/>
</flags>
<attacks>
<attack name="energy" interval="2000" chance="100" radius="10" target="0" min="-999" max="-1000">
<attribute key="areaEffect" value="energy"/>
</attack>
</attacks>
<defenses armor="1" defense="1"/>
<immunities>
<immunity poison="1"/>
<immunity lifedrain="1"/>
<immunity paralyze="1"/>
<immunity outfit="1"/>
<immunity drunk="1"/>
<immunity invisible="1"/>
</immunities>
</monster>
Gerador Vermelho I.xml
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Gerador Vermelho I" nameDescription="a Gerador Vermelho I" race="undead" experience="10000000" speed="0" manacost="0">
<health now="1000000" max="1000000"/>
<look typeex="9784" />
<targetchange interval="5000" chance="0"/>
<strategy attack="100" defense="0"/>
<script>
<event name="gv1"/>
</script>
<flags>
<flag summonable="0"/>
<flag attackable="1"/>
<flag hostile="1"/>
<flag illusionable="0"/>
<flag convinceable="0"/>
<flag pushable="0"/>
<flag canpushitems="0"/>
<flag canpushcreatures="1"/>
<flag targetdistance="1"/>
<flag staticattack="90"/>
<flag runonhealth="100"/>
</flags>
<attacks>
<attack name="energy" interval="2000" chance="100" radius="10" target="0" min="-999" max="-1000">
<attribute key="areaEffect" value="energy"/>
</attack>
</attacks>
<defenses armor="1" defense="1"/>
<immunities>
<immunity poison="1"/>
<immunity lifedrain="1"/>
<immunity paralyze="1"/>
<immunity outfit="1"/>
<immunity drunk="1"/>
<immunity invisible="1"/>
</immunities>
</monster>
Gerador Vemelho II.xml
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Gerador Vermelho II" nameDescription="a Gerador Vermelho II" race="undead" experience="15000000" speed="0" manacost="0">
<health now="1500000" max="1500000"/>
<look typeex="9784" />
<targetchange interval="5000" chance="0"/>
<strategy attack="100" defense="0"/>
<script>
<event name="gv2"/>
</script>
<flags>
<flag summonable="0"/>
<flag attackable="1"/>
<flag hostile="1"/>
<flag illusionable="0"/>
<flag convinceable="0"/>
<flag pushable="0"/>
<flag canpushitems="0"/>
<flag canpushcreatures="1"/>
<flag targetdistance="1"/>
<flag staticattack="90"/>
<flag runonhealth="100"/>
</flags>
<attacks>
<attack name="energy" interval="2000" chance="100" radius="10" target="0" min="-999" max="-1000">
<attribute key="areaEffect" value="energy"/>
</attack>
</attacks>
<defenses armor="1" defense="1"/>
<immunities>
<immunity poison="1"/>
<immunity lifedrain="1"/>
<immunity paralyze="1"/>
<immunity outfit="1"/>
<immunity drunk="1"/>
<immunity invisible="1"/>
</immunities>
</monster>
Gerador Vermelho III.xml
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Gerador Vermelho III" nameDescription="a Gerador Vermelho III" race="undead" experience="20000000" speed="0" manacost="0">
<health now="2000000" max="2000000"/>
<look typeex="9788" />
<targetchange interval="5000" chance="0"/>
<strategy attack="100" defense="0"/>
<script>
<event name="gv3"/>
</script>
<flags>
<flag summonable="0"/>
<flag attackable="1"/>
<flag hostile="1"/>
<flag illusionable="0"/>
<flag convinceable="0"/>
<flag pushable="0"/>
<flag canpushitems="0"/>
<flag canpushcreatures="1"/>
<flag targetdistance="1"/>
<flag staticattack="90"/>
<flag runonhealth="100"/>
</flags>
<attacks>
<attack name="energy" interval="2000" chance="100" radius="10" target="0" min="-999" max="-1000">
<attribute key="areaEffect" value="energy"/>
</attack>
</attacks>
<defenses armor="1" defense="1"/>
<immunities>
<immunity poison="1"/>
<immunity lifedrain="1"/>
<immunity paralyze="1"/>
<immunity outfit="1"/>
<immunity drunk="1"/>
<immunity invisible="1"/>
</immunities>
</monster>
adicione as seguintes tags no monsters.xml
<monster name="Gerador Azul I" file="Dota/Gerador Azul I.xml"/>
<monster name="Gerador Azul II" file="Dota/Gerador Azul II.xml"/>
<monster name="Gerador Azul III" file="Dota/Gerador Azul III.xml"/>
<monster name="Gerador Vermelho I" file="Dota/Gerador Vermelho I.xml"/>
<monster name="Gerador Vermelho II" file="Dota/Gerador Vermelho II.xml"/>
<monster name="Gerador Vermelho III" file="Dota/Gerador Vermelho III.xml"/>
MOVEMENTS
vá em data/movements/script e crie arquivos .lua com os seguintes nomes abaixo blue.lua
function onStepIn(cid, item, frompos, item2, topos)
local outfit = {lookType = 128, lookHead = 88, lookBody = 114, lookLegs = 114, lookFeet = 88, lookAddons = 0}
if item.actionid == 5031 and isPlayer(cid) then
doCreatureChangeOutfit(cid, outfit)
doPlayerSetTown(cid, 7)
end
return true
end
dota.lua
function onStepIn(cid, item, pos, frompos)
local positions = {
{x=691, y=42, z=7},
{x=595, y=42, z=7}
}
local destino = math.random(#positions)
doTeleportThing(cid,positions[destino], true)
doSendMagicEffect(getPlayerPosition(cid), 10)
end
dota_templonormal.lua
function onStepIn(cid, item, frompos, item2, topos)
if doPlayerSetTown(cid, 1) then
end
return TRUE
end
dota_templonormalp.lua
local config = { rewards_id = {2494, 2472, 2514, 2493, 2470, 2195, 2173, 2160}, -- Rewards ID crystal_counts = 20, -- used only if on rewards_id you have crystal coins (ID: 2160). } function onStepIn(cid, item, frompos, item2, topos) local random_item = config.rewards_id[math.random(1, #config.rewards_id)] local item_name = getItemNameById(random_item) if doPlayerSetTown(cid, 1) then if(random_item == 2160) then doPlayerAddItem(cid, random_item, config.crystal_counts) doPlayerAddItem(cid, 10138, 1) doPlayerSendTextMessage(cid,25, 'Your team won the dota round! You winner: '.. config.crystal_counts ..' '.. item_name ..'s and dota winner medal!') else doPlayerSendTextMessage(cid,25, 'Your team won the dota round! You winner: '.. item_name ..' and dota winner medal!') doPlayerAddItem(cid, random_item, 1) doPlayerAddItem(cid, 10138, 1) end end return TRUE end
red.lua
function onStepIn(cid, item, frompos, item2, topos)
local outfit = {lookType = 128, lookHead = 94, lookBody = 114, lookLegs = 114, lookFeet = 94, lookAddons = 0}
if item.actionid == 5032 and isPlayer(cid) then
doCreatureChangeOutfit(cid, outfit)
doPlayerSetTown(cid, 8)
end
return true
end
e adicione as seguintes tags no movements.xml
<movevent type="StepIn" uniqueid="5036" event="script" value="dota_templonormalp.lua" />
<movevent type="StepIn" uniqueid="5035" event="script" value="dota_templonormal.lua" />
<movevent type="StepIn" uniqueid="5040" event="script" value="dota.lua" />
<movevent type="StepIn" uniqueid="5031" event="script" value="blue.lua" />
<movevent type="StepIn" uniqueid="5032" event="script" value="red.lua" />
TALKACTION
crie 2 arquivos lua e coloque os nome abaixo start_dota.lua
function onSay(cid, words, param, channel)
local mensage1 = "[Evento Dota] Evento Iniciado! Destruam as Torres! quem destruir as 3 Torres primeiro, Ganha!" -- Mensagem Inicial
local monster1 = "Gerador Azul I" -- Geradores Iniciais
local monster2 = "Gerador Vermelho I" -- Geradores Iniciais
gatepos = {x=685, y=42, z=7, stackpos=1} -- Posição da Pedras 1
getgate = getThingfromPos(gatepos)
gatepos11 = {x=685, y=41, z=7, stackpos=1} -- Posição da Pedras 11
getgate11 = getThingfromPos(gatepos11)
gatepos12 = {x=685, y=40, z=7, stackpos=1} -- Posição da Pedras 12
getgate12 = getThingfromPos(gatepos12)
gatepos13 = {x=685, y=44, z=7, stackpos=1} -- Posição da Pedras 13
getgate13 = getThingfromPos(gatepos13)
gatepos14 = {x=685, y=43, z=7, stackpos=1} -- Posição da Pedras 14
getgate14 = getThingfromPos(gatepos14)
gatepos2 = {x=601, y=42, z=7, stackpos=1} -- Posição da Pedra 2
getgate2 = getThingfromPos(gatepos2)
gatepos21 = {x=601, y=41, z=7, stackpos=1} -- Posição da Pedra 21
getgate21 = getThingfromPos(gatepos21)
gatepos22 = {x=601, y=40, z=7, stackpos=1} -- Posição da Pedra 22
getgate22 = getThingfromPos(gatepos22)
gatepos23 = {x=601, y=43, z=7, stackpos=1} -- Posição da Pedra 23
getgate23 = getThingfromPos(gatepos23)
gatepos24 = {x=601, y=44, z=7, stackpos=1} -- Posição da Pedra 24
getgate24 = getThingfromPos(gatepos24)
if getgate.itemid == 1304 and getgate2.itemid == 1304 then
broadcastMessage(mensage1, MESSAGE_EVENT_ADVANCE)
doSummonCreature(monster1, {x=607, y=42, z=7})
doSummonCreature(monster2, {x=679, y=42, z=7})
doRemoveItem(getgate.uid,1)
doRemoveItem(getgate11.uid,1)
doRemoveItem(getgate12.uid,1)
doRemoveItem(getgate13.uid,1)
doRemoveItem(getgate14.uid,1)
doRemoveItem(getgate2.uid,1)
doRemoveItem(getgate21.uid,1)
doRemoveItem(getgate22.uid,1)
doRemoveItem(getgate23.uid,1)
doRemoveItem(getgate24.uid,1)
doCreateItem(1304, {x=677, y=14, z=7})
end
return 1
end
team_dota.lua
function onSay(cid, words, param, channel)
local mensage1 = "[Evento Dota] Liberada Sala dos Times! Quem quiser Participar, vá para a sala de times até o Evento começar. Depois que começar, sÓ na outra rodada! Gogo (TELEPORTE PARA O DOTA NO TEMPLO DA CIDADE PRINCIPAL)" -- Mensagem Inicial
gatepos = {x=677, y=14, z=7, stackpos=1} -- Posição da Pedra
getgate = getThingfromPos(gatepos)
if getgate.itemid == 1304 then
broadcastMessage(mensage1, MESSAGE_EVENT_ADVANCE)
doRemoveItem(getgate.uid,1)
end
return 1
end
e adicione as seguintes tags no arquivo talkactions.xml
<talkaction log="yes" words="/start-dota" access="5" event="script" value="start_dota.lua"/>
<talkaction log="yes" words="/team-dota" access="5" event="script" value="team_dota.lua"/>
va em data/actions/scripts e crie um arquivo chama start_dota.lua apague tudo o que esta dentro e adicione isso
function onUse(cid, item, fromPosition, itemEx, toPosition)
gatepos = {x=685, y=42, z=7, stackpos=1} -- Posição da Parede 1
getgate = getThingfromPos(gatepos)
gatepos2 = {x=601, y=42, z=7, stackpos=1} -- Posição da Parede 2
getgate2 = getThingfromPos(gatepos2)
if item.uid == 5533 and item.itemid == 1945 and getgate.itemid == 1304 and getgate2.itemid == 1304 then
doRemoveItem(getgate.uid,1)
doRemoveItem(getgate2.uid,1)
doTransformItem(item.uid,1946)
elseif item.uid == 5533 and item.itemid == 1946 and getgate.itemid == 1304 and getgate2.itemid == 1304 then
doRemoveItem(getgate.uid,1)
doRemoveItem(getgate2.uid,1)
doTransformItem(item.uid,1945)
end
return 1
end
e depois vai em actions.xml e adicione essa tag
<action uniqueid="5533" script="start_dota.lua" />
Arrume a posiçao da parece 1 e 2 para onde voce quiser contanto que esteja dentro do evento dota
o arquivo world voce baixa nesse site:
http://www.sendspace.com/file/zdf3qf
Creditos:98%OtProject (nao sei se a mais a Huriwara que disse)
2%Alberess(Eu por te trazido ao TibiaKing
CREATURESCRIPT
vá em data/creaturescript/scripts copie um arquivo .lua e adicione os nomes citados abaixo
ga1.lua
function onDeath(cid, corpse, killer)
local M ={
["Gerador Azul I"] = {Pos = {x=613,y=42,z=7},id= 1353, Pos2 = {x=613,y=41,z=7},id2= 1353, Pos3 = {x=613,y=40,z=7},id3= 1353, Pos4 = {x=613,y=43,z=7},id4= 1353, Pos5 = {x=613,y=44,z=7},id5= 1353},
}
local mensage1 = "[Evento Dota] Gerador Azul I Foi Destruido!" -- Mensagem depois que o Gerador for Destruido
local monster1 = "Gerador Azul II" -- Boss que irá aparecer na invasão!
local x = M[getCreatureName(cid)]
if x then
local parede = getTileItemById(x.Pos, x.id)
local parede2 = getTileItemById(x.Pos2, x.id2)
local parede3 = getTileItemById(x.Pos3, x.id3)
local parede4 = getTileItemById(x.Pos4, x.id4)
local parede5 = getTileItemById(x.Pos5, x.id5)
if parede then
doRemoveItem(parede.uid, 1)
doRemoveItem(parede2.uid, 1)
doRemoveItem(parede3.uid, 1)
doRemoveItem(parede4.uid, 1)
doRemoveItem(parede5.uid, 1)
doSummonCreature(monster1, {x=619, y=41, z=7})
broadcastMessage(mensage1, MESSAGE_EVENT_ADVANCE)
end
end
return TRUE
end
ga2.lua
function onDeath(cid, corpse, killer)
local M ={
["Gerador Azul II"] = {Pos = {x=625,y=42,z=7},id= 1353, Pos2 = {x=625,y=41,z=7},id2= 1353, Pos3 = {x=625,y=40,z=7},id3= 1353, Pos4 = {x=625,y=43,z=7},id4= 1353, Pos5 = {x=625,y=44,z=7},id5= 1353},
}
local mensage1 = "[Evento Dota] Gerador Azul II Foi Destruido!" -- Mensagem depois que o Gerador for Destruido
local monster1 = "Gerador Azul III" -- Boss que irá aparecer na invasão!
local x = M[getCreatureName(cid)]
if x then
local parede = getTileItemById(x.Pos, x.id)
local parede2 = getTileItemById(x.Pos2, x.id2)
local parede3 = getTileItemById(x.Pos3, x.id3)
local parede4 = getTileItemById(x.Pos4, x.id4)
local parede5 = getTileItemById(x.Pos5, x.id5)
if parede then
doRemoveItem(parede.uid, 1)
doRemoveItem(parede2.uid, 1)
doRemoveItem(parede3.uid, 1)
doRemoveItem(parede4.uid, 1)
doRemoveItem(parede5.uid, 1)
doSummonCreature(monster1, {x=631, y=42, z=7})
broadcastMessage(mensage1, MESSAGE_EVENT_ADVANCE)
end
end
return TRUE
end
ga3.lua
function onDeath(cid, corpse, killer)
local M ={
["Gerador Azul III"] = {Pos = {x=638,y=43,z=7},id= 1353,Pos2 = {x=646,y=42,z=7},id2= 1354,Pos3 = {x=661,y=42,z=7},id3= 1354,Pos4 = {x=673,y=42,z=7},id4= 1354},
}
local mensage1 = "[Evento Dota] Gerador Azul III Foi Destruido! Time Azul foi o Vencedor desta Rodada do Evento Dota! Sala dos vencedores Liberada, Comemorem!" -- Mensagem depois que o Gerador for Destruido
local v3 = {x=655, y=42, z=7, stackpos=253} -- position v3
local v2 = {x=667, y=41, z=7, stackpos=253} -- position v2
local v1 = {x=679, y=42, z=7, stackpos=253} -- position v1
local x = M[getCreatureName(cid)]
if x then
local parede = getTileItemById(x.Pos, x.id)
local parede2 = getTileItemById(x.Pos2, x.id2)
local parede3 = getTileItemById(x.Pos3, x.id3)
local parede4 = getTileItemById(x.Pos4, x.id4)
if parede then
doRemoveItem(parede.uid, 1)
doRemoveItem(parede2.uid, 1)
doRemoveItem(parede3.uid, 1)
doRemoveItem(parede4.uid, 1)
doRemoveCreature(getThingfromPos(v3).uid)
doRemoveCreature(getThingfromPos(v2).uid)
doRemoveCreature(getThingfromPos(v1).uid)
broadcastMessage(mensage1, MESSAGE_EVENT_ADVANCE)
end
end
return TRUE
end
gv1.lua
function onDeath(cid, corpse, killer)
local M ={
["Gerador Vermelho I"] = {Pos = {x=673,y=42,z=7},id= 1354, Pos2 = {x=673,y=41,z=7},id2= 1354, Pos3 = {x=673,y=40,z=7},id3= 1354, Pos4 = {x=673,y=43,z=7},id4= 1354, Pos5 = {x=673,y=44,z=7},id5= 1354},
}
local mensage1 = "[Evento Dota] Gerador Vermelho I Foi Destruido!" -- Mensagem depois que o Gerador for Destruido
local monster1 = "Gerador Vermelho II" -- Boss que irá aparecer na invasão!
local x = M[getCreatureName(cid)]
if x then
local parede = getTileItemById(x.Pos, x.id)
local parede2 = getTileItemById(x.Pos2, x.id2)
local parede3 = getTileItemById(x.Pos3, x.id3)
local parede4 = getTileItemById(x.Pos4, x.id4)
local parede5 = getTileItemById(x.Pos5, x.id5)
if parede then
doRemoveItem(parede.uid, 1)
doRemoveItem(parede2.uid, 1)
doRemoveItem(parede3.uid, 1)
doRemoveItem(parede4.uid, 1)
doRemoveItem(parede5.uid, 1)
doSummonCreature(monster1, {x=667, y=41, z=7})
broadcastMessage(mensage1, MESSAGE_EVENT_ADVANCE)
end
end
return TRUE
end
gv2.lua
function onDeath(cid, corpse, killer)
local M ={
["Gerador Vermelho II"] = {Pos = {x=661,y=42,z=7},id= 1354, Pos2 = {x=661,y=41,z=7},id2= 1354, Pos3 = {x=661,y=40,z=7},id3= 1354, Pos4 = {x=661,y=43,z=7},id4= 1354, Pos5 = {x=661,y=44,z=7},id5= 1354},
}
local mensage1 = "[Evento Dota] Gerador Vermelho II Foi Destruido!" -- Mensagem depois que o Gerador for Destruido
local monster1 = "Gerador Vermelho III" -- Boss que irá aparecer na invasão!
local x = M[getCreatureName(cid)]
if x then
local parede = getTileItemById(x.Pos, x.id)
local parede2 = getTileItemById(x.Pos2, x.id2)
local parede3 = getTileItemById(x.Pos3, x.id3)
local parede4 = getTileItemById(x.Pos4, x.id4)
local parede5 = getTileItemById(x.Pos5, x.id5)
if parede then
doRemoveItem(parede.uid, 1)
doRemoveItem(parede2.uid, 1)
doRemoveItem(parede3.uid, 1)
doRemoveItem(parede4.uid, 1)
doRemoveItem(parede5.uid, 1)
doSummonCreature(monster1, {x=655, y=42, z=7})
broadcastMessage(mensage1, MESSAGE_EVENT_ADVANCE)
end
end
return TRUE
end
gv3.lua
function onDeath(cid, corpse, killer)
local M ={
["Gerador Vermelho III"] = {Pos = {x=648,y=40,z=7},id= 1354,Pos2 = {x=640,y=42,z=7},id2= 1353,Pos3 = {x=625,y=42,z=7},id3= 1353,Pos4 = {x=613,y=42,z=7},id4= 1353},
}
local mensage1 = "[Evento Dota] Gerador Vermelho III Foi Destruido! Time Vermelho foi o Vencedor desta Rodada do Evento Dota! Sala dos vencedores Liberada, Comemorem!" -- Mensagem depois que o Gerador for Destruido
local a3 = {x=631, y=42, z=7, stackpos=253} -- position a3
local a2 = {x=619, y=41, z=7, stackpos=253} -- position a2
local a1 = {x=607, y=42, z=7, stackpos=253} -- position a1
local x = M[getCreatureName(cid)]
if x then
local parede = getTileItemById(x.Pos, x.id)
local parede2 = getTileItemById(x.Pos2, x.id2)
local parede3 = getTileItemById(x.Pos3, x.id3)
local parede4 = getTileItemById(x.Pos4, x.id4)
if parede then
doRemoveItem(parede.uid, 1)
doRemoveItem(parede2.uid, 1)
doRemoveItem(parede3.uid, 1)
doRemoveItem(parede4.uid, 1)
doRemoveCreature(getThingfromPos(a3).uid)
doRemoveCreature(getThingfromPos(a2).uid)
doRemoveCreature(getThingfromPos(a1).uid)
broadcastMessage(mensage1, MESSAGE_EVENT_ADVANCE)
end
end
return TRUE
end
arrume as position de acordo com o seu mapa e onde esta o dota event no mapa adicione as tags no creaturescript.xml
<event type="death" name="ga1" event="script" value="ga1.lua"/>
<event type="death" name="ga2" event="script" value="ga2.lua"/>
<event type="death" name="ga3" event="script" value="ga3.lua"/>
<event type="death" name="gv1" event="script" value="gv1.lua"/>
<event type="death" name="gv2" event="script" value="gv2.lua"/>
<event type="death" name="gv3" event="script" value="gv3.lua"/>
MONSTER
vá em data/monster e adicione os seguintes monstros e os nomes certos Guarda.xml
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Guarda" nameDescription="a Guarda" race="blood" experience="120000" speed="268" manacost="0">
<health now="20000" max="20000"/>
<look type="73" head="20" body="30" legs="40" feet="50" corpse="6080"/>
<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="1"/>
<flag targetdistance="1"/>
<flag staticattack="90"/>
<flag runonhealth="0"/>
</flags>
<attacks>
<attack name="melee" interval="2000" skill="80" attack="75"/>
<attack name="physical" interval="2000" chance="20" range="7" min="-200" max="-420">
<attribute key="shootEffect" value="arrow"/>
</attack>
</attacks>
<defenses armor="30" defense="20">
<defense name="healing" interval="1000" chance="10" min="200" max="350">
<attribute key="areaEffect" value="blueshimmer"/>
</defense>
</defenses>
<elements>
<element firePercent="30"/>
<element physicalPercent="25"/>
<element holyPercent="25"/>
<element deathPercent="-20"/>
<element earthPercent="50"/>
<element energyPercent="25"/>
<element icePercent="15"/>
</elements>
<immunities>
<immunity paralyze="1"/>
<immunity invisible="1"/>
</immunities>
<voices interval="5000" chance="10">
<voice sentence="Let's have a fight!"/>
<voice sentence="Welcome to my battleground."/>
<voice sentence="Have you seen princess Lumelia?"/>
<voice sentence="I will sing a tune at your grave."/>
</voices>
<loot>
<item id="2491" chance="1200"/>
<item id="2148" countmax="100" chance1="100000" chancemax="0"/>
<item id="2120" chance="20000"/>
<item id="1949" chance="10000"/>
<item id="2456" chance="10000"/>
<item id="2661" chance="12000"/>
<item id="2681" chance="10000"/>
<item id="2121" chance="6666"/>
<item id="2666" countmax="3" chance1="20000" chancemax="0"/>
<item id="5911" countmax="1" chance1="5000" chancemax="0"/>
<item id="1987" chance="100000">
<inside>
<item id="2377" chance="1500"/>
<item id="2487" chance="600"/> --crow armor
<item id="2392" chance="700"/>
<item id="2519" chance="900"/>
<item id="2488" chance="800"/>
<item id="2071" chance="10000"/>
<item id="2544" countmax="13" chance1="20000" chancemax="0"/>
<item id="2652" chance="10000"/>
<item id="2164" chance="1000"/>
<item id="7364" countmax="8" chance="2000"/>
<item id="2391" chance="1333"/>
<item id="2744" chance="20000"/>
</inside>
</item>
</loot>
</monster>
Monstro.xml
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Monstro Do Castelo" nameDescription="a monster" race="blood" experience="1200900" speed="268" manacost="0">
<health now="200000" max="200000"/>
<look type="12" head="58" body="115" legs="58" feet="115" corpse="6080"/>
<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="1"/>
<flag targetdistance="1"/>
<flag staticattack="90"/>
<flag runonhealth="0"/>
</flags>
<attacks>
<attack name="melee" interval="2000" skill="80" attack="75"/>
<attack name="physical" interval="2000" chance="20" range="7" min="-700" max="-1020">
<attribute key="shootEffect" value="arrow"/>
</attack>
</attacks>
<defenses armor="30" defense="20">
<defense name="healing" interval="1000" chance="10" min="200" max="350">
<attribute key="areaEffect" value="blueshimmer"/>
</defense>
</defenses>
<elements>
<element physicalPercent="25"/>
<immunities>
<immunity paralyze="1"/>
<immunity invisible="1"/>
</immunities>
<voices interval="5000" chance="10">
<voice sentence="Leavee!"/>
<voice sentence="Welcome to hell."/>
<voice sentence="Not can Kill-me"/>
</voices>
<loot>
<item id="2128" chance="1200"/>
</loot>
</monster>
Portao.xml
<?xml version="1.0" encoding="UTF-8"?>
<monster name="portao" nameDescription="o portao" race="undead" experience="12000" speed="0" manacost="0">
<health now="150000" max="150000"/>
<look typeex="9485" corpse="2256"/>
<targetchange interval="5000" chance="0"/>
<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="0"/>
<flag canpushcreatures="0"/>
<flag targetdistance="1"/>
<flag staticattack="90"/>
<flag runonhealth="100"/>
</flags>
<attacks>
<attack name="fire" interval="200000" chance="100" range="1" min="-10" max="-20">
<attribute key="shootEffect" value="fire"/>
</attack>
</attacks>
<defenses armor="1" defense="1"/>
<immunities>
<immunity invisible="1"/>
</immunities>
<loot>
<item id="2148" countmax="20" chance1="100000" chancemax="0"/>
</loot>
</monster>
Gerador Azul I.xml
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Gerador Azul I" nameDescription="a Gerador Azul I" race="undead" experience="10000000" speed="0" manacost="0">
<health now="1000000" max="1000000"/>
<look typeex="9785" />
<targetchange interval="5000" chance="0"/>
<strategy attack="100" defense="0"/>
<script>
<event name="ga1"/>
</script>
<flags>
<flag summonable="0"/>
<flag attackable="1"/>
<flag hostile="1"/>
<flag illusionable="0"/>
<flag convinceable="0"/>
<flag pushable="0"/>
<flag canpushitems="0"/>
<flag canpushcreatures="1"/>
<flag targetdistance="1"/>
<flag staticattack="90"/>
<flag runonhealth="100"/>
</flags>
<attacks>
<attack name="energy" interval="2000" chance="100" radius="10" target="0" min="-999" max="-1000">
<attribute key="areaEffect" value="energy"/>
</attack>
</attacks>
<defenses armor="1" defense="1"/>
<immunities>
<immunity poison="1"/>
<immunity lifedrain="1"/>
<immunity paralyze="1"/>
<immunity outfit="1"/>
<immunity drunk="1"/>
<immunity invisible="1"/>
</immunities>
</monster>
Gerador Azul II.xml
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Gerador Azul II" nameDescription="a Gerador Azul II" race="undead" experience="15000000" speed="0" manacost="0">
<health now="1500000" max="1500000"/>
<look typeex="9785" />
<targetchange interval="5000" chance="0"/>
<strategy attack="100" defense="0"/>
<script>
<event name="ga2"/>
</script>
<flags>
<flag summonable="0"/>
<flag attackable="1"/>
<flag hostile="1"/>
<flag illusionable="0"/>
<flag convinceable="0"/>
<flag pushable="0"/>
<flag canpushitems="0"/>
<flag canpushcreatures="1"/>
<flag targetdistance="1"/>
<flag staticattack="90"/>
<flag runonhealth="100"/>
</flags>
<attacks>
<attack name="energy" interval="2000" chance="100" radius="10" target="0" min="-999" max="-1000">
<attribute key="areaEffect" value="energy"/>
</attack>
</attacks>
<defenses armor="1" defense="1"/>
<immunities>
<immunity poison="1"/>
<immunity lifedrain="1"/>
<immunity paralyze="1"/>
<immunity outfit="1"/>
<immunity drunk="1"/>
<immunity invisible="1"/>
</immunities>
</monster>
Gerador Azul III.xml
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Gerador Azul III" nameDescription="a Gerador Azul III" race="undead" experience="20000000" speed="0" manacost="0">
<health now="2000000" max="2000000"/>
<look typeex="9790" />
<targetchange interval="5000" chance="0"/>
<strategy attack="100" defense="0"/>
<script>
<event name="ga3"/>
</script>
<flags>
<flag summonable="0"/>
<flag attackable="1"/>
<flag hostile="1"/>
<flag illusionable="0"/>
<flag convinceable="0"/>
<flag pushable="0"/>
<flag canpushitems="0"/>
<flag canpushcreatures="1"/>
<flag targetdistance="1"/>
<flag staticattack="90"/>
<flag runonhealth="100"/>
</flags>
<attacks>
<attack name="energy" interval="2000" chance="100" radius="10" target="0" min="-999" max="-1000">
<attribute key="areaEffect" value="energy"/>
</attack>
</attacks>
<defenses armor="1" defense="1"/>
<immunities>
<immunity poison="1"/>
<immunity lifedrain="1"/>
<immunity paralyze="1"/>
<immunity outfit="1"/>
<immunity drunk="1"/>
<immunity invisible="1"/>
</immunities>
</monster>
Gerador Vermelho I.xml
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Gerador Vermelho I" nameDescription="a Gerador Vermelho I" race="undead" experience="10000000" speed="0" manacost="0">
<health now="1000000" max="1000000"/>
<look typeex="9784" />
<targetchange interval="5000" chance="0"/>
<strategy attack="100" defense="0"/>
<script>
<event name="gv1"/>
</script>
<flags>
<flag summonable="0"/>
<flag attackable="1"/>
<flag hostile="1"/>
<flag illusionable="0"/>
<flag convinceable="0"/>
<flag pushable="0"/>
<flag canpushitems="0"/>
<flag canpushcreatures="1"/>
<flag targetdistance="1"/>
<flag staticattack="90"/>
<flag runonhealth="100"/>
</flags>
<attacks>
<attack name="energy" interval="2000" chance="100" radius="10" target="0" min="-999" max="-1000">
<attribute key="areaEffect" value="energy"/>
</attack>
</attacks>
<defenses armor="1" defense="1"/>
<immunities>
<immunity poison="1"/>
<immunity lifedrain="1"/>
<immunity paralyze="1"/>
<immunity outfit="1"/>
<immunity drunk="1"/>
<immunity invisible="1"/>
</immunities>
</monster>
Gerador Vemelho II.xml
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Gerador Vermelho II" nameDescription="a Gerador Vermelho II" race="undead" experience="15000000" speed="0" manacost="0">
<health now="1500000" max="1500000"/>
<look typeex="9784" />
<targetchange interval="5000" chance="0"/>
<strategy attack="100" defense="0"/>
<script>
<event name="gv2"/>
</script>
<flags>
<flag summonable="0"/>
<flag attackable="1"/>
<flag hostile="1"/>
<flag illusionable="0"/>
<flag convinceable="0"/>
<flag pushable="0"/>
<flag canpushitems="0"/>
<flag canpushcreatures="1"/>
<flag targetdistance="1"/>
<flag staticattack="90"/>
<flag runonhealth="100"/>
</flags>
<attacks>
<attack name="energy" interval="2000" chance="100" radius="10" target="0" min="-999" max="-1000">
<attribute key="areaEffect" value="energy"/>
</attack>
</attacks>
<defenses armor="1" defense="1"/>
<immunities>
<immunity poison="1"/>
<immunity lifedrain="1"/>
<immunity paralyze="1"/>
<immunity outfit="1"/>
<immunity drunk="1"/>
<immunity invisible="1"/>
</immunities>
</monster>
Gerador Vermelho III.xml
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Gerador Vermelho III" nameDescription="a Gerador Vermelho III" race="undead" experience="20000000" speed="0" manacost="0">
<health now="2000000" max="2000000"/>
<look typeex="9788" />
<targetchange interval="5000" chance="0"/>
<strategy attack="100" defense="0"/>
<script>
<event name="gv3"/>
</script>
<flags>
<flag summonable="0"/>
<flag attackable="1"/>
<flag hostile="1"/>
<flag illusionable="0"/>
<flag convinceable="0"/>
<flag pushable="0"/>
<flag canpushitems="0"/>
<flag canpushcreatures="1"/>
<flag targetdistance="1"/>
<flag staticattack="90"/>
<flag runonhealth="100"/>
</flags>
<attacks>
<attack name="energy" interval="2000" chance="100" radius="10" target="0" min="-999" max="-1000">
<attribute key="areaEffect" value="energy"/>
</attack>
</attacks>
<defenses armor="1" defense="1"/>
<immunities>
<immunity poison="1"/>
<immunity lifedrain="1"/>
<immunity paralyze="1"/>
<immunity outfit="1"/>
<immunity drunk="1"/>
<immunity invisible="1"/>
</immunities>
</monster>
adicione as seguintes tags no monsters.xml
<monster name="Gerador Azul I" file="Dota/Gerador Azul I.xml"/>
<monster name="Gerador Azul II" file="Dota/Gerador Azul II.xml"/>
<monster name="Gerador Azul III" file="Dota/Gerador Azul III.xml"/>
<monster name="Gerador Vermelho I" file="Dota/Gerador Vermelho I.xml"/>
<monster name="Gerador Vermelho II" file="Dota/Gerador Vermelho II.xml"/>
<monster name="Gerador Vermelho III" file="Dota/Gerador Vermelho III.xml"/>
MOVEMENTS
vá em data/movements/script e crie arquivos .lua com os seguintes nomes abaixo blue.lua
function onStepIn(cid, item, frompos, item2, topos)
local outfit = {lookType = 128, lookHead = 88, lookBody = 114, lookLegs = 114, lookFeet = 88, lookAddons = 0}
if item.actionid == 5031 and isPlayer(cid) then
doCreatureChangeOutfit(cid, outfit)
doPlayerSetTown(cid, 7)
end
return true
end
dota.lua
function onStepIn(cid, item, pos, frompos)
local positions = {
{x=691, y=42, z=7},
{x=595, y=42, z=7}
}
local destino = math.random(#positions)
doTeleportThing(cid,positions[destino], true)
doSendMagicEffect(getPlayerPosition(cid), 10)
end
dota_templonormal.lua
function onStepIn(cid, item, frompos, item2, topos)
if doPlayerSetTown(cid, 1) then
end
return TRUE
end
dota_templonormalp.lua
local config = { rewards_id = {2494, 2472, 2514, 2493, 2470, 2195, 2173, 2160}, -- Rewards ID crystal_counts = 20, -- used only if on rewards_id you have crystal coins (ID: 2160). } function onStepIn(cid, item, frompos, item2, topos) local random_item = config.rewards_id[math.random(1, #config.rewards_id)] local item_name = getItemNameById(random_item) if doPlayerSetTown(cid, 1) then if(random_item == 2160) then doPlayerAddItem(cid, random_item, config.crystal_counts) doPlayerAddItem(cid, 10138, 1) doPlayerSendTextMessage(cid,25, 'Your team won the dota round! You winner: '.. config.crystal_counts ..' '.. item_name ..'s and dota winner medal!') else doPlayerSendTextMessage(cid,25, 'Your team won the dota round! You winner: '.. item_name ..' and dota winner medal!') doPlayerAddItem(cid, random_item, 1) doPlayerAddItem(cid, 10138, 1) end end return TRUE end
red.lua
function onStepIn(cid, item, frompos, item2, topos)
local outfit = {lookType = 128, lookHead = 94, lookBody = 114, lookLegs = 114, lookFeet = 94, lookAddons = 0}
if item.actionid == 5032 and isPlayer(cid) then
doCreatureChangeOutfit(cid, outfit)
doPlayerSetTown(cid, 8)
end
return true
end
e adicione as seguintes tags no movements.xml
<movevent type="StepIn" uniqueid="5036" event="script" value="dota_templonormalp.lua" />
<movevent type="StepIn" uniqueid="5035" event="script" value="dota_templonormal.lua" />
<movevent type="StepIn" uniqueid="5040" event="script" value="dota.lua" />
<movevent type="StepIn" uniqueid="5031" event="script" value="blue.lua" />
<movevent type="StepIn" uniqueid="5032" event="script" value="red.lua" />
TALKACTION
crie 2 arquivos lua e coloque os nome abaixo start_dota.lua
function onSay(cid, words, param, channel)
local mensage1 = "[Evento Dota] Evento Iniciado! Destruam as Torres! quem destruir as 3 Torres primeiro, Ganha!" -- Mensagem Inicial
local monster1 = "Gerador Azul I" -- Geradores Iniciais
local monster2 = "Gerador Vermelho I" -- Geradores Iniciais
gatepos = {x=685, y=42, z=7, stackpos=1} -- Posição da Pedras 1
getgate = getThingfromPos(gatepos)
gatepos11 = {x=685, y=41, z=7, stackpos=1} -- Posição da Pedras 11
getgate11 = getThingfromPos(gatepos11)
gatepos12 = {x=685, y=40, z=7, stackpos=1} -- Posição da Pedras 12
getgate12 = getThingfromPos(gatepos12)
gatepos13 = {x=685, y=44, z=7, stackpos=1} -- Posição da Pedras 13
getgate13 = getThingfromPos(gatepos13)
gatepos14 = {x=685, y=43, z=7, stackpos=1} -- Posição da Pedras 14
getgate14 = getThingfromPos(gatepos14)
gatepos2 = {x=601, y=42, z=7, stackpos=1} -- Posição da Pedra 2
getgate2 = getThingfromPos(gatepos2)
gatepos21 = {x=601, y=41, z=7, stackpos=1} -- Posição da Pedra 21
getgate21 = getThingfromPos(gatepos21)
gatepos22 = {x=601, y=40, z=7, stackpos=1} -- Posição da Pedra 22
getgate22 = getThingfromPos(gatepos22)
gatepos23 = {x=601, y=43, z=7, stackpos=1} -- Posição da Pedra 23
getgate23 = getThingfromPos(gatepos23)
gatepos24 = {x=601, y=44, z=7, stackpos=1} -- Posição da Pedra 24
getgate24 = getThingfromPos(gatepos24)
if getgate.itemid == 1304 and getgate2.itemid == 1304 then
broadcastMessage(mensage1, MESSAGE_EVENT_ADVANCE)
doSummonCreature(monster1, {x=607, y=42, z=7})
doSummonCreature(monster2, {x=679, y=42, z=7})
doRemoveItem(getgate.uid,1)
doRemoveItem(getgate11.uid,1)
doRemoveItem(getgate12.uid,1)
doRemoveItem(getgate13.uid,1)
doRemoveItem(getgate14.uid,1)
doRemoveItem(getgate2.uid,1)
doRemoveItem(getgate21.uid,1)
doRemoveItem(getgate22.uid,1)
doRemoveItem(getgate23.uid,1)
doRemoveItem(getgate24.uid,1)
doCreateItem(1304, {x=677, y=14, z=7})
end
return 1
end
team_dota.lua
function onSay(cid, words, param, channel)
local mensage1 = "[Evento Dota] Liberada Sala dos Times! Quem quiser Participar, vá para a sala de times até o Evento começar. Depois que começar, sÓ na outra rodada! Gogo (TELEPORTE PARA O DOTA NO TEMPLO DA CIDADE PRINCIPAL)" -- Mensagem Inicial
gatepos = {x=677, y=14, z=7, stackpos=1} -- Posição da Pedra
getgate = getThingfromPos(gatepos)
if getgate.itemid == 1304 then
broadcastMessage(mensage1, MESSAGE_EVENT_ADVANCE)
doRemoveItem(getgate.uid,1)
end
return 1
end
e adicione as seguintes tags no arquivo talkactions.xml
<talkaction log="yes" words="/start-dota" access="5" event="script" value="start_dota.lua"/>
<talkaction log="yes" words="/team-dota" access="5" event="script" value="team_dota.lua"/>
Post a Comment