Skip to content

Instantly share code, notes, and snippets.

View cydh's full-sized avatar

Cydh Ramdh cydh

View GitHub Profile
db/re/item_db.txt | 4 +-
src/map/script_constants.hpp | 2 +
src/map/status.cpp | 119 ++++++++++++++++++++++++++++++++++---------
src/map/status.hpp | 2 +
4 files changed, 100 insertions(+), 27 deletions(-)
diff --git a/db/re/item_db.txt b/db/re/item_db.txt
index 0cc393c1a..815b48215 100644
--- a/db/re/item_db.txt
+++ b/db/re/item_db.txt
@cydh
cydh / soullink_star_30holy_30boss.diff
Created November 15, 2019 01:20
Star Gladiator spirit increase 30% damage to boss monsters, increase 30% damage to holy element target
@cydh
cydh / reflect_damage_gvg_bg_adjustment.diff
Created November 15, 2019 00:53
swapped reflect damage calculation after GVG/BG damage adjustment
src/map/battle.cpp | 42 +++++++++++++++++++++---------------------
1 file changed, 21 insertions(+), 21 deletions(-)
diff --git a/src/map/battle.cpp b/src/map/battle.cpp
index 64cf60bce..ac9c041c3 100644
--- a/src/map/battle.cpp
+++ b/src/map/battle.cpp
@@ -5032,27 +5032,6 @@ struct block_list *battle_check_devotion(struct block_list *bl) {
static void battle_calc_attack_gvg_bg(struct Damage* wd, struct block_list *src,struct block_list *target,uint16 skill_id,uint16 skill_lv)
{
@cydh
cydh / special_item_obtain.pm
Last active October 9, 2019 14:59
special_item_obtain::src/Nerwork/Receive.pm a clean lines for https://github.com/OpenKore/openkore/pull/2932
use constant {
TYPE_BOXITEM => 0x0,
TYPE_MONSTER_ITEM => 0x1,
};
sub special_item_obtain {
my ($self, $args) = @_;
my $item_name = itemNameSimple($args->{nameID});
my $holder = bytesToString($args->{holder});
@cydh
cydh / doram_equip.sql
Last active November 2, 2019 05:46
From Divine Pride
-- source: https://divine-pride.net/
INSERT INTO `mob_drop_db_re` (`mob_id`,`nameid`,`rate`) VALUES('1134','28380','20'); -- KOBOLD_2, Fresh Grass Necklace
INSERT INTO `mob_drop_db_re` (`mob_id`,`nameid`,`rate`) VALUES('1207','28380','20'); -- STING, Fresh Grass Necklace
INSERT INTO `mob_drop_db_re` (`mob_id`,`nameid`,`rate`) VALUES('2640','28380','100'); -- C5_STING, Fresh Grass Necklace
INSERT INTO `mob_drop_db_re` (`mob_id`,`nameid`,`rate`) VALUES('1784','28381','20'); -- STAPO, Cute Grass Necklace
INSERT INTO `mob_drop_db_re` (`mob_id`,`nameid`,`rate`) VALUES('2643','28381','100'); -- C3_STAPO, Cute Grass Necklace
INSERT INTO `mob_drop_db_re` (`mob_id`,`nameid`,`rate`) VALUES('1782','28382','20'); -- ROWEEN, Charm Grass Necklace
INSERT INTO `mob_drop_db_re` (`mob_id`,`nameid`,`rate`) VALUES('2677','28382','100'); -- C2_ROWEEN, Charm Grass Necklace
INSERT INTO `mob_drop_db_re` (`mob_id`,`nameid`,`rate`) VALUES('1692','1695','20'); -- BREEZE, Delicate Foxtail Model
INSERT INTO `mob_drop_db_re` (`mob_id`,`na
@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 / iteml.pl
Last active February 3, 2021 16:39
A function to solve message with <ITEML> contents from item link feature.
# Solve message that contains <ITEML> to kore-style item name
sub solveITEML {
my ($msg) = @_;
if ($msg =~ /<ITEML>([a-zA-Z0-9\%\&\(\,\+\*]*)<\/ITEML>/) {
my $newmsg = $msg;
$newmsg =~ s/<ITEML>([a-zA-Z0-9\%\&\(\,\+\*]*)<\/ITEML>/{itemlink}/g; # I don't really like this part
my (@items) = grep { $_; } $msg=~ /<ITEML>([a-zA-Z0-9\%\&\(\,\+\*]*)<\/ITEML>/g;
for my $item (@items) {
my $refine = 0;
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
//////////////////////////////////////////////////////////////////////////////////