Skip to content

Instantly share code, notes, and snippets.

View cydh's full-sized avatar

Cydh Ramdh cydh

View GitHub Profile
// 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 / Flux with Respect Validation.md
Last active December 1, 2022 19:14
Quick guide to add Respect/Validation to FluxCP

Adding Respect/Validation

The simpliest way to add Respect/Validation into FluxCP

  1. Create new direcotry in FLUX_ROOT/lib/ with name respectvalidation
  2. Followed its installation guide by using command line in respectvalidation directory
composer require respect/validation
  1. In any module file you want to add the input validation (example: modules/character/view.php) add the respect/validation autoload
require 'respectvalidation/vendor/autoload.php';
@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
<?php
if (!defined('FLUX_ROOT')) exit;
require_once 'Flux/FileLoad.php';
$itemDescTable = Flux::config('FluxTables.ItemDescTable');
$title = 'Item Info';
$fileLoad = new FileLoad();
// upload and parse map.
if($files->get('iteminfo')) {
$itemInfo = FLUX_ROOT . '/itemInfo.lua';
@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;
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 / 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 / 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});