Postado Janeiro 27, 2019 6 anos @cocorico303 Quando o monstro morre cria um portal em x posição, certo? se for isso, dá uma boa olhada em creaturescripts.xml que deve ter uma linha assim. <event type="death" name="Azerus" event="script" value="AQUI VAI TER UM NOME, ABRE O ARQUIVO QUE TEM ESSE NOME E POSTA O CÓDIGO AQUI.lua"/> Editado Janeiro 27, 2019 6 anos por JoviM (veja o histórico de edições)
Postado Janeiro 27, 2019 6 anos Autor <?xml version="1.0" encoding="UTF-8"?> <creaturescripts> <event type="login" name="BattleLogin" event="script" value="BattleCreatureScript.lua"/> <event type="PrepareDeath" name="BattleDeath" event="script" value="BattleCreatureScript.lua"/> <event type="combat" name="BattleTeam" event="script" value="BattleCreatureScript.lua"/> <event type="statschange" name="zombieevent" event="script" value="zombie.lua"/> <event type="login" name="PlayerLogin" event="script" value="login.lua"/> <event type="statschange" name="CombatDodge" event="script" value="dodgecombat.lua"/> <event type="joinchannel" name="GuildMotd" event="script" value="guildmotd.lua"/> <event type="receivemail" name="Mail" event="script" value="mail.lua"/> <event type="login" name="CheckMcManager" event="script" value="checkmcmanager.lua"/> <event type="login" name="Antimc" event="script" value="antimc.lua"/> <event type="reportbug" name="SaveReportBug" script="reportbug.lua"/> <event type="login" name="Antiacc" event="script" value="antiacc.lua"/> <event type="death" name="teledonate" script="teledonate.lua"/> <event type="death" name="telelord" script="telelord.lua"/> <event type="death" name="teleking" script="teleking.lua"/> <event type="death" name="teleportmonster" script="tpmonster.lua"/> <event type="death" name="tpdruid" event="script" value="tpdruid.lua"/> <event type="preparedeath" name="onPrepareDeath" event="script" value="preparedeath.lua"/> <event type="death" name="DeathTeam1" event="script" value="WarArenaDeathTeam1.lua"/> <event type="death" name="DeathTeam2" event="script" value="WarArenaDeathTeam2.lua"/> <event type="kill" name="kills" event="script" value="kills.lua"/> <event type="login" name="AntiMB" event="script" value="antimb.lua"/> <event type="login" name="ExpVip" script="vipexp.lua"/> <event type="death" name="DeathC" event="script" value="deathbroadcast.lua"/> <event type="look" name="fraglook" event="script" value="fraglook.lua"/> <event type="login" name="fraglook_register" event="script" value="fraglook.lua"/> <event type="death" name="tp" event="script" value="tp.lua"/> <event type="login" name="Conected" script="customlogin.lua"/> <event type="Advance" name="AdvEffect" script="advance.lua"/> <!-- CTF --> <event type="kill" name="KillingInTheNameOf" event="script" value="killinginthenameof.lua"/> <event type="logout" name="demonOakLogout" event="script" value="demonOakLogout.lua"/> <event type="death" name="demonOakDeath" event="script" value="demonOakDeath.lua"/> <event type="logout" name="CTFLogout" event="script" value="CTFMax.lua"/> <event type="combat" name="CTFCombat" event="script" value="CTFMax.lua"/> <event type="attack" name="CTFAttack" event="script" value="CTFMax.lua"/> <event type="statschange" name="CTFDeath" event="script" value="CTFMax.lua"/> <event type="statschange" name="critical" event="script" value="critical.lua"/> <!-- Blood Castle --> <event type="death" name="guardablood" event="script" value="BloodCreatureGuarda.lua"/> <event type="death" name="arcanjoblood" event="script" value="BloodCreatureAnjo.lua"/> <event type="death" name="morrerblood" event="script" value="BloodCreaturePlayer.lua"/> <event type="death" name="loginblood" event="script" value="BloodCreaturePlayer.lua"/> <!-- Potion Double Exp --> <event type="login" name="expRate" event="script" value="potionexp.lua"/> <event type="think" name="SkullCheck" event="script" value="skullcheck.lua"/> <event type="death" name="PlayerDeath" event="script" value="playerdeath.lua"/> <event type="login" name="FirstItems" event="script" value="firstitems.lua"/> <event type="PrepareDeath" name="pvparena" script="pvparena.lua"/> <event type="attack" name="attackguild" script="attackguild.lua"/> <event type="preparedeath" name="onPrepareDeath" event="script" value="preparedeath.lua"/> </creaturescripts> não consigo achar amigo.
Postado Janeiro 27, 2019 6 anos @cocorico303 Eu também não. AUSHAUSHAUSHAUSH A gente vai criar do 0, mas me responde isso. Quando você mata o monstro ele retorna algum erro?
Postado Janeiro 27, 2019 6 anos Autor tipo, eu faço a quest e no final que é para matar o azerus, eu mato ele e aparece um teleport e vai para o lugar certo, até isso tudo certo, mas esse teleport que aparece deveria sumir depois de 1 min ou algum tempo, só que ele fica lá na quest pra sempre, até o ot ser fechado. [Error - Action Interface] In a timer event called from: data/actions/scripts/quests/azerus.lua:onUse Description: (luaGetCreatureName) Creature not found apareceu esse erro, quando eu mato o azerus... desculpas não tinha prestado atenção. local BlindField = {x=203, y=595, z=10, stackpos=1} function mapArea(fromPos, toPos, stack) local pos = {x=fromPos.x, y=fromPos.y-1, z=fromPos.z} return function() if (pos.y < toPos.y) then pos.y = pos.y+1 elseif (pos.x <= toPos.x) then pos.y = fromPos.y pos.x = pos.x+1 else pos.x = fromPos.x pos.y = fromPos.y pos.z = pos.z+1 end if (pos.x <= toPos.x and pos.y <= toPos.y or pos.z < toPos.z) then if (stack == nil) then return pos else pos.stackpos = stack return pos, getThingfromPos(pos) end end end end function getMonstersfromArea(fromPos, toPos) local monsters = {} for _, thing in mapArea(fromPos, toPos, 253) do if isMonster(thing.uid) == TRUE then table.insert(monsters, thing.uid) end end local bfm = getThingfromPos(BlindField) if isMonster(bfm.uid) == TRUE then table.insert(monsters, bfm.uid) end return monsters end function onUse(cid, item, fromPosition, itemEx, toPosition) local topLeft = {x=198, y=597, z=10} local buttomRight = {x=212, y=614, z=10} local monsters = getMonstersfromArea(topLeft, buttomRight) local monsters1 = getMonstersfromArea(topLeft, buttomRight) local tp = {x=205, y=613, z=10} local glo = {x=205, y=604, z=10} local function FirstWave() doSummonCreature("Rift Worm", {x= glo.x - 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Worm", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Worm", {x=glo.x,y=glo.y + 4,z=glo.z}) doSummonCreature("Rift Worm", {x=glo.x,y=glo.y - 4,z=glo.z}) doSummonCreature("Rift Worm", {x=glo.x,y=glo.y + 5,z=glo.z}) doSummonCreature("Azerus", {x=glo.x,y=glo.y - 5,z=glo.z}) end local function FifthWave() doSummonCreature("Rift Worm", {x= glo.x - 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Worm", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Worm", {x=glo.x,y=glo.y + 4,z=glo.z}) doSummonCreature("Rift Worm", {x=glo.x,y=glo.y - 4,z=glo.z}) doSummonCreature("Rift Worm", {x=glo.x,y=glo.y + 5,z=glo.z}) end local function SecondWave() local monsters1 = getMonstersfromArea(topLeft, buttomRight) for _, monster in pairs(monsters1) do if getCreatureName(monster) == "Azerus" then doRemoveCreature(monster) end end doSummonCreature("Azerus1", {x=glo.x,y=glo.y - 5,z=glo.z}) doSummonCreature("Rift Brood", {x= glo.x - 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Brood", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Brood", {x=glo.x,y=glo.y + 4,z=glo.z}) doSummonCreature("Rift Brood", {x=glo.x,y=glo.y - 4,z=glo.z}) doSummonCreature("Rift Brood", {x=glo.x,y=glo.y + 5,z=glo.z}) end local function SixthWave() doSummonCreature("Rift Brood", {x= glo.x - 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Brood", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Brood", {x=glo.x,y=glo.y + 4,z=glo.z}) doSummonCreature("Rift Brood", {x=glo.x,y=glo.y - 4,z=glo.z}) doSummonCreature("Rift Brood", {x=glo.x,y=glo.y + 5,z=glo.z}) end local function ThirdWave() local monsters1 = getMonstersfromArea(topLeft, buttomRight) for _, monster in pairs(monsters1) do if getCreatureName(monster) == "Azerus" then doRemoveCreature(monster) end end doSummonCreature("Azerus2", {x= glo.x - 5,y=glo.y,z=glo.z}) doSummonCreature("Rift Scythe", {x= glo.x - 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Scythe", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Scythe", {x=glo.x,y=glo.y + 4,z=glo.z}) doSummonCreature("Rift Scythe", {x=glo.x,y=glo.y - 4,z=glo.z}) doSummonCreature("Rift Scythe", {x=glo.x,y=glo.y + 5,z=glo.z}) end local function ThirdWave1() -- with 2s delay doSummonCreature("Rift Scythe", {x= glo.x - 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Scythe", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Scythe", {x=glo.x,y=glo.y + 4,z=glo.z}) doSummonCreature("Rift Scythe", {x=glo.x,y=glo.y - 4,z=glo.z}) doSummonCreature("Rift Scythe", {x=glo.x,y=glo.y + 5,z=glo.z}) end local function FourthWave() doSummonCreature("Rift Scythe", {x= glo.x - 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Scythe", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Scythe", {x=glo.x,y=glo.y + 4,z=glo.z}) doSummonCreature("Rift Scythe", {x=glo.x,y=glo.y - 4,z=glo.z}) doSummonCreature("Rift Scythe", {x=glo.x,y=glo.y + 5,z=glo.z}) end local function SevenWave() local monsters1 = getMonstersfromArea(topLeft, buttomRight) for _, monster in pairs(monsters1) do if getCreatureName(monster) == "Azerus" then doRemoveCreature(monster) end end doSummonCreature("Azerus3", {x= glo.x - 5,y=glo.y,z=glo.z}) doSummonCreature("War Golemm", {x= glo.x - 4,y=glo.y,z=glo.z}) doSummonCreature("War Golemm", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("War Golemm", {x=glo.x,y=glo.y - 4,z=glo.z}) doSummonCreature("War Golemm", {x=glo.x,y=glo.y + 4,z=glo.z}) end local function Glllobe() local monst = getMonstersfromArea(topLeft, buttomRight) for i = 1, #monst do doRemoveCreature(monst) end local item1 = getTileItemById(glo, 9767) doItemSetAttribute(item1.uid, "aid", 58261) end local function createWall(p) local janek = doCreateItem(1387,1,{x=206, y=615, z=9}) doItemSetAttribute(janek, "aid", 9105) end local function createWalll(i) local ela = doCreateItem(1387,1,{x=205, y=613, z=10}) doItemSetAttribute(ela, "aid", 9106) end local wall0 = {x=206, y=615, z=9, stackpos=1} local getwall0 = getThingfromPos(wall0) local wall1 = {x=205, y=613, z=10, stackpos=1} local getwall1 = getThingfromPos(wall1) local monsters = getMonstersfromArea(topLeft, buttomRight) local monsters1 = getMonstersfromArea(topLeft, buttomRight) local tele_chk = getTileItemById(tp, 1387) if item.actionid == 58261 then doItemSetAttribute(item.uid, "aid", 58263) end if tele_chk.uid > 0 then doRemoveItem(getTileItemById(tp,1387).uid) doRemoveItem(getwall0.uid,1) addEvent(FirstWave, 0) addEvent(FifthWave, 30000) addEvent(SecondWave, 60000) addEvent(SixthWave, 90000) addEvent(ThirdWave, 120000) addEvent(ThirdWave1, 150000) addEvent(FourthWave, 180000) addEvent(SevenWave, 210000) addEvent(Glllobe, 400000) p = {wallid = getwall0.itemid} addEvent(createWall, 300*1000, p) i = {wallid = getwall1.itemid} addEvent(createWalll, 300*1000, i) end if item.actionid == 58263 then doCreatureSay(cid, "You have to wait some time before this globe will charge.", TALKTYPE_ORANGE_1) end return TRUEend Editado Janeiro 27, 2019 6 anos por cocorico303 (veja o histórico de edições)
Postado Janeiro 27, 2019 6 anos @cocorico303 Testa ai. EDIT2* Spoiler local BlindField = {x = 133, y = 57, z = 7, stackpos = 1} function mapArea(fromPos, toPos, stack) local pos = {x = fromPos.x, y = fromPos.y - 1, z = fromPos.z} return function() if (pos.y < toPos.y) then pos.y = pos.y+1 elseif (pos.x <= toPos.x) then pos.y = fromPos.y pos.x = pos.x+1 else pos.x = fromPos.x pos.y = fromPos.y pos.z = pos.z+1 end if (pos.x <= toPos.x and pos.y <= toPos.y or pos.z < toPos.z) then if (stack == nil) then return pos else pos.stackpos = stack return pos, getThingfromPos(pos) end end end end function getMonstersfromArea(fromPos, toPos) local monsters = {} for _, thing in mapArea(fromPos, toPos, 253) do if isMonster(thing.uid) == TRUE then table.insert(monsters, thing.uid) end end local bfm = getThingfromPos(BlindField) if isMonster(bfm.uid) == TRUE then table.insert(monsters, bfm.uid) end return monsters end function onUse(cid, item, fromPosition, itemEx, toPosition) local topLeft = {x = 127, y = 53, z = 7} local buttomRight = {x = 146, y = 66, z = 7} local monsters = getMonstersfromArea(topLeft, buttomRight) local monsters1 = getMonstersfromArea(topLeft, buttomRight) local tp = {x = 137, y = 59, z = 7} local glo = {x = 138, y = 59, z = 7} local function FirstWave() doSummonCreature("Rift Worm", {x= glo.x - 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Worm", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Worm", {x=glo.x,y=glo.y + 4,z=glo.z}) doSummonCreature("Rift Worm", {x=glo.x,y=glo.y - 4,z=glo.z}) doSummonCreature("Rift Worm", {x=glo.x,y=glo.y + 5,z=glo.z}) doSummonCreature("Azerus", {x=glo.x,y=glo.y - 5,z=glo.z}) end local function FifthWave() doSummonCreature("Rift Worm", {x= glo.x - 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Worm", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Worm", {x=glo.x,y=glo.y + 4,z=glo.z}) doSummonCreature("Rift Worm", {x=glo.x,y=glo.y - 4,z=glo.z}) doSummonCreature("Rift Worm", {x=glo.x,y=glo.y + 5,z=glo.z}) end local function SecondWave() local monsters1 = getMonstersfromArea(topLeft, buttomRight) for _, monster in ipairs(monsters1) do if getCreatureName(monster) == "Azerus" then doRemoveCreature(monster) end end doSummonCreature("Azerus1", {x=glo.x,y=glo.y - 5,z=glo.z}) doSummonCreature("Rift Brood", {x= glo.x - 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Brood", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Brood", {x=glo.x,y=glo.y + 4,z=glo.z}) doSummonCreature("Rift Brood", {x=glo.x,y=glo.y - 4,z=glo.z}) doSummonCreature("Rift Brood", {x=glo.x,y=glo.y + 5,z=glo.z}) end local function SixthWave() doSummonCreature("Rift Brood", {x= glo.x - 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Brood", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Brood", {x=glo.x,y=glo.y + 4,z=glo.z}) doSummonCreature("Rift Brood", {x=glo.x,y=glo.y - 4,z=glo.z}) doSummonCreature("Rift Brood", {x=glo.x,y=glo.y + 5,z=glo.z}) end local function ThirdWave() local monsters1 = getMonstersfromArea(topLeft, buttomRight) for _, monster in ipairs(monsters1) do if getCreatureName(monster) == "Azerus" then doRemoveCreature(monster) end end doSummonCreature("Azerus2", {x= glo.x - 5,y=glo.y,z=glo.z}) doSummonCreature("Rift Scythe", {x= glo.x - 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Scythe", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Scythe", {x=glo.x,y=glo.y + 4,z=glo.z}) doSummonCreature("Rift Scythe", {x=glo.x,y=glo.y - 4,z=glo.z}) doSummonCreature("Rift Scythe", {x=glo.x,y=glo.y + 5,z=glo.z}) end local function ThirdWave1() -- with 2s delay doSummonCreature("Rift Scythe", {x= glo.x - 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Scythe", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Scythe", {x=glo.x,y=glo.y + 4,z=glo.z}) doSummonCreature("Rift Scythe", {x=glo.x,y=glo.y - 4,z=glo.z}) doSummonCreature("Rift Scythe", {x=glo.x,y=glo.y + 5,z=glo.z}) end local function FourthWave() doSummonCreature("Rift Scythe", {x= glo.x - 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Scythe", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("Rift Scythe", {x=glo.x,y=glo.y + 4,z=glo.z}) doSummonCreature("Rift Scythe", {x=glo.x,y=glo.y - 4,z=glo.z}) doSummonCreature("Rift Scythe", {x=glo.x,y=glo.y + 5,z=glo.z}) end local function SevenWave() local monsters1 = getMonstersfromArea(topLeft, buttomRight) for _, monster in ipairs(monsters1) do if getCreatureName(monster) == "Azerus" then doRemoveCreature(monster) end end doSummonCreature("Azerus3", {x= glo.x - 5,y=glo.y,z=glo.z}) doSummonCreature("War Golemm", {x= glo.x - 4,y=glo.y,z=glo.z}) doSummonCreature("War Golemm", {x= glo.x + 4,y=glo.y,z=glo.z}) doSummonCreature("War Golemm", {x=glo.x,y=glo.y - 4,z=glo.z}) doSummonCreature("War Golemm", {x=glo.x,y=glo.y + 4,z=glo.z}) end local function Glllobe() local monst = getMonstersfromArea(topLeft, buttomRight) for i = 1, #monst do doRemoveCreature(monst) end local item1 = getTileItemById(glo, 9767) doItemSetAttribute(item1.uid, "aid", 58261) end local function createWall(p) local janek = doCreateItem(1387, 1, {x = 137, y = 59, z = 7} doItemSetAttribute(janek, "aid", 9105) end local function createWalll(i) local ela = doCreateItem(1387, 1, {x = 138, y = 59, z = 7}) doItemSetAttribute(ela, "aid", 9106) end local wall0 = {x = 134, y = 53, z = 7, stackpos=1} local getwall0 = getThingfromPos(wall0) local wall1 = {x = 135, y = 53, z = 7, stackpos=1} local getwall1 = getThingfromPos(wall1) local monsters = getMonstersfromArea(topLeft, buttomRight) local monsters1 = getMonstersfromArea(topLeft, buttomRight) local tele_chk = getThingfromPos(tp, 1387) if item.actionid == 58261 then doItemSetAttribute(item.uid, "aid", 58263) end if tele_chk.uid > 0 then doRemoveItem(tele_chk.uid, 1) doRemoveItem(getwall0.uid,1) addEvent(FirstWave, 0) addEvent(FifthWave, 30000) addEvent(SecondWave, 60000) addEvent(SixthWave, 90000) addEvent(ThirdWave, 120000) addEvent(ThirdWave1, 150000) addEvent(FourthWave, 180000) addEvent(SevenWave, 210000) addEvent(Glllobe, 400000) p = {wallid = getwall0.itemid} addEvent(createWall, 300*1000, p) i = {wallid = getwall1.itemid} addEvent(createWalll, 300*1000, i) end if item.actionid == 58263 then doCreatureSay(cid, "You have to wait some time before this globe will charge.", TALKTYPE_ORANGE_1) end return true end Editado Janeiro 27, 2019 6 anos por JoviM (veja o histórico de edições)
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.