2013年5月15日 星期三

【Java教學】製作重生藥水

else if (itemId == 1234) { //自殺藥水物品編號 
            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

沒有留言:

張貼留言