Skip to content

Instantly share code, notes, and snippets.

View cydh's full-sized avatar

Cydh Ramdh cydh

View GitHub Profile
@cydh
cydh / guide_refine_db.md
Last active May 27, 2019 17:53
Guide to modify edited Refine DB related to https://github.com/cydh/rathena/pull/10
@cydh
cydh / rorclientitem_diff.txt
Last active December 6, 2018 10:49
Hasil perbandingan file client idRO Renewal untuk file idnum2* dengan format id:missing|what.
555:desc
556:desc
557:desc
562:desc
563:desc
585:desc
586:desc
588:desc
589:desc
590:desc
@cydh
cydh / [ok]cm_tsurugi2steel_guard2coal_alchol.txt
Last active November 14, 2018 17:32
Macro Collection for Change Material skill (GN_CHANGEMATERIAL) 1. Exchange Skel-Bone & Orcish Voucher to Alchol 2. Tsurugi [1] to Steel 3. Guard to Coal | (c) Cydh/PServeRO
# Macro Collection for Change Material skill (GN_CHANGEMATERIAL)
# 1. Exchange Skel-Bone & Orcish Voucher to Alchol
# 2. Tsurugi [1] to Steel
# 3. Guard to Coal
#
# PLEASE MAKE SURE YOUR OPENKORE IS SUPPORTED BY cm COMMAND, OR
# TRY USE THIS MY BRANCH: https://github.com/cydh/openkore/tree/feature/skill_exchange_item
#
# (c) Cydh/PServeRO
src/map/skill.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/map/skill.cpp b/src/map/skill.cpp
index a45362a1a..69f733314 100755
--- a/src/map/skill.cpp
+++ b/src/map/skill.cpp
@@ -2641,7 +2641,7 @@ bool skill_strip_equip(struct block_list *src, struct block_list *target, uint16
const enum sc_type sc_atk[5] = {SC_STRIPWEAPON, SC_STRIPSHIELD, SC_STRIPARMOR, SC_STRIPHELM, SC__STRIPACCESSORY};
const enum sc_type sc_def[5] = {SC_CP_WEAPON, SC_CP_SHIELD, SC_CP_ARMOR, SC_CP_HELM, SC_NONE};

Sum elements of numeric array(s) for rAthena

//////////////////////////////////////////////////////////////////////////////////
// Sum elements of numeric array(s)
// Example:
//   setarray .@array1[0],2,3,1,5;
//   setarray .@array2[0],-3,-5,1;
//   .@total = callfunc("F_ArraySum",.@array1);          // will returns 11
//   .@total = callfunc("F_ArraySum",.@array1,.@array2); // will returns 4
//////////////////////////////////////////////////////////////////////////////////
@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
}
@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 / 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;
}

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