1
Propozycje / Zimowa Aktualizacja
« dnia: 15 Grudzień 2023, 17:19:18 »
Jakoś w połowie stycznia będzie zimowa aktualizacja więc jak macie jakieś pomysły co usunąc/dodać/zmienić to piszcie teraz.
Ta sekcja pozwala Ci zobaczyć wszystkie wiadomości wysłane przez tego użytkownika. Zwróć uwagę, że możesz widzieć tylko wiadomości wysłane w działach do których masz aktualnie dostęp.
UI.Separator()
local distance = 5
local amountOfMonsters = 1
addTextEdit("NeedSafe", storage.NeedSafe or "NeedSafe", function(widget, text1)
storage.NeedSafe = text1
end)
addTextEdit("SpellAtack", storage.SpellAtack or "fire", function(widget, text2)
storage.SpellAtack = text2
end)
macro(105, "Spells", function()
local isSafe = true;
local specAmount = 0
if not g_game.isAttacking() then
return
end
for i,mob in ipairs(getSpectators()) do
if (getDistanceBetween(player:getPosition(), mob:getPosition()) <= distance and mob:isMonster()) then
specAmount = specAmount + 1
end
if (mob:isPlayer() and (player:getName() ~= mob:getName()) and (storage.NeedSafe) == "NeedSafe") then
isSafe = false;
end
end
if (specAmount >= amountOfMonsters) and isSafe then
if ((storage.SpellAtack) == "bomba" or (storage.SpellAtack) == "earth") then
return say("mage bomb")
end
if ((storage.SpellAtack) == "rp" or (storage.SpellAtack) == "energy") then
return say("mage bomb")
end
if (storage.SpellAtack) == "ms" then
return say("apericus tremendarbus")
end
if (storage.SpellAtack) == "ed" then
return say("mage bomb")
end
if (storage.SpellAtack) == "0earth" then
return say("Exori Gran Tera")
end
if (storage.SpellAtack) == "0ice" then
return say("Exori Gran Frigo")
end
if (storage.SpellAtack) == "supp" then
return say("vatus cego")
end
if (storage.SpellAtack) == "ek" then
return say("exori boli")
end
else
if ((storage.SpellAtack) == "ed" or (storage.SpellAtack) == "0fire") then
return say("rida mort")
end
if ((storage.SpellAtack) == "rp" or (storage.SpellAtack) == "0ice") then
return say("flam shen")
end
if ((storage.SpellAtack) == "ms" or (storage.SpellAtack) == "supp") then
return say("vatus mort")
end
if ((storage.SpellAtack) == "earth" or (storage.SpellAtack) == "0earth") then
return say("Exori Gran Tera")
end
if ((storage.SpellAtack) == "ek" or (storage.SpellAtack) == "0death") then
return say("exori super hur")
end
end
end)
local mineableIds = {4457, 4467, 4458, 4464, 4460, 4459, 4461, 4462}
local idx = 0
local pickId = 3308
local useDistance = 1
local moveDist = 8
local function getClosestPosition(positions)
local closestTile
local closestTileDistance = 99999
for _, position in ipairs(positions) do
local tileDist = getDistanceBetween(pos(), position)
if tileDist < closestTileDistance then
closestTile = position
closestTileDistance = tileDist
end
end
if closestTile then
return closestTile
end
end
macro(500, "Kopalnia", function()
local possibleMine = {}
local foundMine = 0
local tiles = g_map.getTiles(posz())
shuffled = {}
for i, v in ipairs(tiles) do
local pos = math.random(1, #shuffled+1)
table.insert(shuffled, pos, v)
end
local found = false
for i, tile in ipairs(shuffled) do
if tile:getTopUseThing() ~= nil then
local topID = tile:getTopUseThing():getId()
if mineableIds[idx + 1] == topID then
local distance = getDistanceBetween(pos(), tile:getPosition())
if (distance <= useDistance) then
idx = (idx + 1) % #mineableIds
return usewith(getAmmo(), tile:getTopUseThing())
elseif distance > useDistance and distance <= moveDist then
if findPath(pos(), tile:getPosition(), moveDist, {ignoreNonPathable=true, precision=1}) then
table.insert(possibleMine, tile:getPosition())
foundMine = foundMine + 1
end
end
end
end
end
if foundMine >= 1 then
return autoWalk(getClosestPosition(possibleMine), moveDist, {ignoreNonPathable=true, precision=1})
else
idx = (idx + 1) % #mineableIds
end
end)