rAthena boting : create skillnametable.txt/skill_id_handle.txt from skill_id.yml and monsters.txt from mob_db.yml (rAthena db subfolders)
Nobody has claimed this yet.
- Dominant language
- Perl
- Stars
- 1.5k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the solution you'd like
Hi,
If some bots are not attacking the monsters it can be because attackSkillSlot Fire Bolt doesn't work, but attackSkillSlot MG_FIREBOLT is working. Also in mon_control monsters names will not work Poring 2 0 0 is failing, but 1002 2 0 0 where 1002 is the ID of the poring will work, because the ID of skills/monsters are not linked with those informations in openkore for your server.
I created two .bat to convert rAthena yml files in the /db or /db/re folders named "skill_db.yml" and "mob_db.yml". Put the bat and the desired yml file in the same directory, clic on the bat, it'll convert it to the requested .txt file. (convertisseur.bat is for the "skill_db.yml", and convertisseur_mobs.bat is for the "mob_db.yml"). You'll just have to put the txt in the right tables sub-folder (watch your tables/server.txt, find your server section, watch the addTableFolders specified)
Additional context
convertisseur.bat :
`@echo off
SETLOCAL EnableDelayedExpansion
chcp 65001 >nul
set "INPUT_FILE=skill_db.yml"
set "OUT_HANDLE=SKILL_id_handle.txt"
set "OUT_NAME=skillnametable.txt"
if not exist "%INPUT_FILE%" (
echo [ERREUR] Le fichier %INPUT_FILE% est introuvable dans ce dossier.
echo Placez ce script .bat dans le meme dossier que votre skill_db.yml.
pause
exit /b
)
echo Extraction et conversion des competences en cours...
echo Genere a partir de %INPUT_FILE%...
:: Utilisation de PowerShell integre pour un traitement rapide et fiable du YAML
powershell -NoProfile -Command ^
"$currentId = $null; $currentName = $null; $currentDesc = $null; " ^
"$handles = [System.Collections.Generic.List[string]]::new(); " ^
"$names = [System.Collections.Generic.List[string]]::new(); " ^
"Get-Content '%INPUT_FILE%' -Encoding UTF8 | ForEach-Object { " ^
" if ($_ -match '^\s*-\sId:\s(\d+)') { " ^
" if ($currentId -and $currentName) { " ^
" $handles.Add("$currentId $currentName"); " ^
" $desc = if ($currentDesc) { $currentDesc } else { $currentName }; " ^
" $names.Add("$currentName#$desc#"); " ^
" } " ^
" $currentId = $Matches[1]; $currentName = $null; $currentDesc = $null; " ^
" } elseif ($_ -match '^\sName:\s(\w+)') { " ^
" $currentName = $Matches[1]; " ^
" } elseif ($_ -match '^\sDescription:\s(.+)') { " ^
" $currentDesc = $Matches[1].Trim([char]0x22).Trim([char]0x27); " ^
" } " ^
"}; " ^
"if ($currentId -and $currentName) { " ^
" $handles.Add("$currentId $currentName"); " ^
" $desc = if ($currentDesc) { $currentDesc } else { $currentName }; " ^
" $names.Add("$currentName#$desc#"); " ^
"}; " ^
"[System.IO.File]::WriteAllLines('%OUT_HANDLE%', $handles, [System.Text.Encoding]::UTF8); " ^
"[System.IO.File]::WriteAllLines('%OUT_NAME%', $names, [System.Text.Encoding]::UTF8);"
if %ERRORLEVEL% EQU 0 (
echo.
echo [SUCCES] Conversion terminee avec succes !
echo Fichiers crees : %OUT_HANDLE% et %OUT_NAME%
) else (
echo.
echo [ERREUR] Une erreur est survenue durant l'extraction.
)
pause`
convertisseur_mobs.bat :
`@echo off
SETLOCAL EnableDelayedExpansion
chcp 65001 >nul
set "INPUT_FILE=mob_db.yml"
set "OUT_MONSTERS=monsters.txt"
if not exist "%INPUT_FILE%" (
echo [ERREUR] Le fichier %INPUT_FILE% est introuvable dans ce dossier.
echo Placez ce script .bat dans le meme dossier que votre mob_db.yml.
pause
exit /b
)
echo Extraction et conversion des monstres en cours...
echo Genere a partir de %INPUT_FILE%...
:: Utilisation de PowerShell integre pour un traitement ultra-rapide
powershell -NoProfile -Command ^
"$currentId = $null; $currentName = $null; " ^
"$mobs = [System.Collections.Generic.List[string]]::new(); " ^
"Get-Content '%INPUT_FILE%' -Encoding UTF8 | ForEach-Object { " ^
" if ($_ -match '^\s*-\sId:\s(\d+)') { " ^
" if ($currentId -and $currentName) { " ^
" $mobs.Add("$currentId $currentName"); " ^
" } " ^
" $currentId = $Matches[1]; $currentName = $null; " ^
" } elseif ($_ -match '^\sName:\s(.+)') { " ^
" $currentName = $Matches[1].Trim([char]0x22).Trim([char]0x27); " ^
" } " ^
"}; " ^
"if ($currentId -and $currentName) { " ^
" $mobs.Add("$currentId $currentName"); " ^
"}; " ^
"[System.IO.File]::WriteAllLines('%OUT_MONSTERS%', $mobs, [System.Text.Encoding]::UTF8);"
if %ERRORLEVEL% EQU 0 (
echo.
echo [SUCCES] Extraction terminee avec succes !
echo Fichier cree : %OUT_MONSTERS%
) else (
echo.
echo [ERREUR] Une erreur est survenue durant l'extraction.
)
pause`
Hope it helps
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the rAthena db and db/re inputs named in the issue, along with tables/server.txt and its addTableFolders setting. Determine where OpenKore expects skillnametable.txt, SKILL_id_handle.txt, and monsters.txt, then verify that the generated files support the skill and monster names described in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell, yaml
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100