init: add workspace files
This commit is contained in:
19
world/cmd/action/follow.js
Normal file
19
world/cmd/action/follow.js
Normal file
@@ -0,0 +1,19 @@
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user