Show Show Posted August 25, 2021 Report Share Posted August 25, 2021 Não cheguei a testar fora da cidade, então qualquer feedback será útil para possíveis correções. Por algum motivo fiz um vídeo explicando como inserir o código no jogo e demonstrando as funcionalidades. Spoiler --Description: A macro to follow players through stairs, doors, ladders, sewer gates and some other things. --A message error appears on the log, but other than that everything seems to run well... save for the eventual hiccups. --ATTENTION: It might not work if multiple "use objects" that lead to paths places are near eachother. Follow = macro(1000,"Follow",function() nome = storage.followLeader end) UI.Label("Follow Player:") addTextEdit("playerToFollow", storage.followLeader or "Heeey", function(widget, text) storage.followLeader = text target = tostring(text) end) nome = storage.followLeader pos_p = player:getPosition() p = getCreatureByName(nome) onCreaturePositionChange(function(creature, newPos, oldPos) if Follow.isOn() then if creature:getName()==player:getName() and getCreatureByName(nome) == nil and newPos.z>oldPos.z then say('exani tera') for i = -1,1 do for j = -1,1 do local useTile = g_map.getTile({x=posx()+i,y=posy()+j,z=posz()}) g_game.use(useTile:getTopUseThing()) end end end if creature:getName()==nome then if newPos==nil then lastPos = oldPos schedule(200,function() autoWalk(oldPos) end) schedule(1000,function() for i = -1,1 do for j = -1,1 do local useTile = g_map.getTile({x=posx()+i,y=posy()+j,z=posz()}) g_game.use(useTile:getTopUseThing()) end end end) end if oldPos.z == newPos.z then schedule(300,function() local useTile = g_map.getTile({x=oldPos.x,y=oldPos.y,z=oldPos.z}) topThing = useTile:getTopThing() if not useTile:isWalkable() then use(topThing) end end) autoWalk({x=oldPos.x,y=oldPos.y,z=oldPos.z}) else lastPos = oldPos autoWalk(oldPos) for i = 1,6 do schedule(i*200,function() autoWalk(oldPos) if getDistanceBetween(pos(), oldPos) == 0 and (posz()>newPos.z and getCreatureByName(nome) == nil) then say('exani tera') end end) end local useTile = g_map.getTile({x=newPos.x,y=newPos.y-1,z=oldPos.z}) g_game.use(useTile:getTopUseThing()) end end end end) 3 2 Quote Link to comment Share on other sites More sharing options...
MeLkZeRa Posted August 25, 2021 Report Share Posted August 25, 2021 Slk meno so macro de qualidade <3 Bom Trampo rl Quote Link to comment Share on other sites More sharing options...
Coldzera Posted August 25, 2021 Report Share Posted August 25, 2021 Sempre um script melhor que o outro. Parabéns pelo trabalho e por sempre compartilhar conosco. Testado e aprovado! Quote Link to comment Share on other sites More sharing options...
Augusto. Posted August 25, 2021 Report Share Posted August 25, 2021 Se é desenrolado memo em bixao slc Quote Link to comment Share on other sites More sharing options...
Cadwallow Posted August 28, 2021 Report Share Posted August 28, 2021 Boaaa! Obrigado pelas colaborações!! Quote Link to comment Share on other sites More sharing options...
lukasplis Posted January 20, 2022 Report Share Posted January 20, 2022 como usa? não liga o script aqui >.< Quote Link to comment Share on other sites More sharing options...
Kiedis Posted January 21, 2022 Report Share Posted January 21, 2022 4 hours ago, lukasplis said: como usa? não liga o script aqui >.< mano, tem que colocar nos macros, vc deve estar colocando nos script Quote Link to comment Share on other sites More sharing options...
lukasplis Posted January 21, 2022 Report Share Posted January 21, 2022 13 horas atrás, lukasplis disse: como usa? não liga o script aqui >.< desculpem minha ingenuidade, parti da premissa que era só copiar o script e colocar lá do lado direito e acabei nem vendo o vídeo. Problema resolvido da minha parte kkkk Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.