Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: OpenKore forums
url: https://forums.openkore.com/
about: Please ask and answer questions here in our forum.
- name: OpenKore Discord
url: https://discord.gg/X7SNfMXBJ5
about: Chat with us in the Discord support channel.
94 changes: 64 additions & 30 deletions .github/workflows/build_XSTools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# actions upload-artifact https://github.com/actions/upload-artifact
# actions download-artifact https://github.com/actions/download-artifact
# actions cache https://github.com/actions/cache
# git-auto-commit https://github.com/marketplace/actions/git-auto-commit
name: Build XSTools
on:
push:
Expand Down Expand Up @@ -56,13 +57,6 @@ jobs:
# preparing Windows OS #
########################

- name: (Windows 2022) Setup python ${{ matrix.python }} ${{ matrix.architecture }}
if: matrix.os == 'windows-2022'
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
architecture: ${{ matrix.architecture }}

- name: (Windows 2019) Check the Python2 cache
if: matrix.os == 'windows-2019'
id: cache-python2
Expand All @@ -77,10 +71,12 @@ jobs:
echo "::warning ::cache '${{ runner.os }}-python-${{ matrix.python }}' was NOT found, download the Python2"
echo "== python version check:"
python -V
if ( Test-Path "C:/hostedtoolcache/windows/Python/" ) {
$python_path = python -c "import os, sys; print(os.path.dirname(sys.executable))"
echo $python_path
if ( Test-Path $python_path ) {
echo '== Remove default Python 3:'
echo 'rm -r "C:\hostedtoolcache\windows\Python\3.7.9\x64\python.exe"'
rm -r "C:\hostedtoolcache\windows\Python\3.7.9\x64\python.exe"
echo "rm -r $python_path\python.exe"
rm -r $python_path\python.exe
}
echo "================================"
echo "== download python ${{ matrix.python }} (${{ matrix.architecture }})"
Expand All @@ -90,6 +86,13 @@ jobs:
echo "== add the path to python27 to the PATH variable"
echo "c:\python27" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

- name: (Windows 2022) Setup python ${{ matrix.python }} ${{ matrix.architecture }}
if: matrix.os == 'windows-2022'
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
architecture: ${{ matrix.architecture }}

- name: Remove default Strawberry perl and g++
run: |
if ( "${{ matrix.os }}" -eq "windows-2022" ) {
Expand Down Expand Up @@ -299,12 +302,12 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-20.04
- os: ubuntu-22.04
python: 2.7
architecture: x64
perl: 5.12

- os: ubuntu-22.04
- os: ubuntu-latest
python: 3
architecture: x64
perl: latest
Expand All @@ -314,32 +317,36 @@ jobs:
uses: actions/checkout@v4

# setup matrix:
# - ubuntu-20.04 + python 2.7.18 x64 + perl 5.12 x64
# - ubuntu-22.04 + python 3 x64 + perl last (5.38) x64
# - ubuntu-22.04 + python 2.7.18 x64 + perl 5.12 x64
# - ubuntu-latest (24.04) + python 3 x64 + perl last (5.40) x64

######################
# preparing Linux OS #
######################

- name: (Ubuntu-22.04) Setup python ${{ matrix.python }} ${{ matrix.architecture }}
- name: (${{ matrix.os }}) Setup python ${{ matrix.python }} ${{ matrix.architecture }}
if: matrix.os == 'ubuntu-22.04'
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
architecture: ${{ matrix.architecture }}

- name: (Ubuntu-20.04) Setup python ${{ matrix.python }} ${{ matrix.architecture }}
if: matrix.os == 'ubuntu-20.04'
run: |
echo "== python version check:"
python -V
echo "== rename symbolic link"
sudo rm -f /usr/bin/python
cd /usr/bin/ && sudo ln -rs python2.7 python
# ls -l /usr/bin/ |grep python
echo "== sudo apt-get install python2.7:"
sudo apt-get install python2.7
echo "== which python:"
which python
#echo "== rename symbolic link"
#sudo rm -f /usr/bin/python
#cd /usr/bin/ && sudo ln -rs python2.7 python
ls -l /usr/bin/ |grep python
echo "== new python version check:"
python -V

- name: (${{ matrix.os }}) Setup python ${{ matrix.python }} ${{ matrix.architecture }}
if: matrix.os == 'ubuntu-latest'
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
architecture: ${{ matrix.architecture }}

- name: Setup perl ${{ matrix.perl }} on linux
uses: shogo82148/actions-setup-perl@v1
with:
Expand Down Expand Up @@ -377,8 +384,8 @@ jobs:
PERL: ${{ matrix.perl }}
ARCHITECTURE: ${{ matrix.architecture }}
run: |
sudo apt update
sudo apt install -y libreadline6-dev libcurl4-openssl-dev
sudo apt-get update
sudo apt-get install -y libreadline6-dev libcurl4-openssl-dev
make all
echo "======================================================"
echo "DONE:"
Expand Down Expand Up @@ -411,11 +418,11 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-20.04
- os: ubuntu-22.04
architecture: x64
perl: 5.12

- os: ubuntu-22.04
- os: ubuntu-latest
architecture: x64
perl: latest

Expand Down Expand Up @@ -511,3 +518,30 @@ jobs:
- name: run "makedist.sh --unknown"
shell: bash
run: ./makedist.sh --unknown || echo -e "\e[34m# done"

#################
## Translation ##
#################

Translation_update:

runs-on: ubuntu-latest

steps:
- name: GIT checkout
uses: actions/checkout@v4

- name: Installing dependencies
run: sudo apt-get install -y gettext

- name: Run update.sh
run: |
cd src/po/
./update.sh

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Automatic translation updates
branch: translation_update
create_branch: true
27 changes: 0 additions & 27 deletions .github/workflows/test.yml

This file was deleted.

4 changes: 2 additions & 2 deletions src/AI/SlaveAttack.pm
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ sub main {
$args->{ai_attack_failed_give_up}{time} = time if !$args->{ai_attack_failed_give_up}{time};
if (timeOut($args->{ai_attack_failed_give_up})) {
delete $args->{ai_attack_failed_give_up}{time};
message T("$slave unable to determine a attackMethod (check attackUseWeapon and Skills blocks)\n"), 'slave_attack';
message TF("%s unable to determine a attackMethod (check attackUseWeapon and Skills blocks)\n", $slave), 'slave_attack';
giveUp($slave, $args, $ID);
}

Expand All @@ -375,7 +375,7 @@ sub main {

if (timeOut($args->{ai_attack_failed_waitForAgressive_give_up})) {
delete $args->{ai_attack_failed_waitForAgressive_give_up}{time};
message T("[Out of Range] $slave waited too long for target to get closer, dropping target\n"), 'slave_attack';
message TF("[Out of Range] %s waited too long for target to get closer, dropping target\n", $slave), 'slave_attack';
giveUp($slave, $args, $ID);
} else {
warning TF("[Out of Range - Waiting] %s (%d %d), target %s (%d %d), distance %d, maxDistance %d, dmgFromYou %d.\n", $slave, $realMyPos->{x}, $realMyPos->{y}, $target, $realMonsterPos->{x}, $realMonsterPos->{y}, $realMonsterDist, $args->{attackMethod}{maxDistance}, $target->{dmgFromPlayer}{$slave->{ID}}), 'slave_attack';
Expand Down
34 changes: 17 additions & 17 deletions src/Commands.pm
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ sub initHandlers {
# Skill Exchange Item
['cm', undef, \&cmdExchangeItem],
['analysis', undef, \&cmdExchangeItem],

['searchstore', undef, \&cmdSearchStore],
['pause', [
T("Delay the next console commands."),
Expand Down Expand Up @@ -883,8 +883,8 @@ sub run {
my %params = ( switch => $switch, input => $command );
Plugins::callHook('Command_post', \%params);
if (!$params{return}) {
error TF("Unknown command '%s'. Please read the documentation for a list of commands.\n"
."http://openkore.com/wiki/Category:Console_Command\n", $switch);
error TF("Unknown command. Please read the documentation for a list of commands.\n"
."http://openkore.com/wiki/Category:Console_Command\n");
} else {
return $params{return}
}
Expand Down Expand Up @@ -1731,7 +1731,7 @@ sub cmdCash {
$messageSender->sendCashShopClose();
return;
}

if (not defined $cashShop{points}) {
error T("Cash shop is not open\n");
error T("Please use 'cash open' first\n");
Expand Down Expand Up @@ -1801,7 +1801,7 @@ sub cmdCash {
message TF("Cash Points: %sC - Kafra Points: %sC\n", formatNumber($cashShop{points}->{cash}), formatNumber($cashShop{points}->{kafra}));
return;
}

if ($args[0] eq 'list') {
my %cashitem_tab = (
0 => T('New'),
Expand All @@ -1826,10 +1826,10 @@ sub cmdCash {
}
$msg .= ('-'x50) . "\n";
message $msg, "list";

return;
}

error T("Syntax Error in function 'cash' (Cash shop)\n" .
"Usage: cash <open | close | buy | points | list>\n");
}
Expand Down Expand Up @@ -4289,7 +4289,7 @@ sub cmdParty {
"You're already in a party.\n");
} elsif ($arg1 eq "" || $arg1 eq "info") {
my $msg = center(T(" Party Information "), 79, '-') ."\n".
TF("Party name: %s\n" .
TF("Party name: %s\n" .
"EXP Take: %s Item Take: %s Item Division: %s\n\n".
"# Name Map Coord Online HP\n",
$char->{'party'}{'name'},
Expand Down Expand Up @@ -5321,7 +5321,7 @@ sub cmdSpells {
my $spell = $spells{$ID};
next unless $spell;

$msg .= sprintf("%3d %-20s %-20s %3d %3d\n",
$msg .= sprintf("%3d %-20s %-20s %3d %3d\n",
$spell->{binID}, getSpellName($spell->{type}), main::getActorName($spell->{sourceID}), $spell->{pos}{x}, $spell->{pos}{y});
}
$msg .= ('-'x66) . "\n";
Expand Down Expand Up @@ -7194,14 +7194,14 @@ sub cmdAchieve {
my (undef, $args) = @_;
my ($arg1) = $args =~ /^(\w+)/;
my ($arg2) = $args =~ /^\w+\s+(\S.*)/;

if (($arg1 ne 'list' && $arg1 ne 'reward') || ($arg1 eq 'list' && defined $arg2) || ($arg1 eq 'reward' && !defined $arg2)) {
error T("Syntax Error in function 'achieve'\n".
"Usage: achieve [<list|reward>] [<achievemente_id>]\n".
"Usage: achieve list: Shows all current achievements\n".
"Usage: achieve reward achievemente_id: Request reward for the achievement of id achievemente_id\n"
);

return;
}
my ($cmd, $args_string) = @_;
Expand All @@ -7215,18 +7215,18 @@ sub cmdAchieve {
if ($arg1 eq 'reward') {
if (!exists $achievementList->{$arg2}) {
error TF("You don't have the achievement %s.\n", $arg2);

} elsif ($achievementList->{$arg2}{completed} != 1) {
error TF("You haven't completed the achievement %s.\n", $arg2);

} elsif ($achievementList->{$arg2}{reward} == 1) {
error TF("You have already claimed the achievement %s reward.\n", $arg2);

} else {
message TF("Sending request for reward of achievement %s.\n", $arg2);
$messageSender->sendAchievementGetReward($arg2);
}

} elsif ($arg1 eq 'list') {
my $msg = center(" " . "Achievement List" . " ", 79, '-') . "\n";
my $index = 0;
Expand Down Expand Up @@ -7928,7 +7928,7 @@ sub cmdCancelTransaction {
error TF("You must be logged in the game to use this command '%s'\n", shift);
return;
}

if ($ai_v{'npc_talk'}{'talk'} eq 'buy_or_sell') {
cancelNpcBuySell();
} else {
Expand Down Expand Up @@ -8501,7 +8501,7 @@ sub cmdRevive {
"Cannot use item '%s' in attempt to revive: item not found in inventory\n", $args[0]);
return;
}

message TF("Trying to use item %s to self-revive\n", $item->name());
$messageSender->sendAutoRevive();
}
Expand Down
Binary file modified src/po/de.mo
Binary file not shown.
Loading