bashing
I'm creating my own bashing toggle. I have the script for it, except for one minor 'check' that I need to add.. Basically, when I'm targeting 'undead' and there are no 'undead' in the room, it spams out my bashing command until I toggle it off or I lose bal/eq. I need help with that first check..
Would it be easier to create a new variable and create a function out of it to check if target is inRoom or is there a different/easier way?
I think my example would be along the lines of..
local inRoom = function() <insert code here to check for inRoom> end
then the check for it being like,
if inRoom then
if bal and eq then
BASH
end
end
Oh, Mudlet user here.
Would it be easier to create a new variable and create a function out of it to check if target is inRoom or is there a different/easier way?
I think my example would be along the lines of..
local inRoom = function() <insert code here to check for inRoom> end
then the check for it being like,
if inRoom then
if bal and eq then
BASH
end
end
Oh, Mudlet user here.
0
Comments
[code]
---threatCheck determines how dangerous the room is
[/code]
@Gjarrus why are you targetting shards and having that whole check? It looks like it's for an area sweep and harvesting, but you can do that more efficiently - try a separate macro (so you aren't forcing that if process every round) or just add shard to your target list and chuck in an if at the attack level (lower down, less called) that swaps in a harvest. You can also path find shard, if you want a harvesting bot.