If anyone uses mudlet, do anyone know how to code the pattern that allows you to preset the target OR just type in the name of the target?
^tt (\w+)$ <--- is what I use to preset target before choosing to do something to it.
translates:tt testdog
send("kill " ..target)(kill testdog)
but I just need the pattern to where I can do either, and when I do send("kill " ..target), I can just do like kill dog/kill cat/kill something. Without having to keep presetting a target each time a target is changed.
0
Comments
target = matches[2];
send("kill " .. target);
^kill$
send("kill " .. target);
Something like that?
Valkyrior system
https://gyazo.com/13487fb15337d62b4961c9160455f18f so that way I can just do "lea testdog" or just "lea" if the target is current.
Alias pattern: ^t (.+)$ Script: if matches[2]:lower() == "clear" then modules.targets.all = {} modules.targets.primary = "nobody" echo("\nTarget cleared.") else modules.targets.all = {} for s in matches[2]:gmatch("%w+") do table.insert(modules.targets.all,s) end if #modules.targets.all > 0 then modules.targets.primary = modules.targets.all[1] echo("\nTarget: "..modules.targets.primary) else echo("\nNo valid targets.") end end
and then in the 'you cannot see that target' trigger you just step up or down modules.targets.all.
target_index = target_index or 1 if increasing then target_index = target_index + 1 if target_index > #all_targets then target_index = 1 end else target_index = target_index - 1 if target_index < 1 then target_index = #all_targets end end current_target = targets[target_index]
^slash(:?\s(\w+))?$
local tar = matches[2] or target
send('slash ' .. tar)
So, typing 'slash' will slash whatever target you have set.
Override that for a single attack by typing 'slash soandso'
If you wanted, you could choose to set that as your new target as well, or even combine Miha's script and set lists of targets from the attack alias.
Personally I don't bother taking it that far - I just like being able to use my attack aliases without changing my current target.