Skip to content

Instantly share code, notes, and snippets.

View cydh's full-sized avatar

Cydh Ramdh cydh

View GitHub Profile
@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!
}
@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
- 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 / 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
+
@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 / 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 / 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$ = "";
// 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 / 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
@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 ??
}
}