Files
wsmud/world/obj/cash/tool_box2.js
2026-05-26 16:41:20 +08:00

69 lines
1.4 KiB
JavaScript

this.inherits(OBJ);
this.set({
name: "工具包",
desc: "里面有一套黄色工具,几个橙色鱼饵,指南",
unit: "个",
value: 0,
grade: 5
});
this.on_open = function (me) {
let index = me.add_temp('gjx1', 1);
let result = [];
if (index === 1) {
result.push(
{
obj: "sp/tool/yao#4"
});
result.push(
{
obj: "sp/tool/chu#3"
});
result.push(
{
obj: "sp/tool/diao#3"
});
} else if (index === 2) {
result.push(
{
obj: "sp/tool/chu#4"
});
result.push(
{
obj: "sp/tool/yao#3"
});
result.push(
{
obj: "sp/tool/diao#3"
});
} else if (index === 3) {
result.push(
{
obj: "sp/tool/diao#4"
});
result.push(
{
obj: "sp/tool/chu#3"
});
result.push(
{
obj: "sp/tool/yao#3"
});
me.remove_temp('gjx1');
}
result.push({
obj: "sp/tool/er#5", min: 5, max: 6
});
result.push(
{
obj: "sp/tool/exp#5", min: 1, max: 3
});
return OBJ.create_by_odds(result);
}