⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 c_npcaction.java

📁 网络游戏天堂1的java源代码。。。。。
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
			}
			// 「ブラッドクリスタルの欠片を100個捧げます」
			else if (s.equalsIgnoreCase("c")) {
				if (pc.getInventory().consumeItem(40718, 100)) {
					pc.addKarma((int) (-10000 * Config.RATE_KARMA));
					// ヤヒの姿がだんだん近くに感じられます。
					pc.sendPackets(new S_ServerMessage(1079));
					htmlid = "meet109";
				} else {
					htmlid = "meet104";
				}
			}
			// 「ヤヒ様に会わせてください」
			else if (s.equalsIgnoreCase("d")) {
				if (pc.getInventory().checkItem(40615) // 影の神殿2階の鍵
						|| pc.getInventory().checkItem(40616)) { // 影の神殿3階の鍵
					htmlid = "";
				} else {
					L1Teleport.teleport(pc, 32683, 32895, (short) 608, 5, true);
				}
			}
		}
		// ヤヒの軍師
		else if (((L1NpcInstance) obj).getNpcTemplate().get_npcId() == 80052) {
			// 私に力をくださいますよう
			if (s.equalsIgnoreCase("a")) {
				if (pc.hasSkillEffect(STATUS_CURSE_YAHEE)) {
					pc.sendPackets(new S_ServerMessage(79)); // \f1何も起きませんでした。
				} else {
					pc.setSkillEffect(STATUS_CURSE_BARLOG, 1020 * 1000);
					pc.sendPackets(new S_SkillIconBlessOfEva(pc.getId(), 1020));
					pc.sendPackets(new S_SkillSound(pc.getId(), 750));
					pc.broadcastPacket(new S_SkillSound(pc.getId(), 750));
					pc.sendPackets(new S_ServerMessage(1127));
				}
			}
		}
		// ヤヒの鍛冶屋
		else if (((L1NpcInstance) obj).getNpcTemplate().get_npcId() == 80053) {
			int karmaLevel = pc.getKarmaLevel();
			// 「材料すべてを用意できました」
			if (s.equalsIgnoreCase("a")) {
				// バルログのツーハンド ソード / ヤヒの鍛冶屋
				int aliceMaterialId = 0;
				int[] aliceMaterialIdList = { 40991, 196, 197, 198, 199, 200,
						201, 202, 203 };
				for (int id : aliceMaterialIdList) {
					if (pc.getInventory().checkItem(id)) {
						aliceMaterialId = id;
						break;
					}
				}
				if (aliceMaterialId == 0) {
					htmlid = "alice_no";
				} else if (aliceMaterialId == 40991) {
					if (karmaLevel <= -1) {
						materials = new int[] { 40995, 40718, 40991 };
						counts = new int[] { 100, 100, 1 };
						createitem = new int[] { 196 };
						createcount = new int[] { 1 };
						success_htmlid = "alice_1";
						failure_htmlid = "alice_no";
					} else {
						htmlid = "aliceyet";
					}
				} else if (aliceMaterialId == 196) {
					if (karmaLevel <= -2) {
						materials = new int[] { 40997, 40718, 196 };
						counts = new int[] { 100, 100, 1 };
						createitem = new int[] { 197 };
						createcount = new int[] { 1 };
						success_htmlid = "alice_2";
						failure_htmlid = "alice_no";
					} else {
						htmlid = "alice_1";
					}
				} else if (aliceMaterialId == 197) {
					if (karmaLevel <= -3) {
						materials = new int[] { 40990, 40718, 197 };
						counts = new int[] { 100, 100, 1 };
						createitem = new int[] { 198 };
						createcount = new int[] { 1 };
						success_htmlid = "alice_3";
						failure_htmlid = "alice_no";
					} else {
						htmlid = "alice_2";
					}
				} else if (aliceMaterialId == 198) {
					if (karmaLevel <= -4) {
						materials = new int[] { 40994, 40718, 198 };
						counts = new int[] { 50, 100, 1 };
						createitem = new int[] { 199 };
						createcount = new int[] { 1 };
						success_htmlid = "alice_4";
						failure_htmlid = "alice_no";
					} else {
						htmlid = "alice_3";
					}
				} else if (aliceMaterialId == 199) {
					if (karmaLevel <= -5) {
						materials = new int[] { 40993, 40718, 199 };
						counts = new int[] { 50, 100, 1 };
						createitem = new int[] { 200 };
						createcount = new int[] { 1 };
						success_htmlid = "alice_5";
						failure_htmlid = "alice_no";
					} else {
						htmlid = "alice_4";
					}
				} else if (aliceMaterialId == 200) {
					if (karmaLevel <= -6) {
						materials = new int[] { 40998, 40718, 200 };
						counts = new int[] { 50, 100, 1 };
						createitem = new int[] { 201 };
						createcount = new int[] { 1 };
						success_htmlid = "alice_6";
						failure_htmlid = "alice_no";
					} else {
						htmlid = "alice_5";
					}
				} else if (aliceMaterialId == 201) {
					if (karmaLevel <= -7) {
						materials = new int[] { 40996, 40718, 201 };
						counts = new int[] { 10, 100, 1 };
						createitem = new int[] { 202 };
						createcount = new int[] { 1 };
						success_htmlid = "alice_7";
						failure_htmlid = "alice_no";
					} else {
						htmlid = "alice_6";
					}
				} else if (aliceMaterialId == 202) {
					if (karmaLevel <= -8) {
						materials = new int[] { 40992, 40718, 202 };
						counts = new int[] { 10, 100, 1 };
						createitem = new int[] { 203 };
						createcount = new int[] { 1 };
						success_htmlid = "alice_8";
						failure_htmlid = "alice_no";
					} else {
						htmlid = "alice_7";
					}
				} else if (aliceMaterialId == 203) {
					htmlid = "alice_8";
				}
			}
		}
		// ヤヒの補佐官
		else if (((L1NpcInstance) obj).getNpcTemplate().get_npcId() == 80055) {
			L1NpcInstance npc = (L1NpcInstance) obj;
			htmlid = getYaheeAmulet(pc, npc, s);
		}
		// 業の管理者
		else if (((L1NpcInstance) obj).getNpcTemplate().get_npcId() == 80056) {
			L1NpcInstance npc = (L1NpcInstance) obj;
			if (pc.getKarma() <= -10000000) {
				getBloodCrystalByKarma(pc, npc, s);
			}
			htmlid = "";
		}
		// 次元の扉(バルログの部屋)
		else if (((L1NpcInstance) obj).getNpcTemplate().get_npcId() == 80063) {
			// 「中に入る」
			if (s.equalsIgnoreCase("a")) {
				if (pc.getInventory().checkItem(40921)) { // 元素の支配者
					L1Teleport.teleport(pc, 32674, 32832, (short) 603, 2, true);
				} else {
					htmlid = "gpass02";
				}
			}
		}
		// バルログの執政官
		else if (((L1NpcInstance) obj).getNpcTemplate().get_npcId() == 80064) {
			// 「私の永遠の主はバルログ様だけです…」
			if (s.equalsIgnoreCase("1")) {
				htmlid = "meet005";
			}
			// 「私の霊魂をかけてバルログ様に忠誠を誓います…」
			else if (s.equalsIgnoreCase("2")) {
				if (pc.getInventory().checkItem(40678)) { // ソウルクリスタルの欠片
					htmlid = "meet006";
				} else {
					htmlid = "meet010";
				}
			}
			// 「ソウルクリスタルの欠片を1個捧げます」
			else if (s.equalsIgnoreCase("a")) {
				if (pc.getInventory().consumeItem(40678, 1)) {
					pc.addKarma((int) (100 * Config.RATE_KARMA));
					// バルログの笑い声が脳裏を強打します。
					pc.sendPackets(new S_ServerMessage(1078));
					htmlid = "meet007";
				} else {
					htmlid = "meet004";
				}
			}
			// 「ソウルクリスタルの欠片を10個捧げます」
			else if (s.equalsIgnoreCase("b")) {
				if (pc.getInventory().consumeItem(40678, 10)) {
					pc.addKarma((int) (1000 * Config.RATE_KARMA));
					// バルログの笑い声が脳裏を強打します。
					pc.sendPackets(new S_ServerMessage(1078));
					htmlid = "meet008";
				} else {
					htmlid = "meet004";
				}
			}
			// 「ソウルクリスタルの欠片を100個捧げます」
			else if (s.equalsIgnoreCase("c")) {
				if (pc.getInventory().consumeItem(40678, 100)) {
					pc.addKarma((int) (10000 * Config.RATE_KARMA));
					// バルログの笑い声が脳裏を強打します。
					pc.sendPackets(new S_ServerMessage(1078));
					htmlid = "meet009";
				} else {
					htmlid = "meet004";
				}
			}
			// 「バルログ様に会わせてください」
			else if (s.equalsIgnoreCase("d")) {
				if (pc.getInventory().checkItem(40909) // 地の通行証
						|| pc.getInventory().checkItem(40910) // 水の通行証
						|| pc.getInventory().checkItem(40911) // 火の通行証
						|| pc.getInventory().checkItem(40912) // 風の通行証
						|| pc.getInventory().checkItem(40913) // 地の印章
						|| pc.getInventory().checkItem(40914) // 水の印章
						|| pc.getInventory().checkItem(40915) // 火の印章
						|| pc.getInventory().checkItem(40916) // 風の印章
						|| pc.getInventory().checkItem(40917) // 地の支配者
						|| pc.getInventory().checkItem(40918) // 水の支配者
						|| pc.getInventory().checkItem(40919) // 火の支配者
						|| pc.getInventory().checkItem(40920) // 風の支配者
						|| pc.getInventory().checkItem(40921)) { // 元素の支配者
					htmlid = "";
				} else {
					L1Teleport.teleport(pc, 32674, 32832, (short) 602, 2, true);
				}
			}
		}
		// 揺らめく者
		else if (((L1NpcInstance) obj).getNpcTemplate().get_npcId() == 80066) {
			// 「カヘルの意志を受け入れる」
			if (s.equalsIgnoreCase("1")) {
				if (pc.getKarma() >= 10000000) {
					pc.setKarma(-1000000);
					// ヤヒの姿がだんだん近くに感じられます。
					pc.sendPackets(new S_ServerMessage(1079));
					htmlid = "betray03";
				}
			}
		}
		// バルログの補佐官
		else if (((L1NpcInstance) obj).getNpcTemplate().get_npcId() == 80071) {
			L1NpcInstance npc = (L1NpcInstance) obj;
			htmlid = getBarlogEarring(pc, npc, s);
		}
		// バルログの軍師
		else if (((L1NpcInstance) obj).getNpcTemplate().get_npcId() == 80073) {
			// 私に力をくださいますよう
			if (s.equalsIgnoreCase("a")) {
				if (pc.hasSkillEffect(STATUS_CURSE_BARLOG)) {
					pc.sendPackets(new S_ServerMessage(79)); // \f1何も起きませんでした。
				} else {
					pc.setSkillEffect(STATUS_CURSE_YAHEE, 1020 * 1000);
					pc.sendPackets(new S_SkillIconBlessOfEva(pc.getId(), 1020));
					pc.sendPackets(new S_SkillSound(pc.getId(), 750));
					pc.broadcastPacket(new S_SkillSound(pc.getId(), 750));
					pc.sendPackets(new S_ServerMessage(1127));
				}
			}
		}
		// バルログの鍛冶屋
		else if (((L1NpcInstance) obj).getNpcTemplate().get_npcId() == 80072) {
			int karmaLevel = pc.getKarmaLevel();
			if (s.equalsIgnoreCase("0")) {
				htmlid = "lsmitha";
			} else if (s.equalsIgnoreCase("1")) {
				htmlid = "lsmithb";
			} else if (s.equalsIgnoreCase("2")) {
				htmlid = "lsmithc";
			} else if (s.equalsIgnoreCase("3")) {
				htmlid = "lsmithd";
			} else if (s.equalsIgnoreCase("4")) {
				htmlid = "lsmithe";
			} else if (s.equalsIgnoreCase("5")) {
				htmlid = "lsmithf";
			} else if (s.equalsIgnoreCase("6")) {
				htmlid = "";
			} else if (s.equalsIgnoreCase("7")) {
				htmlid = "lsmithg";
			} else if (s.equalsIgnoreCase("8")) {
				htmlid = "lsmithh";
			}
			// ヤヒのシャツ / バルログの鍛冶屋
			else if (s.equalsIgnoreCase("a") && karmaLevel >= 1) {
				materials = new int[] { 20158, 40669, 40678 };
				counts = new int[] { 1, 50, 100 };
				createitem = new int[] { 20083 };
				createcount = new int[] { 1 };
				success_htmlid = "";
				failure_htmlid = "lsmithaa";
			}
			// ヤヒのアーマー / バルログの鍛冶屋
			else if (s.equalsIgnoreCase("b") && karmaLevel >= 2) {
				materials = new int[] { 20144, 40672, 40678 };
				counts = new int[] { 1, 50, 100 };
				createitem = new int[] { 20131 };
				createcount = new int[] { 1 };
				success_htmlid = "";
				failure_htmlid = "lsmithbb";
			}
			// ヤヒのアーマー / バルログの鍛冶屋
			else if (s.equalsIgnoreCase("c") && karmaLevel >= 3) {
				materials = new int[] { 20075, 40671, 40678 };
				counts = new int[] { 1, 50, 100 };
				createitem = new int[] { 20069 };
				createcount = new int[] { 1 };
				success_htmlid = "";
				failure_htmlid = "lsmithcc";
			}
			// ヤヒのグローブ / バルログの鍛冶屋
			else if (s.equalsIgnoreCase("d") && karmaLevel >= 4) {
				materials = new int[] { 20183, 40674, 40678 };
				counts = new int[] { 1, 20, 100 };
				createitem = new int[] { 20179 };
				createcount = new int[] { 1 };
				success_htmlid = "";
				failure_htmlid = "lsmithdd";
			}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -