Skip to content

Instantly share code, notes, and snippets.

View cydh's full-sized avatar

Cydh Ramdh cydh

View GitHub Profile
@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 / 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 / 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;
}
@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';
<?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';

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
@cydh
cydh / itemInfo_v2.lua
Last active April 15, 2018 14:12
Edited itemInfo.lua to supports multi itemInfo files for 2018 clients. kRO Added function AddItemIsCostume for costume. 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 / store_tax.yml
Last active November 24, 2017 13:41
# Taxes for selling something (vending)
# The zeny that you received will be reduced after tax
Selling:
# This is old custom eAthena vending tax
In_Total:
- Minimal_Value: 0
Tax: 0
# Makes the In_Total tax applies after all Each_Entry taxes or before it
In_Total_Applies_After: true

These are functions that use for multi itemInfo files

Force ClassNum

Means use ClassNum from this file. Somehow old files or auto generated itemInfo from item table files (idnum2...) doesn't have this value

for ItemID,DESC in pairs(tbl) do
	CheckItem(ItemID, DESC, true)
end