def cmd_kill(args)
case args
when nil, ""
sendto("Who do you want to kill?")
else
d = world.all_characters.find {|pid| args == get_object(pid).name }
if !d
sendto("Can't find them.")
return
end
d = get_object(d)
if rand < 0.3
sendto("You kill #{d.name}.")
world.connected_characters.each {|pid|
if pid != id
add_event(id,pid,:show,"#{name} kills #{d.name}.")
end
}
d.account.disconnect("You have been pwn3d!")
else
sendto("You attacks and misses #{d.name}.")
world.connected_characters.each {|pid|
if pid != id
add_event(id,pid,:show,"#{name} attacks and misses #{d.name}.")
end
}
end
end
end