You would need to learn alternate methods to achieve a similar effect as to what you want. Something that time and experience will give to you (... like going through the whole DM reference. I've done that before a few times and every time I learned something new).

But this is what you would want:
The reason for the popup would be the argument you have in the parenthesis [the () brackets] in the verb:
mob/trg in oview(1)
This will look for any /mob around you. If there's only one, it'll return that immediately (hence no popup). If there's > 1, it'll give you a popup to select just one. If there's no /mob around you, trg = null which will give you runtime errors if you do not check for that.

So to avoid the popup, the first thing you would want to do is get rid of that argument so you have Attack().

Now, you need some way to find as many /mob as you can when you attack... this is done using for(). ex:
for(var/path/V in location)
The path, for example, being /mob and V being the variable
(it could be dwhjuhdwhgb for all DM cares. The variable name is just a way to access the properties of the object. People often choose "M" for /mob because... well, because of _M_ob so it is easy to remember. "target", "killer", "mama", etc. can be used, as long as it makes sense when you look back at it later on).

Okay, now you know you need to use a for() LOOP (others can be used, like while() but this is more efficient). Now, how do you get the location? That depends on what you want:
  • If you want a X-radius range AROUND you, you use oview(R, src), src = source = yourself. The reason you do not want to use view() is because it'll include yourself... so there's a potentially that you will attack yourself
  • If you want to attack right in front of you, you can use get_step(), using your dir variable to tell what direction to look for the target for.


There are many other ways but these are the top two situation you'll need. If you need to go X-amount of steps in front of you, you may need to have another for() + get_step() to have the /turf set in an array/list or maybe even block()...

Note that these methods returns a /turf as the location. That's because when you walk in DM, you are placed in to a /turf's content. A /turf is in the content of an /area... if you do not know what I mean, do not worry about that right now. All you need to know is when you loop, you need to loop in a /turf.


If you want to get a single object with a certain path, you can use locate(). For example
if(locate(/key/doom) in src.content)
src << "Enter if you dare... for you possess the key of DOOM!"
Page: 1 2