ID:272137
 
How would I go about having a random mob in the world as a target for the user.
Heres my example though it doesnt work
Assassinate(mob/M as mob in oview(10))
var/target as text=random mob in world
if(M.name==usr.target)
usr<<"You kill [M]"
M<<"A bullet flies and hits you in the brain, killing you instantly"
M.Die()
usr.LVL()
else
usr<<"[M] is not your target, [usr.target] is!"
Why would an assassin attack a random person?
In response to Darkmag1c1an11
I did it as often as possible in Assassin's Creed. It makes a fun past time.
In response to Popisfizzy
Well sure, but at least you knew who you were going after. What the TC is trying to do is the equivelant of Robin Hood putting on a blindfold and shooting.
In response to Darkmag1c1an11
The point of this is the assassin class gets a random target at some point and when you kill that target you get money. It's just a way I'm trying to draw attention away from the fact that I'm making another standard RPG game.
Look up the pick() proc in the DM Reference.
Also, don't use the name variable to compare between different objects... just compare the objects themselves directly. Only check the name if you specifically want to do name-related stuff.
In response to Kaioken
Thanks a lot! Finally have a working Assassin class.