本帖最後由 flyht 於 2018-3-14 16:51 編輯
這是原始版本寫法 我直接複製別人寫好的 主要是抓顯示圖檔
樓下是伊薇版的寫法 自己修改圖檔編號和編號對應的編碼 對到即可
L1Attack.java
public void commit() 內
/*
if ((_calcType == PC_PC || _calcType == NPC_PC && !_targetPc.getAttackLog()) {
return;
}
*/
上面這段改成
if (_calcType == NPC_PC) {
return;
}
下面再加上
/**
* 傷害顯示系統
*/
if (_calcType == PC_NPC || _calcType == PC_PC) { // 傷害顯示開關
int units = _damage % 10;
int tens = (_damage / 10) % 10;
int hundreads = (_damage / 100) % 10;
int thousands = (_damage / 1000) % 10;
int tenthousands = (_damage / 10000) % 10;
if ((units > 0) || (tens > 0) || (hundreads > 0)
|| (thousands > 0) || (tenthousands > 0)) {
units += 2000;
_pc.sendPackets(new S_SkillSound(_target.getId(), units));
}
if ((tens > 0) || (hundreads > 0) || (thousands > 0)
|| (tenthousands > 0)) {
tens += 2010;
_pc.sendPackets(new S_SkillSound(_target.getId(), tens));
}
if ((hundreads > 0) || (thousands > 0) || (tenthousands > 0)) {
hundreads += 2020;
_pc.sendPackets(new S_SkillSound(_target.getId(), hundreads));
}
if ((thousands > 0) || (tenthousands > 0)) {
thousands += 2030;
_pc.sendPackets(new S_SkillSound(_target.getId(), thousands));
}
if (tenthousands > 0) {
tenthousands += 2040;
_pc.sendPackets(new S_SkillSound(_target.getId(), tenthousands));
}
if (_damage == 0) {
_pc.sendPackets(new S_SkillSound(_target.getId(), 2050));
}
}
如果不想顯示訊息就把他註解了或改成gm顯示
L1Magic.java
public void commit(int damage, int drainMana) 內
跟L1Attack.java一樣
不過_damage要改成damage
最後C_Chat.java
if (chatType == 0) 內加上簡易開關
/**
* 傷害顯示系統
*/
if(chatText.matches("atkmsg")) {
try {
if(!pc.getAttackLog()) {
pc.setAttackLog(true);
pc.sendPackets(new S_SystemMessage("開啟傷害顯示系統"));
} else {
pc.setAttackLog(false);
pc.sendPackets(new S_SystemMessage("關閉傷害顯示系統"));
}
} catch (Exception e) {
}
}
最後是圖檔編碼
這是整體動畫
#10570 51 攻擊傷害特效
0.eff(0 51,0.0:2 1.0:2 2.0:2 3.0:2 4.0:2 5.0:2 6.0:2 7.0:2 8.0:2 9.0:2 10.0:2 11.0:2 12.0:2 13.0:2 14.0:2 15.0:2 16.0:2 17.0:2 18.0:2 19.0:2 20.0:2 21.0:2 22.0:2 23.0:2 24.0:2 25.0:2 26.0:2 27.0:2 28.0:2 29.0:2 30.0:2 31.0:2 32.0:2 33.0:2 34.0:2 35.0:2 36.0:2 37.0:2 38.0:2 39.0:2 40.0:2 41.0:2 42.0:2 43.0:2 44.0:2 45.0:2 46.0:2 47.0:2 48.0:2 49.0:2 50.0:2)
102.type(0)
104.attr(8)
再來是個別的數字
#2000 51=10570 攻擊傷害特效
0.eff(0 51,0.50:2 0.0:2 0.1:2 0.2:2 0.3:2 0.4:2 0.5:2 0.6:2 0.7:2 0.8:2 0.9:2 0.10:2 0.11:2 0.12:2 0.13:2 0.14:2 0.15:2 0.16:2 0.17:2 0.18:2 0.19:2 0.20:2 0.21:2 0.22:2 0.23:2 0.24:2 0.25:2 0.26:2 0.27:2 0.28:2 0.29:2 0.30:2 0.31:2 0.32:2 0.33:2 0.34:2 0.35:2 0.36:2 0.37:2 0.38:2 0.39:2 0.40:2 0.41:2 0.42:2 0.43:2 0.44:2 0.45:2 0.46:2 0.47:2 0.48:2 0.49:2)
102.type(0)
104.attr(4)
#2001 51=10570 攻擊傷害特效
0.eff(0 51,1.50:2 1.0:2 1.1:2 1.2:2 1.3:2 1.4:2 1.5:2 1.6:2 1.7:2 1.8:2 1.9:2 1.10:2 1.11:2 1.12:2 1.13:2 1.14:2 1.15:2 1.16:2 1.17:2 1.18:2 1.19:2 1.20:2 1.21:2 1.22:2 1.23:2 1.24:2 1.25:2 1.26:2 1.27:2 1.28:2 1.29:2 1.30:2 1.31:2 1.32:2 1.33:2 1.34:2 1.35:2 1.36:2 1.37:2 1.38:2 1.39:2 1.40:2 1.41:2 1.42:2 1.43:2 1.44:2 1.45:2 1.46:2 1.47:2 1.48:2 1.49:2)
102.type(0)
104.attr(4)
#2002 51=10570 攻擊傷害特效
0.eff(0 51,2.50:2 2.0:2 2.1:2 2.2:2 2.3:2 2.4:2 2.5:2 2.6:2 2.7:2 2.8:2 2.9:2 2.10:2 2.11:2 2.12:2 2.13:2 2.14:2 2.15:2 2.16:2 2.17:2 2.18:2 2.19:2 2.20:2 2.21:2 2.22:2 2.23:2 2.24:2 2.25:2 2.26:2 2.27:2 2.28:2 2.29:2 2.30:2 2.31:2 2.32:2 2.33:2 2.34:2 2.35:2 2.36:2 2.37:2 2.38:2 2.39:2 2.40:2 2.41:2 2.42:2 2.43:2 2.44:2 2.45:2 2.46:2 2.47:2 2.48:2 2.49:2)
102.type(0)
104.attr(4)
舉3個例子 剩下自己編了 編碼號碼自己找地方改 要對應核心
圖檔載點
https://goo.gl/dnpnaZ