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

17
world/npc/yz/biaotou.js Normal file
View File

@@ -0,0 +1,17 @@
this.inherits(NPC);
this.set({
name: "镖头",
desc: "福威镖局的镖头",
gender: 1,
age: 35,
per: 22,
mp: 100,
max_mp: 100,
hp: 100,
max_hp: 100,
});
this.skill_map(
["unarmed", 150],
["dodge", 150],
["force", 150]);
this.set_objects(["eq/lv0/cloth", 1, 1], ["eq/lv0/jian", 1, 1]);

16
world/npc/yz/caipan.js Normal file
View File

@@ -0,0 +1,16 @@
this.inherits(NPC);
this.set({
name: "裁判",
desc: "福威镖局的镖头",
gender: 1,
age: 35,
per: 22,
mp: 1500,
max_mp: 1500,
hp: 1500,
max_hp: 1500,
});
this.set_chat_msg([
"裁判说道:要报名打擂台的找我啊,免费帮你找对手!",
"裁判说道:想看哪个擂台的比赛问我就好了。 "
]);

32
world/npc/yz/cheng.js Normal file
View File

@@ -0,0 +1,32 @@
this.inherits(NPC);
this.set({
name: "程药发",
desc: "他就是程药发,扬州现任知府。",
title: "扬州知府",
gender: 1,
age: 45,
per: 22,
mp: 1500,
max_mp: 1500,
hp: 1500,
max_hp: 1500,
});
this.set_objects(["eq/lv0/cloth",1,1]);
this.add_action("ask1", "追捕", function (me) {
USERTASK.RUN("yamen2", me);
});
// this.add_action("ask2", "放弃任务", function (me) {
// if (!me.query_temp("task/yamen")) {
// return me.notify("程药发对你说道:你没有在追捕啊? 如果你想干,就接任务吧。");
// }
// USERTASK.GET("yamen2").giveup(me);
// me.notify("程药发对你说道:好吧,你可以接别的逃犯来继续做。");
// });
// this.add_action("ask3", "快速追捕", function (me) {
// USERTASK.GET("yamen").quickly_start(me);
// });

45
world/npc/yz/cuifu/cui.js Normal file
View File

@@ -0,0 +1,45 @@
this.inherits(NPC);
this.set({
name: "崔员外",
desc: "崔府的主人,满脸肥肉,据说他鱼肉乡里,坏事做尽",
title: "财主",
gender: 1,
age: 55,
per: 15,
mp: 500,
max_mp: 500,
hp: 500,
max_hp: 500,
score:30
});
this.set_objects(
["eq/lv0/cloth", 1, 1]
);
this.skill_map(
["unarmed",30],
["dodge", 30],
["sword", 30],
["blade", 30],
["parry", 30]);
this.set_drop({
obj: "money/silver",
min: 10,
max: 20
}, {
obj: ["eq/lv0/cloth", "eq/lv0/jian"],
odds: 5000
}, {
obj: "eq/lv1/gold_ring",
odds: 1000
});
this.on_enter = function (target) {
if (target.is("yz/cuifu/yahuan")) {
this.send_room("<hir>崔员外对丫鬟叫道:小娘皮,竟然想跑?</hir>");
this.do_kill(target);
} else {
target.notify("崔员外扯着嗓子喊道:管家,管家,有人闯进来了。");
}
}

View File

@@ -0,0 +1,32 @@
this.inherits(NPC);
this.set({
name: "管家",
desc: "崔府的管家,据说掌管着崔府的钥匙",
gender: 1,
age: 65,
per: 15,
mp: 250,
max_mp: 250,
hp: 250,
max_hp: 250,
score: 20
});
this.set_objects(
["eq/lv0/cloth", 1, 1]
);
this.skill_map(
["unarmed", 20],
["dodge", 20],
["sword", 20],
["parry", 20]);
this.set_drop({
obj: "money/silver",
min: 2,
max: 5
}, {
obj: "sp/yz/yaoshi",
odds: 5000
}, {
obj: ["eq/lv0/cloth", "eq/lv0/mugun"],
odds: 3000
});

View File

@@ -0,0 +1,33 @@
this.inherits(NPC);
this.set({
name: "家丁",
desc: "崔府的家丁",
gender: 1,
age: 25,
per: 15,
mp: 100,
max_mp: 100,
hp: 100,
max_hp: 100,
score: 10
});
this.skill_map(
["club", 15],
["dodge", 15],
["sword", 15],
["parry", 15]);
this.set_objects(
["eq/lv0/cloth", 1, 1],
["eq/lv0/mugun", 1, 1]
);
this.set_drop({
obj: "money/coin",
min: 10,
max: 30
}, {
obj: ["eq/lv0/cloth", "eq/lv0/mugun"],
odds:3000
}, {
obj: ["eq/lv0/jd_cloth", "eq/lv0/jd_shoes"],
odds: 3000
});

View File

@@ -0,0 +1,22 @@
this.inherits(MONSTER);
this.set({
name: "大狼狗",
desc: "一只昂首挺胸,吐着长舌头的大狼狗。像是财主家里养的宠物。",
gender: 1,
mp: 100,
max_mp: 100,
hp: 100,
max_hp: 100,
score: 5
});
this.skill_map(
["bite", 20]);
//drop path,min,max,per
this.set_drop({
obj: "res/pimao1",
min: 1,
max: 4
});
this.on_enter = function (me) {
this.do_kill(me);
}

View File

@@ -0,0 +1,48 @@
this.inherits(NPC);
this.set({
name: "丫鬟",
desc: "她是一个长得很好看的小姑娘。",
gender: 2,
age: 16,
per: 30,
mp: 100,
max_mp: 100,
hp: 100,
max_hp: 100,
score: -10,
exp: 0,
pot:0
});
this.add_action("ok", "救出丫鬟", function (me) {
var type = me.query_temp("fb/cuifu/yahuan");
if (!type) {
me.send_room("$N看了看$n把旁边的衣服丢给$n穿好衣服我带你出去。\n$n穿上她的衣服。",this);
this.do_follow(me);
me.set_temp("fb/cuifu/yahuan", 1);
me.add_fbscore(10);
} else {
if (type == 2 || type == 4) {
///me.notify("<hic>你刚想要答应丫鬟,想起来自己还没房子,也是无家可归的人,就没想法了。</hic>");
if (me.add_follower(this)) {
me.notify("你想了一下觉得这个小丫头也怪可怜的,便对她说道:好吧,你就先跟着我吧!");
me.notify("<him>你获得了丫鬟的追随,你可以去你的住所找她。</him>");
this.do_follow(null);
this.destroy();
}
} else {
me.notify("你已经答应她了。");
}
}
});
this.on_enter = function (me) {
if (!this.follow_target && !me.query_temp("fb/cuifu/yahuan")) {
me.notify("丫鬟看到你进来,吓了一跳,待看清来人,扑到你前面泣声喊道:大人,救救我!", this);
me.send_commands("ok " + this.id, "答应她");
}
}

View File

@@ -0,0 +1,33 @@
this.inherits(NPC);
this.set({
name: "崔莺莺",
desc: "她长得极美,尤其是那对眼睛,媚得直可以勾人魂魄。",
title: "财主女儿",
gender: 2,
age: 17,
per: 34,
mp: 100,
max_mp: 100,
hp: 100,
max_hp: 100,
});
this.set_drop({
obj: "money/silver",
min: 1,
max: 5
}, {
obj: "eq/lv1/cui_sz",
odds: 1000
});
this.set_ask("东厢", function (me) {
if (me.query_temp("fb/cuifu/yahuan") == 2) {
me.notify("崔莺莺想了想,告诉你:我记得爹爹在东厢的柜子下面放了个小箱子。");
me.set_temp("fb/cuifu/yahuan", 3);
return true;
} else if (me.query_temp("fb/cuifu/yahuan") == 4) {
me.notify("崔莺莺说道:你不是已经找到了吗?");
return true;
}
return false;
});

106
world/npc/yz/hy/jiaotu.js Normal file
View File

@@ -0,0 +1,106 @@
this.inherits(NPC);
this.set({
name: "黑鹰教徒",
desc: "他们身穿黑袍,持长刀,动作整齐划一",
gender: 1,
age: 32,
per: 22,
mp: 1500,
max_mp: 1500,
hp: 1500,
max_hp: 1500
});
this.no_refresh = true;
this.on_heart_beat = function () {
let exits = this.environment.move_exits;
if (!exits || !exits.length) return;
this.do_command('go', exits.random());
for (let item of this.environment.items) {
if (item.is_player) {
this.send_room("$N喊道这里有个小毛贼");
return this.do_kill(item);
}
}
}
this.on_enter = function (me) {
if (me.is_player && !this.fight_type) {
this.send_room("$N喝道" + me.call(true) + ",哪里来的小毛贼!");
this.do_kill(me);
}
}
var DIE_MSG = ["\n$N扑在地上挣扎了几下腿一伸口中喷出几口<HIR>鲜血</HIR>,死了!\n",
"\n$N大叫一声倒在地上挣扎了几下<HIR>死了</HIR>\n",
"\n$N口中喷出几口<HIR>鲜血</HIR>,倒在地上,死了!\n"];
this.die = function (killer) {
if (!this.environment) return;
if (this.on_die && this.on_die(killer) == false) {
this.hp = 1;
return false;
}
this.hp = 0;
this.clear_status();
this.send_room(DIE_MSG.random());
var corpse = new CORPSE();
var isinfb = this.environment.is_fb();
corpse.init(this, isinfb);
this.die_room = this.environment;
this.environment.item_changed(corpse, true);
this.environment.item_changed(this, false);
// this.call_out(this.relive, 120000);
this.on_died && this.on_died(killer, corpse);
}
this.on_died = function (me, corpse) {
let eny = this.enemy[0];
if (eny && eny.hp > 0 && eny.environment === this.die_room) {
let count = eny.query_temp('hy_ct', 0);
if (count > 0) {
eny.add_exp(0, 10000);
eny.add_temp('hy_ct', -1);
for (let item of corpse.items) {
eny.send('你得到了' + item.unit_name() + "。");
eny.add_obj(item);
}
}
}
corpse.items = null;
}
const rooms = ['yz/hy/jiaochang1', 'yz/hy/jiaochang3',
'yz/hy/jiaochang4', 'yz/hy/jiaochang5'];
this.relive = function () {
if (!this.die_room) return;
var room = ROOM.Get(rooms.random());
obj = NPC.CLONE(this.path);
room.item_changed(obj, true);
this.die_room = null;
this.equipment = null;
this.items = null;
this.skills = null;
}
this.skill_map(
["unarmed", 150],
["dodge", 150],
["force", 150],
["parry", 150],
["blade", 150],
["heilongxinfa", 150, "force"],
["wuhuduanmendao", 150, "blade"]);
this.set_objects(
["eq/lv0/cloth", 1, 1],
["eq/lv1/dandao", 1, 1]
);
this.set_drop({
obj: "st/xuanjing",
min: 1,
max: 3
});

78
world/npc/yz/hy/jiaoxi.js Normal file
View File

@@ -0,0 +1,78 @@
this.inherits(NPC);
this.set({
name: "黑鹰教习",
desc: "他身穿黑袍,手持长刀",
gender: 1,
age: 32,
per: 22,
mp: 1500,
max_mp: 1500,
hp: 2500,
max_hp: 2500
});
this.no_refresh = true;
this.skill_map(
["unarmed", 180],
["dodge", 180],
["force", 180],
["parry", 180],
["blade", 180],
["heilongxinfa", 180, "force"],
["wuhuduanmendao", 180, "blade"]);
this.set_objects(
["eq/lv0/cloth", 1, 1],
["eq/lv1/dandao", 1, 1]
);
this.on_kill = function (me) {
if (!this.fight_type) {
let rooms = ['yz/hy/jiaochang1', 'yz/hy/jiaochang3',
'yz/hy/jiaochang4', 'yz/hy/jiaochang5'];
this.send_room('$N大声喊道小的们来活了');
let list = [];
for (let path of rooms) {
let room = ROOM.Get(path);
for (let item of room.items) {
if (!item.fight_type && item.hp > 0 && item.is('yz/hy/jiaotu')) {
list.push(item);
}
}
}
for (let item of list) {
item.moveto(this.environment, item.name + '冲了过来。');
item.do_kill(me);
}
}
}
this.on_died = function (me, corpse) {
let eny = this.enemy[0];
if (eny && eny.hp > 0 && eny.environment === this.die_room) {
let count = eny.query_temp('hy_ct', 0);
if (count > 0) {
eny.add_exp(0, 10000);
eny.add_temp('hy_ct', -1);
for (let item of corpse.items) {
eny.send('你得到了' + item.unit_name() + "。");
eny.add_obj(item);
}
}
}
corpse.items = null;
}
this.set_drop({
obj: "st/xuanjing",
min: 1,
max: 3
}, {
obj: ['eq/lv1/xk_cloth',
'eq/lv1/xk_head',
'eq/lv1/xk_shoes'],
odds: 3000
});

81
world/npc/yz/hy/tiehu.js Normal file
View File

@@ -0,0 +1,81 @@
this.inherits(NPC);
this.set({
name: "铁虎",
title: "黑鹰队长",
desc: "他身高近七尺,虎背熊腰,脸上一道从眉骨延伸至下颌的刀疤",
gender: 1,
age: 32,
per: 22,
mp: 2500,
max_mp: 2500,
hp: 3000,
max_hp: 3000,
prop: {
gj: 50
}
});
this.no_refresh = true;
this.on_kill = function (me) {
if (!this.fight_type) {
let rooms = ['yz/hy/jiaochang1', 'yz/hy/jiaochang3',
'yz/hy/jiaochang4', 'yz/hy/jiaochang5'];
this.send_room('$N道不知死活');
let list = [];
for (let path of rooms) {
let room = ROOM.Get(path);
for (let item of room.items) {
if (item.hp > 0 && item.is('yz/hy/jiaotu')) {
list.push(item);
}
}
}
for (let item of list) {
item.moveto(this.environment, item.name + '冲了过来。');
item.do_kill(me);
}
}
}
this.on_died = function (me, corpse) {
let eny = this.enemy[0];
if (eny && eny.hp > 0 && eny.environment === this.die_room) {
let count = eny.query_temp('hy_ct', 0);
if (count > 0) {
eny.add_exp(0, 10000);
eny.add_temp('hy_ct', -1);
for (let item of corpse.items) {
eny.send('你得到了' + item.unit_name() + "。");
eny.add_obj(item);
}
}
}
corpse.items = null;
}
this.skill_map(
["unarmed", 200],
["dodge", 200],
["force", 200],
["parry", 200],
["blade", 200],
["feiyanzoubi", 200, "dodge"],
["heilongxinfa", 200, "force"],
["wuhuduanmendao", 200, "blade"]);
this.set_objects(
["eq/lv0/cloth", 1, 1],
["eq/lv1/dandao", 1, 1]
);
this.set_drop({
obj: "st/xuanjing",
min: 10,
max: 30
}, {
obj: ["book/bc#wuhuduanmendao", "eq/lv1/dandao"],
odds: 3000
});

82
world/npc/yz/hy/yin.js Normal file
View File

@@ -0,0 +1,82 @@
this.inherits(NPC);
this.set({
name: "尹小龙",
desc: "他本是青木堂的堂主,被黑鹰队所擒",
title: "青木堂堂主",
gender: 1,
age: 55,
per: 22,
mp: 400,
max_mp: 400,
hp: 1000,
max_hp: 1000,
score: 10
});
this.no_refresh = true;
this.set_objects([
"eq/lv0/cloth", 1, 1
]);
this.skill_map(
["dodge", 200],
["parry", 200],
["force", 200],
["unarmed", 200],
["houquan", 200, "unarmed"],
["yunlongshenfa", 200, "dodge"],
["yunlongxinfa", 200, "force"]);
this.set_drop(
{
obj: ['eq/lv1/xk_cloth',
'eq/lv1/xk_shoes'],
odds: 5000
}, {
obj: [
'eq/lv1/xk_head',
'eq/lv1/qingmu'],
odds: 500
}
);
this.on_enter = function (me) {
if (me.is_player) {
this.die();
}
}
this.on_died = function (killer, corpse) {
if (killer)
corpse.items = null;
else {
corpse.no_alloc = true;
corpse.query_items = this.query_items;
corpse.clear_items = this.clear_items;
}
}
this.query_items = function (eny) {
let items = this.items;
if (!items || !items.length) return null;
if (this.owner) {
if (this.owner === eny.id)
return items;
return null;
}
let count = eny.query_temp('hy_ct', 0);
if (count > 0) {
this.owner = eny.id;
return items;
}
return null;
}
this.clear_items = function (eny) {
this.items = null;
if (this.owner && this.owner === eny.id && eny.query_temp('hy_ct', 0) > 0) {
eny.add_exp(0, 10000);
eny.add_temp('hy_ct', -1);
this.owner = null;
}
}

View File

@@ -0,0 +1,40 @@
this.inherits(NPC);
this.set({
name: "龟公",
desc: "一个满脸横肉的汉子,在丽春院日子久了,养的白白肥肥。",
gender: 1,
age: 25,
per: 22,
mp: 200,
max_mp: 200,
hp: 200,
max_hp: 200,
score: 10
});
this.set_chat_msg([
"龟公嘿嘿笑道:小娘皮,来了这里就乖乖地侍侯大爷们吧。",
"龟公啐了一口,说道:想跑?跑到天涯海角都给你追回来!",
"龟公恶狠狠的说:哼!你们这些小贱人,活该!"
]);
this.on_leave = function (me, dir) {
if (dir == "east" || dir == "west") {
me.notify("龟公拦住你:这位" + me.call() + ",别着急,先来后到嘛,要不兄弟我另外给你物色个?");
return false;
}
}
this.skill_map(
["unarmed", 70],
["dodge", 70],
["parry", 70]);
this.set_drop({
obj: "money/silver",
min: 2,
max: 10
}, {
obj: ["eq/lv0/cloth", "eq/lv0/mugun"],
odds: 6000
}, {
obj: ["eq/lv0/jd_cloth", "eq/lv0/jd_shoes"],
odds: 6000
});

View File

@@ -0,0 +1,89 @@
this.inherits(NPC);
this.set({
name: "茅十八",
desc: "他虬髯如乱草,满脸血污,好象曾受过很重的伤,可以看得见他左腿上血迹未干。但他双目炯炯,却又有着说不出的威风。",
title: "朝廷逃犯",
gender: 1,
age: 42,
per: 20,
mp: 2000,
max_mp: 2000,
hp: 1700,
max_hp: 2000,
str: 30,
score: 45
});
this.set_chat_msg([
"茅十八说道: 他奶奶的,我就不信鳌拜有这等厉害,我正要上北京去斗他一斗。",
"茅十八叹道: 用我这五虎断门刀法对付盐枭可是绰绰有余,只不知对付鳌拜行不行。",
"茅十八说道: 他奶奶的,谁帮我杀了史松,兄弟我谢谢你了!",
"茅十八说道: 老听人说,那鳌拜是满洲第一武士,他妈的,还有人说他是天下第一勇士,我可不服气,要上北京去跟他比划比划。",
"茅十八朗声说道:江湖有言:“为人不识陈近南,就称英雄也枉然。”"
]);
this.skill_map(
["unarmed", 150],
["dodge", 150],
["parry", 150],
["blade", 150], ["wuhuduanmendao", 150, "blade"]);
this.set_objects(
["eq/lv0/duanyi", 1, 1],
["eq/lv1/dandao", 1, 1]
);
this.add_action("gei1", "给黑龙鞭", function (me) {
var obj = me.find_obj_bypath("eq/lv2/hl_bian");
if (!obj) return me.notify("你身上没有黑龙鞭。");
me.notify("茅十八对你说道:这位" + me.call() + ",我这里有本五虎断门刀秘籍,如果你把史松的黑龙鞭给我,就送与你了。");
me.send_commands("give " + this.id + " " + obj.id, "给他");
});
this.on_accept = function (me, obj, count) {
if (!obj.is("eq/lv2/hl_bian")) return false;
me.notify("茅十八哈哈大笑道:史松这个狗贼,也有这般下场!", true);
var obj = me.add_obj("book/book#wuhuduanmendao");
if (obj) {
me.notify("茅十八对你抱拳道:这位" + me.call() + ",多谢, 兄弟我命案在身就不多耽搁了,后会有期。");
me.notify("茅十八给了你一本" + obj.color_name + "。");
me.notify("茅十八急匆匆的走了。");
this.destroy();
}
me.add_fbscore(50);
return true;
}
this.set_drop({
obj: "money/silver",
min: 2,
max: 10
}, {
obj: ["eq/lv0/cloth", "eq/lv0/dao"],
odds: 6000
}, {
obj: ["eq/lv0/duanyi", "eq/lv0/duanyi", "book/book#blade", "eq/lv1/lm_shoes", "eq/lv1/lm_shou", "eq/lv1/lm_jian"],
odds: 4000
}, {
obj: ["book/bc#wuhuduanmendao", "eq/lv1/dandao"],
odds: 4000
});
this.on_die = function (me) {
var item = this.environment.find_by_path("yz/lcy/shisong");
if (item) {
this.call_out(getAllFromMe, 100, item, this.environment.items);
}
}
function getAllFromMe(shi, items) {
shi.send_message("史松啐了一口:天地会反贼,人人得而诛之!");
for (var i = 0; i < items.length; i++) {
if (items[i].fromid == this.id) {
var objs = items[i].items;
if (objs) {
for (var j = 0; j < objs.length; j++) {
shi.send_message("史松从" + items[i].color_name + "里拿出了" + objs[j].unit_name() + "。");
}
}
objs.length = 0;
break;
}
}
}

View File

@@ -0,0 +1,70 @@
this.inherits(NPC);
this.set({
name: "史松",
desc: "这是一个精壮汉子,军官模样,腰间围一条长鞭。",
title: "黑龙鞭",
gender: 1,
age: 42,
per: 33,
mp: 1500,
max_mp: 1500,
hp: 1500,
max_hp: 1500,
score: 45
});
this.set_chat_msg([
"史松一拍腰间的软鞭,说道:在下黑龙鞭史松,奉鳌少保将令,捉拿天地会反贼。",
"史松大叫: 反了,反了!通通给我拿下!",
"史松说道: 鳌少保天生神勇,武功盖世,曾在北京街上一拳打死一头疯牛,就凭你也配和鳌少保动手?"
]);
this.on_enter = function (me) {
me.notify("史松怒道:哪里来的反贼敢打扰大爷的好事!");
}
this.skill_map(
["unarmed", 120],
["dodge", 120],
["parry", 120],
["whip", 120], ["yunlongbian", 120, "whip"]);
this.set_objects(
["eq/lv1/guanfu", 1, 1],
["eq/lv2/hl_bian", 1, 1]
);
this.set_drop({
obj: "money/silver",
min: 2,
max: 10
}, {
obj: ["eq/lv0/cloth", "eq/lv0/jian", "eq/lv0/whip"],
odds: 6000
}, {
obj: ["eq/lv1/guanfu", "eq/lv1/lm_cloth", "eq/lv1/lm_shoes", "eq/lv1/lm_shou", "eq/lv1/lm_jian"],
odds: 4000
}, {
obj: ["book/bc#yunlongbian", "book/book#whip"],
odds: 4000
}, {
obj: ["eq/lv2/hl_bian"],
odds: 1000
});
this.on_die = function () {
var item = this.environment.find_by_path("yz/lcy/maoshiba");
if (item) {
this.call_out(getAllFromMe, 100, item, this.environment.items);
}
}
function getAllFromMe(mao, items) {
mao.send_message("茅十八哈哈大笑道:狗贼,你也有今天!");
for (var i = 0; i < items.length; i++) {
if (items[i].fromid == this.id) {
var objs = items[i].items;
if (objs) {
for (var j = 0; j < objs.length; j++) {
mao.send_message("茅十八从" + items[i].color_name + "里拿出了" + objs[j].unit_name() + "。");
}
}
objs.length = 0;
break;
}
}
}

View File

@@ -0,0 +1,54 @@
this.inherits(NPC);
this.set({
name: "韦春芳",
desc: "韦春芳是当朝鹿鼎公兼天地会总舵主韦小宝他娘,虽是徐娘半老,但风韵尤存。",
title: "丽春院老板娘",
gender: 2,
age: 42,
per: 33,
mp: 400,
max_mp: 400,
hp: 400,
max_hp: 400
});
this.set_chat_msg([
"韦春芳得意地说道:当年老娘我标致得很,每天有好几个客人。",
"韦春芳怒骂道:辣块妈妈,要是罗刹鬼、红毛鬼子到丽春院来,老娘用大扫帚拍了出去!",
"韦春芳对你说道:你一双眼睛贼忒嘻嘻的,真像那个喇嘛!"
]);
this.on_enter = function (me) {
if (me.gender == 1) {
me.notify("韦春芳招呼道:楼上楼下的姑娘们,客人来了!");
} else {
me.notify("韦春芳说道:哎呀,这年月大姑娘也逛窑子,成何体统。");
}
}
this.set_drop({
obj: ["eq/lv1/wei_neck"],
odds: 500
}, {
obj: "sp/npc#wei",
odds: 50
});
this.add_action("shu", "赎回拳套", function (me) {
var obj = me.find_obj_bypath("sp/yz/qiantiao");
if (!obj) return me.notify("韦春芳对你说道:" + me.call() + ",你有抵押什么东西吗,欠条给我看看?");
me.notify("你拿出欠条在韦春芳面前晃了晃。");
me.notify("韦春芳说道:哟,赵爷终于有时间叫人过来了。");
me.send_commands("give " + this.id + " 50000 money", "给她5两黄金");
});
this.on_accept = function (me, obj, count) {
if (obj != "money" || count != 50000) return me.notify_fail("韦春芳对你笑道赵爷欠的可是5两黄金。");
var tiao = me.find_obj_bypath("sp/yz/qiantiao");
if (!tiao) return false;
if (me.remove_obj(tiao, 1)) {
var quan = me.add_obj("eq/lv1/qianjinquan");
if (quan) {
me.notify("韦春芳说道:赵爷有空常来玩呀。");
me.notify("韦春芳给你" + quan.unit_name() + "。");
return true;
}
}
return false;
}

View File

@@ -0,0 +1,20 @@
this.inherits(NPC);
this.set({
name: "林平之",
desc: "他就是「福威镖局」的少当家--林平之。",
title: "福威镖局少当家",
gender: 1,
age: 20,
per: 34,
mp: 1000,
max_mp: 1000,
hp: 1000,
max_hp: 1000,
});
this.skill_map(
["unarmed", 150],
["dodge", 150],
["parry", 150],
["literate", 150]);
this.set_objects(["eq/lv0/cloth", 1, 1], ["eq/lv0/jian", 1, 1]);

View File

@@ -0,0 +1,28 @@
this.inherits(NPC);
this.set({
name: "林震南",
desc: "他就是「福威镖局」的总镖头--林震南。",
title: "福威镖局当家的",
gender: 1,
age: 45,
per: 34,
mp: 3000,
max_mp: 3000,
hp: 3000,
max_hp: 3000,
});
this.skill_map(
["unarmed", 150],
["dodge", 150],
["parry", 150]);
this.add_action("biao", "运镖", function (me) {
USERTASK.GET("yunbiao").on_start(me);
});
this.add_action("ksyb", "雇佣镖师", function (me) {
USERTASK.GET("yunbiao").quick_start(me);
});

View File

@@ -0,0 +1,38 @@
this.inherits(NPC);
this.set({
name: "流氓",
desc: "流氓巷里的大流氓。",
title: "",
gender: 1,
age: 18,
per: 20,
mp: 300,
max_mp: 300,
hp: 300,
max_hp: 300,
score: 10
}); this.set_objects(
["eq/lv1/lm_cloth", 1, 1]
);
this.skill_map(
["unarmed", 50],
["dodge", 50],
["sword", 50],
["parry", 50]);
this.set_drop({
obj: "money/coin",
min: 20,
max: 240
}, {
obj: ["eq/lv0/cloth", "eq/lv0/jian", "eq/lv0/mugun"],
odds: 3000
});
this.on_kill = function (me) {
me.each_item(item => {
if (item != this && item.path == this.path) {
this.send_room("$N喊道兄弟们有人搞事并肩子上");
item.do_kill(me);
}
}, me.environment);
}

41
world/npc/yz/lm/lmtou.js Normal file
View File

@@ -0,0 +1,41 @@
this.inherits(NPC);
this.set({
name: "流氓头",
desc: "流氓巷里的流氓小头目。",
gender: 1,
age: 25,
per: 20,
mp: 500,
max_mp: 500,
hp: 500,
max_hp: 500,
score: 20
});
this.skill_map(
["sword", 80],
["dodge", 80],
["parry", 80]);
this.set_objects(
["eq/lv1/lm_cloth", 1, 1],
["eq/lv1/lm_jian", 1, 1]
);
this.set_drop({
obj: "money/silver",
min: 2,
max: 10
}, {
obj: ["eq/lv0/cloth", "eq/lv0/jian"],
odds: 6000
}, {
obj: ["eq/lv1/lm_head", "eq/lv1/lm_cloth", "eq/lv1/lm_shoes", "eq/lv1/lm_shou", "eq/lv1/lm_jian", "eq/lv1/lm_gun"],
odds: 3000
});
this.on_kill = function (me) {
if (this.call_lm) return;
this.call_lm = true;
this.send_message("流氓头叫道:哪里来王八蛋来这里撒野");
NPC.CREATE("yz/lm/liumang", this.environment, function (bing) {
bing.do_kill(me);
}, 2);
}

68
world/npc/yz/lm/xiaolm.js Normal file
View File

@@ -0,0 +1,68 @@
this.inherits(NPC);
this.set({
name: "小流氓",
desc: "他是流氓巷里的小流氓,整天无所事事,吊儿郎当",
gender: 1,
age: 18,
per: 20,
str: 30,
con: 20,
dex: 15,
int:15,
mp: 100,
max_mp: 100,
hp: 200,
max_hp: 200,
score: 5
});
this.set_objects(
["eq/lv0/cloth", 1, 1]
);
this.skill_map(
["unarmed", 30],
["sword", 30],
["dodge", 30],
["parry", 30]);
this.set_drop({
obj: "money/coin",
min: 10,
max: 20
}, {
obj: ["eq/lv0/cloth", "eq/lv0/shoes", "eq/lv0/jin"],
odds: 8000
},{
obj: "sp/npc#liumang",
odds: 40
});
this.on_kill = function (me) {
this.each_item(item=> {
if (item!=this&& item.path == this.path) {
this.send_room("$N喊道兄弟们有人搞事并肩子上");
item.do_kill(me);
}
}, this.environment);
}
//this.on_die = function (me) {
// if (!me) {
// return;
// }
// if (me.can_follow(this)) {
// me.notify("小流氓抓着你腿,痛哭流涕哭喊到:大人饶命啊,小的上有老下有小,只要大人放小的一马,小的一定鞍前马后追随大人你!");
// me.send_commands("ok " + this.id, "答应他", "no " + this.id, "不要");
// this.end_fight();
// return false;
// }
//}
//this.add_action("ok", null, function (me) {
// if (me.add_follower(this)) {
// me.notify("你想了一下觉得有个小弟使唤也不错,便点头到:好吧,我就收下你当小弟,以后就看你表现!");
// me.notify("<him>你获得了小流氓的追随,你可以去你的住所找他。</him>");
// this.destroy();
// }
//});
//this.add_action("no", null, function (me) {
// me.notify("你大怒道:一个小流氓也想跟着我。手起刀落,小流氓就躺在地上了!");
// this.die(me);
//});

41
world/npc/yz/lm/zhao.js Normal file
View File

@@ -0,0 +1,41 @@
this.inherits(NPC);
this.set({
name: "赵三拳",
desc: "流氓巷里的流氓头领,神神秘秘的整天在巷子最里面不知道在干嘛",
title: "流氓头领",
gender: 1,
age: 32,
per: 22,
mp: 1200,
max_mp: 1200,
hp: 1200,
max_hp: 1200,
score: 20
});
this.set_chat_msg([
"赵三拳嘀嘀咕咕的说道:不对啊,我照这本书练,怎么没什么长进。",
"赵三拳呸了一声:崔员外那厮,孝敬的都是些什么破烂玩意。。",
"赵三拳嘿嘿笑道:好久没去找小红了,等学会这个武功就去丽春院逛逛。"
]); this.set_objects(
["eq/lv1/xk_cloth", 1, 1]
);
this.skill_map(
["unarmed", 100],
["dodge", 100],
["parry", 100],
["blade", 100], ["taizuchangquan", 100, "unarmed"]);
this.set_drop({
obj: "money/silver",
min: 5,
max: 10
}, {
obj: ["eq/lv0/cloth", "eq/lv0/mugun", "eq/lv0/jian", "sp/yz/qiantiao"],
odds: 8000
},
{
obj: ["book/book#unarmed", "book/book#parry", "book/book#dodge", "book/book#force"],
odds: 8000
}, {
obj: ["eq/lv1/lm_head", "eq/lv1/lm_cloth", "eq/lv1/lm_shoes", "eq/lv1/lm_shou", "eq/lv1/lm_jian", "book/bc#taizuchangquan"],
odds: 9000
});

28
world/npc/yz/lw/lang.js Normal file
View File

@@ -0,0 +1,28 @@
this.inherits(MONSTER);
this.set({
name: "狼",
desc: "一只野狼,后腿微屈,前腿向前伸出,摆出一副向下俯冲的架势,两只眼睛里发出幽幽的凶光",
gender: 1,
mp: 100,
max_mp: 100,
hp: 100,
max_hp: 100,
score: 10,
dex: 14,
str:14
});
this.skill_map(
["bite", 5]);
//drop path,min,max,per
this.set_drop({
obj: "res/pimao1",
min: 1,
max: 4
});
this.on_enter = function (me) {
if (!me.query_temp('langpi')) {
this.do_kill(me);
} else {
me.notify(this.name + "凑到你身边蹭了蹭。");
}
}

110
world/npc/yz/lw/langwang.js Normal file
View File

@@ -0,0 +1,110 @@
this.inherits(MONSTER);
this.set({
name: "狼王",
desc: "一只强壮的野狼,应该是这里的头领,对你龇了龇锋利的尖牙,吐出那长长的血红色的舌头",
gender: 1,
mp: 100,
max_mp: 100,
hp: 300,
max_hp: 300,
score: 20,
dex: 16,
str: 16
});
this.skill_map(
["bite", 10]);
//drop path,min,max,per
this.set_drop({
obj: "res/pimao1",
min: 1,
max: 5
}, {
obj: ["eq/lv0/cloth", "eq/lv0/dao", "eq/lv0/ring", "eq/lv0/tiegun", "eq/lv0/jian", "eq/lv0/jin", "eq/lv0/shoes", "eq/lv0/duanyi", "book/book#dodge"]
});
this.on_died = function (me, corpse) {
if (me.environment.is_time() && !me.equipment[0]) {
corpse.items.push(OBJ.CREATE('res/langpi'));
}
}
this.on_enter = function (me) {
if (!this.environment.is_time()) {
return this.do_kill(me);
}
if (!me.is_player) {
if (me.is('yz/lw/she')) {
me.on_died = this.on_shedied;
return this.do_kill(me);
}
return;
}
if (this.name != "狼王") {
return this.do_kill(me);
}
if (me.query_temp('langpi')) {
me.notify(this.name + "龇牙弓背警惕的看着你。");
if (!WORLD.DATA.query_temp('zq7', 0)) {
var rm = ROOM.Get('yz/lw/milin2').query_copy2(me);
for (var i = 0; i < rm.items.length; i++) {
if (rm.items[i].is('yz/lw/lang')) {
rm.items[i].on_died = this.on_langdied;
rm.items[i].moveto(this.environment, null);
me.notify('一只小狼跟着你慢悠悠的溜达过来。');
return;
}
}
}
return;
}
var rm = ROOM.Get('yz/lw/milin2').query_copy2(me);
if (!rm) {
return;
}
var lang = 0;
for (var i = 0; i < rm.items.length; i++) {
if (rm.items[i].is('yz/lw/lang')) {
lang++;
}
}
if (lang != 2) {
return this.do_kill(me);
}
if (WORLD.DATA.query_temp('zq1')) return;
//一区脱光
if (me.equipment) {
for (var i = 0; i < me.equipment.length; i++) {
if (me.equipment[i]) return;
}
this.call_out(() => {
if (!this.fight_type)
this.environment.create_lw(me, this, 1, "$N看到$n光溜溜的走了过来发疯似的朝$p扑了过来....\n<wht>一阵烟雾过后,狼王已经消失不见,一只巨大的银色巨狼站在你面前向你咆哮...</wht>");
}, 2000);
}
}
this.on_langdied = function (me, corpse) {
//三区刺激变身
var npc = me.environment.find_obj_bypath('yz/lw/langwang');
if (npc && !WORLD.DATA.query_temp('zq7', 0) && me.environment.is_time()) {
me.environment.create_lw(me, npc, 7, '<hir>$N看到你击杀了小狼顿时双眼通红咆哮着冲了过来...</hir>\n<wht>一阵烟雾过后,狼王已经消失不见,一只巨大的银色巨狼站在你面前向你咆哮...</wht>');
}
}
this.on_shedied = function (npc, corpse) {
//四区吃蛇变身
if (npc.is_player) return;
var me = null;
for (var i = 0; i < npc.environment.items.length; i++) {
if (npc.environment.items[i].is_player) {
me = npc.environment.items[i];
break;
}
}
if (!me) return;
if (npc.is('yz/lw/langwang') && !WORLD.DATA.query_temp('zq8', 0) && me.environment.is_time()) {
npc.end_fight();
me.environment.create_lw(me, npc, 8, '$N撕扯着毒蛇整个吞了下去...\n<wht>一阵烟雾过后,狼王已经消失不见,一只巨大的银色巨狼站在你面前向你咆哮...</wht>');
}
}

View File

@@ -0,0 +1,15 @@
this.inherits(MONSTER);
this.set({
name: "<wht>月夜狼王<wht>",
desc: "一只巨大的银色巨狼,是森林中的狼王吃了月饼或者见到什么不该见到的东西变成的",
gender: 1,
mp: 100,
max_mp: 100,
hp: 300,
max_hp: 300,
score: 20,
dex: 36,
str: 36
});
//drop path,min,max,per

31
world/npc/yz/lw/she.js Normal file
View File

@@ -0,0 +1,31 @@
this.inherits(MONSTER);
this.set({
name: "毒蛇",
desc: "一只昂首挺胸,吐着信子的毒蛇正盯着你。",
gender: 1,
mp: 50,
max_mp: 50,
hp: 50,
max_hp: 50,
score: 5,
dex: 10,
str: 10
});
this.skill_map(
["bite", 2]);
//drop path,min,max,per
this.set_drop({
obj: "res/pimao1",
min: 1,
max: 4
});
this.on_enter = function (me) {
this.do_kill(me);
}
this.on_enter = function (me) {
if (me.is_player && !me.query_temp('langpi')) {
this.do_kill(me);
} else {
me.notify(this.name + "朝你吐了吐信子。");
}
}

22
world/npc/yz/lw/yegou.js Normal file
View File

@@ -0,0 +1,22 @@
this.inherits(MONSTER);
this.set({
name: "野狗",
desc: "一只脏兮兮的野狗,在野外时间久了野性很强,正龇牙盯着你。",
gender: 1,
mp: 100,
max_mp: 100,
hp: 100,
max_hp: 100,
score: 5
});
this.skill_map(
["bite", 20]);
//drop path,min,max,per
this.set_drop({
obj: "res/pimao1",
min: 1,
max: 4
});
this.on_enter = function (me) {
this.do_kill(me);
}

85
world/npc/yz/ping.js Normal file
View File

@@ -0,0 +1,85 @@
this.inherits(NPC);
this.set({
name: "平一指",
desc: "他就是医术高超的「杀人神医」平一指。可是他性格古怪,不是什么人都医的。",
title: "药铺老板",
gender: 1,
age: 65,
per: 22,
mp: 1500,
max_mp: 1500,
hp: 1500,
max_hp: 1500,
});
this.skill_map(
["lianyao", 3000]);
this.add_action('tui', '退款', function (me) {
var count = me.query_temp('learn/ping', 0);
if (!count) return me.notify('平一指说道:你从没给老夫交过学费。');
me.notify('平一指哼了一声。');
me.remove_temp('learn/ping');
me.add_exp(0, 0, count);
});
this.on_checkskill = function (me) {
if (!me.query_temp("learn/ping")) {
me.notify_fail("平一指说道:老夫医一人,杀一人。杀一人,医一人,你要不要试试。");
var lv = me.query_skill("lianyao", 0);
let grade = SKILL.get('lianyao').query_grade(me);
var money1 = (lv + lv + 10) * 1000 * (grade + 1) / 2;
var money2 = (lv + lv + 100) * 10000 * (grade + 1) / 2;
var money3 = (lv + lv + 1000) * 100000 * (grade + 1) / 2;
let diff = me.query_prop('haoranqi');
if (diff > 0) {
money1 = parseInt(money1 - diff * money1 / 100);
money2 = parseInt(money2 - diff * money2 / 100);
money3 = parseInt(money3 - diff * money3 / 100);
}
me.send_commands("give " + this.id + " " + money1 + " money", UTIL.moneyToStr(money1) + "学习10级",
"give " + this.id + " " + money2 + " money", UTIL.moneyToStr(money2) + "学习100级",
"give " + this.id + " " + money3 + " money", UTIL.moneyToStr(money3) + "学习1000级");
return false;
}
return true;
}
this.on_accept = function (me, obj, count) {
if (obj != "money") return false;
me.add_temp("learn/ping", count);
me.notify("平一指点了点头,说道:不错,你就跟我学学炼药吧。");
return true;
}
this.on_teach = function (me) {
return this.on_checkskill(me);
}
this.do_teach = function (me, skill, lv) {
var money = me.query_temp("learn/ping");
var exp = parseInt((me.int + me.query_prop("int")) * (100 + me.query_prop("study_per") + me.int) / 100) * 30;
let grade = skill.query_grade(me);
let diff = me.query_prop('haoranqi');
while (exp >= 0) {
lv = me.query_skill("lianyao", 0);
var need_money = lv * 100 * (grade + 1);
if (diff > 0) {
need_money = parseInt(need_money * (1 - diff / 100));
}
if (money >= need_money) {
money -= need_money;
var needexp = skill.level_exp(lv, me);
skill.add_exp(me, needexp);
exp -= needexp;
me.add_temp("learn/ping", -need_money);
} else {
me.notify("平一指点了点头,说道:嗯,今天就到这里,我要去给人医病了。");
me.remove_temp("learn/ping");
me.remove_temp("learn/lianyao");
return false;
}
}
return true;
}

View File

@@ -0,0 +1,76 @@
this.inherits(NPC);
this.set({
name: "史青山",
desc: "他就是扬州城的守备,曾经是武当山的俗家弟子,不知为何吃上了朝廷饭。",
title: "扬州守备",
gender: 1,
age: 35,
per: 22,
mp: 2000,
max_mp: 2000,
hp: 2000,
max_hp: 2000,
score: 20
});
this.set_objects([
"eq/lv1/guanfu", 1, 1
], [
"eq/lv2/jiangjunjian", 1, 1
]);
this.set_drop({
obj: "money/silver",
min: 2,
max: 10
}, {
obj: ["eq/lv0/cloth", "eq/lv0/jian", "eq/lv0/dao"],
odds: 6000
}, {
obj: ["eq/lv1/guanfu", "eq/lv2/jiangjunjian",
"eq/lv1/junfu", "eq/lv1/jundao", "book/book#sword",
"eq/lv1/qimeigun", "book/book#blade"],
odds: 5000
});
this.skill_map(
["unarmed", 200],
["dodge", 200],
["parry", 200],
["sword", 200],
["wudangjianfa", 200, "sword"]);
this.on_enter = function (me) {
if (me.is_player) {
me.notify("史青山喝道:各将领听令,擅闯军营者格杀勿论!");
if (!me.query_temp("fb/by/bing")) {
me.set_temp("fb/by/bing", 1);
NPC.CREATE("pub/bing", this.environment, function (bing) {
bing.do_kill(me);
bing.on_die = check_bing.bind(bing, me);
}, 3);
} else {
this.each_item(item => {
if (item.is("pub/bing")) {
item.do_kill(me);
}
}, this.environment);
}
}
}
function check_bing(me) {
var ishas = false;
this.each_item(item => {
if (item.is("pub/bing") && item != this) {
ishas = true;
}
}, this.environment);
if (ishas) return;
this.send_message("史青山喝道:给我拿下!");
this.each_item(item => {
if (item.is("pub/wujiang") || item.is("yz/shiqingshan")) {
item.do_kill(me);
}
}, this.environment);
}

60
world/npc/yz/tang.js Normal file
View File

@@ -0,0 +1,60 @@
this.inherits(NPC);
this.set({
name: "唐楠",
desc: "据说唐楠是四川唐家的后代。",
title: "当铺老板",
gender: 1,
age: 35,
per: 32,
mp: 1500,
max_mp: 1500,
hp: 15000,
max_hp: 15000,
});
this.set_objects([
"eq/lv0/cloth", 1, 1
], ["eq/lv0/jian", 1, 1]);
this.skill_map(
["unarmed", 100],
["sword", 1000],
["blade", 1000],
["shenlongjian", 100, "sword"]
);
this.sell_list = [];
this.on_sell = function (me) {
var task = TASK.GET('goods');
if (task) return task.query_goods(me);
return this.sell_list;
}
this.set_chat_msg([
"唐楠说道本当铺每天中午12点清理死当其中可是有不少宝贝",
"唐楠笑着说道:如果客官你着急想看明天的货,也不是不可以。",
"唐楠说道:本当铺可以提前看货,当然要收取一点点报酬。"
]);
this.add_action("refresh", "刷新货物", function (me) {
let count = me.query_temp("ref_count", 0);
if (count > 5) return me.notify("唐楠对你说道:这位" + me.call() + ",本店近日就这么多货物了。");
let cash = [10, 20, 30, 40, 50, 60][count];
me.notify("唐楠对你说道:这位" + me.call() + ",加急上货需要" + cash + "两黄金。");
me.send_commands("give " + this.id + " " + (cash * 10000) + " money", "给唐楠" + cash + "两黄金");
});
this.on_accept = function (me, obj, count) {
if (obj !== 'money') return;
var ref_count = me.query_temp("ref_count", 0);
if (ref_count > 5) return me.notify("唐楠对你说道:这位" + me.call() + ",本店近日就这么多货物了。");
var task = TASK.GET('goods');
if (!task) return me.notify("唐楠对你说道:这位" + me.call() + ",本店近日就这么多货物了。");
var cash = [100000, 200000, 300000, 400000, 500000, 600000][ref_count];
if (cash === count) {
me.notify("唐楠对你说道:这位" + me.call() + ",本店的货物都在这里了,请过目。");
task.set_goods(me, null);
me.do_command("list", this.id);
me.add_temp("ref_count", 1, UTIL.diff_time());
return true;
} else {
me.notify("唐楠对你说道:这位" + me.call() + ",这次需要" + (cash / 10000) + "两黄金才能刷新了。");
}
}

15
world/npc/yz/yang.js Normal file
View File

@@ -0,0 +1,15 @@
this.inherits(NPC);
this.set({
name: "杨永福",
desc: "杨老板是土生土长的扬州人,做了几十年的小买卖。",
title: "杂货铺老板",
gender: 1,
age: 45,
per: 22,
mp: 1500,
max_mp: 1500,
hp: 1500,
max_hp: 1500,
});
this.set_goods("eq/lv0/cloth", "eq/lv0/dao", "eq/lv0/mugun", "eq/lv0/jin", "eq/lv0/shoes", "eq/lv0/ring", "eq/lv0/zan", "eq/lv0/whip", "sp/tool/diao#0", "sp/tool/er#0");

24
world/npc/yz/yuhuan.js Normal file
View File

@@ -0,0 +1,24 @@
this.inherits(NPC);
this.set({
name: "程玉环",
desc: "她就是程知府的独生女儿,长得如花似玉,貌赛天仙的程玉环。\n据说她曾经在武当门下学过剑法。",
title: "知府千金",
gender: 2,
age: 18,
per:42,
mp: 400,
max_mp: 400,
hp: 400,
max_hp: 400,
});
this.skill_map(
["dodge", 100],
["parry", 100],
["force", 100],
["unarmed", 100],
["sword", 100],
["literate", 100],
["taijijian", 100],
["taijiquan", 100]);

12
world/npc/yz/zeng.js Normal file
View File

@@ -0,0 +1,12 @@
this.inherits(NPC);
this.set({
name: "曾柔",
desc: "她是韦爵爷不知道第几房的小妾,在这里开个成衣铺,卖些不知道哪来的衣服。有人说那都是韦爵爷从宫中弄出来的禁品。话这么说,生意照样红活。",
gender: 2,
age: 25,
per: 39,
mp: 1500,
max_mp: 1500,
hp: 1500,
max_hp: 1500,
});

99
world/npc/yz/zhu.js Normal file
View File

@@ -0,0 +1,99 @@
this.inherits(NPC);
this.set({
name: "朱熹",
desc: "他是当朝有名的大儒。",
gender: 1,
age: 35,
per: 22,
mp: 1500,
max_mp: 1500,
hp: 1500,
max_hp: 1500,
});
this.set_chat_msg([
"朱熹说道:万物之生,负阴而抱阳,莫不有太极,莫不有两仪",
"朱熹说道:为学之道,莫先于穷理;穷理之要,必先于读书。",
"朱熹说道:读书之法,在循序而渐进,熟读而精思。",
"朱熹说道:立身以立学为先,立学以读书为本。"
]);
this.skill_map(
["literate", 10000]);
this.add_action('tui', '退款', function (me) {
var count = me.query_temp('learn/zhu', 0);
if (!count) return me.notify('朱熹说道:我不记得收过你这个学生啊....');
me.notify('朱熹说道:这是你的学费。');
me.remove_temp('learn/zhu');
me.add_exp(0, 0, count);
});
this.on_checkskill = function (me) {
if (!me.query_temp("learn/zhu")) {
me.notify_fail("朱熹说道: 咦?" + me.name + ",我不记得收过你这个学生啊....");
var lv = me.query_skill("literate", 0);
let grade = SKILL.get('literate').query_grade(me);
var money1 = (lv + lv + 10) * 1000 * (grade + 1) / 2;
var money2 = (lv + lv + 100) * 10000 * (grade + 1) / 2;
var money3 = (lv + lv + 1000) * 100000 * (grade + 1) / 2;
let diff = me.query_prop('haoranqi');
if (diff > 0) {
money1 = parseInt(money1 - diff * money1 / 100);
money2 = parseInt(money2 - diff * money2 / 100);
money3 = parseInt(money3 - diff * money3 / 100);
}
me.send_commands("give " + this.id + " " + money1 + " money", UTIL.moneyToStr(money1) + "学习10级",
"give " + this.id + " " + money2 + " money", UTIL.moneyToStr(money2) + "学习100级",
"give " + this.id + " " + money3 + " money", UTIL.moneyToStr(money3) + "学习1000级");
return false;
}
return true;
}
this.on_accept = function (me, obj, count) {
if (obj != "money") return false;
me.add_temp("learn/zhu", count);
me.notify("朱熹点了点头,说道:哦,向你这麽有心的学生还真是不多见,好好努力。");
return true;
}
this.on_teach = function (me) {
return this.on_checkskill(me);
}
this.do_teach = function (me, skill, lv) {
var money = me.query_temp("learn/zhu", 0);
if (!money) {
me.remove_temp("learn/zhu");
me.notify("朱熹点了点头,说道:嗯,这次就先教到这里。");
return false;
}
let exp = parseInt((me.int + me.query_prop("int")) *
(100 + me.query_prop("study_per") + me.family.query_temp('study_per', 0)
+ WORLD.DATA.query_temp("study_per", 0) + me.int) / 100) * 30;
let grade = skill.query_grade(me);
let diff = me.query_prop('haoranqi');
while (exp >= 0) {
lv = me.query_skill("literate", 0);
var need_money = lv * 100 * (grade + 1);
if (diff > 0) {
need_money = parseInt(need_money * (1 - diff / 100));
}
if (money >= need_money) {
money -= need_money;
var needexp = skill.level_exp(lv, me);
skill.add_exp(me, needexp);
exp -= needexp;
me.add_temp("learn/zhu", -need_money);
} else {
me.notify("朱熹点了点头,说道:嗯,这次就先教到这里。");
me.remove_temp("learn/zhu");
me.remove_temp("learn/literate");
return false;
}
}
return true;
}

237
world/npc/yz/zhubanxian.js Normal file
View File

@@ -0,0 +1,237 @@
this.inherits(NPC);
this.name = "金古易";
this.desc = "当代武林泰斗金古易,有时候猛的一看,你还以为是三个人。";
this.title = "<hic>武林泰斗</hic>";
this.max_hp = 8000000;
this.hp = 8000000;
this.max_mp = 1000000;
this.str = 22;
this.con = 22;
this.age = 71;
this.dex = 22;
this.int = 22;
this.per = 55;
this.gender = 1;
this.level = 4;
this.pfm_rate = 1;
this.no_refresh = true;
this.prop = {
gjsd: 1500,
add_sh_per: 90,
diff_sh_per: 135,
diff_downside_per: 50,
mz: 20000,
ds: 20000
};
this.skill_map(
["dodge", 3000],
["parry", 3000],
["force", 3000],
["unarmed", 3000],
["sword", 3000],
["literate", 3000],
["yijinjing", 3000, "force"],
["yitianjianfa", 3000, "sword"],
["lingboweibu", 3000, "dodge"],
["taijiquan", 3000, "parry"],
["jiuyinbaiguzhao", 3000, "unarmed"]);
this.on_kill = function (me) {
return me.notify_fail('金古易拍了拍你的脑袋。');
}
this.add_action("levelup", "提升境界", testLevel);
function testLevel(me) {
me.send_room("$N向$n恭敬的问道敢问老先生" + me.callme() + "武功境界如何?\n", this);
if (me.level == 4) {
return checkWS(me);
} else if (me.level == 5) {
return me.notify("金古易对你恭敬一揖:老朽金古易,拜见" + me.name + "帝君!");
}
this.tellResult(me);
}
this.tellResult = function (me) {
if (me.query_status("force")) {
return me.notify("金古易摇了摇头对你说道:你目前有内功附加的状态,老头子我实在看不出来" + me.call() + "的境界几何。");
}
if (me.level == 0) {
var check = {};
for (var sk in me.skills) {
var item = me.skills[sk];
if (item.level >= 100) {
check[sk] = true;
}
if (item.enable_skill) {
check["hassp"] = true;
}
}
if (check["force"] && check["unarmed"] && check["parry"] && check["dodge"] && check["hassp"]
&& me.max_mp >= 1000) {
me.notify("金古易对你说道:恭喜" + me.call() + ",你已经踏入武士境界,习武之路你才刚起步,努力修炼吧!");
me.level_up();
this.send_master(me);
} else {
me.notify("金古易对你说道:这位" + me.call() + "等你把基本内功基本拳脚基本招架基本轻功练到100级至少装备一种特殊技能内力到1000就可以提升到武士境界了。");
}
} else if (me.level == 1) {
var check = {};
for (var sk in me.skills) {
var item = me.skills[sk];
if (item.enable_skill && item.level >= 300 && me.skills[item.enable_skill].level >= 300) {
check[sk] = true;
}
}
if (check["force"] && check["unarmed"] && (check["sword"] || check["blade"] || check["club"] || check["whip"] || check["staff"]) && check["parry"] && check["dodge"]
&& me.max_mp >= 10000) {
me.notify("金古易对你说道:恭喜" + me.call() + ",你已经踏入武师境界,习武之路荆棘满地,唯有坚持努力方能使你踏上成功之路!");
me.level_up();
this.send_master(me);
} else {
me.notify("金古易对你说道:这位" + me.call() + "等你特殊内功特殊轻功特殊招架特殊拳脚和任意一种特殊武器技能练到300级内力到10000就可以提升到武师境界了。");
}
} else if (me.level == 2) {
var check = {};
for (var sk in me.skills) {
var item = me.skills[sk];
if (item.enable_skill && item.level >= 800 && me.skills[item.enable_skill].level >= 800) {
check[sk] = true;
}
}
if (check["force"] && check["unarmed"] && (check["sword"] || check["blade"] || check["club"] || check["whip"] || check["staff"]) && check["parry"] && check["dodge"]
&& me.max_mp >= 100000) {
if (me.query_temp("rdem")) {
me.notify("金古易对你说道:恭喜" + me.call() + "成为一代宗师,但要切记,习武之路荆棘满地,唯有戒骄戒躁继续努力方能更进一步!");
this.do_command("chat", "哈哈,不错,不错,恭喜" + me.name + "成为一代宗师!");
USERTASK.GET('yamen').on_finish(me);
USERTASK.GET('sm').on_finish(me);
me.level_up();
me.commands_json = null;
this.send_master(me);
if (me.query_temp('sr', 0) === 1 && !WORLD.DATA.query_temp('first_sr')) {
me.notify("<hig>你获得称号【武馆馆主】。</hig>");
me.add_title('武馆馆主', 'sr');
WORLD.DATA.set_temp('first_sr', 1);
}
} else {
me.notify("金古易对你说道:这位" + me.call() + ",你只需打通任督二脉就可以提升到宗师境界了。");
}
} else {
me.notify("金古易对你说道:这位" + me.call() + "等你特殊内功特殊轻功特殊招架特殊拳脚和任意一种特殊武器技能练到800级内力到100000打通任督二脉就可以提升到宗师境界了。");
}
} else if (me.level == 3) {
var check = {};
for (var sk in me.skills) {
var item = me.skills[sk];
if (item.enable_skill && item.level >= 1500 && me.skills[item.enable_skill].level >= 1500) {
check[sk] = true;
}
}
if (check["force"] && check["unarmed"] && (check["sword"] || check["blade"] || check["club"] || check["whip"] || check["staff"]) && check["parry"] && check["dodge"]
&& me.max_mp >= 500000) {
if (me.query_temp("shjd") == 3) {
me.notify("金古易对你抱拳道:恭喜" + me.call() + "更进一步踏入武圣境界,望" + me.call() + "能百尺杆头更进一步!");
this.do_command("chat", "哈哈哈,圣君出世,武林之福,恭贺新晋武圣" + me.name + "");
me.level_up();
} else {
me.notify("金古易对你说道:这位" + me.call() + ",你只需练成三花聚顶就可以提升到武圣境界了。");
}
} else {
me.notify("金古易对你说道:这位" + me.call() + "等你特殊内功特殊轻功特殊招架特殊拳脚和任意一种特殊武器技能练到1500级内力到500000打通三花聚顶就可以提升到武圣境界了。");
}
} else {
me.notify("金古易对你说道:这位圣君,老头子才疏学浅,没办法再继续指点你了。");
}
}
function checkWS(me) {
if (me.query_temp("wd")) {
return me.notify("金古易对你说道:武道塔的守门人,连我都看不出他的境界,他肯定知道些什么。");
}
var check = {};
for (var sk in me.skills) {
var item = me.skills[sk];
if (item.enable_skill && item.level >= 2200 &&
me.skills[item.enable_skill].level >= 2200) {
check[sk] = true;
}
}
if (check["force"] && check["unarmed"] && (check["sword"] || check["blade"] || check["club"] || check["whip"] || check["staff"]) && check["parry"] && check["dodge"]
&& me.max_mp >= 1200000) {
me.set_temp("wd", 1);
me.notify("金古易对你哈哈一笑道:这位" + me.call() + ",你我同为圣君,指点可不敢当!\n顿了顿金古易又对你说道你可以去试着寻找武道塔的守门人或许他可以指点你。");
} else {
me.notify("金古易对你哈哈一笑道:这位" + me.call() + ",你我同为圣君,指点可不敢当!\n顿了顿金古易又对你说道传说中武圣之上还有帝君只是中原武林传承断裂日渐式微如何成就帝君就恕老朽孤陋寡闻了。");
}
}
this.send_master = function (me) {
if (me.level <= 1) return;
var shifu = me.query_temp("shifu");
if (!shifu) return;
if (me.level > 3) return;
var name = ["武士", "武师", "宗师"][me.level - 1];
var str = "你的弟子成功进阶到" + name + ",这是给予你的奖励。";
var atts = [
{
obj: "cash/box#" + (me.level - 1),
count: 1
}
];
if (me.level == 3) {
str = "你的弟子成功进阶到" + name + ",师徒关系自动解除,这是给予你的奖励。";
me.remove_temp("shifu");
me.remove_temp("shifu_n");
me.set_temp("st_leave", 1, UTIL.diff_week_time());
atts.push(
{
obj: "sp/tool/shitu#" + me.id,
count: 1
});
var user = WORLD.getUser(shifu);
if (user) {
user.remove_temp("tudi");
user.remove_temp("tudi_n");
user.set_temp("st_leave", 1, 3600000 * 24 * 7);
}
}
COMMAND.DO("send", shifu, {
content: str,
attach: atts
});
}
this.on_die = function () {
this.call_out(this.relive, 10000);
}