hsiang520 發表於 2024-3-3 10:22

有人知道永久古白要怎麼寫入遊戲?

如題~
感恩~


因為喜歡的版本沒有...因此想要製作永久古白!

yasioukon 發表於 2024-3-3 15:47

要改核心

把扣除那一行語法拿掉

hsiang520 發表於 2024-3-4 02:54

感謝大大回覆!
核心是要改哪? 要怎麼改? QQ

zouzouge 發表於 2024-3-4 12:37

package com.lineage.data.item_etcitem.hp;

import com.lineage.data.executor.ItemExecutor;
import com.lineage.server.model.Instance.L1ItemInstance;
import com.lineage.server.model.Instance.L1PcInstance;
import com.lineage.server.model.L1PcInventory;
import com.lineage.server.model.skill.L1BuffUtil;
import com.lineage.server.serverpackets.S_ServerMessage;
import com.lineage.server.serverpackets.S_SkillSound;
import java.util.Random;

public class Ante_Fruit6 extends ItemExecutor
{

        protected L1ItemInstance _weapon;
        protected int _weaponM;

        private Ante_Fruit6()
        {
                _weapon = null;
                _weaponM = 0;
        }

        public static ItemExecutor get()
        {
                return new Ante_Fruit6();
        }

        public void execute(int data[], L1PcInstance pc, L1ItemInstance item)
        {
                if (item == null)
                        return;
                if (pc == null)
                        return;
                if (L1BuffUtil.stopPotion(pc))
                        UseHeallingPotion(pc, 85, 197);
        }

        private void UseHeallingPotion(L1PcInstance pc, int healHp, int gfxid)
        {
                if (pc.getInventory().consumeItem(40308, 950L))//如果有金币950
                {
                        L1BuffUtil.cancelAbsoluteBarrier(pc);
                        Random random = new Random();
                        pc.sendPacketsX8(new S_SkillSound(pc.getId(), gfxid));
                        healHp = (int)((double)healHp * (random.nextGaussian() / 5D + 1.0D));
                        if (pc.hasSkillEffect(173))
                                healHp >>= 1;
                        if (pc.hasSkillEffect(4012))
                                healHp >>= 1;
                        if (pc.hasSkillEffect(4011))
                                healHp *= -1;
                        pc.setCurrentHp(pc.getCurrentHp() + healHp);
                } else
                {
                        pc.sendPackets(new S_ServerMessage("很抱歉,您的金币不夠!多赚点钱吧。"));
                }
        }
}

random 發表於 2024-3-21 01:29

yasioukon 發表於 2024-3-3 15:47
要改核心

把扣除那一行語法拿掉

借串發問一下
源碼的治癒藥水大多都沒有寫扣除語法、治癒藥水使用後會消失
有寫扣除語法「pc.getInventory().removeItem(l1iteminstance, 1)」的治癒藥水即使刪除扣除語法、該物品使用後仍然會消失

使用模擬器《[版本] 天堂3.6模擬器_內附源碼》

kevinsoin 發表於 2024-3-21 02:08

讓我們繼續看下去

yasioukon 發表於 2024-3-21 09:08

random 發表於 2024-3-21 01:29
借串發問一下
源碼的治癒藥水大多都沒有寫扣除語法、治癒藥水使用後會消失
有寫扣除語法「pc.getInventor ...

正常來說


如果移除該行還會扣除

應該喝一次會扣兩瓶才對

所以你可以先改補血量 確認修改的檔案正確

如果改補血量有變化

那可能就看是不是藥水分類那種條件 有下了移除

au03l729 發表於 2024-4-23 16:58

感恩大大無私分享

eemone28 發表於 2024-4-28 00:43

學習了 謝分享
頁: [1]
查看完整版本: 有人知道永久古白要怎麼寫入遊戲?