Skip to content

Instantly share code, notes, and snippets.

View cydh's full-sized avatar

Cydh Ramdh cydh

View GitHub Profile
@cydh
cydh / Double_attack_on_Emperium.diff
Last active December 19, 2016 12:41
Double attack on Emperium is miss on rAthena. This diff fixes for issue #217 (https://github.com/rathena/rathena/issues/217). Reason for this change, see my comment below.
diff --git a/src/map/battle.c b/src/map/battle.c
index 825436e..70a3846 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3282,9 +3282,10 @@ static struct Damage battle_calc_multi_attack(struct Damage wd, struct block_lis
|| ( sd->bonus.double_rate > 0 && sd->weapontype1 != W_FIST ) //Will fail bare-handed
|| ( sc && sc->data[SC_KAGEMUSYA] && sd->weapontype1 != W_FIST )) // Need confirmation
{ //Success chance is not added, the higher one is used [Skotlex]
- int max_rate = max(5*skill_lv,sd->bonus.double_rate);
- if(sc && sc->data[SC_KAGEMUSYA]) max_rate= max(max_rate,sc->data[SC_KAGEMUSYA]->val1*3);
@cydh
cydh / Change-Max-Level-on-rAthena.md
Last active April 8, 2022 16:37
How to change MAX LEVEL from 99 to 255 for rAthena

How to change MAX LEVEL from 99 to 255 for rAthena

Adding EXP tables for Base Level 255 from level 99

All you need is Notepad++ to change max level from 99 to 255 by editing the job_exp.txt file. Follow these quick instructions:

  1. Open job_exp.txt (pre | re) by using Notepad++
  2. Create a new blank file
  3. Makes 156 empty lines, because to add max level from 99 to 255 needs 156 more EXP entries 156 empty lines
  4. In that empty blank file at first line, click Edit menu > choose Column Editor..., or press ALT+C Open Column Editor
@cydh
cydh / disabling_job.diff
Last active January 6, 2017 01:31
To disable certain job in rAthena just comment the job line from db/[pre-]re/job_db1.txt. Example usage to disable 2 Trans, 3rd, Babies, and Expanded for Ragnarok server.
diff --git a/conf/msg_conf/map_msg.conf b/conf/msg_conf/map_msg.conf
index f4dfc46..ab14daa 100644
--- a/conf/msg_conf/map_msg.conf
+++ b/conf/msg_conf/map_msg.conf
@@ -753,7 +753,8 @@
//Skill messages
720: %s is required.
721: [%s] Poison effect was applied to the weapon.
-//722: Free
+
- script AtCommandCheck -1,{
OnCommandCheck:
.@map$ = strcharinfo(3);
if (.@atcmd_command$ == "warp") {
if (.@map$ == "prontera" || .@map$ == "izlude")
end;
useatcmd .@atcmd_command$ .@atcmd_parameters$[0];
end;
}
@cydh
cydh / itemInfo.lub
Last active October 12, 2017 09:59
just for new costume field
function main()
for ItemID, DESC in pairs(tbl) do
if not (DESC.costume) then
DESC.costume = false
end
result, msg = AddItem(ItemID, DESC.unidentifiedDisplayName, DESC.unidentifiedResourceName, DESC.identifiedDisplayName, DESC.identifiedResourceName, DESC.slotCount, DESC.ClassNum, DESC.costume)
if not result then
return false, msg
end
for k, v in pairs(DESC.unidentifiedDescriptionName) do
@cydh
cydh / itemInfo.lua
Last active April 26, 2018 23:22
Edited itemInfo.lua to supports multi itemInfo files. Guide: https://pservero.com/multi-iteminfo-files-with-costume-slots-name-fixes-from-item_db/
main = function()
iiFiles = {
"System/itemInfo_Translation.lua", -- 1st priority
"System/itemInfo_kRO.lua", -- 2nd
"System/itemInfo_idRO.lua", -- 3rd
"System/itemInfo_iRO.lua", -- 4th
"System/itemInfo_misc.lua", -- 5th
"System/itemInfo_ItemDB.lua", -- Fixes!
}

These are functions that use for multi itemInfo files

Force ClassNum

Means use ClassNum from this file. Somehow old files or auto generated itemInfo from item table files (idnum2...) doesn't have this value

for ItemID,DESC in pairs(tbl) do
	CheckItem(ItemID, DESC, true)
end
@cydh
cydh / store_tax.yml
Last active November 24, 2017 13:41
# Taxes for selling something (vending)
# The zeny that you received will be reduced after tax
Selling:
# This is old custom eAthena vending tax
In_Total:
- Minimal_Value: 0
Tax: 0
# Makes the In_Total tax applies after all Each_Entry taxes or before it
In_Total_Applies_After: true
@cydh
cydh / itemInfo_v2.lua
Last active April 15, 2018 14:12
Edited itemInfo.lua to supports multi itemInfo files for 2018 clients. kRO Added function AddItemIsCostume for costume. Guide: https://pservero.com/multi-iteminfo-files-with-costume-slots-name-fixes-from-item_db/
main = function()
iiFiles = {
"System/itemInfo_Translation.lua", -- 1st priority
"System/itemInfo_kRO.lua", -- 2nd
"System/itemInfo_idRO.lua", -- 3rd
"System/itemInfo_iRO.lua", -- 4th
"System/itemInfo_misc.lua", -- 5th
"System/itemInfo_ItemDB.lua", -- Fixes!
}

Update The Refine NPC

Try just patch this NPC first

 npc/merchants/refine.txt | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/npc/merchants/refine.txt b/npc/merchants/refine.txt
index 48a82d7..89e662f 100644
--- a/npc/merchants/refine.txt