init: add workspace files

This commit is contained in:
2026-05-26 16:41:20 +08:00
commit f4f2393f72
1041 changed files with 67405 additions and 0 deletions

55
world/npc/pub/jiaoxi.js Normal file
View File

@@ -0,0 +1,55 @@
this.inherits(NPC);
this.set({
name: "武馆教习",
desc: "一个高大威猛的汉子,负责教导武馆新人基本功法",
gender: 1,
age: 25,
per: this.random(20) + 10,
mp: 400,
max_mp: 400,
hp: 400,
max_hp: 400,
family: FAMILIES.NONE
});
this.skill_map(
["force", 300],
["dodge", 300],
["parry", 300],
["sword", 300],
["blade", 300],
["club", 300],
["staff", 300],
["whip", 300],
["unarmed", 300],
["throwing", 300]);
this.on_checkskill = function (me) {
if (!me.query_temp("wg_sr")) {
me.send_room("武馆教习瞄了$N一眼100两白银先交钱再学功夫包教包会。");
return me.notify_fail('{type:"cmds",items:{cmd:"give ' + this.id + ' 10000 money",name:"交报名费"}}');
}
return true;
}
this.on_teach = function (me) {
return me.query_temp("wg_sr") == 1;
}
this.on_accept = function (me, obj, count) {
if (obj != "money") return false;
if (me.query_temp("wg_sr")) {
me.notify("武馆教习愉快笑了笑,收下你的钱。");
return true;
}
if (count < 10000) return me.notify_fail("武馆教习瞪了你一眼100两白银不二价没钱就一边玩去。");
me.send_room("武馆教习收下$N的钱拍了拍$N的肩膀不错以后你就是本馆的弟子了本武馆包教基本武技到300级随到随学不限学时全国连锁。");
me.set_temp("wg_sr", 1);
if (!me.query_temp("sm_tm")) {
me.set_temp("sm_tm", Math.floor(Date.now() / 100000));
}
return true;
}
// this.add_action("ask1", "武馆任务", function (me) {
// if (me.family != FAMILIES.NONE) return me.notify("武馆教习对你说道:你还是去找自己的师门看看吧。");
// me.do_command("task", "sm " + this.id);
// });