Skip to content

Instantly share code, notes, and snippets.

View cydh's full-sized avatar

Cydh Ramdh cydh

View GitHub Profile
case TF_BACKSLIDING: //This is the correct implementation as per packet logging information. [Skotlex]
clif_skill_nodamage(src,bl,skill_id,skill_lv,1);
skill_blown(src,bl,skill_get_blewcount(skill_id,skill_lv),unit_getdir(bl),2);
break;
@cydh
cydh / [ok]item_list_window_selected.patch
Last active April 29, 2016 11:52
Source for select item list window by Change Material and Four Spirits Analysis skill. Added 2 commands `cm` for Change Material and `analysis` for Four Spirits Analysis that only can be used after skill is casted. Now, you can make simple macro! See https://gist.github.com/cydh/e8167633881f44c76759943a3a1e66ab
Index: src/Commands.pm
===================================================================
--- src/Commands.pm (revision 9032)
+++ src/Commands.pm (working copy)
@@ -236,6 +236,10 @@
southeast => \&cmdManualMove,
southwest => \&cmdManualMove,
captcha => \&cmdAnswerCaptcha
+
+ # [Cydh]
@cydh
cydh / [ok]cm_tsurugi2steel.txt
Last active June 10, 2016 23:20
This snippet may depreciated, please read https://gist.github.com/cydh/7b77580fc50b8f8b508c38dca296325a | Sample macro for Change Material skill after patching the https://gist.github.com/cydh/e1473eb2a242d221e80a42dce4ed7093. Change the Tsurugi [1] to Steel for simple lines!
macro doConvSteel {
$per = @eval($.weight * 100 / $.maxweight)
# log \$per $per
$count = @invamount (Tsurugi [1])
while ($count > 0 && $per < 90) as loop
do ss GN_CHANGEMATERIAL
pause 2
$idx = @inventory (Tsurugi [1])
# log \$idx $idx
do cm $idx 1
@cydh
cydh / [ok]cm_createalchol.txt
Last active June 10, 2016 23:19
Macro to Exchange Material (GN_CHANGEMATERIAL) | Creating Alchol/Alcohol by each 50 Orcish Voucer + 40 Skel-Bone | 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.com
# Macro to Exchange Material (GN_CHANGEMATERIAL)
# Creating Alchol/Alcohol by each 50 Orcish Voucer + 40 Skel-Bone
#
# 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.com
macro doConvAlchol {
log doConvAlchol
@cydh
cydh / [ok]rough_oridecon_to_oridecon.txt
Created May 29, 2016 06:47
Simple macro to convert Rough Oridecon to Oridecon by talking with NPC Dietrich inside the Prontera's refinery building | (c) Cydh/PServeRO
# Simple macro to convert Rough Oridecon to Oridecon
# by talking with NPC Dietrich inside the Prontera's refinery building
#
# HOW TO USE:
# 1. Manually move Rough Oridecon to inventory
# 2. Walk into Dietrich location
# 3. Call teh macro in console: macro doConvOri
#
# (c) Cydh/PServeRO
@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
@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 / followup-0647b159.diff
Created August 15, 2016 13:57
* Cleaned up `clif_status_change`. * Removed `BL_SCEFFECT` and `StatusRelevantBLTypes` array.
diff --git a/src/map/clif.c b/src/map/clif.c
index 9387c3f..ccf134f 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -5820,10 +5820,17 @@ void clif_cooking_list(struct map_session_data *sd, int trigger, uint16 skill_id
/// 0196 <index>.W <id>.L <state>.B (ZC_MSG_STATE_CHANGE) [used for ending status changes and starting them on non-pc units (when needed)]
/// 043f <index>.W <id>.L <state>.B <remain msec>.L { <val>.L }*3 (ZC_MSG_STATE_CHANGE2) [used exclusively for starting statuses on pcs]
/// 0983 <index>.W <id>.L <state>.B <total msec>.L <remain msec>.L { <val>.L }*3 (ZC_MSG_STATE_CHANGE3) (PACKETVER >= 20120618)
-void clif_status_change_sub(struct block_list *bl,int type,int flag,int tick,int val1, int val2, int val3, enum send_target target_type)
+/// @param bl Show/send packet to clients around this object
// Written by me, Cydh
// For rathena.org
// Autoload atcommand for players on login
prontera,147,155,5 script Kafra#saveyouratcmd 4_F_KAFRA4,{
mes .npc$;
mes "Hi, you can select command that auto enable when you login.";
next;
switch(select("Select commands","Close")) {
case 1:
callsub(OnSelectCommand);
@cydh
cydh / random_option_npc.txt
Created November 10, 2016 11:04
Sample NPC to add Random Option for Crimson Weapons
prontera,109,187,3 script Crimson Weapon Enchanter 4_F_KAFRA3,{
mes "[Kafra]";
.@i = getequipid(EQI_HAND_R);
if (.@i == -1) {
mes "You don't hold any weapon!";
close;
}
mes "What element you want to endow?";
next;
.@menu$ = "";