--- deliantra/server/server/c_object.C 2010/04/04 02:51:57 1.115 +++ deliantra/server/server/c_object.C 2010/04/05 03:22:26 1.116 @@ -1305,3 +1305,32 @@ return 0; } + +/* op should be a player, params is any params. + * If no params given, we print out the currently marked object. + * otherwise, try to find a matching object - try best match first. + */ +int +command_mark (object *op, char *params) +{ + if (!params) + { + if (object *mark = find_marked_object (op)) + op->statusmsg (format ("%s is marked.", query_name (mark))); + else + op->failmsg ("You have no marked object."); + } + else + { + if (object *mark = find_best_object_match (op, params)) + { + op->contr->mark = mark; + op->statusmsg (format ("Marked item %s", query_name (mark))); + } + else + op->failmsg (format ("Could not find an object that matches %s", params)); + } + + return 0; /*shouldnt get here */ +} +