📄 c_npcaction.java
字号:
0)); // 無属性魔法以外のエルフ魔法を魔法ウィンドウから削除する
pc.setElfAttr(0);
pc.save(); // DBにキャラクター情報を書き込む
pc.sendPackets(new S_ServerMessage(678));
htmlid = ""; // ウィンドウを消す
}
} else if (s.equalsIgnoreCase("exp")) { // 「経験値を回復する」
if (pc.getExpRes() == 1) {
int cost = 0;
int level = pc.getLevel();
int lawful = pc.getLawful();
if (level < 45) {
cost = level * level * 100;
} else {
cost = level * level * 200;
}
if (lawful >= 0) {
cost = (cost / 2);
}
pc.sendPackets(new S_Message_YN(738, String.valueOf(cost))); // 経験値を回復するには%0のアデナが必要です。経験値を回復しますか?
} else {
pc.sendPackets(new S_ServerMessage(739)); // 今は経験値を回復することができません。
htmlid = ""; // ウィンドウを消す
}
} else if (s.equalsIgnoreCase("pk")) { // 「贖罪する」
if (pc.getLawful() < 30000) {
pc.sendPackets(new S_ServerMessage(559)); // \f1まだ罪晴らしに十分な善行を行っていません。
} else if (pc.get_PKcount() < 5) {
pc.sendPackets(new S_ServerMessage(560)); // \f1まだ罪晴らしをする必要はありません。
} else {
if (pc.getInventory().consumeItem(L1ItemId.ADENA, 700000)) {
pc.set_PKcount(pc.get_PKcount() - 5);
pc.sendPackets(new S_ServerMessage(561, String.valueOf(pc
.get_PKcount()))); // PK回数が%0になりました。
} else {
pc.sendPackets(new S_ServerMessage(189)); // \f1アデナが不足しています。
}
}
// ウィンドウを消す
htmlid = "";
} else if (s.equalsIgnoreCase("ent")) {
// 「お化け屋敷に入る」
// 「アルティメット バトルに参加する」または
// 「観覧モードで闘技場に入る」
// 「ステータス再分配」
int npcId = ((L1NpcInstance) obj).getNpcId();
if (npcId == 80085 || npcId == 80086 || npcId == 80087) {
htmlid = enterHauntedHouse(pc);
} else if (npcId == 80088) {
htmlid = enterPetMatch(pc, Integer.valueOf(s2));
} else if (npcId == 50038 || npcId == 50042 || npcId == 50029
|| npcId == 50019 || npcId == 50062) { // 副管理人の場合は観戦
htmlid = watchUb(pc, npcId);
} else if (npcId == 71251) { // ロロ
if (!pc.getInventory().checkItem(49142)) { // 希望のロウソク
pc.sendPackets(new S_ServerMessage(1290)); // ステータス初期化に必要なアイテムがありません。
return;
}
L1SkillUse l1skilluse = new L1SkillUse();
l1skilluse.handleCommands(pc, L1SkillId.CANCELLATION,
pc.getId(), pc.getX(), pc.getY(), null, 0,
L1SkillUse.TYPE_LOGIN);
pc.getInventory().takeoffEquip(945); // 牛のpolyIdで装備を全部外す。
L1Teleport.teleport(pc, 32737, 32789, (short) 997, 4, false);
int initStatusPoint = 75 + pc.getElixirStats();
int pcStatusPoint = pc.getBaseStr() + pc.getBaseInt()
+ pc.getBaseWis() + pc.getBaseDex() + pc.getBaseCon()
+ pc.getBaseCha();
if (pc.getLevel() > 50) {
pcStatusPoint += (pc.getLevel() - 50 - pc.getBonusStats());
}
int diff = pcStatusPoint - initStatusPoint;
/**
* [50級以上]
*
* 目前點數 - 初始點數 = 人物應有等級 - 50 -> 人物應有等級 = 50 + (目前點數 - 初始點數)
*/
int maxLevel = 1;
if (diff > 0) {
// 最高到99級:也就是?不支援轉生
maxLevel = Math.min(50 + diff, 99);
} else {
maxLevel = pc.getLevel();
}
pc.setTempMaxLevel(maxLevel);
pc.setTempLevel(1);
pc.setInCharReset(true);
pc.sendPackets(new S_CharReset(pc));
} else {
htmlid = enterUb(pc, npcId);
}
} else if (s.equalsIgnoreCase("par")) { // UB関連「アルティメット バトルに参加する」 副管理人経由
htmlid = enterUb(pc, ((L1NpcInstance) obj).getNpcId());
} else if (s.equalsIgnoreCase("info")) { // 「情報を確認する」「競技情報を確認する」
int npcId = ((L1NpcInstance) obj).getNpcId();
if (npcId == 80085 || npcId == 80086 || npcId == 80087) {
} else {
htmlid = "colos2";
}
} else if (s.equalsIgnoreCase("sco")) { // UB関連「高得点者一覧を確認する」
htmldata = new String[10];
htmlid = "colos3";
}
else if (s.equalsIgnoreCase("haste")) { // ヘイスト師
L1NpcInstance l1npcinstance = (L1NpcInstance) obj;
int npcid = l1npcinstance.getNpcTemplate().get_npcId();
if (npcid == 70514) {
pc.sendPackets(new S_ServerMessage(183));
pc.sendPackets(new S_SkillHaste(pc.getId(), 1, 1600));
pc.broadcastPacket(new S_SkillHaste(pc.getId(), 1, 0));
pc.sendPackets(new S_SkillSound(pc.getId(), 755));
pc.broadcastPacket(new S_SkillSound(pc.getId(), 755));
pc.setMoveSpeed(1);
pc.setSkillEffect(L1SkillId.STATUS_HASTE, 1600 * 1000);
htmlid = ""; // ウィンドウを消す
}
}
// 変身専門家
else if (s.equalsIgnoreCase("skeleton nbmorph")) {
poly(client, 2374);
htmlid = ""; // ウィンドウを消す
} else if (s.equalsIgnoreCase("lycanthrope nbmorph")) {
poly(client, 3874);
htmlid = ""; // ウィンドウを消す
} else if (s.equalsIgnoreCase("shelob nbmorph")) {
poly(client, 95);
htmlid = ""; // ウィンドウを消す
} else if (s.equalsIgnoreCase("ghoul nbmorph")) {
poly(client, 3873);
htmlid = ""; // ウィンドウを消す
} else if (s.equalsIgnoreCase("ghast nbmorph")) {
poly(client, 3875);
htmlid = ""; // ウィンドウを消す
} else if (s.equalsIgnoreCase("atuba orc nbmorph")) {
poly(client, 3868);
htmlid = ""; // ウィンドウを消す
} else if (s.equalsIgnoreCase("skeleton axeman nbmorph")) {
poly(client, 2376);
htmlid = ""; // ウィンドウを消す
} else if (s.equalsIgnoreCase("troll nbmorph")) {
poly(client, 3878);
htmlid = ""; // ウィンドウを消す
}
// 長老 ノナメ
else if (((L1NpcInstance) obj).getNpcTemplate().get_npcId() == 71038) {
// 「手紙を受け取る」
if (s.equalsIgnoreCase("A")) {
L1NpcInstance npc = (L1NpcInstance) obj;
L1ItemInstance item = pc.getInventory().storeItem(41060, 1); // ノナメの推薦書
String npcName = npc.getNpcTemplate().get_name();
String itemName = item.getItem().getName();
pc.sendPackets(new S_ServerMessage(143, npcName, itemName)); // \f1%0が%1をくれました。
htmlid = "orcfnoname9";
}
// 「調査をやめます」
else if (s.equalsIgnoreCase("Z")) {
if (pc.getInventory().consumeItem(41060, 1)) {
htmlid = "orcfnoname11";
}
}
}
// ドゥダ-マラ ブウ
else if (((L1NpcInstance) obj).getNpcTemplate().get_npcId() == 71039) {
// 「わかりました、その場所に送ってください」
if (s.equalsIgnoreCase("teleportURL")) {
htmlid = "orcfbuwoo2";
}
}
// 調査団長 アトゥバ ノア
else if (((L1NpcInstance) obj).getNpcTemplate().get_npcId() == 71040) {
// 「やってみます」
if (s.equalsIgnoreCase("A")) {
L1NpcInstance npc = (L1NpcInstance) obj;
L1ItemInstance item = pc.getInventory().storeItem(41065, 1); // 調査団の証書
String npcName = npc.getNpcTemplate().get_name();
String itemName = item.getItem().getName();
pc.sendPackets(new S_ServerMessage(143, npcName, itemName)); // \f1%0が%1をくれました。
htmlid = "orcfnoa4";
}
// 「調査をやめます」
else if (s.equalsIgnoreCase("Z")) {
if (pc.getInventory().consumeItem(41065, 1)) {
htmlid = "orcfnoa7";
}
}
}
// ネルガ フウモ
else if (((L1NpcInstance) obj).getNpcTemplate().get_npcId() == 71041) {
// 「調査をします」
if (s.equalsIgnoreCase("A")) {
L1NpcInstance npc = (L1NpcInstance) obj;
L1ItemInstance item = pc.getInventory().storeItem(41064, 1); // 調査団の証書
String npcName = npc.getNpcTemplate().get_name();
String itemName = item.getItem().getName();
pc.sendPackets(new S_ServerMessage(143, npcName, itemName)); // \f1%0が%1をくれました。
htmlid = "orcfhuwoomo4";
}
// 「調査をやめます」
else if (s.equalsIgnoreCase("Z")) {
if (pc.getInventory().consumeItem(41064, 1)) {
htmlid = "orcfhuwoomo6";
}
}
}
// ネルガ バクモ
else if (((L1NpcInstance) obj).getNpcTemplate().get_npcId() == 71042) {
// 「調査をします」
if (s.equalsIgnoreCase("A")) {
L1NpcInstance npc = (L1NpcInstance) obj;
L1ItemInstance item = pc.getInventory().storeItem(41062, 1); // 調査団の証書
String npcName = npc.getNpcTemplate().get_name();
String itemName = item.getItem().getName();
pc.sendPackets(new S_ServerMessage(143, npcName, itemName)); // \f1%0が%1をくれました。
htmlid = "orcfbakumo4";
}
// 「調査をやめます」
else if (s.equalsIgnoreCase("Z")) {
if (pc.getInventory().consumeItem(41062, 1)) {
htmlid = "orcfbakumo6";
}
}
}
// ドゥダ-マラ ブカ
else if (((L1NpcInstance) obj).getNpcTemplate().get_npcId() == 71043) {
// 「調査をします」
if (s.equalsIgnoreCase("A")) {
L1NpcInstance npc = (L1NpcInstance) obj;
L1ItemInstance item = pc.getInventory().storeItem(41063, 1); // 調査団の証書
String npcName = npc.getNpcTemplate().get_name();
String itemName = item.getItem().getName();
pc.sendPackets(new S_ServerMessage(143, npcName, itemName)); // \f1%0が%1をくれました。
htmlid = "orcfbuka4";
}
// 「調査をやめます」
else if (s.equalsIgnoreCase("Z")) {
if (pc.getInventory().consumeItem(41063, 1)) {
htmlid = "orcfbuka6";
}
}
}
// ドゥダ-マラ カメ
else if (((L1NpcInstance) obj).getNpcTemplate().get_npcId() == 71044) {
// 「調査をします」
if (s.equalsIgnoreCase("A")) {
L1NpcInstance npc = (L1NpcInstance) obj;
L1ItemInstance item = pc.getInventory().storeItem(41061, 1); // 調査団の証書
String npcName = npc.getNpcTemplate().get_name();
String itemName = item.getItem().getName();
pc.sendPackets(new S_ServerMessage(143, npcName, itemName)); // \f1%0が%1をくれました。
htmlid = "orcfkame4";
}
// 「調査をやめます」
else if (s.equalsIgnoreCase("Z")) {
if (pc.getInventory().consumeItem(41061, 1)) {
htmlid = "orcfkame6";
}
}
}
// ポワール
else if (((L1NpcInstance) obj).getNpcTemplate().get_npcId() == 71078) {
// 「入ってみる」
if (s.equalsIgnoreCase("teleportURL")) {
htmlid = "usender2";
}
}
// 治安団長アミス
else if (((L1NpcInstance) obj).getNpcTemplate().get_npcId() == 71080) {
// 「私がお手伝いしましょう」
if (s.equalsIgnoreCase("teleportURL")) {
htmlid = "amisoo2";
}
}
// 空間の歪み
else if (((L1NpcInstance) obj).getNpcTemplate().get_npcId() == 80048) {
// 「やめる」
if (s.equalsIgnoreCase("2")) {
htmlid = ""; // ウィンドウを消す
}
}
// 揺らぐ者
else if (((L1NpcInstance) obj).getNpcTemplate().get_npcId() == 80049) {
// 「バルログの意志を迎え入れる」
if (s.equalsIgnoreCase("1")) {
if (pc.getKarma() <= -10000000) {
pc.setKarma(1000000);
// バルログの笑い声が脳裏を強打します。
pc.sendPackets(new S_ServerMessage(1078));
htmlid = "betray13";
}
}
}
// ヤヒの執政官
else if (((L1NpcInstance) obj).getNpcTemplate().get_npcId() == 80050) {
// 「私の霊魂はヤヒ様へ…」
if (s.equalsIgnoreCase("1")) {
htmlid = "meet105";
}
// 「私の霊魂をかけてヤヒ様に忠誠を誓います…」
else if (s.equalsIgnoreCase("2")) {
if (pc.getInventory().checkItem(40718)) { // ブラッドクリスタルの欠片
htmlid = "meet106";
} else {
htmlid = "meet110";
}
}
// 「ブラッドクリスタルの欠片を1個捧げます」
else if (s.equalsIgnoreCase("a")) {
if (pc.getInventory().consumeItem(40718, 1)) {
pc.addKarma((int) (-100 * Config.RATE_KARMA));
// ヤヒの姿がだんだん近くに感じられます。
pc.sendPackets(new S_ServerMessage(1079));
htmlid = "meet107";
} else {
htmlid = "meet104";
}
}
// 「ブラッドクリスタルの欠片を10個捧げます」
else if (s.equalsIgnoreCase("b")) {
if (pc.getInventory().consumeItem(40718, 10)) {
pc.addKarma((int) (-1000 * Config.RATE_KARMA));
// ヤヒの姿がだんだん近くに感じられます。
pc.sendPackets(new S_ServerMessage(1079));
htmlid = "meet108";
} else {
htmlid = "meet104";
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -