📄 c_itemuse.java
字号:
//pc.sendPackets(new S_ServerMessage(481)); // \f1一つの能力値の最大値は25です。他の能力値を選択してください。
}
} else if (itemId == 40038) { // エリクサー:魅力
if (pc.getBaseCha() < Config.MAX_ABILITY3 && pc.getElixirStats() < Config.MAX_ABILITY2) {
pc.addBaseCha((byte) 1); // 素のCHA値に+1
pc.setElixirStats(pc.getElixirStats() + 1);
pc.getInventory().removeItem(l1iteminstance, 1);
pc.sendPackets(new S_OwnCharStatus2(pc));
pc.save();
// DBにキャラクター情報を書き込む
} else {
if(pc.getBaseCha() >= Config.MAX_ABILITY3)
pc.sendPackets(new S_SystemMessage("Cha能力值"+Config.MAX_ABILITY3+"以後不能喝萬能藥! "));
if(pc.getElixirStats() >= Config.MAX_ABILITY2)
pc.sendPackets(new S_SystemMessage("萬能藥只能喝"+Config.MAX_ABILITY2+"瓶"));
//pc.sendPackets(new S_ServerMessage(481)); // \f1一つの能力値の最大値は25です。他の能力値を選択してください。
}
}
else if (itemId == 300007) { //TODO 重生藥水
if (pc.getLevel() <= 10) {
pc.sendPackets(new S_ServerMessage(79));
return;
}
pc.sendPackets(new S_SkillSound(pcObjid, 6505));
pc.broadcastPacket(new S_SkillSound(pcObjid, 6505));
pc.getInventory().takeoffEquip(945);//用來脫掉全身裝備
pc.setExp(10000);
pc.resetLevel();
pc.addBaseMaxHp((short)(-1 * (int)((double) pc.getBaseMaxHp() - 12)));
pc.addBaseMaxMp((short)(-1 * (int)((double) pc.getBaseMaxMp() - 12)));
pc.resetBaseAc();
pc.resetBaseMr();
pc.resetBaseHitup();
pc.resetBaseDmgup();
pc.sendPackets(new S_OwnCharStatus(pc));
pc.sendPackets(new S_ServerMessage(822));
pc.getInventory().removeItem(l1iteminstance, 1);
}
//end
else if (itemId == 300008) { //TODO 解卡點卷軸 by xpatax
Connection connection = null;
connection = L1DatabaseFactory.getInstance().getConnection();
PreparedStatement preparedstatement = connection.prepareStatement("UPDATE characters SET LocX=33442,LocY=32797,MapID=4 WHERE account_name=?");
preparedstatement.setString(1, client.getAccountName());
preparedstatement.execute();
preparedstatement.close();
connection.close();
pc.sendPackets(new S_SystemMessage("除了你,其他角色已回到奇岩村。"));
pc.getInventory().removeItem(l1iteminstance, 1);
}
//end
// レッドポーション、濃縮体力回復剤、象牙の塔の体力回復剤
else if (itemId == L1ItemId.POTION_OF_HEALING
|| itemId == L1ItemId.CONDENSED_POTION_OF_HEALING
|| itemId == 40029) {
UseHeallingPotion(pc, 15, 189);
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == 40022) { // 古代の体力回復剤
UseHeallingPotion(pc, 20, 189);
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == L1ItemId.POTION_OF_EXTRA_HEALING
|| itemId == L1ItemId.CONDENSED_POTION_OF_EXTRA_HEALING) {
UseHeallingPotion(pc, 45, 194);
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == 40023) { // 古代の高級体力回復剤
UseHeallingPotion(pc, 30, 194);
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == L1ItemId.POTION_OF_GREATER_HEALING
|| itemId == L1ItemId.CONDENSED_POTION_OF_GREATER_HEALING) {
UseHeallingPotion(pc, 75, 197);
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == 40024) { // 古代の強力体力回復剤
UseHeallingPotion(pc, 55, 197);
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == 40506) { // エントの実
UseHeallingPotion(pc, 70, 197);
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == 40026 || itemId == 40027
|| itemId == 40028) { // ジュース
UseHeallingPotion(pc, 25, 189);
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == 40058) { // きつね色のパン
UseHeallingPotion(pc, 30, 189);
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == 40071) { // 黒こげのパン
UseHeallingPotion(pc, 70, 197);
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == 40734) { // 信頼のコイン
UseHeallingPotion(pc, 50, 189);
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == L1ItemId.B_POTION_OF_HEALING) {
UseHeallingPotion(pc, 25, 189);
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == L1ItemId.C_POTION_OF_HEALING) {
UseHeallingPotion(pc, 10, 189);
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == L1ItemId.B_POTION_OF_EXTRA_HEALING) { // 祝福されたオレンジ
// ポーション
UseHeallingPotion(pc, 55, 194);
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == L1ItemId.B_POTION_OF_GREATER_HEALING) { // 祝福されたクリアー
// ポーション
UseHeallingPotion(pc, 85, 197);
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == 140506) { // 祝福されたエントの実
UseHeallingPotion(pc, 80, 197);
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == 40043) { // 兎の肝
UseHeallingPotion(pc, 600, 189);
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == 41403) { // クジャクの食糧
UseHeallingPotion(pc, 300, 189);
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId >= 41417 && itemId <= 41421) { // 「アデンの夏」イベント限定アイテム
UseHeallingPotion(pc, 90, 197);
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == 41337) { // 祝福された麦パン
UseHeallingPotion(pc, 85, 197);
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == 40858) { // liquor(酒)
pc.setDrink(true);
pc.sendPackets(new S_Liquor(pc.getId()));
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == L1ItemId.POTION_OF_CURE_POISON
|| itemId == 40507) { // シアンポーション、エントの枝
if (pc.hasSkillEffect(71) == true) { // ディケイポーションの状態
pc.sendPackets(new S_ServerMessage(698)); // 魔力によって何も飲むことができません。
} else {
cancelAbsoluteBarrier(pc); // アブソルート バリアの解除
pc.sendPackets(new S_SkillSound(pc.getId(), 192));
pc.broadcastPacket(new S_SkillSound(pc.getId(), 192));
if (itemId == L1ItemId.POTION_OF_CURE_POISON) {
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == 40507) {
pc.getInventory().removeItem(l1iteminstance, 1);
}
pc.curePoison();
}
} else if (itemId == L1ItemId.POTION_OF_HASTE_SELF
|| itemId == L1ItemId.B_POTION_OF_HASTE_SELF
|| itemId == 40018 // 強化グリーン ポーション
|| itemId == 140018 // 祝福された強化グリーン ポーション
|| itemId == 40030 // 象牙の塔のヘイスト ポーション
|| itemId == 41338 // 祝福されたワイン
|| itemId == 41261 // おむすび
|| itemId == 41262 // 焼き鳥
|| itemId == 41268 // ピザのピース
|| itemId == 41269 // 焼きもろこし
|| itemId == 41271 // ポップコーン
|| itemId == 41272 // おでん
|| itemId == 41273 // ワッフル
|| itemId == 41342) { // メデューサの血
useGreenPotion(pc, itemId);
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == L1ItemId.POTION_OF_EMOTION_BRAVERY // ブレイブポーション
|| itemId == L1ItemId.B_POTION_OF_EMOTION_BRAVERY // 祝福されたブレイブポーション
|| itemId == 41415) { // 強化ブレイブポーション
if (pc.isKnight()) {
useBravePotion(pc, itemId);
} else {
pc.sendPackets(new S_ServerMessage(79)); // \f1何も起きませんでした。
}
pc.getInventory().removeItem(l1iteminstance, 1);
//法師 紅酒
}else if (itemId == 40039) { // 紅酒
if (pc.isWizard()) {
useBravePotion(pc, itemId);
} else {
pc.sendPackets(new S_ServerMessage(79)); // \f1何も起きませんでした。
}
pc.getInventory().removeItem(l1iteminstance, 1);
//黑妖 威士忌
}else if (itemId == 40040) { // 強化ブレイブポーション
if (pc.isDarkelf()) {
useBravePotion(pc, itemId);
} else {
pc.sendPackets(new S_ServerMessage(79)); // \f1何も起きませんでした。
}
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == 49158) { // 新增生命果實勇水效果
if (pc.isDragonKnight() || pc.isIllusionist()) {
useBravePotion(pc, itemId);
} else {
pc.sendPackets(new S_ServerMessage(79)); // \f1何も起きませんでした。
}
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == 40068 // エルヴン ワッフル
|| itemId == 140068) { // 祝福されたエルヴン ワッフル
if (pc.isElf()) {
useBravePotion(pc, itemId);
} else {
pc.sendPackets(new S_ServerMessage(79)); // \f1何も起きませんでした。
}
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == 40031) { // イビル ブラッド
if (pc.isCrown()) {
useBravePotion(pc, itemId);
} else {
pc.sendPackets(new S_ServerMessage(79)); // \f1何も起きませんでした。
}
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == 40733) { // 名誉のコイン
useBravePotion(pc, itemId);
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == 40066 || itemId == 41413) { // お餅、月餅
pc.sendPackets(new S_ServerMessage(338, "$1084")); // あなたの%0が回復していきます。
pc.setCurrentMp(pc.getCurrentMp()
+ (7 + _random.nextInt(6))); // 7~12
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == 40067 || itemId == 41414) { // よもぎ餅、福餅
pc.sendPackets(new S_ServerMessage(338, "$1084")); // あなたの%0が回復していきます。
pc.setCurrentMp(pc.getCurrentMp()
+ (15 + _random.nextInt(16))); // 15~30
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == 40735) { // 勇気のコイン
pc.sendPackets(new S_ServerMessage(338, "$1084")); // あなたの%0が回復していきます。
pc.setCurrentMp(pc.getCurrentMp() + 60);
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == 40042) { // スピリットポーション
pc.sendPackets(new S_ServerMessage(338, "$1084")); // あなたの%0が回復していきます。
pc.setCurrentMp(pc.getCurrentMp() + 50);
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == 41404) { // クジャクの霊薬
pc.sendPackets(new S_ServerMessage(338, "$1084")); // あなたの%0が回復していきます。
pc.setCurrentMp(pc.getCurrentMp()
+ (80 + _random.nextInt(21))); // 80~100
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == 41412) { // 金のチョンズ
pc.sendPackets(new S_ServerMessage(338, "$1084")); // あなたの%0が回復していきます。
pc.setCurrentMp(pc.getCurrentMp()
+ (5 + _random.nextInt(16))); // 5~20
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == 40032 || itemId == 40041
|| itemId == 41344) { // エヴァの祝福、マーメイドの鱗、水の精粋
useBlessOfEva(pc, itemId);
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == L1ItemId.POTION_OF_MANA // ブルー ポーション
|| itemId == L1ItemId.B_POTION_OF_MANA // 祝福されたブルー
// ポーション
|| itemId == 40736) { // 知恵のコイン
useBluePotion(pc, itemId);
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == L1ItemId.POTION_OF_EMOTION_WISDOM // ウィズダム
// ポーション
|| itemId == L1ItemId.B_POTION_OF_EMOTION_WISDOM) { // 祝福されたウィズダム
// ポーション
if (pc.isWizard()) {
useWisdomPotion(pc, itemId);
} else {
pc.sendPackets(new S_ServerMessage(79)); // \f1何も起きませんでした。
}
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == L1ItemId.POTION_OF_BLINDNESS) { // オペイクポーション
useBlindPotion(pc);
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == 40088 // 変身スクロール
|| itemId == 40096 // 象牙の塔の変身スクロール
|| itemId == 140088) { // 祝福された変身スクロール
if (usePolyScroll(pc, itemId, s)) {
pc.getInventory().removeItem(l1iteminstance, 1);
} else {
pc.sendPackets(new S_ServerMessage(181)); // \f1そのようなモンスターには変身できません。
}
} else if (itemId == 41154 // 闇の鱗
|| itemId == 41155 // 烈火の鱗
|| itemId == 41156 // 背徳者の鱗
|| itemId == 41157) { // 憎悪の鱗
usePolyScale(pc, itemId);
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == 41143 // ラバーボーンヘッド変身ポーション
|| itemId == 41144 // ラバーボーンアーチャー変身ポーション
|| itemId == 41145 // ラバーボーンナイフ変身ポーション
|| itemId == 49149 // シャルナの変身スクロール(レベル30)
|| itemId == 49150 // シャルナの変身スクロール(レベル40)
|| itemId == 49151 // シャルナの変身スクロール(レベル52)
|| itemId == 49152 // シャルナの変身スクロール(レベル55)
|| itemId == 49153 // シャルナの変身スクロール(レベル60)
|| itemId == 49154 // シャルナの変身スクロール(レベル65)
|| itemId == 49155) { // シャルナの変身スクロール(レベル70)
usePolyPotion(pc, itemId);
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == 40317) { // 砥石
// 武器か防具の場合のみ
if (l1iteminstance1.getItem().getType2() != 0
&& l1iteminstance1.get_durability() > 0) {
String msg0;
pc.getInventory().recoveryDamage(l1iteminstance1);
msg0 = l1iteminstance1.getLogName();
if (l1iteminstance1.get_durability() == 0) {
pc.sendPackets(new S_ServerMessage(464, msg0)); // %0%sは新品同様の状態になりました。
} else {
pc.sendPackets(new S_ServerMessage(463, msg0)); // %0の状態が良くなりました。
}
} else {
pc.sendPackets(new S_ServerMessage(79)); // \f1何も起きませんでした。
}
pc.getInventory().removeItem(l1iteminstance, 1);
} else if (itemId == 40097 || itemId == 40119
|| itemId == 140119 || itemId == 140329) { // 解呪スクロール、原住民のトーテム
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -