Files
wsmud/world/cmd/action/follow.js
2026-05-26 16:41:20 +08:00

19 lines
481 B
JavaScript

this.inherits(COMMAND);
this.command = "follow";
this.enter = function (me, objid) {
if (me.is_player && !me.query_temp("admin")) return false;
if (!objid) {
return me.notify("你要跟随谁?");
}
if (objid == "none") {
me.do_follow(null);
} else {
var obj = me.find_obj(objid, me.environment);
if (!obj || !obj.is_living) {
return me.notify("你要跟随谁?");
}
me.do_follow(obj);
}
}