Skip to content

Instantly share code, notes, and snippets.

View cydh's full-sized avatar

Cydh Ramdh cydh

View GitHub Profile
@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 / [ok]macro_fcp.txt
Last active November 8, 2017 02:35
OpenKore's automacro to cast Full Chemical Protection (FCP) to player in certain guild only | (c) Cydh/PServeRO
# Automacro to cast Full Chemical Protection (FCP) on chat
automacro fcp {
pubm "fcp",2
call {
if (@eval(checkPlayerGuild("$.lastpub")) == 1) {
do sp CR_FULLPROTECTION "$.lastpub"
} else {
do e ??
}
}
@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!
}
@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

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
@cydh
cydh / herc-private_airship.txt
Created July 31, 2018 09:17
Sample custom run for Private Airship (Herc's script)
- script private_airship FAKE_NPC,{
end;
S_AirShipIsNeedItem:
for (.@i = 0; .@i < getarraysize(.needitem); .@i += 2) {
if (@airshipitem_id == .needitem[.@i]) {
@airshipitem_amount = .needitem[.@i+1]; //<--- Set the amount will be deleted
return true;
}
@cydh
cydh / add_custom_map.md
Last active September 28, 2018 09:32
Adding custom map as copy of gld2_prt, gld2_pay, gld2_gef, gld2_ald

Requirements:

  1. Tokei's GRF Editor, can be downloaded here
  2. WeeMapCache, can be downloaded here
  3. rAthena

Steps

  1. Open GRF Editor
  2. Open kRO's data.grf (or any grf file taht you think it contains the map that you want)
  3. Find files for gld2_ maps
@cydh
cydh / mob_db_atk_matk_diff.json
Last active October 15, 2018 00:30
related to https://github.com/rathena/rathena/pull/3574 renewal mob_db atk1 and atk2 differences
{
"ATK1Counts": 1216,
"ATK2Counts": 1724,
"Counts": 1724,
"Monsters": {
"1001": {
"ATK2": {
"Old": 40,
"New": 7
}