Posts: 8
Threads: 4
Joined: Oct 2023
Reputation:
0
10-28-2023, 01:56 AM
(This post was last modified: 10-28-2023, 02:00 AM by virtual21.)
Hi, do you know how to do "exori min" caster?
variables:
MIN_HP
MIN_MONSTERS
MIN_MANA
will be nice if it detect what side is most monsters, turn good course and if hp&mp is ok then cast spell
Posts: 2,919
Threads: 483
Joined: Jul 2018
Reputation:
83
10-28-2023, 12:38 PM
(This post was last modified: 10-30-2023, 03:48 AM by Arkilys.)
Hello.
I didn't tested this script at all, but should work:
local Monsters = { 'Demon', 'Demon Skeleton', 'Dragon' } -- Monsters to kill or leave empty = { } to check for all monsters
local SafeList = { 'Player1', 'Friend', 'Another Friend' } -- Your safelist
local MinMonsters = 2 -- Min. count to cast exori min. It will only cast if can hit at least this count of monsters.
local MinMana = 150 -- Min. mana to cast exori min.
local SafeHealth = 70 -- Only if your HP % is higher or equal to this valaue.
local CheckForPlayers = true -- If true then script will not cast spel if there are players on screen.
local CheckPlayerAllFloors = true -- Checks all floors for players?
local Directions = {
n = { { -1, -1 }, { 0, -1 }, { 1, -1 } },
s = { { -1, 1 }, { 0, 1 }, { 1, 1 } },
e = { { 1, -1 }, { 1, 0 }, { 1, 1 } },
w = { { -1, -1 }, { -1, 0 }, { -1, 1 } },
}
if hppc() >= SafeHealth and mp() >= MinMana and cancast() and (not CheckForPlayers or paroundignore(CheckPlayerAllFloors, unpack(SafeList)) == 0) then
local monstersListCount = #Monsters
if monstersListCount > 0 then
table.lower(Monsters)
end
local monstersCountOnDirection = {n = 0, e = 0, s = 0, w = 0}
local playerX, playerY = posx(), posy()
local creatures = getcreatures('mfs')
for _, creature in ipairs(creatures) do
if creature.dist == 1 and (monstersListCount == 0 or table.find(Monsters, creature.name:lower()) ~= nil) then
local xDiff, yDiff = creature.posx - playerX, creature.posy - playerY
for dir, dirDiffs in pairs(Directions) do
for __, pos in ipairs(dirDiffs) do
if xDiff == pos[1] and yDiff == pos[2] then
monstersCountOnDirection[dir] = monstersCountOnDirection[dir] + 1
break
end
end
end
end
end
local bestAmount, bestDir = 0, ''
for dir, amount in pairs(monstersCountOnDirection) do
if amount > bestAmount then
bestAmount, bestDir = amount, dir
end
end
if bestAmount >= MinMonsters and bestDir ~= '' then
local dirStr = { n = 0, e = 1, s = 2, w = 3}
if dir() ~= dirStr[bestDir] then
turn(bestDir)
wait(100, 300)
end
say('exori min')
wait(1100, 1300)
end
end
Posts: 8
Threads: 4
Joined: Oct 2023
Reputation:
0
|Only Registered members can see download links. | Click here to buy subscription or here to register.thank you for the quick reply <3
LUA Script -> exori min: 45: '}' expected near '='
Posts: 2,919
Threads: 483
Joined: Jul 2018
Reputation:
83
|Only Registered members can see download links. | Click here to buy subscription or here to register.
Fixed it. Please, try again
Posts: 8
Threads: 4
Joined: Oct 2023
Reputation:
0
10-29-2023, 01:10 AM
(This post was last modified: 10-29-2023, 01:11 AM by virtual21.)
I pasted it in HUDs and it doesn't work. Compile with no error but not using spell
Posts: 2,919
Threads: 483
Joined: Jul 2018
Reputation:
83
|Only Registered members can see download links. | Click here to buy subscription or here to register.Hello.
I've fixed it and also tested, it worked fine after fix.
btw... You should use it on Persistents, not HUDs.
Posts: 8
Threads: 4
Joined: Oct 2023
Reputation:
0
|Only Registered members can see download links. | Click here to buy subscription or here to register.I pasted it in Persistents and still nothing ;/ i will check it script or Persistents problem when i back to home.
Posts: 2,919
Threads: 483
Joined: Jul 2018
Reputation:
83
|Only Registered members can see download links. | Click here to buy subscription or here to register.Hello.
Try again, because i didn't pasted the correct code, which i just fixed. xD sorry
|