Ir para conteúdo

Featured Replies

Postado

Assim que eu mato o boss, ele cria um Tp, mas não ele não leva a canto nenhum.

OBS: eu removi os NPC da quest e coloquei o Boss no mapa, (igual aos boses da inquisition)
só que quando eu mato esse boss e o TP aparece, ele não me leva pras coordenadas  {x=578, y=568, z=14}

creaturescripts.xml

 <event type="death" name="Azerus" event="script" value="azerus.lua"/>  


 

creaturescripts\scripts

local config = {

message = "Azerus ran into teleporter! It will disappear in 2 minutes. Enter It!",
teleportId = 1387,
bosses = { -- Monster Name, Teleport To Position, Teleport Position
["Azerus"] = {{x=581, y=577, z=9}, {x=581, y=575, z=10}},



}
}

function onDeath(cid, corpse, killer)
local position = getCreaturePosition(cid)
for name, pos in pairs(config.bosses) do
if name == getCreatureName(cid) then

doCreateTeleport(config.teleportId, pos[1], pos[2])
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
end
end
return TRUE
end

 

monster\Azerus

<?xml version="1.0" encoding="UTF-8"?>

<monster name="Azerus" nameDescription="azerus" race="blood" experience="6000" speed="320" manacost="0">
    <health now="14000" max="14000"/>
    <look type="309" head="19" body="96" legs="21" feet="81" corpse="9738"/>
    <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="85"/>
        <flag runonhealth="0"/>
    </flags>
    <attacks>
        <attack name="melee" interval="2000" min="-0" max="-900"/>
        <attack name="manadrain" interval="2000" chance="10" range="7" min="-0" max="-2000">
            <attribute key="shootEffect" value="energy"/>
            <attribute key="areaEffect" value="poff"/>
        </attack>
          <attack name="manadrain" interval="2000" chance="15" range="7" radius="7" target="1" min="-0" max="-800">
            <attribute key="shootEffect" value="fire"/>
            <attribute key="areaEffect" value="bigclouds"/>
        </attack>
        <attack name="death" interval="2000" chance="20" range="7" min="-0" max="-524">
                  <attribute key="shootEffect" value="suddendeath"/>
                <attribute key="areaEffect" value="mortarea"/>
          </attack>
        <attack name="lifedrain" interval="1000" chance="10" length="8" spread="0" min="-100" max="-500">
            <attribute key="areaEffect" value="sleep"/>
        </attack> 
    </attacks>
    <defenses armor="40" defense="65">
        <defense name="healing" interval="1000" chance="11" min="400" max="900">
            <attribute key="areaEffect" value="greenshimmer"/>
        </defense>
    </defenses>
      <immunities>
    <immunity name="lifedrain"/>
    <immunity name="outfit"/>
    <immunity name="paralyze"/>
    <immunity name="invisible"/>
  </immunities>
  <summons maxSummons="10">
    <summon name="Rift Worm" speed="3000" chance="30"/>
    <summon name="War golem" speed="3000" chance="30"/>
    <summon name="Rift Brood" speed="3000" chance="30"/>
    <summon name="Rift Worm" speed="3000" chance="30"/>
    <summon name="Rift Scythe" speed="3000" chance="30"/>
  </summons>
    <voices interval="5000" chance="12">
        <voice sentence="The ultimate will finally consume this unworthy existence!" />
        <voice sentence="My masters and I will tear down barriers and join the ultimate in its realm!" />
        <voice sentence="The power of the Yalahari will all be mine!" />
        <voice sentence="He who has returned from beyond has taught me secrets you can't even grasp!" />
        <voice sentence="You can't hope to penetrate my shields!"/>
        <voice sentence="Do you really think you could beat me?"/>
    </voices>
</monster>



movements.xml

<movement type="StepIn" actionid="1973" event="script" value="azerus.lua" />

<movement type="StepIn" actionid="1974" event="script" value="azerus.lua" />



movements\scripts\azerus.lua

Try this one:

[lua]function onStepIn(cid, item, position, fromPosition)

--Config-->
local queststatus = getPlayerStorageValue(cid, 50001)
--EndConfig-->
if item.actionid == 1974 and queststatus == -1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "It seems by defeating Azerus you have stoped this army from entering your world! Better leave this ghastly place forever.")
setPlayerStorageValue(cid, 4765, 1)
return TRUE
end

if item.actionid == 1973 and queststatus == -1 then
-- Here is the code start:
starting={x = 576, y = 560, z = 10, stackpos = 253}
checking={x=starting.x, y=starting.y, z=starting.z, stackpos=starting.stackpos}
ending={x = 586, y = 572, z = 10, stackpos = 253}
players=0
totalmonsters=0
monster = {}
repeat
creature= getThingfromPos(checking)
if creature.itemid > 0 then
if getPlayerAccess(creature.uid) == 0 then
players=players+1
end
if getPlayerAccess(creature.uid) ~= 0 and getPlayerAccess(creature.uid) ~= 3 then
totalmonsters=totalmonsters+1
monster[totalmonsters]=creature.uid
end
end
checking.x=checking.x+1
if checking.x>ending.x then
checking.x=starting.x
checking.y=checking.y+1
end
until checking.y>ending.y
if players==0 then
trash= {x=33193, y=31689, z=15}
current=0
repeat
current=current+1
doTeleportThing(monster[current],trash)
until current>=totalmonsters
end
-- Here is the end of it

doTeleportThing(cid, player_pos_entrada)
doSendMagicEffect(player_pos_entrada, 10)

else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'You have already done this quest!')
end
end[/lua]
Or if it won't work, try this:
[lua]function onStepIn(cid, item, position, fromPosition)
if getCreatureStorage(cid, 50001) == -1 then
if item.actionid == 1974 then
doCreatureSay(cid, 'It seems by defeating Azerus you have stopped this army from entering your world! Better leave this ghastly place forever.', TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid, 4765, 1)
elseif item.actionid == 1973 then
local t, f = {}
for x = 576, 586 do
for y = 560, 572 do
local v = getTopCreature({x=x, y=y, z=10}).uid
if isPlayer(v) then
f = true
break
elseif isMonster(v) then
table.insert(t, v)
end
end
end
if not f then
for i = 1, #t do
doRemoveCreature(t)
end
end
doTeleportThing(cid, {x=579, y=575, z=10})
doSendMagicEffect({x=579, y=575, z=10}, CONST_ME_TELEPORT)
end
else
doTeleportThing(cid, fromPosition, false)
doPlayerSendCancel(cid, 'You have already done this quest!')
end
end[/lua]

  • Respostas 5
  • Visualizações 678
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • luanluciano93
    luanluciano93

    Coloque o evento no monstro:  <script> <event name="Azerus" /> </script>

Postado
local config = {
	message = "Azerus ran into teleporter! It will disappear in 2 minutes. Enter It!",
	teleportId = 1387,
	bossName = "Azerus",
	pos = {x=581, y=577, z=9}, {x=581, y=575, z=10},
}

function onDeath(cid, corpse, killer)
	
	if getCreatureName(cid) == bossName then
		doCreateTeleport(config.teleportId, config.pos[1], config.pos[2])
		doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
	end
	
	return true
end

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

Informação Importante

Confirmação de Termo