- UID
- 286271
- 帖子
- 42
- 主題
- 31
- 精華
- 0
- 積分
- 31
- 楓幣
- 507
- 威望
- 31
- 存款
- 0
- 贊助金額
- 0
- 推廣
- 0
- GP
- 31
- 閱讀權限
- 10
- 性別
- 保密
- 在線時間
- 2 小時
- 註冊時間
- 2020-7-12
- 最後登入
- 2021-4-13
|
本帖最後由 -Sammy 於 2020-7-27 04:18 編輯
到达等级打开指定NPC
打开 MapleCharacter.java
import net.sf.odinms.scripting.npc.NPCScriptManager;
找到
if (level == 200 && !isGM()) {
exp.set(0);
MaplePacket packet = MaplePacketCreator.serverNotice(6, "[Congrats] " + getName() + " has reached Level 200! Congratulate " + getName() + " on such an amazing achievment!");
try {
getClient().getChannelServer().getWorldInterface().broadcastMessage(getName(), packet.getBytes());
} catch (RemoteException e) {
getClient().getChannelServer().reconnectWorld();
}
}
增加
if (level == 10) {
NPCScriptManager npc = NPCScriptManager.getInstance();
npc.start(client, 9010009);
}
if (level == 30) {
NPCScriptManager npc = NPCScriptManager.getInstance();
npc.start(client, 9010009);
}
if (level == 70) {
NPCScriptManager npc = NPCScriptManager.getInstance();
npc.start(client, 9010009);
}
if (level == 120) {
NPCScriptManager npc = NPCScriptManager.getInstance();
npc.start(client, 9010009);
}
得到某个物品与NPC对话
if (haveItem == [itemid, amount]) {
NPCScriptManager npc = NPCScriptManager.getInstance();
npc.start(client, [npcid]);
}
|
|