281 Commits

Author SHA1 Message Date
TheSumm
a1a993282b Fix vcpkg compiling 2021-06-12 12:37:32 +02:00
diath
6cd5eb3e22 Add clickable NPC keywords (#1148) 2021-04-29 18:06:48 +02:00
Ranieri Althoff
5cc9319a94 Optimize XTEA encryption (#1143)
https://dev.to/rsa/making-an-algorithm-15x-faster-without-parallelism-38k5
2021-04-02 21:48:58 +02:00
vfjpl
3600a9b40b Fix Lua errors when the client is built without the sound framework (#1142) 2021-04-02 21:35:34 +02:00
diath
b37623cd86 Fix the use of deprecated C++ functions (#1138) 2021-04-01 00:38:36 +02:00
vfjpl
67b7dbfcfe Keep log messages in a deque instead of a list and remove unnecessary copy
Co-authored-by: Kacper Piwiński <kacper.piwinski@arex.pl>
2021-04-01 00:38:02 +02:00
vfjpl
7752add8aa Use float literals where applicable (#1140)
Use float literals to perform more calculation in float instead of performing implicit conversion to double and back to float.

Co-authored-by: Kacper Piwiński <kacper.piwinski@arex.pl>
2021-04-01 00:06:50 +02:00
diath
7c528be73e Cleanup CMake project (#1137)
* Updated the minimum required standard from C++11 to C++14 (https://en.wikipedia.org/wiki/C%2B%2B14).
* Fixed -g0 and -Os flags being passed to luafunctions.cpp when building with MSVC.
* Fixed case mismatch in FIND_PACKAGE_HANDLE_STANDARD_ARGS argument in a number of CMake files.
2021-03-31 07:30:09 +02:00
vfjpl
4d055913dc Clean up BitmapFont code (#1129) 2021-03-30 17:03:02 +02:00
Marcin Michalski
4edb1eb3ad Fix adding executable icon on windows with non-msvc compiler (#1136) 2021-03-30 08:58:32 +02:00
Marcin Michalski
69e44a3722 Fix & enable by default static linking on macOS (#1133) 2021-03-29 17:22:04 +02:00
Marcin Michalski
ba706fc5c3 Remove travis (#1135)
Replaced by GitHub workflows.
2021-03-29 16:58:38 +02:00
Marcin Michalski
975d138a57 Run windows workflow with luajit only (#1134) 2021-03-29 16:54:02 +02:00
Marcin Michalski
c4530a6d17 Bump minimum required CMake version to 3.1 (#1131)
* Removed Ubuntu Clang workflow
* Removed FindCXX.cmake (in favor of native feature)
* Added support for building Windows binaries with CMake when using MSVC
* Cleaned up a number of Find*.cmake modules
2021-03-27 01:04:59 +01:00
Marcin Michalski
b6399a8ad9 Update workflow (#1130) 2021-03-26 14:37:02 +01:00
Kamil Chojnowski
9c9b85ac5e Fix UITextEdit::setTextHidden ignoring the hidden param and always setting the member variable to true 2021-03-14 21:12:59 +01:00
Martin Nylind
872abf05f4 Add Missile:setPath to Lua interface (#1125)
Add Missile:setPath(fromPos, toPos) method to Lua interface.
2021-02-10 05:40:39 +01:00
peonso
d07e7fcce7 Correct messageModsMap for version 10.41 (#1119) 2021-01-04 17:33:04 +01:00
vfjpl
f521737b26 Return Tile walking creatures and things by const ref instead of copy (#1117) 2020-11-23 17:26:15 +01:00
reyhammer
18dd9c2d2d Fix TPoint::distanceFrom() calling TPoint::getLength() instead of TPoint::length() (#1116) 2020-11-23 15:59:50 +01:00
vfjpl
72cc4b2fb0 Fix out-of-bounds access in Platform::getCPUName (#1115) 2020-11-22 22:08:37 +01:00
vfjpl
c6d0fc0f71 Fix laggy diagonal movement (#1108) 2020-10-07 03:14:00 +02:00
vfjpl
b3d947d4c3 Use std::deque for queues (#1112) 2020-10-07 03:12:04 +02:00
bakasuradbl
83959e5e23 Fix window position when entering fullscreen mode on Windows platform (#1099) 2020-10-05 19:59:36 +02:00
Source61
70400bc83e Add optional format string for stdext::date_time_string() (#1110) 2020-09-15 18:58:47 +02:00
vfjpl
9c1f519f8a resourcemanager:[bug fix] directoryExists method should resolvePath before checking (#1102) 2020-08-29 17:35:42 +02:00
diath
88d0ea34bf Fix UITabBar and UIMoveableTabBar bricking when removing first tabs in (#1101) collapsed view
Co-authored-by: Xagul <eixim@hotmail.com>
2020-08-26 09:54:56 +02:00
diath
b3aaa10646 Remove stdext::packed_vector (#1106)
Co-authored-by: Kacper Piwiński <cosiekvfj@o2.pl>
2020-08-26 09:54:05 +02:00
diath
59059321a6 Fix an issue with pathfinding not respecting the PathFindAllowCreatures flag properly (#1090) 2020-06-13 09:00:01 +02:00
4drik
b0a73e5525 Fix an issue with the VIP list data not being stored properly (#1083)
The VIP IDs aren't guaranteed to be stable.
2020-05-27 21:41:25 +02:00
Oscar
307a618591 Spanish language revised (#1088)
* Spanish language revised
2020-05-22 02:11:37 +02:00
Oscar
28c2f46f13 Fix comma_value result treated as an int (#1087) 2020-05-09 16:32:19 +02:00
slavidodo
190131a1b8 Update project version to celebrate github workflows 2020-05-09 09:06:53 +02:00
slavi
de97869384 Adding build with vcpkg github workflow
- updated gitignore
- build-vcpkg
2020-05-09 08:55:33 +02:00
slavidodo
eb031e8584 removing datapack preparing 2020-05-09 08:54:02 +02:00
slavidodo
0f78727db5 remove mysql removal step 2020-05-09 08:52:27 +02:00
slavidodo
dcd3573e16 Building with vcpkg 2020-05-09 08:46:31 +02:00
slavidodo
48c3a8992f Update gitignore 2020-05-09 08:45:00 +02:00
slavidodo
d95bde1c77 fixing some unused variables and hiding previous/class members warnings 2020-05-07 19:05:16 +02:00
slavidodo
e3caaacc55 Use vcpkg & drop OTClient SDK for windows
additionaly, the project has been updated to Visual Studio 2019!
2020-05-07 19:02:20 +02:00
Ascuas Funkeln
714c6b8fc0 Add comma_value function for pretty formatting big numbers (#1085)
This also applies the function to a number of labels in the skills window.
2020-05-05 18:39:11 +02:00
Konrad Kuśnierz
63f5351016 Merge pull request #1021 from edubart/openssl-gmp
Support for OpenSSL with a fallback to GMP
2020-03-31 17:09:45 +02:00
Konrad Kuśnierz
066df4dd52 Merge pull request #1070 from Ochmar/master
Getting rid of redraw on lying corpse
2020-02-03 10:23:42 +01:00
OchmanM
e1c3fac974 Getting rid of redraw on lying corpse
In https://github.com/edubart/otclient/issues/1040#issuecomment-581173589 we had a discussion if tile:draw() redrawing in case of lying corpse either is needed or not. We came to conclusion that there are way too many downsides of this resolution and therefore we opt against redrawing. Both performance-wise and gameplay-wise it is better without redrawing.
2020-02-03 10:07:19 +01:00
Konrad Kuśnierz
a0abcbb54e Merge pull request #1065 from Sposito/update-copyright-year-2020
Update Copyright year for 2020
2019-12-31 11:44:26 +01:00
Sposito
fbcf0a3eea Update copyright year for 2020 2019-12-31 10:07:29 +00:00
Zbizu
fe6bbd6c21 fix initial language selection
fix language selection bug

steps to reproduce:
- go to c:/users/username/otclient and remove settings file
- launch otclient
- select english
- restart otclient

expected behaviour: no more startup prompts for language selection when selecting default language
observed behaviour: everytime client gets restarted and you click the default language, it doesn't get saved if it didn't exist in config file previously
2019-12-19 19:20:12 +01:00
Zbizu
be7a7d365f fixing typo in PL translation
punkt -> plural: punkty
2019-12-15 17:53:01 +01:00
Zbizu
45b14060f6 allow using up/down arrows in modalWindow
QoL change, that's how it works in the official client
2019-12-14 04:27:52 +01:00
Zbizu
a7785a3029 removing duplicate 2019-12-13 04:14:47 +01:00
Zbizu
451075516d focus first choice in modalWindow by default (QoL)
selecting first modalwindow choice by default like in cip client
2019-12-13 04:14:47 +01:00
4drik
49e3ded63c Update console.lua
I was wrong, still need it for multireturn unpack
2019-11-21 13:47:15 +01:00
4drik
14a93a13c8 Update battle.lua
Indentation
2019-11-21 13:47:15 +01:00
4drik
3019e88293 Update uiitem.lua
Indentation
2019-11-21 13:47:15 +01:00
4drik
91a80017b4 Fix for moving creatures/items far out of reach
Fix to https://github.com/edubart/otclient/issues/1055
2019-11-21 13:47:15 +01:00
4drik
656dff45f1 Fix for moving creatures/items far out of reach
Fix to https://github.com/edubart/otclient/issues/1055
2019-11-21 13:47:15 +01:00
4drik
11b006c356 Fix for container miniWindow
A fix for container miniWindow that should be able to move.
2019-11-21 13:47:15 +01:00
4drik
62d84d13d0 Delete unused variable. 2019-11-21 13:47:15 +01:00
4drik
521e87ca00 Fix target square
The target square disappeared when using filters in the battle window.
2019-11-21 13:47:15 +01:00
Leonardo Dias
6217d8805b Update dockerfile to use physfs stable 3.0 2019-10-22 22:51:01 +02:00
Konrad Kuśnierz
23bc0ab4b7 Merge pull request #1052 from diath/fix_demangle_name
Fix a possible missing null terminator in the demangle_name output buffer
2019-10-14 08:10:08 +02:00
Konrad Kuśnierz
0b0c8191dd Merge pull request #1048 from diath/fix_static_linkage
Fix an issue with Connection class linkage
2019-10-14 08:09:54 +02:00
Kamil Chojnowski
7a57acd646 Fix a possible missing null terminator in the demangle_name output buffer 2019-10-14 07:56:06 +02:00
Kamil Chojnowski
80b35b8308 Fix an issue with Connection class linkage 2019-10-14 07:54:39 +02:00
Konrad Kuśnierz
ca868b9b61 Merge pull request #1049 from diath/update_resourcemanager
Move isDirectory logic from an anonymous namespace to ResourceManager::directoryExists
2019-10-11 08:47:49 +02:00
Konrad Kuśnierz
9a0abb1452 Merge pull request #1047 from diath/update_travis
Update Travis build file to use physfs stable 3.0 branch
2019-10-11 08:46:53 +02:00
Kamil Chojnowski
ba12f55fe4 Move isDirectory logic from an anonymous namespace to ResourceManager::directoryExists 2019-10-11 03:23:01 +02:00
Kamil Chojnowski
cd7b09e27e Update Travis build file to use physfs stable 3.0 branch 2019-10-11 03:15:22 +02:00
Konrad Kuśnierz
1ab18788e6 Merge pull request #1039 from slavidodo/master
Correcting text offset
2019-10-10 08:14:47 +02:00
Konrad Kuśnierz
dd0303feee Merge pull request #1046 from diath/fix_deprecated_physfs_funcs
Fix use of deprecated PhysFS functions
2019-10-10 08:14:08 +02:00
Konrad Kuśnierz
2f76fe1c3c Merge pull request #1045 from diath/dft_cpy_mov_ctor
Add default copy constructors to Color and Position classes
2019-10-10 08:13:50 +02:00
Konrad Kuśnierz
831a87abc9 Merge pull request #1044 from diath/tidy_up
Tidy up the source code
2019-10-10 08:13:36 +02:00
Konrad Kuśnierz
f048b0e414 Merge pull request #1042 from f0rmiga/improve-docker-support
Improved Docker support
2019-10-10 08:12:52 +02:00
Kamil Chojnowski
6f13914a92 Fix use of deprecated PhysFS functions 2019-10-10 06:30:31 +02:00
Kamil Chojnowski
6a2d12ce27 Add default copy constructors to Color and Position classes 2019-10-10 01:47:34 +02:00
Kamil Chojnowski
869de6886f Tidy up the source code
* Replaced push_back calls with emplace_back where applicable.
* Replaced size() == 0 and size() != 0 with empty() and !empty().
* Replaced C style loops for range for loops where applicable.
* Fixed mismatching arg names between function declarations and definitions.
* Replaced NULL and 0 (in the context of pointers) with nullptr.
* Remove unnecessary calls to string::c_str() where applicable.
* Replaced deprecated C headers with proper C++ headers.
* Removed unnecessary null pointer checks when deleting pointers
(deleting a null pointer has no effect).
* Fixed a potential memory leak in apngloader.cpp file.
* Replaced unsafe strcpy with strncpy in the demangle_name function.
2019-10-10 00:59:24 +02:00
Thulio Ferraz Assis
5bde14d6ba Improved concurrency for building on CI 2019-09-26 20:19:46 -07:00
Thulio Ferraz Assis
9bb251e14a Refactored before_script for TravisCI 2019-09-26 20:19:37 -07:00
Thulio Ferraz Assis
22a23ee977 Used MAKE_BUILD_TYPE=Release instead of strip 2019-09-26 19:59:40 -07:00
Thulio Ferraz Assis
f6358492a5 Removed unnecessary mv for libphysfs.a 2019-09-26 19:59:07 -07:00
Thulio Ferraz Assis
272867e56e Used nproc instead of grepping /proc/cpuinfo 2019-09-26 19:58:19 -07:00
Thulio Ferraz Assis
0f69f11b78 Improved Docker support 2019-09-26 18:23:08 -07:00
Nickolas Coppem
17738dfdea Correcting text offset 2019-07-06 19:41:39 +02:00
Konrad Kuśnierz
caae18dbce Merge pull request #1038 from diath/fix_tooltip_move
Fix tooltip position updating
2019-07-02 09:08:01 +02:00
Kamil Chojnowski
09593e3382 Fix tooltip position updating 2019-07-02 01:58:40 +02:00
Konrad Kuśnierz
15d8793a93 Merge pull request #1037 from diath/improve_mouse_move_propagation
Improve mouse move event propagation
2019-07-01 19:16:22 +02:00
Kamil Chojnowski
da564e86cf Improve mouse move event propagation 2019-07-01 17:36:25 +02:00
Konrad Kuśnierz
7922f8238e Merge pull request #1032 from diath/fix_config_setvalue
Fix clearing a config key
2019-06-03 00:53:12 +02:00
Kamil Chojnowski
501552dc23 Fix clearing a config key 2019-06-02 20:05:34 +02:00
Konrad Kuśnierz
83ae66e6ae Merge pull request #1026 from divinity76/patch-3
urlencode stuff
2019-04-29 01:13:52 +02:00
Konrad Kuśnierz
fdba9d5e9c Merge pull request #1030 from Shawak/patch-1
don't call getChildren() thrice
2019-04-28 10:40:20 +02:00
Maximilian
833f029335 don't call getChildren() thrice 2019-04-27 19:21:38 +02:00
divinity76
97d2be8187 urlencode stuff
for example spaces should be %20 encoded and the @ in `Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz` should be encoded to %40

but the real problem is the possibility that these stings may include the `&` character, which should be encoded as %25 (but wasn't prior to this commit)
2019-04-14 13:54:30 +02:00
Konrad Kuśnierz
e244ba4775 Merge pull request #1025 from diath/fix_ignore_list
Fix saving ignore list and whitelist
2019-03-31 10:29:42 +02:00
Kamil Chojnowski
e5ec5ff6c8 Fix saving ignore list and whitelist 2019-03-31 08:34:32 +02:00
Konrad Kuśnierz
88e271c4ad Minor GMP typos 2019-03-09 23:55:07 +01:00
Konrad Kuśnierz
779eb56068 Fix setBuffer of InputMessage class 2019-03-09 23:35:52 +01:00
Konrad Kuśnierz
c9845a36fc Support for OpenSSL with a fallback to GMP 2019-03-09 23:21:02 +01:00
Konrad Kuśnierz
322c6fde3e Change default AVX instructions to SSE2 as mentioned in #1019 2019-03-09 00:34:35 +01:00
Konrad Kuśnierz
1c8cea513c Fix setBuffer of the OutputMessage class 2019-03-06 14:48:46 +01:00
Konrad Kuśnierz
92532a958e Merge pull request #967 from EgzoT/EgzoT-OutputMessage_setBuffer_2
Add setBuffer() method to OutputMessage class
2019-03-06 14:46:24 +01:00
Konrad Kuśnierz
53f57dfcf7 Merge pull request #929 from vamo89/vamo89-patch-2
Update translations
2019-03-06 14:36:15 +01:00
Konrad Kuśnierz
ef8fa2472c Merge pull request #1001 from divinity76/patch-2
OpenSSL >= 1.1.0 compatibility
2019-03-06 14:30:20 +01:00
Konrad Kuśnierz
8b8e7312ea Fix code style 2019-03-06 09:41:37 +01:00
Konrad Kuśnierz
fd3db800fe Fix default init of BIGNUM to nullptr 2019-03-05 09:29:13 +01:00
Konrad Kuśnierz
9186ac5321 Follow OTClient code style 2019-03-05 00:44:18 +01:00
Konrad Kuśnierz
d2a68ea301 Merge pull request #1008 from Arkamek/vs-settings
Fix glew32/zlib debug build.
2019-01-30 22:13:05 +01:00
Arkamek
b231725294 Fix glew32/zlib debug mode 2019-01-30 16:19:56 +01:00
Konrad Kuśnierz
62a48a94ff Merge pull request #919 from EgzoT/EgzoT-VS_OTC_upd_ver
Update OTClient outdated version in VS project
2019-01-16 14:16:20 +01:00
Konrad Kuśnierz
68872dd02c Merge pull request #950 from codetriage-readme-bot/codetriage-badge
Add CodeTriage badge to edubart/otclient
2019-01-16 14:14:11 +01:00
Konrad Kuśnierz
c1369a7c92 Merge branch 'master' into codetriage-badge 2019-01-16 14:13:18 +01:00
Konrad Kuśnierz
c4dce79b15 Update README.md 2019-01-16 14:08:50 +01:00
Konrad Kuśnierz
c58bf46f5e Merge pull request #954 from DavidUser/feature/docker-support
Docker support
2019-01-16 14:08:09 +01:00
Konrad Kuśnierz
8b2bb127b0 Merge pull request #951 from EgzoT/EgzoT-setupViewMode_2_fix
Fix problem with display text in setupViewMode_2
2019-01-16 14:03:17 +01:00
Konrad Kuśnierz
33b60e842f Merge pull request #966 from diath/msvc_fixes
Silence Windows SDK warnings when building with MSVC
2019-01-16 13:57:30 +01:00
Konrad Kuśnierz
70a95b2f04 Merge pull request #972 from EgzoT/EgzoT-UIComboBox_fix_getOption_to_isOption
Fixed getOption and rename to isOption
2019-01-16 13:56:20 +01:00
Konrad Kuśnierz
e3b02a7c5d Merge pull request #986 from okk3/patch-1
Function updateJump() fix
2019-01-16 13:53:14 +01:00
Konrad Kuśnierz
74d328206b Merge pull request #1002 from diath/fix_magic_effects
Fix magic effect animations in newer client versions
2019-01-16 13:50:51 +01:00
Konrad Kuśnierz
db3ba0f679 Merge pull request #1006 from diath/improve_scrollbar_navigation
Improve scrollbar navigation
2019-01-16 13:36:33 +01:00
Konrad Kuśnierz
d563aafbc9 Merge pull request #990 from EgzoT/EgzoT-Show_more_information_in_stamina_bar_2
Show more information in stamina bar
2019-01-16 13:35:05 +01:00
Konrad Kuśnierz
7e31980ba3 Merge pull request #965 from diath/fix_tab_blink
Fix tab blink
2019-01-16 13:32:39 +01:00
Konrad Kuśnierz
f7ceb788e8 Merge pull request #1004 from diath/add_channel_events
Add support for channel events
2019-01-16 13:30:09 +01:00
Konrad Kuśnierz
710212c23a Merge pull request #1003 from diath/fix_keyboard_desc
Fix an issue with key combo desc not working properly with integer keys
2019-01-16 13:25:37 +01:00
Samuel Gros
d1500746c0 Merge pull request #981 from DSpeichert/vcpkg-fixes
Compilation & linking fixes
2019-01-07 12:50:39 +01:00
Samuel Gros
a6c7269f78 Merge pull request #1005 from diath/message_prefixes
Don't apply message prefixes to messages with empty name
2019-01-06 14:32:59 +01:00
Kamil Chojnowski
a40130d79b Fix magic effect animations in newer client versions 2019-01-06 06:17:25 +01:00
Kamil Chojnowski
8301bc74f3 Add support for channel events 2019-01-05 22:22:01 +01:00
Kamil Chojnowski
c4be084516 Fix an issue with key combo desc not working properly with integer keys 2019-01-05 19:31:19 +01:00
Kamil Chojnowski
b8228ac6eb Don't apply message prefixes to messages with empty name 2019-01-05 18:14:38 +01:00
Kamil Chojnowski
57a1f5eebe Improve scrollbar navigation 2019-01-05 18:13:36 +01:00
divinity76
79e31cb041 OpenSSL >= 1.1.0 compatibility
OpenSSL did some otclient-breaking changes around 1.1.0, 
this patch should work on both < and >= 1.1.0
2018-12-06 00:51:16 +01:00
EgzoT
0e8464bd42 Show more information in stamina bar
1. Change colors on certain values, when stamina time was change.
2. Change tooltip on certain values, when stamina time was change.
3. Work with most protocols, including the most popular (8.54 - 10.98).
4. In protocols >= 1031 use information about premium account to show if player have premium stamina time.
2018-09-03 16:33:07 +02:00
Okke
a93333ddbf Function updateJump() fix
nextT should cast double as it's a second degree equation and results in a double type. -> Bhaskara.
2018-08-06 00:08:37 +02:00
Daniel Speichert
dc729d9846 Fix formatting 2018-07-16 08:47:31 -04:00
Daniel Speichert
271790d22e Upgrade vcxproj + fix path to OpenAL from vcpkg 2018-07-15 17:37:36 -04:00
Daniel Speichert
ad769d6614 Fix compilation errors (READ_TIMEOUT, READ_TIMEOUT) 2018-07-15 17:03:21 -04:00
Samuel Gros
07b4b785fc Merge pull request #934 from diath/fix_login_protocol
Fix parsing the premium status in newer login protocol versions
2018-07-13 00:11:40 +02:00
EgzoT
95ce65d8cc Fixed getOption and rename to isOption
Fixed getOption who always return nil.
Rename getOption to isOption.
2018-06-09 18:08:56 +02:00
Samuel Gros
1addf3e176 Merge pull request #971 from rmalizia44/patch-1
Fixing a typo
2018-05-09 14:31:32 +02:00
Malizia R
b813508eb7 Fixing a typo 2018-05-09 06:56:14 -03:00
EgzoT
9e9d88f184 Add setBuffer() method to OutputMessage class 2018-04-24 23:21:58 +02:00
Kamil Chojnowski
1bd392aba9 Silence Windows SDK warnings when building with MSVC 2018-04-23 14:33:08 +02:00
Kamil Chojnowski
ba558404d3 Fix tab blink 2018-04-23 14:29:39 +02:00
David Kennedy S. A
d03ffc1f26 Enable any client connect to X host 2018-03-28 11:57:59 -03:00
David Kennedy S. A
251c937b7e Disable SE Linux when running the client on container 2018-03-21 01:56:38 -03:00
David Kennedy S. A
934513df80 Build and run with docker container 2018-03-21 01:55:51 -03:00
David Kennedy S. A
9142a096df Add dockerfile to build ubuntu version 2018-03-21 01:54:10 -03:00
EgzoT
9daec49212 Fix problem with display text in setupViewMode_2
Fix problem with display text messages in setupViewMode - 2 ([CTRL + .] x 2).
Status messages was display in other place (higher than player character).
2018-03-05 11:43:38 +01:00
EgzoT
4007980c0c Change outdated compiler name for VS (#920)
Change "msvc12" compiler name to "Visual Studio [13-17]" for Visual Studio compiler. 
Name based on "_MSC_VER" parameter.
2018-02-28 21:48:27 +01:00
EgzoT
b58c438015 UIMiniWindowContainer small improve (#938)
Change type of checking whether window have on drop possibility.

Reason:
Previously this parameter was checking by class name, so it blocking creating similar objects to miniwindow or inheritance from miniwindow object without changing sources. So it block creating modules with new UI objects working with miniwindowcontainer.
2018-02-28 21:46:27 +01:00
EgzoT
e6f273d5e1 Add functionality to minimap flags system (#931)
- Add parameter 'temporary' to method 'UIMinimap:addFlag', who prevents saving flag with this parameter (look 'UIMinimap:save' method), add flag only at game session time. Old parameters list work the same at previous - backward compatibility.
- Add possibility to add icon from outside (for example from module folder) using link to this file. Old system with choose flag name by number work the same at previous, now method check if paramether is number then use old system otherwise get icon from path - backward compatibility. 'Mods' friendly.
2018-02-28 21:45:59 +01:00
diath
7967bd4385 Fix vertical tooltip clamping (#942) 2018-02-28 21:44:49 +01:00
diath
cb508c6b9f Fix write dir missing a trailing slash (#947) 2018-02-28 21:44:17 +01:00
codetriage-readme-bot
2b1feb1586 Add CodeTriage badge to edubart/otclient
Adds a badge showing the number of people helping this repo on CodeTriage.

[![Open Source Helpers](https://www.codetriage.com/edubart/otclient/badges/users.svg)](https://www.codetriage.com/edubart/otclient)

## What is CodeTriage?

CodeTriage is an Open Source app that is designed to make contributing to Open Source projects easier. It works by sending subscribers a few open issues in their inbox. If subscribers get busy, there is an algorithm that backs off issue load so they do not get overwhelmed

[Read more about the CodeTriage project](https://www.codetriage.com/what).

## Why am I getting this PR?

Your project was picked by the human, @schneems. They selected it from the projects submitted to https://www.codetriage.com and hand edited the PR. How did your project get added to [CodeTriage](https://www.codetriage.com/what)? Roughly about 1 year ago, [Tarjei400](https://github.com/Tarjei400) added this project to CodeTriage in order to start contributing. Since then, 5 people have subscribed to help this repo.

## What does adding a badge accomplish?

Adding a badge invites people to help contribute to your project. It also lets developers know that others are invested in the longterm success and maintainability of the project.

You can see an example of a CodeTriage badge on these popular OSS READMEs:

- [![Email clients like GMAIL do not render SVG images](https://www.codetriage.com/rails/rails/badges/users.svg)](https://www.codetriage.com/rails/rails) https://github.com/rails/rails
- [![Email clients like GMAIL do not render SVG images](https://www.codetriage.com/crystal-lang/crystal/badges/users.svg)](https://www.codetriage.com/crystal-lang/crystal) https://github.com/crystal-lang/crystal

## Have a question or comment?

While I am a bot, this PR was manually reviewed and monitored by a human - @schneems. My job is writing commit messages and handling PR logistics.

If you have any questions, you can reply back to this PR and they will be answered by @schneems. If you do not want a badge right now, no worries, close the PR, you will not hear from me again.

Thanks for making your project Open Source! Any feedback is greatly appreciated.
2018-02-27 14:13:10 -06:00
Victor Oliveira
e1e0ee5cb5 Updating neededtranslations and some pt translations 2018-01-03 20:42:00 -02:00
Victor Oliveira
a725de55f2 Updating translation string. 'in' and 'out' were outside translation. 2018-01-03 20:40:56 -02:00
Victor Oliveira
edd54cc5f6 Updating translation strings. Don't use ':' as last char. 2018-01-03 20:38:53 -02:00
Kamil Chojnowski
2bb9fdc82b Fix parsing the premium status in newer login protocol versions
Closes #933
2018-01-01 05:36:51 +01:00
Henrique Santiago
a7b910a755 Merge pull request #921 from EgzoT/EgzoT-compiler_info_on_start_screen
Add compiler info to version label in start screen
2017-12-22 02:43:15 -02:00
EgzoT
78ca89d2b4 Add compiler info to version label in start screen
Add compiler name and version to start screen (client_background module).
It would help distinguish OTClient problems on different compilations.
2017-11-29 00:42:15 +01:00
EgzoT
1eda9b441f Update OTClient outdated version in VS project
Change OTClient version from 0.6.3 to 0.6.6 in Visual Studio project.
2017-11-28 22:17:06 +01:00
Eduardo Bart
47766685d9 Merge pull request #907 from diath/topbar_visibility_toggle
Add a keyboard shortcut to toggle topmenu visibility
2017-11-20 12:04:11 -02:00
Eduardo Bart
8e639ea338 Merge pull request #913 from andersonfaaria/icons-branch
Fix minimap icons
2017-11-20 12:03:23 -02:00
Eduardo Bart
425b3bfdda Merge pull request #915 from diath/add_summon_indicator
Add creature type icons for summons
2017-11-20 12:03:09 -02:00
Henrique Santiago
034a152668 Merge pull request #916 from diath/fix_defunct_link
Replace a defunct otclient.info link with a link to this repo
2017-11-20 11:55:08 -02:00
Kamil Chojnowski
0e0f194df6 Replace a defunct otclient.info link with a link to this repo (closes #821) 2017-11-19 20:09:31 +01:00
Kamil Chojnowski
3b23b787f3 Add creature type icons for summons 2017-11-19 20:02:34 +01:00
Kamil Chojnowski
68371c98d4 Add a button to show the top menu when it's hidden 2017-11-19 02:00:02 +01:00
Henrique Santiago
81a705096a Merge pull request #914 from andersonfaaria/outfit-src
Fix wrong parameter name in source
2017-11-17 15:27:39 -03:00
Anderson Chaves Faria
2e3bf66502 Fix wrong parameter name in source
This will fix missing t in outfit parameter
2017-11-17 14:26:23 -02:00
Anderson Chaves Faria
885cc90fb5 Fix minimap icons
This commit will change the flagid to fit the correct id on the source code of tfs.
2017-11-17 14:22:40 -02:00
Eduardo Bart
0a6e7dd74e Merge pull request #898 from EgzoT/EgzoT-setPathable
Add setPathable() function
2017-11-16 23:51:15 -02:00
EgzoT
c1a5a661e7 Fixed indentation and changed function location 2017-11-17 02:32:31 +01:00
Eduardo Bart
a9c59526e0 Merge pull request #904 from ninjalulz/FixModalWindowId
Fix data type for Modal Dialog ID
2017-11-16 22:56:28 -02:00
Eduardo Bart
fe1ca3d329 Merge pull request #909 from diath/player_mana_bar
Add player mana bar
2017-11-16 22:47:54 -02:00
Eduardo Bart
38e9e7c1ed Merge pull request #910 from diath/hotkey_turn_delay
Add turn and hotkey delay
2017-11-16 22:46:37 -02:00
Eduardo Bart
ac21f6772d Merge pull request #908 from diath/fix_market_focus
Fix game interface not gaining focus after exitting the market
2017-11-16 22:44:11 -02:00
Kamil Chojnowski
483988f814 Add a keyboard shortcut to toggle topmenu visibility 2017-11-16 19:06:50 +01:00
Kamil Chojnowski
93f51fe127 Add player mana bar 2017-11-16 19:06:40 +01:00
Kamil Chojnowski
d889b5aaf2 Add turn and hotkey delay 2017-11-16 19:06:31 +01:00
Kamil Chojnowski
74caa132c5 Fix game interface not gaining focus after exitting the market (closes #869) 2017-11-16 19:06:15 +01:00
Daniel Björkholm
408e9b4239 Fix data type for Modal Dialog ID 2017-11-16 14:50:12 +01:00
EgzoT
5650db7ba2 Move definition to thingtype.cpp file
Move definition from thingtype.h to thingtype.cpp file
2017-11-15 02:20:33 +01:00
EgzoT
c51df93e3e Add setPathable() function
Adding function who changing item attribute (ThingAttrNotPathable).
Allows to walk on not pathable items (ThingAttrNotPathable -> true) like parcels, fire fields etc. and vice versa.
Modifying item attribute without editing items sources files. Temporary action for the duration of the client session.

Usage:
print(g_things.getThingType(3504):isNotPathable()) -> true

g_things.getThingType(3504):setPathable(true)

print(g_things.getThingType(3504):isNotPathable()) -> false

Helpful for highter levels players to ignoring "avoiding" fire/energy/poison fields etc. when using map click.
2017-11-15 01:02:06 +01:00
Eduardo Bart
2095951e07 Add missing include 2017-11-14 13:59:19 -02:00
Eduardo Bart
8bbc8c09a5 Update README.md 2017-11-04 12:33:51 -02:00
Sportacus
a9f6f7662f Log file saves specific to server and character
Changed it so when you save a log file, the log file name includes the
server name and the characters name, in the file name.

This is to improve organization, to separate logs based off the server
you are on, and the character you are logged in.
2017-11-04 11:34:33 -02:00
Marcin Michalski
13789c5612 Properly check tile elevation in older protocols 2017-11-04 11:24:12 -02:00
Eduardo Bart
7046fa1cdb Merge pull request #874 from EgzoT/EgzoT-useWith_fix
Fixed problem with function "useWith" on creatures
2017-11-04 11:13:11 -02:00
Eduardo Bart
aeb98810ed Merge pull request #878 from EgzoT/EgzoT-map_missile_bug
[Probable bug] Double use function onAppear
2017-11-04 11:08:37 -02:00
Eduardo Bart
aa19f45d94 Fixes to compile on mingw32 2017-11-04 11:05:25 -02:00
Eduardo Bart
c9bc9e327d Merge pull request #867 from fluidsonic/clang-9
fixed clang 9 compile errors in shared_object_ptr
2017-11-04 10:53:46 -02:00
Eduardo Bart
8309fee510 Fix build for mingw-w64 2017-11-04 10:43:57 -02:00
Eduardo Bart
e6bec115ae Try to fix travis build script 2017-11-04 10:32:23 -02:00
Eduardo Bart
8b161e1a07 Priorize OpenSSL 1.0 in cmake, warning fixes 2017-11-04 09:03:57 -02:00
Eduardo Bart
696610bba7 Merge pull request #880 from diath/fix_missing_include
Fix a missing include in unix crash handler
2017-10-31 12:48:15 -02:00
Kamil Chojnowski
f33a44643f Fix a missing include 2017-10-31 13:44:38 +01:00
EgzoT
f4f3219d61 [Probable bug] Double use function onAppear
Method Map::addThing uses two times function onAppear for object Missile.
First used in line 119, but then used again the same function in line 165.
Without first function onAppear method Map::addThing work the same.
2017-10-25 23:25:02 +02:00
EgzoT
1950d8ec26 Fixed problem with function "useWith" on creatures 2017-10-23 02:33:51 +02:00
Henrique Santiago
4e9e1555f4 Merge pull request #872 from EgzoT/EgzoT-trade_request_ui
Sending trade request using "UICreatureButton"
2017-10-22 20:21:16 -03:00
Henrique Santiago
a4a40426bf Merge pull request #873 from EgzoT/EgzoT-getBackground
Add function getBackground
2017-10-22 20:18:53 -03:00
EgzoT
d44733ff3e Add function getBackground
Add function getBackground 
Function getBackground return background value, who contain background UI (login screen).
2017-10-22 23:31:45 +02:00
EgzoT
bc507fd98b Sending trade request using "UICreatureButton"
Extending the possibilities of "UICreatureButton" widget.
Adding possibility sending trade request in battle list (game_battle module) and other modules who use widget "UICreatureButton".
2017-10-22 23:21:02 +02:00
Marc Knaup
a604ea7153 fixed clang 9 compile errors in shared_object_ptr 2017-09-29 23:39:27 +02:00
Konrad Kuśnierz
8c731ac016 Merge pull request #844 from gesior/iptostring_fix
Fix iptostring in LUA
2017-05-13 14:08:25 +02:00
Jerzy Skalski
1d77d202e6 Change uint to uint32 2017-05-13 13:14:25 +02:00
Jerzy Skalski
90de0dec04 Fix iptostring
Fix iptostring bug that blocks access to half of OTSes
2017-05-12 15:47:44 +02:00
Konrad Kuśnierz
c87c450905 Fix #703 2017-05-01 18:15:16 +02:00
Henrique Santiago
8871659b07 Fix image read 2017-04-27 18:47:08 -03:00
Henrique Santiago
42df56a98d Merge pull request #831 from ranisalt/master
Fix misleading indentation
2017-03-27 08:06:45 -03:00
Ranieri Althoff
88d0a0a879 Fix misleading indentation 2017-03-27 01:54:35 -03:00
A-Syntax
df422c0991 Update protocolgameparse.cpp (#777)
The vocation id was not being received by the client.
https://github.com/otland/forgottenserver/issues/1982
2017-02-04 13:05:03 +02:00
Joao Pasqualini Costa
837f461bb1 Update README (#817)
Remove all broken links and fix MSVC link
2017-02-02 10:00:03 +02:00
Joao Pasqualini Costa
af92792d4a Fix Login problem and use removeEvent (#816)
When trying to logout in battle the player would not logout and tryLogin
would be called, so the next time you tryed to login it will still be
trying to login
2017-02-02 09:59:41 +02:00
Joao Pasqualini Costa
2292df922d Fix Look (#818)
sendLookCreature should only be called in battleList
2017-02-02 09:59:20 +02:00
Joao Pasqualini Costa
0676b68493 Include Issue Template (#819) 2017-02-02 09:58:48 +02:00
Ahmed Samy
fdec018186 Merge pull request #808 from GustavoBlaze/patch-1
Bug idle animations of the creatures solved
2017-01-24 23:42:49 +02:00
GustavoBlaze
743e73d755 Applying the otclient code style 2017-01-24 15:27:58 -02:00
GustavoBlaze
bc20e16584 Applying the otclient code style
changing the variables names
2017-01-24 14:58:11 -02:00
GustavoBlaze
a4400a4ff1 applying the otclient code style
changing the variables names
2017-01-24 14:56:21 -02:00
GustavoBlaze
2927ed29d8 Bug idle animations of the creatures solved
These changes we join the idle animations with the walking animations
2017-01-23 22:39:16 -02:00
Ahmed Samy
15483a395f Merge pull request #805 from brunominervino/some-changes
Change LICENSE Copyright Year
2017-01-18 23:41:13 +02:00
Ahmed Samy
e44b33fc67 Merge pull request #807 from conde2/otclient-locales
Show missing translation on console
2017-01-18 23:40:51 +02:00
Ahmed Samy
af09a91d64 Merge pull request #806 from conde2/otclient-vs
Update Visual Studio Project
2017-01-18 23:40:36 +02:00
conde2
a644dff043 Show missing translation on console 2017-01-18 11:31:40 -02:00
conde2
664ef6bcad Update Visual Studio Project
Update Visual Studio to work with PATH system variables in Windows
systems. Credits go to @Radseq for changing the project and to me for
update to Visual Studio 2015

Closes
#795
#746
#718
#724
#713
2017-01-18 11:20:09 -02:00
Bruno Minervino
deeb80dd67 Revert Extension 2017-01-17 09:42:31 -02:00
Bruno Minervino
9d3f3d8aec Change LICENSE Copyright Year and Extension 2017-01-16 10:38:58 -02:00
Ahmed Samy
deee6ed8c9 Completion for #764
Thanks to @conde2 for pointer it out.
2017-01-13 18:46:04 +02:00
Ahmed Samy
94d60432f3 Merge pull request #766 from TibiaFun/patch-1
Update protocolcodes.cpp
2017-01-13 18:31:41 +02:00
Ahmed Samy
b6140a03b4 Merge pull request #764 from elderapo/patch-1
Fix typo
2017-01-13 18:31:33 +02:00
Ahmed Samy
7845238918 Merge pull request #802 from brunominervino/vs-version
Update Visual Studio build files
2017-01-13 18:30:44 +02:00
Samuel Gros
e870110875 Merge pull request #801 from brunominervino/copyright-year-2017
Update copyright year for 2017
2017-01-13 13:09:11 +01:00
Bruno Minervino
8eacaa8e80 Fix EOF (again) 2017-01-13 09:01:42 -02:00
Bruno Minervino
21d9bf059e Remove new line 2017-01-13 08:59:56 -02:00
Bruno Minervino
23b6c8e839 Fix EOF 2017-01-13 08:58:50 -02:00
Bruno Minervino
a793cab751 Update Visual Studio build files 2017-01-13 08:55:24 -02:00
Bruno Minervino
882be286d9 Update copyright year for 2017 2017-01-13 08:47:07 -02:00
Ahmed Samy
d5858092ca Merge pull request #799 from zygzagZ/master
Fixed inconsistences between const.lua and const.h causing messagetypes not to work
Fixed talking with npc for 8.54
2017-01-13 01:05:57 +02:00
zygzagZ
8486f6c867 Fixed talking with npc for 8.54 2017-01-12 15:40:13 +01:00
zygzagZ
9d2298037e Fixed inconsistences between const.lua and const.h causing messagetypes not to work 2017-01-12 15:30:24 +01:00
Konrad Kuśnierz
42e0b0a025 Merge pull request #771 from jo3bingham/coding-style
Fix inconsistent coding style
2016-11-08 18:57:52 +01:00
Joseph Bingham
e5d28e00e2 Fixes inconsistent coding style 2016-11-08 12:54:31 -05:00
Joseph Bingham
56a641e516 Merge pull request #1 from edubart/master
Rebase with original master
2016-11-08 12:50:22 -05:00
Samuel Gros
7cd01714fc Merge pull request #770 from jo3bingham/update-1099
10.96, 10.97, 10.98, 10.99 support
2016-11-08 09:22:23 +01:00
Joseph Bingham
9148d412e5 Replace tabs with spaces (again) 2016-11-08 00:00:21 -05:00
Joseph Bingham
5a5adc4ed6 Replace tabs with spaces 2016-11-07 23:58:42 -05:00
Joseph Bingham
344146ba2d 10.96, 10.97, 10.98, 10.99 support
Adds basic support for the latest client version
2016-11-07 23:52:42 -05:00
TibiaFun
0870fda2ac Update protocolcodes.cpp 2016-10-23 13:31:02 +02:00
Tomasz Martyński
8ffacefb04 Fix typo
change "getOufitColor" to "getOutfitColor"
2016-10-10 02:16:40 +02:00
Eduardo Bart
a6a50fa162 Merge pull request #744 from ranisalt/copyright-year
Update copyright year for 2016
2016-07-10 11:10:43 -03:00
Eduardo Bart
a5f4545168 Merge pull request #745 from ranisalt/cxx11
Replace deprecated c++11 test with cmake script
2016-07-10 11:09:47 -03:00
Ranieri Althoff
551f30d32f Replace deprecated c++11 test with cmake script 2016-07-09 22:51:32 -03:00
Ranieri Althoff
2f1f62a916 Update copyright year for 2016 2016-07-09 22:11:34 -03:00
Sam
1ec3b65a3a 10.94, 10.95 support 2016-07-03 00:50:08 +02:00
Sam
8992d40e37 Update PIC signature 2016-05-23 03:26:17 +02:00
Sam
1c09c3770b Protocol 10.93 2016-05-23 02:48:32 +02:00
Henrique Santiago
0dfdb22509 Merge pull request #728 from dalvorsn/master
Fixed issue in function fitAll
2016-05-01 16:21:04 -03:00
dalvorsn
a165bef741 Fixed issue in function fitAll: mini windows containers was exceeding the size of the panels. 2016-04-24 18:25:21 -03:00
Henrique Santiago
fa3068f6e6 Merge pull request #725 from ottools/master
Fix 'getTopMultiUseThing' returning border items. Closes #644
2016-04-11 14:49:51 -03:00
Nailson
d1b26781d3 Fix 'getTopMultiUseThing' returning border items. 2016-04-11 09:42:37 -03:00
Sam
7a8e605704 Minimal 10.91 support 2016-03-03 08:44:26 +01:00
Ahmed Samy
5913cc0fd7 vc12: restore path as I thought they were originally like that 2016-02-08 10:35:00 +02:00
Ahmed Samy
c6f5c5c725 vc12: Fix compilation and also give the compiler more options to use
This gives the compiler the opportunity to SSE2 instead of FPU
Also added some options that were necessary.
2016-02-08 10:34:13 +02:00
Sam
2b7e2a45ea Fix 7.4 walking over items with elevation 2016-01-25 22:19:39 +01:00
BenDol
f024e30753 Fix NPC chat when ignoring private messages. 2016-01-22 16:15:35 +13:00
Sam
408b3c5125 Fix npc message mode 2016-01-20 02:44:13 +01:00
TheSumm
90deb067a6 Added missing message types 2015-12-22 13:06:36 +01:00
Ahmed Samy
39d4a7d842 Merge branch 'master' of https://github.com/Crypton33/otclient 2015-12-15 03:26:43 +02:00
TheSumm
37f563d3d5 Replaced some tabs with spaces 2015-12-11 01:51:55 +01:00
TheSumm
80184a1249 Initial 10.90 support
Basic support, I did not check for further protocol changes yet.
2015-12-08 18:25:18 +01:00
Konrad Kuśnierz
ec9dafcfdf Fix #696 2015-12-05 16:23:09 +01:00
Henrique Santiago
b1a290981c Merge pull request #695 from ottools/master
Small optimization.
2015-11-30 21:47:47 -02:00
Nailson
2f3540c996 Small optimization. 2015-11-30 19:49:21 -03:00
TheSumm
0d8791e1a7 Protocol updates up to 10.82 2015-10-24 17:46:53 +02:00
Sam
d9e8bfff4c Merge pull request #690 from ottools/master
Add 'GameKeepUnawareTiles' feature.
2015-10-06 15:12:37 +02:00
Nailson
d41fe195f4 Add 'GameKeepUnawareTiles' feature.
Remove tiles that we are not aware anymore by default.
2015-10-06 00:37:50 -03:00
Konrad Kuśnierz
1686d8081b Merge pull request #680 from ottools/master
Add a flag for idle animation game feature.
2015-08-28 10:07:14 +02:00
Nailson
f1fdbd56e9 Add a flag for idle animation game feature. 2015-08-26 19:49:43 -03:00
Mateusz Pawlica
af0819f454 Changed rule violation window default focus 2015-01-31 22:31:58 +01:00
Mateusz Pawlica
27f7871a08 Minimap widget is now horizontally resizeable 2015-01-31 22:30:14 +01:00
476 changed files with 5189 additions and 6690 deletions

2
.dockerignore Normal file
View File

@@ -0,0 +1,2 @@
/build/
Dockerfile

128
.github/workflows/build-vcpkg.yml vendored Normal file
View File

@@ -0,0 +1,128 @@
name: Build with vcpkg
on:
push:
branches:
- master
- v*
tags:
- v*
paths:
- cmake/**
- src/**
- CMakeLists.txt
pull_request:
paths:
- cmake/**
- src/**
- CMakeLists.txt
jobs:
job:
name: ${{ matrix.os }}-${{ matrix.cxx }}-${{ matrix.buildtype }}-luajit=${{ matrix.luajit }}
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
max-parallel: 8
matrix:
name: [ubuntu-gcc, macos-clang, windows-msvc]
buildtype: [Debug, Release]
luajit: [on, off]
include:
- name: windows-msvc
os: windows
cxx: cl.exe
cc: cl.exe
triplet: x64-windows
packages: >
boost-iostreams boost-asio boost-system boost-variant boost-lockfree boost-filesystem boost-uuid
glew luajit libogg libvorbis openal-soft opengl openssl physfs zlib
- name: ubuntu-gcc
os: ubuntu
cxx: g++
cc: gcc
triplet: x64-linux
packages: >
boost-iostreams boost-asio boost-system boost-variant boost-lockfree glew
boost-filesystem boost-uuid physfs openal-soft libogg libvorbis zlib opengl
- name: macos-clang
os: macos
cxx: clang++
cc: clang
triplet: x64-osx
packages: >
boost-iostreams boost-asio boost-system boost-variant boost-lockfree glew
boost-filesystem boost-uuid libogg libvorbis zlib opengl
exclude:
- name: windows-msvc
luajit: off
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Unshallow
run: git fetch --prune --unshallow
- name: Get latest CMake
# Using 'latest' branch, the latest CMake is installed.
uses: lukka/get-cmake@latest
- name: Ubuntu - install opengl lua5.1 luajit
# vcpkg has lua 5.3+
run: sudo apt-get install libglew-dev liblua5.1-0-dev libluajit-5.1-dev
if: contains( matrix.os, 'ubuntu')
- name: MacOS - install physfs pkgconfig lua5.1 luajit xquartz
run: brew install physfs pkgconfig lua@5.1 luajit xquartz
if: contains( matrix.os, 'macos')
- name: Set Environment vars
run: |
echo "CXX=${{ matrix.cxx }}" >> $GITHUB_ENV
echo "CC=${{ matrix.cc }}" >> $GITHUB_ENV
- name: Run vcpkg
uses: lukka/run-vcpkg@v7.1
with:
vcpkgArguments: ${{ matrix.packages }}
vcpkgDirectory: ${{ runner.workspace }}/vcpkg/
vcpkgTriplet: ${{ matrix.triplet }}
vcpkgGitCommitId: 9a49e3df7f729655318c59b9985c9c18ad0c99d6
- name: Build with CMake
uses: lukka/run-cmake@v3
with:
buildDirectory: ${{ runner.workspace }}/build
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeAppendedArgs: '-G Ninja -DCMAKE_BUILD_TYPE="${{ matrix.buildtype }}" -DLUAJIT="${{ matrix.luajit }}"'
useVcpkgToolchainFile: true
- name: dir
run: find $RUNNER_WORKSPACE
shell: bash
- name: Upload artifact binary
uses: actions/upload-artifact@v2
with:
name: otclient-${{ matrix.name }}-${{ matrix.buildtype }}-luajit=${{ matrix.luajit }}-${{ github.sha }}
path: ${{ runner.workspace }}/build/otclient
if: "! contains( matrix.os, 'windows')"
- name: Upload artifact binary (exe)
uses: actions/upload-artifact@v2
with:
name: otclient-${{ matrix.name }}-${{ matrix.buildtype }}-luajit=${{ matrix.luajit }}-${{ github.sha }}
path: ${{ runner.workspace }}/build/otclient.exe
if: contains( matrix.os, 'windows')
- name: Upload artifact binary (dlls)
uses: actions/upload-artifact@v2
with:
name: otclient-${{ matrix.name }}-${{ matrix.buildtype }}-luajit=${{ matrix.luajit }}-${{ github.sha }}
path: ${{ runner.workspace }}/build/*.dll
if: contains( matrix.os, 'windows')

245
.gitignore vendored
View File

@@ -1,59 +1,3 @@
build*
CMakeCache.txt
CMakeFiles
cmake_install.cmake
Makefile
/otclient
/android/project/build.xml
/android/project/proguard-project.txt
/android/project/gen
/android/project/bin
/android/project/libs
/android/project/.settings
/android/project/.classpath
/android/project/.project
/android/project/.cproject
/android/project/local.properties
/android/project/project.properties
libs*
.idea*
/*.h
/*.cxx
*.o
*.gch
*.a
*.exe
*.so
*.spr
*.dat
*.kdev*
*.cbp
*~
*.kate-swap
*.autosave
CMakeLists.txt.user*
*.xml
*.otb
*.otbm
*.log
*.bak
*.swp
*.pic
.lvimrc
.clang_complete
config.otml
/modules/otclientrc.lua
/doc
!.gitignore
otclient.map
otclient.layout
LOCALTODO
tags
Thumbs.db
.directory
src/framework/graphics/dx/
modules/.project/modules.sublime-workspace
#################
## Visual Studio
#################
@@ -65,6 +9,8 @@ modules/.project/modules.sublime-workspace
*.suo
*.user
*.sln.docstates
.idea/
.vscode/
# Build results
@@ -74,6 +20,7 @@ x64/
build/
[Bb]in/
[Oo]bj/
cmake-build-*/
# MSTest test Results
[Tt]est[Rr]esult*/
@@ -100,16 +47,19 @@ build/
*.vssscc
.builds
*.pidb
*.log
*.scc
*.dll
*.exe
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.opendb
*.sdf
*.cachefile
*.VC.db
# Visual Studio profiler
*.psess
@@ -122,3 +72,184 @@ ipch/
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# NCrunch
*.ncrunch*
.*crunch*.local.xml
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.Publish.xml
*.pubxml
# NuGet Packages Directory
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
#packages/
# Windows Azure Build Output
csx
*.build.csdef
# Windows Store app package directory
AppPackages/
# Others
sql/
*.Cache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.[Pp]ublish.xml
*.pfx
*.publishsettings
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
App_Data/*.mdf
App_Data/*.ldf
#############
## Windows detritus
#############
# Windows image file caches
Thumbs.db
ehthumbs.db
# Folder config file
Desktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Mac crap
.DS_Store
# Installer logs
pip-log.txt
# Unit test / coverage reports
.coverage
.tox
#Translations
*.mo
#Mr Developer
.mr.developer.cfg
# Vim files
*~
.*.swp
.*.swo
#################
## OTClient
#################
/otclient
/modules/otclientrc.lua
src/framework/graphics/dx/
*.o
*.gch
*.a
*.kdev*
*.cbp
*~
*.kate-swap
*.autosave
*.bak
*.swp
.lvimrc
.clang_complete
LOCALTODO
tags
# user-specific files
*.xml
*.otb
*.otbm
*.spr
*.dat
*.pic
config.otml
## Cmake cache
CMakeLists.txt.user
CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
Makefile
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
_deps
## Sublime
# Cache files for Sublime Text
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache
# Workspace files are user-specific
*.sublime-workspace
# Project files should be checked into the repository, unless a significant
# proportion of contributors will probably not be using Sublime Text
# *.sublime-project
# SFTP configuration file
sftp-config.json
sftp-config-alt*.json
# Package control specific files
Package Control.last-run
Package Control.ca-list
Package Control.ca-bundle
Package Control.system-ca-bundle
Package Control.cache/
Package Control.ca-certs/
Package Control.merged-ca-bundle
Package Control.user-ca-bundle
oscrypto-ca-bundle.crt
bh_unicode_properties.cache
# Sublime-github package stores a github token in this file
# https://packagecontrol.io/packages/sublime-github
GitHub.sublime-settings

View File

@@ -1,14 +0,0 @@
language: cpp
compiler:
- gcc
before_script:
- sudo apt-get install libboost1.48-all-dev libphysfs-dev libssl-dev liblua5.1-dev libglew1.6-dev libvorbis-dev libopenal-dev libz-dev -y
script: |
cmake . -DCMAKE_BUILD_TYPE=Release
make
notifications:
irc:
channels:
- "irc.freenode.org#otclient"
on_success: change
skip_join: true

View File

@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 2.6)
cmake_minimum_required(VERSION 3.1)
project(otclient)
set(VERSION "0.6.6")
set(VERSION "1.0.0")
option(FRAMEWORK_SOUND "Use SOUND " ON)
option(FRAMEWORK_GRAPHICS "Use GRAPHICS " ON)
@@ -19,32 +19,45 @@ endif()
option(USE_PCH "Use precompiled header (speed up compile)" OFF)
# add executable icon for win32 platforms
set(executable_SOURCES
src/main.cpp
)
if(WIN32)
if(MSVC)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/otcicon.o
COMMAND ${CMAKE_RC_COMPILER}
-I${CMAKE_CURRENT_SOURCE_DIR}/src
-fo${CMAKE_CURRENT_BINARY_DIR}/otcicon.o
${CMAKE_CURRENT_SOURCE_DIR}/src/otcicon.rc
)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
else()
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/otcicon.o
COMMAND ${CMAKE_RC_COMPILER}
-I${CMAKE_CURRENT_SOURCE_DIR}/src
-i${CMAKE_CURRENT_SOURCE_DIR}/src/otcicon.rc
-o ${CMAKE_CURRENT_BINARY_DIR}/otcicon.o)
-o ${CMAKE_CURRENT_BINARY_DIR}/otcicon.o
)
endif()
set(executable_SOURCES ${executable_SOURCES} otcicon.o)
endif()
add_definitions(-D"VERSION=\\"${VERSION}\\"")
set(executable_SOURCES
src/main.cpp
)
# add client executable
add_executable(${PROJECT_NAME} ${framework_SOURCES} ${client_SOURCES} ${executable_SOURCES})
if(ANDROID)
# add shared library for android
add_library(${PROJECT_NAME} SHARED ${framework_SOURCES} ${client_SOURCES} ${executable_SOURCES})
else()
# add client executable
add_executable(${PROJECT_NAME} ${framework_SOURCES} ${client_SOURCES} ${executable_SOURCES})
endif()
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 14)
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD_REQUIRED ON)
target_link_libraries(${PROJECT_NAME} ${framework_LIBRARIES})
if(APPLE AND USE_STATIC_LIBS)
target_link_libraries(${PROJECT_NAME} "-framework Foundation" "-framework IOKit")
endif()
if(USE_PCH)
include(cotire)
cotire(${PROJECT_NAME})

49
Dockerfile Normal file
View File

@@ -0,0 +1,49 @@
FROM ubuntu@sha256:b88f8848e9a1a4e4558ba7cfc4acc5879e1d0e7ac06401409062ad2627e6fb58 AS builder
RUN apt-get update; \
apt-get install -y \
build-essential \
cmake \
git-core \
libboost-atomic1.65-dev \
libboost-chrono1.65-dev \
libboost-date-time1.65-dev \
libboost-filesystem1.65-dev \
libboost-system1.65-dev \
libboost-thread1.65-dev \
libglew-dev \
liblua5.1-0-dev \
libncurses5-dev \
libopenal-dev \
libssl-dev \
libvorbis-dev \
mercurial \
zlib1g-dev; \
apt-get clean && apt-get autoclean
WORKDIR /
RUN hg clone -r stable-3.0 http://hg.icculus.org/icculus/physfs/
WORKDIR /physfs/build/
RUN cmake ..
RUN make -j$(nproc)
RUN make install
COPY ./src/ /otclient/src/.
COPY CMakeLists.txt /otclient/.
WORKDIR /otclient/build/
RUN cmake -DCMAKE_CXX_LINK_FLAGS=-no-pie -DCMAKE_BUILD_TYPE=Release ..
RUN make -j$(nproc)
FROM ubuntu@sha256:b88f8848e9a1a4e4558ba7cfc4acc5879e1d0e7ac06401409062ad2627e6fb58
RUN apt-get update; \
apt-get install -y \
libglew2.0 \
libopenal1; \
apt-get clean && apt-get autoclean
COPY --from=builder /otclient/build/otclient /otclient/bin/otclient
COPY ./data/ /otclient/data/.
COPY ./mods/ /otclient/mods/.
COPY ./modules/ /otclient/modules/.
COPY ./init.lua /otclient/.
WORKDIR /otclient
CMD ["./bin/otclient"]

22
ISSUE_TEMPLATE.md Normal file
View File

@@ -0,0 +1,22 @@
<!-- Welcome to the issues section if it's your first time! -->
### Before creating an issue, please ensure:
- [ ] This is a bug in the software that resides in this repository, and not a
support matter (use https://otland.net/forums/otclient.494/ for support)
- [ ] This issue is reproducible without changes to the code in this repository
### Steps to reproduce (include any configuration/script required to reproduce)
1.
2.
3.
### Expected behaviour
<!-- Tell us what should happen -->
### Actual behaviour
<!-- Tell us what happens instead -->
### Environment
<!-- Please tell which client version are you using (E.g 10.98 OTClient 0.6.6)
If the issue is environment specific (e.g. compiling errors), include
name and version of the operating system and compiler you are using. -->

View File

@@ -1,6 +1,6 @@
OTClient is made available under the MIT License
Copyright (c) 2010-2015 OTClient <https://github.com/edubart/otclient>
Copyright (c) 2010-2020 OTClient <https://github.com/edubart/otclient>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@@ -1,4 +1,5 @@
[![Build Status](https://secure.travis-ci.org/edubart/otclient.svg?branch=mobile_port)](http://travis-ci.org/edubart/otclient) [![Join the chat at https://gitter.im/edubart/otclient](https://img.shields.io/badge/GITTER-join%20chat-green.svg)](https://gitter.im/edubart/otclient?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Build Status](https://github.com/edubart/otclient/actions/workflows/build-vcpkg.yml/badge.svg)](https://github.com/edubart/otclient/actions/workflows/build-vcpkg.yml) [![Join the chat at https://gitter.im/edubart/otclient](https://img.shields.io/badge/GITTER-join%20chat-green.svg)](https://gitter.im/edubart/otclient?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Open Source Helpers](https://www.codetriage.com/edubart/otclient/badges/users.svg)](https://www.codetriage.com/edubart/otclient)
### What is otclient?
Otclient is an alternative Tibia client for usage with otserv. It aims to be complete and flexible,
@@ -6,32 +7,17 @@ for that it uses LUA scripting for all game interface functionality and configur
similar to CSS for the client interface design. Otclient works with a modular system, this means
that each functionality is a separated module, giving the possibility to users modify and customize
anything easily. Users can also create new mods and extend game interface for their own purposes.
Otclient is written in C++2011, the upcoming C++ standard and heavily scripted in lua.
Otclient is written in C++11 and heavily scripted in lua.
## The Mobile Project
This is a fork of edubart's otclient. The objective of this fork it's to develop a runnable otclient on mobiles devices.
Tasks that need to do:
- [X] Compile on Android devices
- [ ] Compile on Apple devices
- [ ] Adapt the UI reusing the existing lua code
Current compiling tutorials:
* [Compiling for Android](https://github.com/edubart/otclient/wiki/Compiling-for-Android)
For a server to connect to, you can build your own with the [forgottenserver](https://github.com/otland/forgottenserver)
or connect to one listed on [otservlist](https://otservlist.org/).
### Where do I download?
The latest commits compiled for Windows can be found here.
Compiled for Windows can be found here (but can be outdated):
* [Windows Builds](http://otland.net/threads/otclient-builds-windows.217977/)
Here is the latest v0.6.5 release compiled for both i686(32 bit) and x86_64(64 bit) machines, with OpenGL renderer.
This release is compatible with protocols ranges from 7.60 up to 10.31.
* [For Windows](https://www.dropbox.com/sh/se1okacemoqzjve/XFqFoSKLCg/otclient-win-0.6.5.zip)
* [For Linux](https://www.dropbox.com/sh/se1okacemoqzjve/xKJL7j6vEo/otclient-linux-0.6.5.tar.gz)
**NOTE:** You will need to download spr/dat files on your own and place them in `data/things/VERSION/` (i.e: `data/things/1041/Tibia.spr`)
Older releases can be downloaded from [here](https://www.dropbox.com/sh/se1okacemoqzjve/-oWK4YFm03)
**NOTE:** You will need to download spr/dat files on your own and place them in `data/things/VERSION/` (i.e: `data/things/1098/Tibia.spr`)
### Features
@@ -45,20 +31,40 @@ client, instead otclient was designed to be a combination of a framework and tib
### Compiling
A package with all required libraries for compiling OTClient on Windows can be found here:
* [For MSVC 2013](https://www.dropbox.com/sh/se1okacemoqzjve/dI4ODbq7OT/otclient-msvc13-libs.zip)
* [For MingW32](https://www.dropbox.com/sh/se1okacemoqzjve/UAkRCiGXXR/otclient-libs_mingw32-dwarf2.zip)
In short, if you need to compile OTClient, follow these tutorials:
* [Compiling on Windows](https://github.com/edubart/otclient/wiki/Compiling-on-Windows)
* [Compiling on Linux](https://github.com/edubart/otclient/wiki/Compiling-on-Linux)
* [Compiling on OS X](https://github.com/edubart/otclient/wiki/Compiling-on-Mac-OS-X)
### Build and run with Docker
To build the image:
```sh
docker build -t edubart/otclient .
```
To run the built image:
```sh
# Disable access control for the X server.
xhost +
# Run the container image with the required bindings to the host devices and volumes.
docker run -it --rm \
--env DISPLAY \
--volume /tmp/.X11-unix:/tmp/.X11-unix \
--device /dev/dri \
--device /dev/snd edubart/otclient /bin/bash
# Enable access control for the X server.
xhost -
```
### Need help?
Try to ask questions in [otland](http://otland.net/f494/), now we have a board for the project there,
or talk with us at #otclient irc.freenode.net
or talk with us at the gitter chat.
### Bugs
@@ -70,7 +76,7 @@ We encourage you to contribute to otclient! You can make pull requests of any im
### Contact
Talk directly with us at #otclient irc.freenode.net or send an email directly to the project leader edub4rt@gmail.com
Talk directly with us at the gitter chat [![Join the chat at https://gitter.im/edubart/otclient](https://img.shields.io/badge/GITTER-join%20chat-green.svg)](https://gitter.im/edubart/otclient?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge).
### License

File diff suppressed because it is too large Load Diff

View File

@@ -1,18 +0,0 @@
#!/bin/sh
mkdir -p ../build_android && cd ../build
cmake -DCMAKE_TOOLCHAIN_FILE=../android/android.toolchain.cmake -DANDROID_ABI=armeabi-v7a -DANDROID_NATIVE_API_LEVEL=android-16 -DANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-4.6 ..
make
cd ../
cp -r libs android/project/
cp $ANDROID_NDK/libraries/lib/libSDL2.so android/project/libs/armeabi-v7a
cd android/project
android update project -p . --name OTClientMob --target android-16
ant debug
cd bin
adb install -r OTClientMob-debug.apk

View File

@@ -1,18 +0,0 @@
cd ..
mkdir build_android
cd build_android
cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=../android/android.toolchain.cmake -DANDROID_ABI=armeabi-v7a -DANDROID_NATIVE_API_LEVEL=android-16 -DANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-4.6 ..
make
cd ../
xcopy /E /Y libs android\project\libs
cd android\project
call android update project -p . --name OTClient --target android-16
call ant debug
cd bin
adb install -r OTClient-debug.apk

View File

@@ -1,21 +0,0 @@
cd ..
mkdir build_android
cd build_android
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=../android/android.toolchain.cmake -DANDROID_ABI=armeabi-v7a -DANDROID_NATIVE_API_LEVEL=android-16 -DANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-4.6 ..
make
cd ../
ECHO D|xcopy /E /Y android\project\jni\libSDL2.so android\project\libs\armeabi-v7a
xcopy /E /Y libs\armeabi-v7a\libotclient.so android\project\jni
cd android\project
call android update project -p . --name OTClient --target android-16
call ndk-build.cmd all NDK_DEBUG=1
call ant clean
call ant debug
cd bin
adb install -r OTClient-debug.apk

View File

@@ -1,36 +0,0 @@
<?xml version="1.0"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.otclient.mobile" android:versionCode="1" android:versionName="1.0">
<application
android:debuggable="true"
android:label="@string/app_name"
android:icon="@drawable/ic_launcher"
android:hardwareAccelerated="true" >
<activity android:name="MainActivity"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:configChanges="orientation|keyboardHidden"
android:screenOrientation="landscape">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<meta-data android:name="android.app.lib_name" android:value="otclient"/>
</activity>
</application>
<!-- Android 2.3.3 -->
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="16"/>
<!-- OpenGL ES 2.0 -->
<uses-feature android:glEsVersion="0x00020000"/>
<!-- Allow writing to external storage -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<!-- Allow make internet connections -->
<uses-permission android:name="android.permission.INTERNET" />
</manifest>

View File

@@ -1,6 +0,0 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libotclient
LOCAL_SRC_FILES := libotclient.so
include $(PREBUILT_SHARED_LIBRARY)

View File

@@ -1,2 +0,0 @@
APP_PLATFORM := android-9
APP_ABI := armeabi-v7a

Binary file not shown.

Before

Width:  |  Height:  |  Size: 538 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 429 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">OTClient</string>
</resources>

View File

@@ -1,52 +0,0 @@
package com.otclient.mobile;
import android.view.KeyEvent;
import android.view.View;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputConnection;
public class FakeEditText extends View implements View.OnKeyListener {
InputConnection ic;
public FakeEditText() {
super(MainActivity.getInstance());
setFocusableInTouchMode(true);
setFocusable(true);
setOnKeyListener(this);
}
@Override
public boolean onCheckIsTextEditor() {
return true;
}
@Override // This handles the hardware keyboard input
public boolean onKey(View v, int keyCode, KeyEvent event) {
if (event.isPrintingKey()) {
if (event.getAction() == KeyEvent.ACTION_DOWN) {
ic.commitText(String.valueOf((char) event.getUnicodeChar()), 1);
}
return true;
}
if (event.getAction() == KeyEvent.ACTION_DOWN) {
onNativeKeyDown(keyCode);
return true;
} else if (event.getAction() == KeyEvent.ACTION_UP) {
onNativeKeyUp(keyCode);
return true;
}
return false;
}
@Override
public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
ic = new InputConnectionForNative(this, true);
return ic;
}
public static native void onNativeKeyDown(int keyCode);
public static native void onNativeKeyUp(int keyCode);
}

View File

@@ -1,47 +0,0 @@
package com.otclient.mobile;
import android.view.KeyEvent;
import android.view.View;
import android.view.inputmethod.BaseInputConnection;
public class InputConnectionForNative extends BaseInputConnection {
public InputConnectionForNative(View targetView, boolean fullEditor) {
super(targetView, fullEditor);
}
@Override // This handles the keycodes from soft keyboard
public boolean sendKeyEvent(KeyEvent event) {
int keyCode = event.getKeyCode();
if (event.getAction() == KeyEvent.ACTION_DOWN) {
if (event.isPrintingKey()) {
commitText(String.valueOf((char) event.getUnicodeChar()), 1);
}
FakeEditText.onNativeKeyDown(keyCode);
return true;
} else if (event.getAction() == KeyEvent.ACTION_UP) {
FakeEditText.onNativeKeyUp(keyCode);
return true;
}
return super.sendKeyEvent(event);
}
@Override // Typed text
public boolean commitText(CharSequence text, int newCursorPosition) {
nativeCommitText(text.toString(), newCursorPosition);
return super.commitText(text, newCursorPosition);
}
@Override // Workaround to capture backspace key
public boolean deleteSurroundingText(int beforeLength, int afterLength) {
if (beforeLength == 1 && afterLength == 0) {
return super.sendKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DEL))
&& super.sendKeyEvent(new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_DEL));
}
return super.deleteSurroundingText(beforeLength, afterLength);
}
public static native void nativeCommitText(String text, int newCursorPosition);
}

View File

@@ -1,33 +0,0 @@
package com.otclient.mobile;
import android.content.Context;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
public class KeyboardSoftHandler{
private View editText;
public KeyboardSoftHandler() {
editText = new FakeEditText();
MainActivity.getInstance()
.addViewToLayout(editText);
}
public void showKeyboardSoft() {
editText.setVisibility(View.VISIBLE);
editText.requestFocus();
InputMethodManager imm = (InputMethodManager) MainActivity
.getInstance().getSystemService(Context.INPUT_METHOD_SERVICE);
imm.showSoftInput(editText, 0);
}
public void hideKeyboardSoft() {
editText.setVisibility(View.GONE);
InputMethodManager imm = (InputMethodManager) MainActivity
.getInstance().getSystemService(
Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(editText.getWindowToken(), 0);
}
}

View File

@@ -1,110 +0,0 @@
package com.otclient.mobile;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.RelativeLayout.LayoutParams;
public class MainActivity extends Activity {
public static final String APP_TAG = "OTClientMob";
private static MainActivity instance;
private RelativeLayout layout;
private static boolean started;
static {
started = false;
//android.os.Debug.waitForDebugger();
System.loadLibrary("otclient");
}
@Override
protected void onCreate(Bundle savedInstanceState) {
Log.v(APP_TAG, "onCreate()");
super.onCreate(savedInstanceState);
initialize();
}
private void initialize() {
instance = this;
layout = new RelativeLayout(this);
RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
layout.setLayoutParams(params);
setContentView(layout);
if( !started ) {
nativeInit();
started = true;
}
NativeFacadeCalls.initialize();
}
@Override
protected void onPause() {
Log.v(APP_TAG, "onPause()");
super.onPause();
nativePause();
}
@Override
protected void onResume() {
Log.v(APP_TAG, "onResume()");
super.onResume();
if( NativeFacadeCalls.isSurfaceReady() )
nativeResume();
}
@Override
protected void onDestroy() {
Log.v(APP_TAG, "onDestroy()");
super.onDestroy();
if(isFinishing()) {
NativeFacadeCalls.destroy();
destroy();
nativeDestroy();
}
}
private void destroy() {
instance = null;
layout = null;
}
@Override // Ignore certain special keys so they're handled by Android
public boolean dispatchKeyEvent(KeyEvent event) {
int keyCode = event.getKeyCode();
if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN ||
keyCode == KeyEvent.KEYCODE_VOLUME_UP ||
keyCode == KeyEvent.KEYCODE_CAMERA ||
keyCode == 168 || /* API 11: KeyEvent.KEYCODE_ZOOM_IN */
keyCode == 169 /* API 11: KeyEvent.KEYCODE_ZOOM_OUT */
) {
return false;
}
return super.dispatchKeyEvent(event);
}
public static MainActivity getInstance() {
return instance;
}
public void addViewToLayout(View view) {
layout.addView(view);
}
public native void nativeInit();
public native void nativePause();
public native void nativeResume();
public native void nativeDestroy();
}

View File

@@ -1,45 +0,0 @@
package com.otclient.mobile;
import android.os.Handler;
import android.os.Looper;
import android.view.Surface;
public class NativeFacadeCalls {
private static NativeSurfaceView nativeSurfaceView;
private static KeyboardSoftHandler keyboardSoftHandler;
private static Handler handler;
public static void initialize() {
handler = new Handler(Looper.getMainLooper());
keyboardSoftHandler = new KeyboardSoftHandler();
nativeSurfaceView = new NativeSurfaceView();
MainActivity.getInstance().addViewToLayout(nativeSurfaceView);
}
public static void destroy() {
handler = null;
nativeSurfaceView = null;
keyboardSoftHandler = null;
}
public static boolean isSurfaceReady() {
return nativeSurfaceView.isSurfaceReady();
}
/*
* Static methods called from JNI
*/
public static Surface getNativeSurface() {
return nativeSurfaceView.getSurface();
}
public static void showKeyboardSoft() {
handler.post(new Runnable() {
@Override
public void run() {
keyboardSoftHandler.showKeyboardSoft();
}
});
}
}

View File

@@ -1,38 +0,0 @@
package com.otclient.mobile;
public class NativeMainThread {
private static final NativeMainThread instance;
private Thread nativeThread;
static {
instance = new NativeMainThread();
}
private NativeMainThread() {}
public void start() {
if( nativeThread == null ) {
nativeThread = new Thread(
new NativeThread(), "NativeThread" );
nativeThread.start();
}
}
public static NativeMainThread getInstance() {
return instance;
}
/*
* Native methods implemented on C++
*/
public native void nativeStartApp();
private class NativeThread implements Runnable {
@Override
public void run() {
nativeStartApp();
}
}
}

View File

@@ -1,130 +0,0 @@
package com.otclient.mobile;
import android.util.Log;
import android.view.GestureDetector;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.Surface;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.View;
public class NativeSurfaceView extends SurfaceView implements
SurfaceHolder.Callback, View.OnTouchListener {
private Surface surface;
private GestureDetector gestureDetector;
private int currentWidth;
private int currentHeight;
private boolean surfaceReady;
private final int LONGPRESS_EVENT = 3;
public NativeSurfaceView() {
super(MainActivity.getInstance());
getHolder().addCallback(this);
setFocusable(true);
setFocusableInTouchMode(true);
requestFocus();
setOnTouchListener(this);
currentWidth = 0;
currentHeight = 0;
surfaceReady = false;
gestureDetector = new GestureDetector(
new GestureDetector.SimpleOnGestureListener() {
public void onLongPress(MotionEvent event) {
onNativeTouch(LONGPRESS_EVENT, event.getX(), event.getY());
}
});
}
@Override
public void surfaceCreated(SurfaceHolder holder) {
Log.d(MainActivity.APP_TAG, "surfaceCreated");
}
@Override
public void surfaceChanged(SurfaceHolder holder, int format, int width,
int height) {
Log.d(MainActivity.APP_TAG, "surfaceChanged");
surface = holder.getSurface();
currentWidth = width;
currentHeight = height;
surfaceReady = true;
onNativeResize(width, height);
onNativeSurfaceChanged();
NativeMainThread.getInstance().start();
}
@Override
public void surfaceDestroyed(SurfaceHolder holder) {
Log.d(MainActivity.APP_TAG, "surfaceDestroyed");
surface = null;
surfaceReady = false;
onNativeSurfaceDestroyed();
}
@Override
public boolean onTouch(View view, MotionEvent event) {
gestureDetector.onTouchEvent(event);
/* Ref: http://developer.android.com/training/gestures/multi.html */
final int pointerCount = event.getPointerCount();
int action = event.getActionMasked();
int i = -1;
float x,y;
switch(action) {
case MotionEvent.ACTION_MOVE:
for (i = 0; i < pointerCount; i++) {
x = event.getX(i);
y = event.getY(i);
onNativeTouch(action, x, y);
}
break;
case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_DOWN:
// Primary pointer up/down, the index is always zero
i = 0;
case MotionEvent.ACTION_POINTER_UP:
case MotionEvent.ACTION_POINTER_DOWN:
// Non primary pointer up/down
if (i == -1) {
i = event.getActionIndex();
}
x = event.getX(i);
y = event.getY(i);
onNativeTouch(action, x, y);
break;
default:
break;
}
return true;
}
public Surface getSurface() {
return surface;
}
public boolean isSurfaceReady() {
return surfaceReady;
}
/*
* Native methods implemented on C++
*/
public native void onNativeSurfaceChanged();
public native void onNativeSurfaceDestroyed();
public native void onNativeResize(int width, int height);
public native void onNativeTouch(int actionType, float x, float y);
}

View File

Before

Width:  |  Height:  |  Size: 283 B

After

Width:  |  Height:  |  Size: 283 B

View File

Before

Width:  |  Height:  |  Size: 283 B

After

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 243 B

After

Width:  |  Height:  |  Size: 243 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 387 B

After

Width:  |  Height:  |  Size: 373 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 444 B

After

Width:  |  Height:  |  Size: 397 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 362 B

After

Width:  |  Height:  |  Size: 412 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 373 B

After

Width:  |  Height:  |  Size: 418 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 397 B

After

Width:  |  Height:  |  Size: 392 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 412 B

After

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 418 B

After

Width:  |  Height:  |  Size: 400 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

After

Width:  |  Height:  |  Size: 402 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 402 B

After

Width:  |  Height:  |  Size: 423 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 392 B

After

Width:  |  Height:  |  Size: 387 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 400 B

After

Width:  |  Height:  |  Size: 444 B

View File

@@ -30,7 +30,7 @@ locale = {
["4c) False Report to Gamemaster"] = false,
["Accept"] = "Annehmen",
["Account name"] = "Benutzername",
["Account Status:"] = false,
["Account Status"] = false,
["Action:"] = false,
["Add"] = "Hinzuf<EFBFBD>gen",
["Add new VIP"] = "Neuen Freund hinzuf<75>gen",
@@ -231,7 +231,7 @@ locale = {
["Pass Leadership to %s"] = "%s zum Anf<6E>hrer ernennen",
["Password"] = "Passwort",
["Piece Price:"] = "St<EFBFBD>ckpreis",
["Please enter a character name:"] = "Bitte gib einen Charakternamen an:",
["Please enter a character name"] = "Bitte gib einen Charakternamen an",
["Please, press the key you wish to add onto your hotkeys manager"] = "Bitte die gew<65>nschte Taste dr<64>cken",
["Please Select"] = false,
["Please use this dialog to only report bugs. Do not report rule violations here!"] = false,

View File

@@ -13,14 +13,14 @@ locale = {
translation = {
["1a) Offensive Name"] = "1a) Nombre ofensivo",
["1b) Invalid Name Format"] = "1b) Formato invalido para nombre",
["1b) Invalid Name Format"] = "1b) Formato inv<EFBFBD>lido para el nombre",
["1c) Unsuitable Name"] = "1c) Nombre no adecuado",
["1d) Name Inciting Rule Violation"] = "1d) Nombre que incita una violaci<63>n al reglamento",
["2a) Offensive Statement"] = "2a) Comentario ofensivo",
["2b) Spamming"] = "2b) Spamming",
["2c) Illegal Advertising"] = "2c) Publicidad il<69>cita",
["2d) Off-Topic Public Statement"] = "2d) Publicaci<63>n fuera de lugar",
["2e) Non-English Public Statement"] = "2e) Publicaci<63>n fuera del ingles",
["2e) Non-English Public Statement"] = "2e) Publicaci<63>n fuera del ingl<EFBFBD>s",
["2f) Inciting Rule Violation"] = "2f) Incitar a una violaci<63>n al reglamento",
["3a) Bug Abuse"] = "3a) Abuso de error",
["3b) Game Weakness Abuse"] = "3b) Abuso de debilidad del juego",
@@ -28,12 +28,12 @@ locale = {
["3d) Hacking"] = "3d) Hackeo",
["3e) Multi-Clienting"] = "3e) Uso de m<>ltiples clientes",
["3f) Account Trading or Sharing"] = "3f) Intercambio de cuenta",
["4a) Threatening Gamemaster"] = "4a) Amenzar a un Gamemaster",
["4a) Threatening Gamemaster"] = "4a) Amenazar a un Gamemaster",
["4b) Pretending to Have Influence on Rule Enforcement"] = "4b) Pretender tener influencia en una parte del reglamento",
["4c) False Report to Gamemaster"] = "4c) Reporte falso a un Gamemaster",
["Accept"] = "Aceptar",
["Account name"] = "Nombre de cuenta",
["Account Status:"] = "Estado de cuenta:",
["Account name"] = "Nombre de la cuenta",
["Account Status"] = "Estado de la cuenta",
["Action:"] = "Acci<EFBFBD>n:",
["Add"] = "A<EFBFBD>adir",
["Add new VIP"] = "A<EFBFBD>adir nuevo VIP",
@@ -44,14 +44,14 @@ locale = {
["Adjust volume"] = "Ajustar volumen",
["Alas! Brave adventurer, you have met a sad fate.\nBut do not despair, for the gods will bring you back\ninto this world in exchange for a small sacrifice\n\nSimply click on Ok to resume your journeys!"] = "<EFBFBD>Ay! Aventurero valiente, has conocido un triste destino. \nPero no se desespere, porque los dioses te llevar<61>n de vuelta \na este mundo a cambio de un peque<75>o sacrificio \n\nSimplemente haga clic en Aceptar para continuar con sus viajes!",
["All"] = "Todo",
["All modules and scripts were reloaded."] = "Todos los m<>dulos y scripts se vuelven a cargar.",
["Allow auto chase override"] = "Permitur auto persecuci<63>n override",
["Also known as dash in tibia community, recommended\nfor playing characters with high speed"] = "Conocido por la comunidad de tibia como dash.\nRecomenada para jugadores de alto nivel.",
["Ambient light: %s%%"] = "Ambiente de luz: %s%%",
["All modules and scripts were reloaded."] = "Todos los m<>dulos y scripts se volvieron a cargar.",
["Allow auto chase override"] = "Desactivar auto persecuci<63>n al andar",
["Also known as dash in tibia community, recommended\nfor playing characters with high speed"] = "Conocido por la comunidad de tibia como \"dash\".\nRecomenada para jugadores de alto nivel.",
["Ambient light: %s%%"] = "Luz de ambiente: %s%%",
["Amount:"] = "Cantidad:",
["Amount"] = "Cantidad",
["Anonymous"] = "An<EFBFBD>nimo",
["Are you sure you want to logout?"] = "<EFBFBD>Estas seguro de que deseas salir?",
["Are you sure you want to logout?"] = "<EFBFBD>Est<EFBFBD>s seguro de que deseas salir?",
["Attack"] = "Atacar",
["Author"] = "Autor",
["Autoload"] = "Auto carga",
@@ -60,26 +60,26 @@ locale = {
["Auto login selected character on next charlist load"] = "Ingresar la siguiente vez que aparece el charlist con el personaje seleccionado",
["Axe Fighting"] = "Combate con hacha",
["Balance:"] = "Saldo:",
["Banishment"] = "Banishment",
["Banishment + Final Warning"] = "Banishment + Final Warning",
["Banishment"] = "Baneo",
["Banishment + Final Warning"] = "Baneo + <20>ltimo Aviso",
["Battle"] = "Batalla",
["Browse"] = "Navegar",
["Bug report sent."] = "Reporte de error enviado.",
["Button Assign"] = "Bot<EFBFBD>n asignado",
["Button Assign"] = "Asignar bot<6F>n",
["Buy"] = "Compra",
["Buy Now"] = "Compra ahora",
["Buy Offers"] = "Comprar oferta",
["Buy Offers"] = "Comprar ofertas",
["Buy with backpack"] = "Comprar con mochila",
["Cancel"] = "Cancelar",
["Cannot login while already in game."] = "No se puede iniciar sesi<73>n, mientras que est<73>s en el juego.",
["Cannot login while already in game."] = "No se puede iniciar sesi<73>n, mientras ya est<73>s en el juego.",
["Cap"] = "Cap",
["Capacity"] = "Capacidad",
["Center"] = "Centrar",
["Channels"] = "Canales",
["Character List"] = "Lista de car<EFBFBD>cter",
["Classic control"] = "Controles Cl<EFBFBD>sicos",
["Clear current message window"] = "Limpiar mensaje actual en ventana",
["Clear Messages"] = "Limpiar mensaje",
["Character List"] = "Lista de caracteres",
["Classic control"] = "Controles cl<EFBFBD>sicos",
["Clear current message window"] = "Limpiar ventana de mensajes actual",
["Clear Messages"] = "Limpiar mensajes",
["Clear object"] = "Limpiar objeto",
["Client needs update."] = "El cliente necesita una actualizaci<63>n.",
["Close"] = "Cerrar",
@@ -87,10 +87,10 @@ locale = {
["Club Fighting"] = "Combate con mazo",
["Combat Controls"] = "Controles de combate",
["Comment:"] = "Comentario:",
["Connecting to game server..."] = "Conectando a servidor game...",
["Connecting to login server..."] = "Conectando a servidor login...",
["Connecting to game server..."] = "Conectando a servidor de juego...",
["Connecting to login server..."] = "Conectando a servidor de login...",
["Console"] = "Consola",
["Cooldowns"] = "Descansos",
["Cooldowns"] = "Enfriamientos",
["Copy message"] = "Copiar mensaje",
["Copy name"] = "Copiar nombre",
["Copy Name"] = "Copiar nombre",
@@ -122,7 +122,7 @@ locale = {
["Enable vertical synchronization"] = "Habilitar sincronizaci<63>n vertical",
["Enable walk booster"] = "Habilitar caminado turbo",
["Enter Game"] = "Entrar al juego",
["Enter one name per line."] = "Introducir un nombre por linea.",
["Enter one name per line."] = "Introducir un nombre por l<EFBFBD>nea.",
["Enter with your account again to update your client."] = "Ingrese con su cuenta nuevamente para actualizar el cliente.",
["Error"] = "Error",
["Error"] = "Error",
@@ -130,18 +130,18 @@ locale = {
["Exclude from private chat"] = "Ejecutar desde un canal privado",
["Exit"] = "Salir",
["Experience"] = "Experiencia",
["Filter list to match your level"] = "Lista de filtros que coincida con el nivel",
["Filter list to match your vocation"] = "Lista de filtros que coincida con el vocaci<63>n",
["Filter list to match your level"] = "Filtrar lista para coincidir con el nivel",
["Filter list to match your vocation"] = "Filtrar lsta para coincidir con la vocaci<63>n",
["Find:"] = "Encontrar:",
["Fishing"] = "Pesca",
["Fist Fighting"] = "Combate con pu<70>os",
["Fist Fighting"] = "Combate a pu<70>os",
["Follow"] = "Seguir",
["Force Exit"] = "Forzar salida",
["Force Exit"] = "Forzar Salir", -- "Forzar Salida" is almost too big for a button
["For Your Information"] = "Para tu informaci<63>n",
["Free Account"] = "Cuenta gratis",
["Fullscreen"] = "Pantalla completa",
["Game"] = "Juego",
["Game framerate limit: %s"] = "Limite de cuadros por segundo en el juego: %s",
["Game framerate limit: %s"] = "L<EFBFBD>mite de cuadros por segundo en el juego: %s",
["Graphics"] = "Gr<EFBFBD>ficos",
["Graphics card driver not detected"] = "Controlador de tarjeta gr<67>fica de video no detectado",
["Graphics Engine:"] = "Motor Gr<47>fico:",
@@ -155,32 +155,32 @@ locale = {
["Hide Offline"] = "Ocultar fuera de linea",
["Hide party members"] = "Ocultar miembros del party",
["Hide players"] = "Ocultar players",
["Hide spells for higher exp. levels"] = "Ocultar hechizos para niveles mas altos que tu experiencia.",
["Hide spells for higher exp. levels"] = "Ocultar hechizos para niveles m<EFBFBD>s altos que tu experiencia.",
["Hide spells for other vocations"] = "Ocultar hechizos que sean para otra vocaci<63>n",
["Hit Points"] = "Puntos de vida",
["Hold left mouse button to navigate\nScroll mouse middle button to zoom\nRight mouse button to create map marks"] = "Mantenga presionado el bot<6F>n derecho del rat<61>n para navegar\nDezplaze la rueda central del rat<61>n para ampliar\nbot<EFBFBD>n derecho del mouse para crear marcas del mapa",
["Hold left mouse button to navigate\nScroll mouse middle button to zoom\nRight mouse button to create map marks"] = "Mantenga presionado el bot<6F>n derecho del rat<61>n para navegar\nDesplace la rueda central del rat<61>n para ampliar\nbot<EFBFBD>n derecho del rat<EFBFBD>n para crear marcas del mapa",
["Hotkeys"] = "Hotkeys",
["If you shut down the program, your character might stay in the game.\nClick on 'Logout' to ensure that you character leaves the game properly.\nClick on 'Exit' if you want to exit the program without logging out your character."] = "Si se cierra el programa, tu personaje puede permanecer en el juego.\nHaga clic en 'Salir' para asegurarse de que personaje deja el juego correctamente.\nHaga click en 'Salir' si desea salir del programa sin tener que salir de tu personaje.",
["If you shut down the program, your character might stay in the game.\nClick on 'Logout' to ensure that you character leaves the game properly.\nClick on 'Exit' if you want to exit the program without logging out your character."] = "Si se cierra el programa, su personaje puede permanecer en el juego.\nHaga clic en 'Desconectar' para asegurarse de que el personaje deja el juego correctamente.\nHaga clic en 'Forzar Salir' si desea salir del programa igualmente, pudiendo mantener el personaje en el juego.",
["Ignore"] = "Ignorar",
["Ignore capacity"] = "Ignorar Capacidad",
["Ignore capacity"] = "Ignorar capacidad",
["Ignored players:"] = "Jugadores ignorados:",
["Ignore equipped"] = "Ignorar lo equipado",
["Ignore List"] = "Ignorar lista",
["Ignore players"] = "Ignorar jugadores",
["Ignore Private Messages"] = "Ignorar mensajes privados",
["Ignore Yelling"] = "Ignorar gritos",
["Interface framerate limit: %s"] = "Interface de cuadros por segundo: %s",
["Interface framerate limit: %s"] = "Interfaz de cuadros por segundo: %s",
["Inventory"] = "Inventario",
["Invite to Party"] = "Ivitar al party",
["Invite to Party"] = "Invitar a party",
["Invite to private chat"] = "Invitar a canal privado",
["IP Address Banishment"] = "Banishment - Direcci<EFBFBD>n IP",
["IP Address Banishment"] = "Direcci<EFBFBD>n IP Baneada",
["Item Offers"] = "Ofertas de objetos",
["It is empty."] = "Est<EFBFBD> vaci<EFBFBD>.",
["Join %s\'s Party"] = "Unirse al party de %s ",
["It is empty."] = "Est<EFBFBD> vac<61>o.",
["Join %s\'s Party"] = "Unirse al party de %s",
["Leave Party"] = "Dejar el party",
["Level"] = "Nivel",
["Lifetime Premium Account"] = "Tiempo de Premium Account infinito",
["Limits FPS to 60"] = "Limites FPS a 60",
["Limits FPS to 60"] = "L<EFBFBD>mites FPS a 60",
["List of items that you're able to buy"] = "Lista de objetos que puedes de comprar",
["List of items that you're able to sell"] = "Lista de objetos que puedes de vender",
["Load"] = "Cargar",
@@ -188,44 +188,44 @@ locale = {
["Login"] = "Ingresar",
["Login Error"] = "Error de ingreso",
["Login Error"] = "Error de ingreso",
["Logout"] = "Salir",
["Logout"] = "Desconectar",
["Look"] = "Mirar",
["Magic Level"] = "Nivel m<>gico",
["Make sure that your client uses\nthe correct game protocol version"] = "Aseg<EFBFBD>rese de que el cliente este utilizando\nes el versi<73>n del protocolo adecuado",
["Make sure that your client uses\nthe correct game protocol version"] = "Aseg<EFBFBD>rese de que el cliente este utilizando\nla versi<73>n del protocolo correcta",
["Mana"] = "Mana",
["Manage hotkeys:"] = "Administrador de hotkeys:",
["Market"] = "Mercado",
["Market Offers"] = "Ofertas en mercado",
["Market Offers"] = "Ofertas del mercado",
["Message of the day"] = "Mensaje del d<>a",
["Message to "] = "Mensaje a",
["Message to "] = "Mensaje a ",
["Message to %s"] = "Mensaje a %s",
["Minimap"] = "Minimapa",
["Module Manager"] = "Administrador de m<>dulos",
["Module name"] = "Nombre del modulo",
["Mount"] = "Montar", --Unique name?
["Module name"] = "Nombre del m<EFBFBD>dulo",
["Mount"] = "Montar", --"Montura" if it doesn't refers to the verb
["Move Stackable Item"] = "Mover objeto apilable",
["Move up"] = "Mover arriba",
["My Offers"] = "Mis ofertas",
["Name:"] = "Nombre:",
["Name Report"] = "Name Report",
["Name Report + Banishment"] = "Name Report + Banishment",
["Name Report + Banishment + Final Warning"] = "Name Report + Banishment + Final Warning",
["Name Report"] = "Reportar nombre",
["Name Report + Banishment"] = "Reportar nombre + Baneo",
["Name Report + Banishment + Final Warning"] = "Reportar nombre + Baneo + <20>ltimo Aviso",
["No"] = "No",
["No graphics card detected, everything will be drawn using the CPU,\nthus the performance will be really bad.\nPlease update your graphics driver to have a better performance."] = "No se ha detectado una tarjeta gr<67>fica y todo sera procesado por tu procesador,\npor lo tanto el rendimiento va a ser muy malo.\nPor favor, actualice su controlador de gr<67>ficos para tener un rendimiento optimo.",
["No graphics card detected, everything will be drawn using the CPU,\nthus the performance will be really bad.\nPlease update your graphics driver to have a better performance."] = "No se ha detectado una tarjeta gr<67>fica y todo sera procesado por tu procesador,\npor lo tanto el rendimiento va a ser muy malo.\nPor favor, actualice su controlador de la gr<EFBFBD>fica para tener un rendimiento <EFBFBD>ptimo.",
["No item selected."] = "No hay elemento seleccionado.",
["No Mount"] = "No montura",
["No Mount"] = "No montura", --probably "Sin" instead of "No" is more fitting?
["No Outfit"] = "No outfit",
["No statement has been selected."] = "No hay comentario seleccionado.",
["Notation"] = "Notation",
["No statement has been selected."] = "No se ha seleccionado ning<6E>n comentario.",
["Notation"] = "Notaci<EFBFBD>n",
["NPC Trade"] = "Intercambio con NPC",
["Offer History"] = "Historial de oferta",
["Offer History"] = "Historial de ofertas",
["Offers"] = "Ofertas",
["Offer Type:"] = "Tipo de oferta:",
["Offline Training"] = "Entrenamiento offLine",
["Ok"] = "OK",
["on %s.\n"] = "en %s.\n",
["Open"] = "Abierto",
["Open a private message channel:"] = "Abrir mensaje en canal privado:",
["Open"] = "Abrir",
["Open a private message channel:"] = "Abrir canal privado:",
["Open charlist automatically when starting client"] = "Abrir lista de jugadores autom<6F>ticamente al iniciar el cliente",
["Open in new window"] = "Abrir en nueva ventana",
["Open new channel"] = "Abrir nuevo canal",
@@ -234,21 +234,21 @@ locale = {
["Pass Leadership to %s"] = "Pasar liderazgo a %s",
["Password"] = "Contrase<EFBFBD>a",
["Piece Price:"] = "Precio por pieza:",
["Please enter a character name:"] = "Por favor ingresar nombre del jugador:",
["Please enter a character name"] = "Por favor ingresa nombre del jugador",
["Please, press the key you wish to add onto your hotkeys manager"] = "Por favor, presiona la tecla que desees para que sea registrada en\nel administrador de hotkeys",
["Please Select"] = "Por favor seleccione",
["Please use this dialog to only report bugs. Do not report rule violations here!"] = "Por favor usa este di<64>logo solo para reportar errores.\n<EFBFBD>No reportar violaciones del reglamento aqu<71>!",
["Please use this dialog to only report bugs. Do not report rule violations here!"] = "Por favor usa este di<64>logo s<EFBFBD>lo para reportar errores.\n<EFBFBD>No reportar violaciones del reglamento aqu<71>!",
["Please wait"] = "Por favor espere",
["Port"] = "Puerto",
["Position:"] = "Posici<EFBFBD>n:",
["Position: %i %i %i"] = "Posici<EFBFBD>n: %i %i %i",
["Premium Account (%s) days left"] = "Tienes (%s) d<>as de Premium Account restantes",
["Premium Account (%s) days left"] = "Quedan (%s) d<>as de Premium Account",
["Price:"] = "Precio:",
["Primary"] = "Primario",
["Protocol"] = "Protocolo",
["Quest Log"] = "Quest Log", --Unique name
["Randomize"] = "Combinar",
["Randomize characters outfit"] = "Combinar vestimenta del jugador",
["Randomize"] = "Aleatorio",
["Randomize characters outfit"] = "Crear vestimenta del jugador aleatoriamente",
["Reason:"] = "Raz<EFBFBD>n:",
["Refresh"] = "Refrescar",
["Refresh Offers"] = "Refrescar ofertas",
@@ -257,10 +257,10 @@ locale = {
["Reload All"] = "Cargar todo de nuevo",
["Remember account and password when starts client"] = "Recordar cuenta y contrase<73>a al iniciar el cliente",
["Remember password"] = "Recordar contrase<73>a",
["Remove"] = "Remover",
["Remove %s"] = "Remover %s",
["Remove"] = "Eliminar",
["Remove %s"] = "Eliminar %s",
["Report Bug"] = "Reportar error",
["Reserved for more functionality later."] = "Reservado para una funci<EFBFBD>n futura.",
["Reserved for more functionality later."] = "Reservado para una funcionalidad futura.",
["Reset Market"] = "Reiniciar mercado",
["Revoke %s\'s Invitation"] = "Anular %s\'s invitaci<63>n",
["Rotate"] = "Rotar",
@@ -272,7 +272,7 @@ locale = {
["Secondary"] = "Secundario",
["Select object"] = "Seleccionar objeto",
["Select Outfit"] = "Seleccionar outfit",
["Select your language"] = "Selectionar tu lenguaje",
["Select your language"] = "Seleccionar tu idioma",
["Sell"] = "Vender",
["Sell Now"] = "Vender ahora",
["Sell Offers"] = "Ofertas de venta",
@@ -300,82 +300,85 @@ locale = {
["Show timestamps in console"] = "Mostrar marcas de tiempo en consola",
["Show your depot items only"] = "Mostrar solo tus objetos en depot",
["Skills"] = "Habilidades",
["Soul"] = "Soul",
["Soul Points"] = "Puntos de Soul", --I'm leaving these as is because its a unique name, if you want to change it it can be "Alma" or "Esp<73>ritu"
["Sort by name"] = "Ordenar por nombre",
["Sort by status"] = "Ordenar por estado",
["Sort by type"] = "Ordernar por tipo",
["Soul"] = "Soul", --I'm leaving these as is because its a unique name, if you want to change it it can be "Alma" or "Esp<73>ritu"
["Soul Points"] = "Puntos de Soul",
["Special"] = "Especial",
["Speed"] = "Velocidad",
["Spell Cooldowns"] = "Spells Cooldowns", --Could be "Tiempo de recarga para los hechizos".
["Spell Cooldowns"] = "Enfriamiento de hechizos", --Should 'spells'? be an unique name?
["Spell List"] = "Lista de hechizos",
["Stamina"] = "Resistencia",
["Statement:"] = "Comentario:",
["Statement Report"] = "Statement Report", --Could be "reporte del comentario"
["Statement Report"] = "Statement Report", --Could be "reporte del comentario"/Not sure how to translate it correctly.. When is it used in the game?
["Statistics"] = "Estad<EFBFBD>sticas",
["Stop Attack"] = "Detener ataque",
["Stop Follow"] = "Detener persecuci<63>n",
["Support"] = "Soporte",
["%s: (use object)"] = "%s: (usar objeto)",
["%s: (use object on target)"] = "%s: (usar objeto en un objetivo)",
["%s: (use object on yourself)"] = "%s: (usar objeto en mi mismo)",
["%s: (use object on yourself)"] = "%s: (usar objeto en ti mismo)",
["%s: (use object with crosshair)"] = "%s: (usar objeto con punto de mira)",
["Sword Fighting"] = "Combate de espada",
["Sword Fighting"] = "Combate con espada",
["Terminal"] = "Terminal",
["There is no way."] = "No hay ninguna manera.",
["Title"] = "Titulo",
["Total Price:"] = "Total total:",
["There is no way."] = "No hay forma de llegar.",
["Title"] = "T<EFBFBD>tulo",
["Total Price:"] = "Precio total:",
["Trade"] = "Intercambio",
["Trade with ..."] = "Intercambiar con ...",
["Trying to reconnect in %s seconds."] = "",
["Trying to reconnect in %s seconds."] = "Intentando reconectar en %s segundos.",
["Unable to load dat file, please place a valid dat in '%s'"] = "No se puede cargar el archivo dat, por favor coloque un dat v<>lido en '%s'",
["Unable to load spr file, please place a valid spr in '%s'"] = "No se puede cargar el archivo spr, por favor coloque un spr v<>lido en '%s'",
["Unable to logout."] = "No se puede cerrar sesi<73>n-",
["Unable to logout."] = "No se puede cerrar sesi<73>n.",
["Unignore"] = "Dejar de ignorar",
["Unload"] = "No cargado",
["Unload"] = "Desactivar", -- Should be "Descargar", but not used to prevent misunderstandings with "Download".
["Update needed"] = "Es necesario actualizar",
["Use"] = "Uso",
["Use"] = "Usar",
["Use on target"] = "Usar en un objetivo",
["Use on yourself"] = "Usar en mi mismo",
["Use with ..."] = "Usar en ...",
["Version"] = "Versi<EFBFBD>n",
["VIP List"] = "Lista Vip",
["VIP List"] = "Lista VIP",
["Voc."] = "Voc.",
["Vocation"] = "Vocaci<EFBFBD>n",
["Waiting List"] = "Lista de espera",
["Website"] = "Sitio Web",
["Weight:"] = "Peso:",
["Will detect when to use diagonal step based on the\nkeys you are pressing"] = "Detectara cuando se camina en diagonal usando las flechas",
["Will detect when to use diagonal step based on the\nkeys you are pressing"] = "Detectar<EFBFBD> cuando caminar en diagonal en base\n a las teclas pulsadas",
["With crosshair"] = "Con punto de mira",
["Yes"] = "Si",
["You are bleeding"] = "Te estas desangrando",
["You are burning"] = "Te estas quemando",
["You are cursed"] = "Tu estas maldecido",
["You are dazzled"] = "Tu estas deslumbrado",
["You are dead."] = "Tu estas muerto.",
["You are dead"] = "Tu estas muerto",
["You are drowning"] = "Te estas ahogando",
["You are drunk"] = "Tu estas ebrio",
["You are electrified"] = "Tu estas electrocutado",
["You are freezing"] = "Te estas congelando",
["You are hasted"] = "Tu estas r<>pido", --I dont know what is the best way to translate this so I'm leaving it as I found it.
["You are hungry"] = "Tu estas hambriento",
["You are paralysed"] = "Tu estas paralizado",
["You are poisoned"] = "Tu estas envenedado",
["You are protected by a magic shield"] = "Tu estas protegido por un escudo m<>gico",
["You are strengthened"] = "Tu estas reforzado",
["You are within a protection zone"] = "Tu estas dentro de una zona de protecci<63>n",
["You can enter new text."] = "Tu puedes ingresar un texto nuevo.",
["You have %s percent"] = "Tu tienes %s por ciento",
["You have %s percent to go"] = "Tu tienes %s por ciento para ir",
["You may not logout during a fight"] = "No puedes salir durante una pelea",
["You may not logout or enter a protection zone"] = "No puedes salir o entrar en una zona de protecci<63>n",
["You must enter a comment."] = "Debes ingresar un comentario.",
["Yes"] = "S<EFBFBD>",
["You are bleeding"] = "Te est<EFBFBD>s desangrando",
["You are burning"] = "Te est<EFBFBD>s quemando",
["You are cursed"] = "Est<EFBFBD>s maldecido",
["You are dazzled"] = "Est<EFBFBD>s deslumbrado",
["You are dead."] = "Has muerto.",
["You are dead"] = "Has muerto",
["You are drowning"] = "Te est<EFBFBD>s ahogando",
["You are drunk"] = "Est<EFBFBD>s ebrio",
["You are electrified"] = "Est<EFBFBD>s electrocutado",
["You are freezing"] = "Te est<EFBFBD>s congelando",
["You are hasted"] = "Tienes la velocidad incrementada", --The best translation I could thing of ("You have increased speed")
["You are hungry"] = "Tienes hambre",
["You are paralysed"] = "Est<EFBFBD>s paralizado",
["You are poisoned"] = "Est<EFBFBD>s envenedado",
["You are protected by a magic shield"] = "Est<EFBFBD>s protegido por un escudo m<>gico",
["You are strengthened"] = "Est<EFBFBD>s reforzado", --"fortificado" maybe?
["You are within a protection zone"] = "Est<EFBFBD>s dentro de una zona de protecci<63>n",
["You can enter new text."] = "Puedes escribir texto nuevo.",
["You have %s percent"] = "Tienes el %s por ciento",
["You have %s percent to go"] = "Tienes el %s por ciento para avanzar",
["You may not logout during a fight"] = "No te puedes desconectar durante una pelea",
["You may not logout or enter a protection zone"] = "No te puedes desconectar o entrar en una zona de protecci<63>n",
["You must enter a comment."] = "Debes escribir un comentario.",
["You must enter a valid server address and port."] = "Debes ingresar una direcci<63>n v<>lida de servidor y el puerto.",
["You must select a character to login!"] = "<EFBFBD>Debes seleccionar un personaje para ingresar!",
["You must select a character to login!"] = "<EFBFBD>Debes seleccionar un personaje para ingresar!", -- I would use "conectarte" but it's Ok
["Your Capacity:"] = "Tu capacidad:",
["You read the following, written by \n%s\n"] = "Lees lo siguiente, escrito por \n%s\n",
["You read the following, written on \n%s.\n"] = "Lees lo siguiente, escrito en \n%s\n",
["Your Money:"] = "Tu dinero:",
["Change language"] = "Cambiar idioma",
["Don't stretch or shrink Game Window"] = "No estirar o encoger Ventana de Juego"
["Don't stretch or shrink Game Window"] = "No estirar ni encoger la ventana de juego"
}
}

View File

@@ -28,7 +28,7 @@ locale = {
["4c) False Report to Gamemaster"] = "4c) Wyslanie Falszywego Raportu Mistrzowi Gry",
["Accept"] = "Akceptuj",
["Account name"] = "Numer konta",
["Account Status:"] = "Status Konta:",
["Account Status"] = "Status Konta",
["Action:"] = "Akcja:",
["Add"] = "Dodaj",
["Add new VIP"] = "Nowy VIP",
@@ -228,7 +228,7 @@ locale = {
["Pass Leadership to %s"] = "Oddaj przywodztwo %s",
["Password"] = "Haslo",
["Piece Price:"] = "Cena jednego przedmiotu",
["Please enter a character name:"] = "Podaj nazwe postaci:",
["Please enter a character name"] = "Podaj nazwe postaci",
["Please, press the key you wish to add onto your hotkeys manager"] = "Nacisnij klawisz, ktory chcesz dodac do menedzera skrotow klawiszowych",
["Please Select"] = "Prosze wybrac",
["Please use this dialog to only report bugs. Do not report rule violations here!"] = "Zglaszaj tylko bledy gry, nie lamanie zasad",
@@ -295,7 +295,7 @@ locale = {
["Show your depot items only"] = "Pokaz tylko przedmioty z depozytu",
["Skills"] = "Umiejetnosci",
["Soul"] = "Dusze",
["Soul Points"] = "Punktey Duszy",
["Soul Points"] = "Punkty Duszy",
["Special"] = "Specialne",
["Speed"] = "Predkosc",
["Spell Cooldowns"] = "Czas odnowienia czaru",

View File

@@ -10,11 +10,15 @@ locale = {
-- As tradu<64><75>es devem vir sempre em ordem alfab<61>tica.
translation = {
["%d of experience per hour"] = "%d de experi<72>ncia por hora",
["%s has finished the request"] = "%s finalizou o pedido",
["%s has logged in."] = "%s entrou.",
["%s has logged out."] = "%s saiu.",
["%s of experience left"] = "%s de experi<72>ncia faltando",
["%s: (use object on target)"] = "%s: (usar objeto no alvo)",
["%s: (use object on yourself)"] = "%s: (usar objeto em si)",
["%s: (use object with crosshair)"] = "%s: (usar objeto com mira)",
["%s: (use object)"] = "%s: (usar objeto)",
["(ERROR %d)"] = "(ERRO %d)",
["1a) Offensive Name"] = "1a) Nome ofensivo",
["1b) Invalid Name Format"] = "1b) Nome com formato inv<6E>lido",
["1c) Unsuitable Name"] = "1c) Nome n<>o adequado",
@@ -38,6 +42,8 @@ locale = {
["Account name"] = "Nome da conta",
["Account Status"] = "Estado da Conta",
["Action"] = "A<EFBFBD><EFBFBD>o",
["Activate ignorelist"] = "Ativar lista ignorada",
["Activate whitelist"] = "Ativar lista branca",
["Add new server"] = "Adicionar novo servidor",
["Add new VIP"] = "Adicionar nova VIP",
["Add to VIP list"] = "Adicionar a lista VIP",
@@ -46,17 +52,18 @@ locale = {
["Addon 2"] = "Addon 2",
["Addon 3"] = "Addon 3",
["Adjust volume"] = "Ajustar volume",
["Alas! Brave adventurer, you have met a sad fate.\nBut do not despair, for the gods will bring you back\ninto this world in exchange for a small sacrifice\n\nSimply click on Ok to resume your journeys!"] = false,
["All modules and scripts were reloaded."] = "Todos m<>dulos e scripts foram recarregados.",
["All"] = "Todos",
["Allow auto chase override"] = "Permitir sobrescrever o modo de persegui<75><69>o",
["Allow VIPs to message you"] = "Permitir que VIPs te mandem mensagem",
["Allowed Players"] = "Jogadores com permiss<73>o",
["Also known as dash in tibia community, recommended\nfor playing characters with high speed"] = "Tamb<EFBFBD>m conhecido como dash na comunidade tibiana, recomendado\npara jogar com personagem que possuam velocidade alta",
["Ambient light: %s%%"] = "Luz ambiente: %s%%",
["Amount"] = "Quantidade",
["Anonymous"] = "An<EFBFBD>nimo",
["Any"] = "Qualquer",
["Are you sure you want to logout?"] = "Voc<EFBFBD> tem certeza que quer sair?",
["Attack"] = "Atacar",
["Auction End"] = "Fim do Leil<69>o",
["Audio"] = "<EFBFBD>udio",
["Author"] = "Autor",
["Auto login selected character on next charlist load"] = "Entrar automaticamente com o personagem quando reabrir a lista de personagens",
@@ -68,6 +75,7 @@ locale = {
["Banishment + Final Warning"] = "Banimento + Aviso final",
["Banishment"] = "Banimento",
["Battle"] = "Batalha",
["Browse Field"] = "Navegar Campo",
["Browse"] = "Navegar",
["Bug report sent."] = "Reporte de bug enviado.",
["Button Assign"] = "Selecionar bot<6F>o",
@@ -75,12 +83,14 @@ locale = {
["Buy Offers"] = "Ofertas de compra",
["Buy with backpack"] = "Comprar com mochila",
["Buy"] = "Comprar",
["Buyer Name"] = "Nome do Comprador",
["Cancel"] = "Cancelar",
["Cannot login while already in game."] = "N<EFBFBD>o <20> possivel logar enquanto j<> estiver jogando.",
["Cap"] = "Cap",
["Capacity"] = "Capacidade",
["Center"] = "Centro",
["Change language"] = "Trocar l<>ngua",
["Channel appended to %s"] = "Canais acrescentados a %s",
["Channels"] = "Canais",
["Character List"] = "Lista de personagens",
["Classic control"] = "Controle cl<63>ssico",
@@ -88,6 +98,7 @@ locale = {
["Clear Messages"] = "Limpar mensagens",
["Clear object"] = "Limpar objeto",
["Client needs update."] = "O client do jogo precisa ser atualizado",
["Client Version"] = "Vers<EFBFBD>o do Client",
["Close this channel"] = "Fechar esse canal",
["Close"] = "Fechar",
["Club Fighting"] = "Combate com Porrete",
@@ -96,35 +107,44 @@ locale = {
["Connecting to game server..."] = "Conectando no servidor do jogo...",
["Connecting to login server..."] = "Conectando no servidor de autentica<63><61>o...",
["Connection Error"] = "Erro de Conex<65>o",
["Connection failed the server address does not exist."] = "Conex<EFBFBD>o falhou, servidor n<>o existe.",
["Connection failed."] = "Conex<EFBFBD>o falhou.",
["Connection refused the server might be offline or restarting.\nPlease try again later."] = "Conex<EFBFBD>o recusada, servidor pode estar offline ou reiniciando. Por favor, tente novamente mais tarde.",
["Connection timed out. Either your network is failing or the server is offline."] = "Conex<EFBFBD>o encerrada por tempo limite. Sua rede est<73> falhando, ou o servidor est<73> offline.",
["Console"] = "Console",
["Cooldown"] = "Cooldown",
["Cooldowns"] = "Cooldowns",
["Copy message"] = "Copiar mensagem",
["Copy name"] = "Copiar nome",
["Copy Name"] = "Copiar Nome",
["Copy"] = "Copiar",
["Create Map Mark"] = "Criar marca no mapa",
["Create mark"] = "Criar marca",
["Create New Offer"] = "Criar nova oferta",
["Create Offer"] = "Criar oferta",
["Current hotkey to add: %s"] = "Atalho atual para adicionar: %s",
["Current hotkeys:"] = "Atalhos atuais",
["Critical Hit Chance"] = "Chance de acerto cr<63>tico",
["Critical Hit Damage"] = "Dano de acerto cr<63>tico",
["Current hotkeys"] = "Atalhos atuais",
["Current Offers"] = "Ofertas atuais",
["Default"] = "Padr<EFBFBD>o",
["Delete mark"] = "Deletar marca",
["Description"] = "Descri<EFBFBD><EFBFBD>o",
["Description:"] = "Descri<EFBFBD><EFBFBD>o",
["Destructive Behaviour"] = "Comportamento destrutivo",
["Detail"] = "Detalhe",
["Details"] = "Detalhes",
["Disable chat mode allow to walk using ASDW"] = "Desativar modo de chat permite andar usando ASDW",
["Disable Shared Experience"] = "Desativar experi<72>ncia compartilhada",
["Dismount"] = "Desmontar",
["Display connection speed to the server (milliseconds)"] = "Exibir a velocidade de conex<65>o com o servidor (milisegundos)",
["Display creature health bars"] = "Exibir barras de vida das criaturas",
["Display creature names"] = "Exibir nomes das criaturas",
["Display player mana bar"] = "Exibir barra de mana",
["Display text messages"] = "Exibir mensagens de texto",
["Distance Fighting"] = "Combate a Dist<73>ncia",
["Don't stretch or shrink Game Window"] = "N<EFBFBD>o esticar ou contrair a janela do game",
["Don\'t stretch or shrink Game Window"] = "N<EFBFBD>o esticar ou contrair a janela do game",
["Druid"] = "Druid",
["Edit %s"] = "Editar %s",
["Edit hotkey text:"] = "Editar texto do atalho",
["Edit List"] = "Editar lista",
["Edit Text"] = "Editar Texto",
@@ -257,7 +277,7 @@ locale = {
["Pass Leadership to %s"] = "Passar lideran<61>a para %s",
["Password"] = "Senha",
["Piece Price"] = "Pre<EFBFBD>o por pe<70>a",
["Please enter a character name:"] = "Por favor, entre com o nome do personagem:",
["Please enter a character name"] = "Por favor, entre com o nome do personagem",
["Please Select"] = "Por favor, selecione algo",
["Please use this dialog to only report bugs. Do not report rule violations here!"] = "Por favor, use este campo apenas para reportar defeitos. N<>o reporte viola<6C><61>o de regras aqui!",
["Please wait"] = "Por favor, espere",

View File

@@ -31,7 +31,7 @@ locale = {
["4c) False Report to Gamemaster"] = "4c) Falsk rapport till gamemaster",
["Accept"] = "Acceptera",
["Account name"] = "Konto namn",
["Account Status:"] = false,
["Account Status"] = false,
["Action:"] = "Handling:",
["Add"] = "L<EFBFBD>gg till",
["Add new VIP"] = "Ny VIP",
@@ -232,7 +232,7 @@ locale = {
["Pass Leadership to %s"] = "Ge ledarskap till %s",
["Password"] = "L<EFBFBD>senord",
["Piece Price:"] = "Per Styck:",
["Please enter a character name:"] = "Skriv in ett karakt<6B>rsnamn:",
["Please enter a character name"] = "Skriv in ett karakt<6B>rsnamn",
["Please, press the key you wish to add onto your hotkeys manager"] = "Tryck p<> knappen som du\nvill l<>gga till som snabbtangent",
["Please Select"] = "V<EFBFBD>lj",
["Please use this dialog to only report bugs. Do not report rule violations here!"] = "Anv<EFBFBD>nd den h<>r dialogrutan endast f<>r att rapportera buggar. Rapportera inte regelbrott h<>r!",

View File

@@ -22,7 +22,7 @@ end
g_resources.addSearchPath(g_resources.getWorkDir() .. "mods", true)
-- setup directory for saving configurations
g_resources.setupUserWriteDir(g_app.getCompactName())
g_resources.setupUserWriteDir(('%s/'):format(g_app.getCompactName()))
-- search all packages
g_resources.searchAndAddPackages('/', '.otpkg', true)

View File

@@ -1,5 +1,8 @@
local musicFilename = "/sounds/startup"
local musicChannel = g_sounds.getChannel(1)
local musicChannel = nil
if g_sounds then
musicChannel = g_sounds.getChannel(SoundChannels.Music)
end
function setMusic(filename)
musicFilename = filename
@@ -27,12 +30,14 @@ end
function startup()
-- Play startup music (The Silver Tree, by Mattias Westlund)
if musicChannel then
musicChannel:enqueue(musicFilename, 3)
connect(g_game, { onGameStart = function() musicChannel:stop(3) end })
connect(g_game, { onGameEnd = function()
g_sounds.stopAll()
musicChannel:enqueue(musicFilename, 3)
end })
end
-- Check for startup errors
local errtitle = nil
@@ -57,7 +62,9 @@ function init()
onExit = exit })
g_window.setMinimumSize({ width = 600, height = 480 })
if musicChannel then
g_sounds.preload(musicFilename)
end
-- initialize in fullscreen mode on mobile devices
if g_window.getPlatformType() == "X11-EGL" then

View File

@@ -2,7 +2,7 @@ Module
name: client
description: Initialize the client and setups its main window
author: edubart
website: www.otclient.info
website: https://github.com/edubart/otclient
reloadable: false
sandboxed: true
scripts: [ client ]

View File

@@ -10,7 +10,7 @@ function init()
clientVersionLabel = background:getChildById('clientVersionLabel')
clientVersionLabel:setText(g_app.getName() .. ' ' .. g_app.getVersion() .. '\n' ..
'Rev ' .. g_app.getBuildRevision() .. ' ('.. g_app.getBuildCommit() .. ')\n' ..
'Built on ' .. g_app.getBuildDate())
'Built on ' .. g_app.getBuildDate() .. '\n' .. g_app.getBuildCompiler())
if not g_game.isOnline() then
addEvent(function() g_effects.fadeIn(clientVersionLabel, 1500) end)
@@ -45,3 +45,7 @@ end
function setVersionText(text)
clientVersionLabel:setText(text)
end
function getBackground()
return background
end

View File

@@ -2,7 +2,7 @@ Module
name: client_background
description: Handles the background of the login screen
author: edubart
website: www.otclient.info
website: https://github.com/edubart/otclient
sandboxed: true
scripts: [ background ]
dependencies: [ client_topmenu ]

View File

@@ -8,6 +8,7 @@ local errorBox
local waitingWindow
local updateWaitEvent
local resendWaitEvent
local loginEvent
-- private functions
local function tryLogin(charInfo, tries)
@@ -21,7 +22,7 @@ local function tryLogin(charInfo, tries)
if tries == 1 then
g_game.safeLogout()
end
scheduleEvent(function() tryLogin(charInfo, tries+1) end, 100)
loginEvent = scheduleEvent(function() tryLogin(charInfo, tries+1) end, 100)
return
end
@@ -180,15 +181,20 @@ function CharacterList.terminate()
end
if updateWaitEvent then
updateWaitEvent:cancel()
removeEvent(updateWaitEvent)
updateWaitEvent = nil
end
if resendWaitEvent then
resendWaitEvent:cancel()
removeEvent(resendWaitEvent)
resendWaitEvent = nil
end
if loginEvent then
removeEvent(loginEvent)
loginEvent = nil
end
CharacterList = nil
end
@@ -248,12 +254,21 @@ function CharacterList.create(characters, account, otui)
end
-- account
if account.premDays > 0 and account.premDays < 65535 then
accountStatusLabel:setText(tr("Premium Account (%s) days left", account.premDays))
elseif account.premDays >= 65535 then
accountStatusLabel:setText(tr("Lifetime Premium Account"))
local status = ''
if account.status == AccountStatus.Frozen then
status = tr(' (Frozen)')
elseif account.status == AccountStatus.Suspended then
status = tr(' (Suspended)')
end
if account.subStatus == SubscriptionStatus.Free then
accountStatusLabel:setText(('%s%s'):format(tr('Free Account'), status))
elseif account.subStatus == SubscriptionStatus.Premium then
if account.premDays == 0 or account.premDays == 65535 then
accountStatusLabel:setText(('%s%s'):format(tr('Gratis Premium Account'), status))
else
accountStatusLabel:setText(tr('Free Account'))
accountStatusLabel:setText(('%s%s'):format(tr('Premium Account (%s) days left', account.premDays), status))
end
end
if account.premDays > 0 and account.premDays <= 7 then
@@ -310,6 +325,10 @@ function CharacterList.doLogin()
worldName = selected.worldName,
characterName = selected.characterName }
charactersWindow:hide()
if loginEvent then
removeEvent(loginEvent)
loginEvent = nil
end
tryLogin(charInfo)
else
displayErrorBox(tr('Error'), tr('You must select a character to login!'))
@@ -330,12 +349,12 @@ function CharacterList.cancelWait()
end
if updateWaitEvent then
updateWaitEvent:cancel()
removeEvent(updateWaitEvent)
updateWaitEvent = nil
end
if resendWaitEvent then
resendWaitEvent:cancel()
removeEvent(resendWaitEvent)
resendWaitEvent = nil
end

View File

@@ -2,7 +2,7 @@ Module
name: client_entergame
description: Manages enter game and character list windows
author: edubart
website: www.otclient.info
website: https://github.com/edubart/otclient
dependencies:
- client_topmenu

View File

@@ -113,15 +113,18 @@ function installLocale(locale)
if _G.allowedLocales and not _G.allowedLocales[locale.name] then return end
if locale.name ~= defaultLocaleName then
local updatesNeeded = 0
for _i,k in pairs(neededTranslations) do
local updatesNamesMissing = {}
for _,k in pairs(neededTranslations) do
if locale.translation[k] == nil then
updatesNeeded = updatesNeeded + 1
updatesNamesMissing[#updatesNamesMissing + 1] = k
end
end
if updatesNeeded > 0 then
pdebug('Locale \'' .. locale.name .. '\' is missing ' .. updatesNeeded .. ' translations.')
if #updatesNamesMissing > 0 then
pdebug('Locale \'' .. locale.name .. '\' is missing ' .. #updatesNamesMissing .. ' translations.')
for _,name in pairs(updatesNamesMissing) do
pdebug('["' .. name ..'"] = \"\",')
end
end
end
@@ -141,7 +144,10 @@ end
function setLocale(name)
local locale = installedLocales[name]
if locale == currentLocale then return end
if locale == currentLocale then
g_settings.set('locale', name)
return
end
if not locale then
pwarning("Locale " .. name .. ' does not exist.')
return false

View File

@@ -2,7 +2,7 @@ Module
name: client_locales
description: Translates texts to selected language
author: baxnie, edubart
website: www.otclient.info
website: https://github.com/edubart/otclient
sandboxed: true
scripts: [ locales ]
@onLoad: init()

View File

@@ -21,40 +21,47 @@ neededTranslations = {
"4c) False Report to Gamemaster",
"Accept",
"Account name",
"Account Status:",
"Action:",
"Account Status",
"Action",
"Activate ignorelist",
"Activate whitelist",
"Add",
"Add new server",
"Add new VIP",
"Addon 1",
"Addon 2",
"Addon 3",
"Add to VIP list",
"Adjust volume",
"Alas! Brave adventurer, you have met a sad fate.\nBut do not despair, for the gods will bring you back\ninto this world in exchange for a small sacrifice\n\nSimply click on Ok to resume your journeys!",
"All",
"All modules and scripts were reloaded.",
"Allow auto chase override",
"Also known as dash in tibia community, recommended\nfor playing characters with high speed",
"Allowed Players",
"Allow VIPs to message you",
"Ambient light: %s%%",
"Amount:",
"Amount",
"Anonymous",
"Are you sure you want to logout?",
"Any",
"Attack",
"Auction End",
"Audio",
"Authenticator Token",
"Author",
"Autoload",
"Autoload priority",
"Auto login",
"Auto login selected character on next charlist load",
"Axe Fighting",
"Balance:",
"Balance",
"Banishment",
"Banishment + Final Warning",
"Battle",
"Browse",
"Browse Field",
"Bug report sent.",
"Button Assign",
"Buy",
"Buyer Name",
"Buy Now",
"Buy Offers",
"Buy with backpack",
@@ -63,6 +70,8 @@ neededTranslations = {
"Cap",
"Capacity",
"Center",
"Change language",
"Channel appended to %s",
"Channels",
"Character List",
"Classic control",
@@ -70,15 +79,23 @@ neededTranslations = {
"Clear Messages",
"Clear object",
"Client needs update.",
"Client Version",
"Close",
"Close this channel",
"Club Fighting",
"Combat Controls",
"Comment:",
"Comment",
"Connecting to game server...",
"Connecting to login server...",
"Connection Error",
"Connection failed.",
"Connection failed, the server address does not exist.",
"Connection refused, the server might be offline or restarting.\nPlease try again later.",
"Connection timed out. Either your network is failing or the server is offline.",
"Console",
"Cooldown",
"Cooldowns",
"Copy",
"Copy message",
"Copy name",
"Copy Name",
@@ -86,53 +103,72 @@ neededTranslations = {
"Create mark",
"Create New Offer",
"Create Offer",
"Current hotkeys:",
"Critical Hit Chance",
"Critical Hit Damage",
"Current hotkeys",
"Current hotkey to add: %s",
"Current Offers",
"Default",
"Delete mark",
"Description:",
"Description",
"Destructive Behaviour",
"Detail",
"Details",
"Disable chat mode, allow to walk using ASDW",
"Disable chat mode, allow to walk using ASDW",
"Disable Shared Experience",
"Dismount",
"Display connection speed to the server (milliseconds)",
"Display creature health bars",
"Display creature names",
"Display player mana bar",
"Display text messages",
"Distance Fighting",
"%d of experience per hour",
"Don\'t stretch/shrink Game Window",
"Edit hotkey text:",
"Druid",
"Edit hotkey text",
"Edit List",
"Edit %s",
"Edit Text",
"Enable music",
"Edit VIP list entry",
"Enable audio",
"Enable chat mode",
"Enable dash walking",
"Enable lights",
"Enable music sound",
"Enable Shared Experience",
"Enable smart walking",
"Enable vertical synchronization",
"Enable walk booster",
"Enter Game",
"Enter one name per line.",
"Enter with your account again to update your client.",
"Error",
"Error",
"(ERROR %d)",
"Excessive Unjustified Player Killing",
"Exclude from private chat",
"Exit",
"Experience",
"Filter list to match your level",
"Filter list to match your vocation",
"Find:",
"Filters",
"Find",
"Fishing",
"Fist Fighting",
"Follow",
"Force Exit",
"Formula",
"For Your Information",
"Free Account",
"Fullscreen",
"Game",
"Game framerate limit: %s",
"Global ignore settings",
"Global whitelist settings",
"Graphics",
"Graphics card driver not detected",
"Graphics Engine:",
"Group",
"Head",
"Healing",
"Health Info",
@@ -146,43 +182,50 @@ neededTranslations = {
"Hide spells for higher exp. levels",
"Hide spells for other vocations",
"Hit Points",
"Hold left mouse button to navigate\nScroll mouse middle button to zoom\nRight mouse button to create map marks",
"Hold left mouse button to navigate\nScroll mouse middle button to zoom\nRight mouse button to create map marks\nPress Ctrl+Shift+M to view the entire game map",
"Host",
"Hotkey delay: %dms",
"Hotkey delay: %sms",
"Hotkeys",
"If you shut down the program, your character might stay in the game.\nClick on 'Logout' to ensure that you character leaves the game properly.\nClick on 'Exit' if you want to exit the program without logging out your character.",
"Ignore",
"Ignore capacity",
"Ignored players:",
"Ignored Players",
"Ignore equipped",
"Ignore List",
"Ignore players",
"Ignore Private Messages",
"Ignore Yelling",
"Interface framerate limit: %s",
"Invalid authentification token.",
"Inventory",
"Invite to Party",
"Invite to private chat",
"IP Address Banishment",
"Item Name",
"Item Offers",
"It is empty.",
"Join %s\'s Party",
"Knight",
"Leave Party",
"Level",
"Life Leech Amount",
"Life Leech Chance",
"Lifetime Premium Account",
"Limits FPS to 60",
"List of items that you're able to buy",
"List of items that you're able to sell",
"Load",
"Logging out...",
"Login",
"Login Error",
"Login Error",
"Logout",
"Look",
"Magic Level",
"Make sure that your client uses\nthe correct game protocol version",
"Make sure that your client uses\nthe correct game client version",
"Mana",
"Manage hotkeys:",
"Market",
"Market Error",
"Market Offers",
"Message of the day",
"Message to ",
@@ -193,11 +236,14 @@ neededTranslations = {
"Mount",
"Move Stackable Item",
"Move up",
"Music volume: %d",
"My Offers",
"Name:",
"Name",
"Name Report",
"Name Report + Banishment",
"Name Report + Banishment + Final Warning",
"New Server",
"Next level in %d hours and %d minutes",
"No",
"No graphics card detected, everything will be drawn using the CPU,\nthus the performance will be really bad.\nPlease update your graphics driver to have a better performance.",
"No item selected.",
@@ -205,39 +251,47 @@ neededTranslations = {
"No Outfit",
"No statement has been selected.",
"Notation",
"Notify-Login",
"NPC Trade",
"Offer History",
"Offers",
"Offer Type:",
"Offer Type",
"Offline Training",
"Ok",
"on %s.\n",
"Open",
"Open a private message channel:",
"Open a private message channel",
"Open charlist automatically when starting client",
"Open in new window",
"Open new channel",
"Open purse",
"Open PvP",
"Open PvP Situations",
"Options",
"Overview",
"Paladin",
"Pass Leadership to %s",
"Password",
"Piece Price:",
"Please enter a character name:",
"Piece Price",
"Please enter a character name",
"Please, press the key you wish to add onto your hotkeys manager",
"Please Select",
"Please state the rule violation in one clear sentence and wait for a reply from a gamemaster. Please note that your message will disappear if you close the channel.",
"Please use this dialog to only report bugs. Do not report rule violations here!",
"Please wait",
"Please wait patiently for a gamemaster to reply",
"Port",
"Position:",
"Position: %i %i %i",
"Position",
"Premium",
"Premium Account (%s) days left",
"Price:",
"Price",
"Primary",
"Process",
"Protocol",
"Quest Log",
"Randomize",
"Randomize characters outfit",
"Reason:",
"Reason",
"Refresh",
"Refresh Offers",
"Regeneration Time",
@@ -245,31 +299,46 @@ neededTranslations = {
"Reload All",
"Remember account and password when starts client",
"Remember password",
"Remove ",
"Remove",
"Remove %s",
"Report Bug",
"Report Rule",
"Report Rule Violation",
"Reserved for more functionality later.",
"Reset All",
"Reset Market",
"Reset selection, filters & search",
"Revoke %s\'s Invitation",
"Rotate",
"Rule Violation",
"Rule Violations",
"Save",
"Save Messages",
"Search:",
"Search",
"Search all items",
"Secondary",
"Select",
"Select all",
"Select object",
"Select Outfit",
"Select your language",
"Sell",
"Sell All",
"Seller Name",
"Sell Now",
"Sell Offers",
"Send",
"Send automatically",
"Send Message",
"Server",
"Server list",
"Server List",
"Server Log",
"Set Outfit",
"%s has finished the request",
"%s has logged in.",
"%s has logged out.",
"Shielding",
"Show all items",
"Show connection ping",
@@ -286,8 +355,15 @@ neededTranslations = {
"Show status messages in console",
"Show Text",
"Show timestamps in console",
"Show Top Menu",
"Show your depot items only",
"Skills",
"Skull Time",
"%s of experience left",
"Sorcerer",
"Sort by name",
"Sort by status",
"Sort by type",
"Soul",
"Soul Points",
"Special",
@@ -295,9 +371,10 @@ neededTranslations = {
"Spell Cooldowns",
"Spell List",
"Stamina",
"Statement:",
"Statement",
"Statement Report",
"Statistics",
"Stay logged during session",
"Stop Attack",
"Stop Follow",
"Support",
@@ -308,17 +385,23 @@ neededTranslations = {
"Sword Fighting",
"Terminal",
"There is no way.",
"Title",
"Total Price:",
"This offer is 25%% above the average market price",
"This offer is 25%% below the average market price",
"Total Price",
"Trade",
"Trade with ...",
"Trying to reconnect in %s seconds.",
"Turn delay: %dms",
"Turn delay: %sms",
"Two-Factor Authentification",
"Type",
"Unable to load dat file, please place a valid dat in '%s'",
"Unable to load spr file, please place a valid spr in '%s'",
"Unable to logout.",
"Unignore",
"Unjustified Points",
"Unload",
"Update needed",
"Update needed",
"Use",
"Use on target",
"Use on yourself",
@@ -329,7 +412,8 @@ neededTranslations = {
"Vocation",
"Waiting List",
"Website",
"Weight:",
"Weight",
"Will boost your walk on high speed characters",
"Will detect when to use diagonal step based on the\nkeys you are pressing",
"With crosshair",
"Yes",
@@ -358,8 +442,13 @@ neededTranslations = {
"You must enter a comment.",
"You must enter a valid server address and port.",
"You must select a character to login!",
"Your Capacity:",
"You must select an action.",
"You must select a reason.",
"Your Capacity",
"Your client needs updating, try redownloading it.",
"Your connection has been lost.\nEither your network or the server went down.",
"You read the following, written by \n%s\n",
"You read the following, written on \n%s.\n",
"Your Money:",
"Your Money",
"Your request has been closed",
}

View File

@@ -2,7 +2,7 @@ Module
name: client_modulemanager
description: Manage other modules
author: edubart
website: www.otclient.info
website: https://github.com/edubart/otclient
sandboxed: true
scripts: [ modulemanager ]
dependencies: [ client_topmenu ]

View File

@@ -34,15 +34,59 @@ Panel
id: displayHealth
!text: tr('Display creature health bars')
OptionCheckBox
id: displayMana
!text: tr('Display player mana bar')
OptionCheckBox
id: displayText
!text: tr('Display text messages')
Label
id: turnDelayLabel
!text: tr('Turn delay: %sms', 30)
anchors.left: parent.left
anchors.right: parent.right
anchors.top: prev.bottom
margin-top: 12
@onSetup: |
local value = modules.client_options.getOption('turnDelay')
self:setText(tr('Turn delay: %dms', value))
OptionScrollbar
id: turnDelay
anchors.left: parent.left
anchors.right: parent.right
anchors.top: prev.bottom
margin-top: 3
minimum: 30
maximum: 250
Label
id: hotkeyDelayLabel
!text: tr('Hotkey delay: %dms', 30)
anchors.left: parent.left
anchors.right: parent.right
anchors.top: prev.bottom
margin-top: 12
@onSetup: |
local value = modules.client_options.getOption('hotkeyDelay')
self:setText(tr('Hotkey delay: %dms', value))
OptionScrollbar
id: hotkeyDelay
anchors.left: parent.left
anchors.right: parent.right
anchors.top: prev.bottom
margin-top: 3
minimum: 30
maximum: 250
Button
id: changeLocale
!text: tr('Change language')
@onClick: modules.client_locales.createWindow()
anchors.top: prev.bottom
anchors.left: prev.left
margin-top: 5
margin-top: 12
width: 120

View File

@@ -25,8 +25,11 @@ local defaultOptions = {
ambientLight = 25,
displayNames = true,
displayHealth = true,
displayMana = true,
displayText = true,
dontStretchShrink = false
dontStretchShrink = false,
turnDelay = 50,
hotkeyDelay = 50,
}
local optionsWindow
@@ -106,8 +109,8 @@ function init()
graphicsPanel = g_ui.loadUI('graphics')
optionsTabBar:addTab(tr('Graphics'), graphicsPanel, '/images/optionstab/graphics')
audioPanel = g_ui.loadUI('audio')
optionsTabBar:addTab(tr('Audio'), audioPanel, '/images/optionstab/audio')
soundPanel = g_ui.loadUI('audio')
optionsTabBar:addTab(tr('Audio'), soundPanel, '/images/optionstab/audio')
optionsButton = modules.client_topmenu.addLeftButton('optionsButton', tr('Options'), '/images/topbuttons/options', toggle)
audioButton = modules.client_topmenu.addLeftButton('audioButton', tr('Audio'), '/images/topbuttons/audio', function() toggleOption('enableAudio') end)
@@ -155,15 +158,17 @@ function hide()
end
function toggleDisplays()
if options['displayNames'] and options['displayHealth'] then
if options['displayNames'] and options['displayHealth'] and options['displayMana'] then
setOption('displayNames', false)
elseif options['displayHealth'] then
setOption('displayHealth', false)
setOption('displayMana', false)
else
if not options['displayNames'] and not options['displayHealth'] then
setOption('displayNames', true)
else
setOption('displayHealth', true)
setOption('displayMana', true)
end
end
end
@@ -185,17 +190,23 @@ function setOption(key, value, force)
elseif key == 'fullscreen' then
g_window.setFullscreen(value)
elseif key == 'enableAudio' then
if g_sounds then
g_sounds.setAudioEnabled(value)
end
if value then
audioButton:setIcon('/images/topbuttons/audio')
else
audioButton:setIcon('/images/topbuttons/audio_mute')
end
elseif key == 'enableMusicSound' then
if g_sounds then
g_sounds.getChannel(SoundChannels.Music):setEnabled(value)
end
elseif key == 'musicSoundVolume' then
if g_sounds then
g_sounds.getChannel(SoundChannels.Music):setGain(value/100)
audioPanel:getChildById('musicSoundVolumeLabel'):setText(tr('Music volume: %d', value))
end
soundPanel:getChildById('musicSoundVolumeLabel'):setText(tr('Music volume: %d', value))
elseif key == 'showLeftPanel' then
modules.game_interface.getLeftPanel():setOn(value)
elseif key == 'backgroundFrameRate' then
@@ -222,12 +233,18 @@ function setOption(key, value, force)
gameMapPanel:setDrawNames(value)
elseif key == 'displayHealth' then
gameMapPanel:setDrawHealthBars(value)
elseif key == 'displayMana' then
gameMapPanel:setDrawManaBar(value)
elseif key == 'displayText' then
gameMapPanel:setDrawTexts(value)
elseif key == 'dontStretchShrink' then
addEvent(function()
modules.game_interface.updateStretchShrink()
end)
elseif key == 'turnDelay' then
generalPanel:getChildById('turnDelayLabel'):setText(tr('Turn delay: %sms', value))
elseif key == 'hotkeyDelay' then
generalPanel:getChildById('hotkeyDelayLabel'):setText(tr('Hotkey delay: %sms', value))
end
-- change value for keybind updates

View File

@@ -2,7 +2,7 @@ Module
name: client_options
description: Create the options window
author: edubart, BeniS
website: www.otclient.info
website: https://github.com/edubart/otclient
sandboxed: true
scripts: [ options ]
@onLoad: init()

View File

@@ -2,7 +2,7 @@ Module
name: client_serverlist
description: Manages a server list of previously entered servers
author: BeniS
website: www.otclient.info
website: https://github.com/edubart/otclient
dependencies:
- client_entergame

View File

@@ -65,33 +65,33 @@ function onConnect(protocol)
end
local post = ''
post = post .. 'uid=' .. UUID
post = post .. 'uid=' .. urlencode(UUID)
post = post .. '&report_delay=' .. REPORT_DELAY
post = post .. '&os=' .. g_app.getOs()
post = post .. '&graphics_vendor=' .. g_graphics.getVendor()
post = post .. '&graphics_renderer=' .. g_graphics.getRenderer()
post = post .. '&graphics_version=' .. g_graphics.getVersion()
post = post .. '&painter_engine=' .. g_graphics.getPainterEngine()
post = post .. '&fps=' .. g_app.getBackgroundPaneFps()
post = post .. '&max_fps=' .. g_app.getBackgroundPaneMaxFps()
post = post .. '&fullscreen=' .. tostring(g_window.isFullscreen())
post = post .. '&window_width=' .. g_window.getWidth()
post = post .. '&window_height=' .. g_window.getHeight()
post = post .. '&player_name=' .. g_game.getCharacterName()
post = post .. '&world_name=' .. g_game.getWorldName()
post = post .. '&otserv_host=' .. G.host
post = post .. '&os=' .. urlencode(g_app.getOs())
post = post .. '&graphics_vendor=' .. urlencode(g_graphics.getVendor())
post = post .. '&graphics_renderer=' .. urlencode(g_graphics.getRenderer())
post = post .. '&graphics_version=' .. urlencode(g_graphics.getVersion())
post = post .. '&painter_engine=' .. urlencode(g_graphics.getPainterEngine())
post = post .. '&fps=' .. urlencode(g_app.getBackgroundPaneFps())
post = post .. '&max_fps=' .. urlencode(g_app.getBackgroundPaneMaxFps())
post = post .. '&fullscreen=' .. urlencode(tostring(g_window.isFullscreen()))
post = post .. '&window_width=' .. urlencode(g_window.getWidth())
post = post .. '&window_height=' .. urlencode(g_window.getHeight())
post = post .. '&player_name=' .. urlencode(g_game.getCharacterName())
post = post .. '&world_name=' .. urlencode(g_game.getWorldName())
post = post .. '&otserv_host=' .. urlencode(G.host)
post = post .. '&otserv_port=' .. G.port
post = post .. '&otserv_protocol=' .. g_game.getProtocolVersion()
post = post .. '&otserv_client=' .. g_game.getClientVersion()
post = post .. '&build_version=' .. g_app.getVersion()
post = post .. '&build_revision=' .. g_app.getBuildRevision()
post = post .. '&build_commit=' .. g_app.getBuildCommit()
post = post .. '&build_date=' .. g_app.getBuildDate()
post = post .. '&otserv_protocol=' .. urlencode(g_game.getProtocolVersion())
post = post .. '&otserv_client=' .. urlencode(g_game.getClientVersion())
post = post .. '&build_version=' .. urlencode(g_app.getVersion())
post = post .. '&build_revision=' .. urlencode(g_app.getBuildRevision())
post = post .. '&build_commit=' .. urlencode(g_app.getBuildCommit())
post = post .. '&build_date=' .. urlencode(g_app.getBuildDate())
post = post .. '&display_width=' .. g_window.getDisplayWidth()
post = post .. '&display_height=' .. g_window.getDisplayHeight()
post = post .. '&cpu=' .. g_platform.getCPUName()
post = post .. '&cpu=' .. urlencode(g_platform.getCPUName())
post = post .. '&mem=' .. g_platform.getTotalSystemMemory()
post = post .. '&os_name=' .. g_platform.getOSName()
post = post .. '&os_name=' .. urlencode(g_platform.getOSName())
post = post .. getAdditionalData()
local message = ''
@@ -121,3 +121,11 @@ end
function onError(protocol, message, code)
pdebug('Could not send statistics: ' .. message)
end
function urlencode(str)
local encodeChar=function(chr)
return string.format("%%%X",string.byte(chr))
end
local output, t = string.gsub(str,"[^%w]",encodeChar)
return output
end

View File

@@ -2,7 +2,7 @@ Module
name: client_stats
description: Sends client statistics to a server
author: baxnie
website: www.otclient.info
website: https://github.com/edubart/otclient
sandboxed: true
scripts: [ stats ]
@onLoad: init()

View File

@@ -2,7 +2,7 @@ Module
name: client_styles
description: Load client fonts and styles
author: edubart
website: www.otclient.info
website: https://github.com/edubart/otclient
scripts: [ styles ]
sandboxed: true
@onLoad: init()

View File

@@ -2,7 +2,7 @@ Module
name: client_terminal
description: Terminal for executing lua functions
author: edubart
website: www.otclient.info
website: https://github.com/edubart/otclient
scripts: [ terminal ]
sandboxed: true
@onLoad: init()

View File

@@ -51,6 +51,8 @@ function init()
pingLabel = topMenu:getChildById('pingLabel')
fpsLabel = topMenu:getChildById('fpsLabel')
g_keyboard.bindKeyDown('Ctrl+Shift+T', toggle)
if g_game.isOnline() then
online()
end
@@ -164,3 +166,22 @@ end
function getTopMenu()
return topMenu
end
function toggle()
local menu = getTopMenu()
if not menu then
return
end
if menu:isVisible() then
menu:hide()
modules.client_background.getBackground():addAnchor(AnchorTop, 'parent', AnchorTop)
modules.game_interface.getRootPanel():addAnchor(AnchorTop, 'parent', AnchorTop)
modules.game_interface.getShowTopMenuButton():show()
else
menu:show()
modules.client_background.getBackground():addAnchor(AnchorTop, 'topMenu', AnchorBottom)
modules.game_interface.getRootPanel():addAnchor(AnchorTop, 'topMenu', AnchorBottom)
modules.game_interface.getShowTopMenuButton():hide()
end
end

View File

@@ -2,7 +2,7 @@ Module
name: client_topmenu
description: Create the top menu
author: edubart
website: www.otclient.info
website: https://github.com/edubart/otclient
scripts: [ topmenu ]
sandboxed: true
@onLoad: init()

View File

@@ -2,7 +2,7 @@ Module
name: corelib
description: Contains core lua classes, functions and constants used by other modules
author: OTClient team
website: www.otclient.info
website: https://github.com/edubart/otclient
reloadable: false
@onLoad: |

View File

@@ -26,6 +26,11 @@ local function retranslateKeyComboDesc(keyComboDesc)
if keyComboDesc == nil then
error('Unable to translate key combo \'' .. keyComboDesc .. '\'')
end
if type(keyComboDesc) == 'number' then
keyComboDesc = tostring(keyComboDesc)
end
local keyCombo = {}
for i,currentKeyDesc in ipairs(keyComboDesc:split('+')) do
for keyCode, keyDesc in pairs(KeyCodeDescs) do

View File

@@ -10,13 +10,24 @@ local function moveToolTip(first)
if not first and (not toolTipLabel:isVisible() or toolTipLabel:getOpacity() < 0.1) then return end
local pos = g_window.getMousePosition()
local windowSize = g_window.getSize()
local labelSize = toolTipLabel:getSize()
pos.x = pos.x + 1
pos.y = pos.y + 1
local xdif = g_window.getSize().width - (pos.x + toolTipLabel:getWidth())
if xdif < 10 then
pos.x = pos.x - toolTipLabel:getWidth() - 3
if windowSize.width - (pos.x + labelSize.width) < 10 then
pos.x = pos.x - labelSize.width - 3
else
pos.x = pos.x + 10
end
if windowSize.height - (pos.y + labelSize.height) < 10 then
pos.y = pos.y - labelSize.height - 3
else
pos.y = pos.y + 10
end
toolTipLabel:setPosition(pos)
end
@@ -51,7 +62,6 @@ function g_tooltip.init()
toolTipLabel:setBackgroundColor('#111111cc')
toolTipLabel:setTextAlign(AlignCenter)
toolTipLabel:hide()
toolTipLabel.onMouseMove = function() moveToolTip() end
end)
end
@@ -78,10 +88,18 @@ function g_tooltip.display(text)
toolTipLabel:enable()
g_effects.fadeIn(toolTipLabel, 100)
moveToolTip(true)
connect(rootWidget, {
onMouseMove = moveToolTip,
})
end
function g_tooltip.hide()
g_effects.fadeOut(toolTipLabel, 100)
disconnect(rootWidget, {
onMouseMove = moveToolTip,
})
end

View File

@@ -19,13 +19,14 @@ function UIComboBox:clearOptions()
self:clearText()
end
function UIComboBox:getOption(text)
if not self.options then return nil end
function UIComboBox:isOption(text)
if not self.options then return false end
for i,v in ipairs(self.options) do
if v.text == text then
return nil
return true
end
end
return false
end
function UIComboBox:setOption(text, dontSignal)

View File

@@ -3,6 +3,7 @@ UIMiniWindow = extends(UIWindow, "UIMiniWindow")
function UIMiniWindow.create()
local miniwindow = UIMiniWindow.internalCreate()
miniwindow.UIMiniWindowContainer = true
return miniwindow
end

View File

@@ -69,7 +69,7 @@ function UIMiniWindowContainer:fitAll(noRemoveChild)
end
local child = children[i]
if child ~= noRemoveChild then
if child ~= noRemoveChild and child:isVisible() then
local childHeight = child:getHeight()
sumHeight = sumHeight - childHeight
table.insert(removeChildren, child)
@@ -83,7 +83,7 @@ function UIMiniWindowContainer:fitAll(noRemoveChild)
end
function UIMiniWindowContainer:onDrop(widget, mousePos)
if widget:getClassName() == 'UIMiniWindow' then
if widget.UIMiniWindowContainer then
local oldParent = widget:getParent()
if oldParent == self then
return true

View File

@@ -334,9 +334,12 @@ function UIMoveableTabBar:removeTab(tab)
end
if self.currentTab == tab then
self:selectPrevTab()
if #self.tabs == 1 then
self.currentTab = nil
elseif index == #self.tabs then
self:selectPrevTab()
else
self:selectNextTab()
end
end
table.remove(tabTable, index)
@@ -385,6 +388,11 @@ function UIMoveableTabBar:selectTab(tab)
tab:setOn(false)
tab.blinking = false
if tab.blinkEvent then
removeEvent(tab.blinkEvent)
tab.blinkEvent = nil
end
local parent = tab:getParent()
parent:focusChild(tab, MouseFocusReason)
updateNavigation(self)

View File

@@ -126,8 +126,8 @@ end
function UIScrollBar:onSetup()
self.setupDone = true
local sliderButton = self:getChildById('sliderButton')
g_mouse.bindAutoPress(self:getChildById('decrementButton'), function() self:decrement() end, 300)
g_mouse.bindAutoPress(self:getChildById('incrementButton'), function() self:increment() end, 300)
g_mouse.bindAutoPress(self:getChildById('decrementButton'), function() self:onDecrement() end, 300)
g_mouse.bindAutoPress(self:getChildById('incrementButton'), function() self:onIncrement() end, 300)
g_mouse.bindPressMove(sliderButton, function(mousePos, mouseMoved) parseSliderPos(self, sliderButton, mousePos, mouseMoved) end)
g_mouse.bindPress(sliderButton, function(mousePos, mouseButton) parseSliderPress(self, sliderButton, mousePos, mouseButton) end)
@@ -158,6 +158,26 @@ function UIScrollBar:onStyleApply(styleName, styleNode)
end
end
function UIScrollBar:onDecrement()
if g_keyboard.isCtrlPressed() then
self:decrement(self.value)
elseif g_keyboard.isShiftPressed() then
self:decrement(10)
else
self:decrement()
end
end
function UIScrollBar:onIncrement()
if g_keyboard.isCtrlPressed() then
self:increment(self.maximum)
elseif g_keyboard.isShiftPressed() then
self:increment(10)
else
self:increment()
end
end
function UIScrollBar:decrement(count)
count = count or self.step
self:setValue(self.value - count)

View File

@@ -77,7 +77,13 @@ function UITabBar:removeTab(tab)
local index = table.find(self.tabs, tab)
if index == nil then return end
if self.currentTab == tab then
if #self.tabs == 1 then
self.currentTab = nil
elseif index == #self.tabs then
self:selectPrevTab()
else
self:selectNextTab()
end
end
table.remove(self.tabs, index)
tab:destroy()

View File

@@ -244,7 +244,11 @@ function doCreatureFitFilters(creature)
local localPlayer = g_game.getLocalPlayer()
if pos.z ~= localPlayer:getPosition().z or not creature:canBeSeen() then return false end
return true
end
function doShowCreatureAtBattle(creature)
if doCreatureFitFilters(creature) then
local hidePlayers = hidePlayersButton:isChecked()
local hideNPCs = hideNPCsButton:isChecked()
local hideMonsters = hideMonstersButton:isChecked()
@@ -264,6 +268,8 @@ function doCreatureFitFilters(creature)
end
return true
end
return false
end
function onCreatureHealthPercentChange(creature, health)
@@ -452,7 +458,7 @@ function addCreature(creature)
end
local localPlayer = g_game.getLocalPlayer()
battleButton:setVisible(localPlayer:hasSight(creature:getPosition()) and creature:canBeSeen())
battleButton:setVisible(localPlayer:hasSight(creature:getPosition()) and creature:canBeSeen() and doShowCreatureAtBattle(creature))
end
function removeAllCreatures()
@@ -484,10 +490,10 @@ function onBattleButtonMouseRelease(self, mousePosition, mouseButton)
if ((g_mouse.isPressed(MouseLeftButton) and mouseButton == MouseRightButton)
or (g_mouse.isPressed(MouseRightButton) and mouseButton == MouseLeftButton)) then
mouseWidget.cancelNextRelease = true
g_game.look(self.creature)
g_game.look(self.creature, true)
return true
elseif mouseButton == MouseLeftButton and g_keyboard.isShiftPressed() then
g_game.look(self.creature)
g_game.look(self.creature, true)
return true
elseif mouseButton == MouseRightButton and not g_mouse.isPressed(MouseLeftButton) then
modules.game_interface.createThingMenu(mousePosition, nil, nil, self.creature)

View File

@@ -2,7 +2,7 @@ Module
name: game_battle
description: Manage battle window
author: andrefaramir, BeniS
website: www.otclient.info
website: https://github.com/edubart/otclient
sandboxed: true
scripts: [ battle ]
@onLoad: init()

View File

@@ -2,7 +2,7 @@ Module
name: game_bugreport
description: Bug report interface (Ctrl+Z)
author: edubart
website: www.otclient.info
website: https://github.com/edubart/otclient
scripts: [ bugreport ]
sandboxed: true
@onLoad: init()

View File

@@ -2,7 +2,7 @@ Module
name: game_combatcontrols
description: Combat controls window
author: edubart, BeniS
website: www.otclient.info
website: https://github.com/edubart/otclient
sandboxed: true
scripts: [ combatcontrols ]
@onLoad: init()

View File

@@ -25,7 +25,7 @@ MainWindow
Label
id: openPrivateChannelWithLabel
!text: tr('Open a private message channel:')
!text: tr('Open a private message channel') .. ':'
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: next.top

View File

@@ -35,7 +35,7 @@ MainWindow
width: 180
Label
!text: tr('Ignored Players:')
!text: tr('Ignored Players') .. ':'
anchors.left: parent.left
anchors.top: prev.bottom
margin-top: 10
@@ -108,7 +108,7 @@ MainWindow
width: 180
Label
!text: tr('Allowed Players:')
!text: tr('Allowed Players') .. ':'
anchors.top: prev.bottom
anchors.left: prev.left
margin-top: 10

View File

@@ -52,6 +52,13 @@ SayModes = {
[3] = { speakTypeDesc = 'yell', icon = '/images/game/console/yell' }
}
ChannelEventFormats = {
[ChannelEvent.Join] = '%s joined the channel.',
[ChannelEvent.Leave] = '%s left the channel.',
[ChannelEvent.Invite] = '%s has been invited to the channel.',
[ChannelEvent.Exclude] = '%s has been removed from the channel.',
}
MAX_HISTORY = 500
MAX_LINES = 100
HELP_CHANNEL = 9
@@ -98,7 +105,8 @@ function init()
onRuleViolationCancel = onRuleViolationCancel,
onRuleViolationLock = onRuleViolationLock,
onGameStart = online,
onGameEnd = offline
onGameEnd = offline,
onChannelEvent = onChannelEvent,
})
consolePanel = g_ui.loadUI('console', modules.game_interface.getBottomPanel())
@@ -240,7 +248,8 @@ function terminate()
onRuleViolationCancel = onRuleViolationCancel,
onRuleViolationLock = onRuleViolationLock,
onGameStart = online,
onGameEnd = offline
onGameEnd = offline,
onChannelEvent = onChannelEvent,
})
if g_game.isOnline() then clear() end
@@ -544,6 +553,8 @@ function addTabText(text, speaktype, tab, creatureName)
label:setColor(speaktype.color)
consoleTabBar:blinkTab(tab)
label.highlightInfo = {}
-- Overlay for consoleBuffer which shows highlighted words only
if speaktype.npcChat and (g_game.getCharacterName() ~= creatureName or g_game.getCharacterName() == 'Account Manager') then
@@ -573,6 +584,10 @@ function addTabText(text, speaktype, tab, creatureName)
local dataBlock = { _start = highlightData[(i-1)*3+1], _end = highlightData[(i-1)*3+2], words = highlightData[(i-1)*3+3] }
local lastBlockEnd = (highlightData[(i-2)*3+2] or 1)
for i = dataBlock._start, dataBlock._end do
label.highlightInfo[i] = dataBlock.words
end
for letter = lastBlockEnd, dataBlock._start-1 do
local tmpChar = string.byte(drawText:sub(letter, letter))
local fillChar = (tmpChar == 10 or tmpChar == 32) and string.char(tmpChar) or string.char(127)
@@ -600,8 +615,15 @@ function addTabText(text, speaktype, tab, creatureName)
processMessageMenu(mousePos, mouseButton, nil, nil, nil, tab)
end
label.onMouseRelease = function(self, mousePos, mouseButton)
if mouseButton == MouseLeftButton then
local position = label:getTextPos(mousePos)
if position and label.highlightInfo[position] then
sendMessage(label.highlightInfo[position], npcTab)
end
elseif mouseButton == MouseRightButton then
processMessageMenu(mousePos, mouseButton, creatureName, text, self, tab)
end
end
label.onMousePress = function(self, mousePos, button)
if button == MouseLeftButton then clearSelection(consoleBuffer) end
end
@@ -709,6 +731,8 @@ function processChannelTabMenu(tab, mousePos, mouseButton)
local menu = g_ui.createWidget('PopupMenu')
menu:setGameMenu(true)
local worldName = g_game.getWorldName()
local characterName = g_game.getCharacterName()
channelName = tab:getText()
if tab ~= defaultTab and tab ~= serverTab then
menu:addOption(tr('Close'), function() removeTab(channelName) end)
@@ -726,7 +750,7 @@ function processChannelTabMenu(tab, mousePos, mouseButton)
table.insert(lines, label:getText())
end
local filename = channelName .. '.txt'
local filename = worldName .. ' - ' .. characterName .. ' - ' .. channelName .. '.txt'
local filepath = '/' .. filename
-- extra information at the beginning
@@ -976,7 +1000,7 @@ function navigateMessageHistory(step)
end
function applyMessagePrefixies(name, level, message)
if name then
if name and #name > 0 then
if modules.client_options.getOption('showLevelsInConsole') and level > 0 then
message = name .. ' [' .. level .. ']: ' .. message
else
@@ -992,7 +1016,9 @@ function onTalk(name, level, mode, message, channelId, creaturePos)
return
end
if ignoreNpcMessages and mode == MessageModes.NpcFrom then return end
local isNpcMode = (mode == MessageModes.NpcFromStartBlock or mode == MessageModes.NpcFrom)
if ignoreNpcMessages and isNpcMode then return end
speaktype = SpeakTypes[mode]
@@ -1008,7 +1034,7 @@ function onTalk(name, level, mode, message, channelId, creaturePos)
if mode == MessageModes.Yell and isIgnoringYelling() then
return
elseif speaktype.private and isIgnoringPrivate() and mode ~= MessageModes.NpcFrom then
elseif speaktype.private and isIgnoringPrivate() and not isNpcMode then
return
elseif isIgnored(name) then
return
@@ -1026,7 +1052,7 @@ function onTalk(name, level, mode, message, channelId, creaturePos)
local staticText = StaticText.create()
-- Remove curly braces from screen message
local staticMessage = message
if mode == MessageModes.NpcFrom or mode == MessageModes.NpcFromStartBlock then
if isNpcMode then
local highlightData = getHighlightedText(staticMessage)
if #highlightData > 0 then
for i = 1, #highlightData / 3 do
@@ -1189,15 +1215,15 @@ function loadCommunicationSettings()
local ignoreNode = g_settings.getNode('IgnorePlayers')
if ignoreNode then
for i = 1, #ignoreNode do
table.insert(communicationSettings.ignoredPlayers, ignoreNode[i])
for _, player in pairs(ignoreNode) do
table.insert(communicationSettings.ignoredPlayers, player)
end
end
local whitelistNode = g_settings.getNode('WhitelistedPlayers')
if whitelistNode then
for i = 1, #whitelistNode do
table.insert(communicationSettings.whitelistedPlayers, whitelistNode[i])
for _, player in pairs(whitelistNode) do
table.insert(communicationSettings.whitelistedPlayers, player)
end
end
@@ -1433,3 +1459,19 @@ function offline()
end
clear()
end
function onChannelEvent(channelId, name, type)
local fmt = ChannelEventFormats[type]
if not fmt then
print(('Unknown channel event type (%d).'):format(type))
return
end
local channel = channels[channelId]
if channel then
local tab = getTab(channel)
if tab then
addTabText(fmt:format(name), SpeakTypesSettings.channelOrange, tab)
end
end
end

View File

@@ -2,7 +2,7 @@ Module
name: game_console
description: Manage chat window
author: edubart, andrefaramir, baxnie, sn4ake, BeniS
website: www.otclient.info
website: https://github.com/edubart/otclient
sandboxed: true
scripts: [ console ]
@onLoad: init()

View File

@@ -110,6 +110,7 @@ function onContainerOpen(container, previousContainer)
containerWindow:setText(name)
containerItemWidget:setItem(container:getContainerItem())
containerItemWidget:setPhantom(true)
containerPanel:destroyChildren()
for slot=0,container:getCapacity()-1 do

View File

@@ -2,7 +2,7 @@ Module
name: game_containers
description: Manage containers
author: edubart, baxnie
website: www.otclient.info
website: https://github.com/edubart/otclient
sandboxed: true
scripts: [containers]
@onLoad: init()

View File

@@ -2,7 +2,7 @@ Module
name: game_cooldown
description: Spellcooldowns
author: OTClient team
website: www.otclient.info
website: https://github.com/edubart/otclient
sandboxed: true
scripts: [ cooldown ]
@onLoad: init()

View File

@@ -2,7 +2,7 @@ Module
name: game_healthinfo
description: Displays health, mana points, soul points, and conditions
author: edubart, BeniS
website: www.otclient.info
website: https://github.com/edubart/otclient
sandboxed: true
scripts: [ healthinfo ]
@onLoad: init()

View File

@@ -36,6 +36,7 @@ useRadioGroup = nil
currentHotkeys = nil
boundCombosCallback = {}
hotkeysList = {}
lastHotkeyTime = g_clock.millis()
-- public functions
function init()
@@ -374,6 +375,12 @@ function doKeyCombo(keyCombo)
if not g_game.isOnline() then return end
local hotKey = hotkeyList[keyCombo]
if not hotKey then return end
if g_clock.millis() - lastHotkeyTime < modules.client_options.getOption('hotkeyDelay') then
return
end
lastHotkeyTime = g_clock.millis()
if hotKey.itemId == nil then
if not hotKey.value or #hotKey.value == 0 then return end
if hotKey.autoSend then

View File

@@ -2,7 +2,7 @@ Module
name: game_hotkeys
description: Manage client hotkeys
author: andrefaramir, BeniS
website: www.otclient.info
website: https://github.com/edubart/otclient
sandboxed: true
scripts: [ hotkeys_manager ]
@onLoad: init()

View File

@@ -18,7 +18,7 @@ MainWindow
Label
id: currentHotkeysLabel
!text: tr('Current hotkeys:')
!text: tr('Current hotkeys') .. ':'
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
@@ -70,7 +70,7 @@ MainWindow
Label
id: hotKeyTextLabel
!text: tr('Edit hotkey text:')
!text: tr('Edit hotkey text') .. ':'
enable: false
anchors.left: parent.left
anchors.right: parent.right

View File

@@ -5,6 +5,7 @@ gameMapPanel = nil
gameRightPanel = nil
gameLeftPanel = nil
gameBottomPanel = nil
showTopMenuButton = nil
logoutButton = nil
mouseGrabberWidget = nil
countWindow = nil
@@ -17,6 +18,7 @@ smartWalkDirs = {}
smartWalkDir = nil
walkFunction = nil
hookedMenuOptions = {}
lastDirTime = g_clock.millis()
function init()
g_ui.importStyle('styles/countwindow')
@@ -55,6 +57,11 @@ function init()
logoutButton = modules.client_topmenu.addLeftButton('logoutButton', tr('Exit'),
'/images/topbuttons/logout', tryLogout, true)
showTopMenuButton = gameMapPanel:getChildById('showTopMenuButton')
showTopMenuButton.onClick = function()
modules.client_topmenu.toggle()
end
setupViewMode(0)
bindKeys()
@@ -80,14 +87,15 @@ function bindKeys()
bindWalkKey('Numpad4', West)
bindWalkKey('Numpad7', NorthWest)
g_keyboard.bindKeyPress('Ctrl+Up', function() g_game.turn(North) changeWalkDir(North) end, gameRootPanel)
g_keyboard.bindKeyPress('Ctrl+Right', function() g_game.turn(East) changeWalkDir(East) end, gameRootPanel)
g_keyboard.bindKeyPress('Ctrl+Down', function() g_game.turn(South) changeWalkDir(South) end, gameRootPanel)
g_keyboard.bindKeyPress('Ctrl+Left', function() g_game.turn(West) changeWalkDir(West) end, gameRootPanel)
g_keyboard.bindKeyPress('Ctrl+Numpad8', function() g_game.turn(North) changeWalkDir(North) end, gameRootPanel)
g_keyboard.bindKeyPress('Ctrl+Numpad6', function() g_game.turn(East) changeWalkDir(East) end, gameRootPanel)
g_keyboard.bindKeyPress('Ctrl+Numpad2', function() g_game.turn(South) changeWalkDir(South) end, gameRootPanel)
g_keyboard.bindKeyPress('Ctrl+Numpad4', function() g_game.turn(West) changeWalkDir(West) end, gameRootPanel)
bindTurnKey('Ctrl+Up', North)
bindTurnKey('Ctrl+Right', East)
bindTurnKey('Ctrl+Down', South)
bindTurnKey('Ctrl+Left', West)
bindTurnKey('Ctrl+Numpad8', North)
bindTurnKey('Ctrl+Numpad6', East)
bindTurnKey('Ctrl+Numpad2', South)
bindTurnKey('Ctrl+Numpad4', West)
g_keyboard.bindKeyPress('Escape', function() g_game.cancelAttackAndFollow() end, gameRootPanel)
g_keyboard.bindKeyPress('Ctrl+=', function() gameMapPanel:zoomIn() end, gameRootPanel)
g_keyboard.bindKeyPress('Ctrl+-', function() gameMapPanel:zoomOut() end, gameRootPanel)
@@ -109,6 +117,19 @@ function unbindWalkKey(key)
g_keyboard.unbindKeyPress(key, gameRootPanel)
end
function bindTurnKey(key, dir)
local function callback(widget, code, repeatTicks)
if g_clock.millis() - lastDirTime >= modules.client_options.getOption('turnDelay') then
g_game.turn(dir)
changeWalkDir(dir)
lastDirTime = g_clock.millis()
end
end
g_keyboard.bindKeyPress(key, callback, gameRootPanel)
end
function terminate()
hide()
@@ -386,6 +407,11 @@ function onTradeWith(clickedWidget, mousePosition)
if tile then
g_game.requestTrade(selectedThing, tile:getTopCreature())
end
elseif clickedWidget:getClassName() == 'UICreatureButton' then
local creature = clickedWidget:getCreature()
if creature then
g_game.requestTrade(selectedThing, creature)
end
end
end
@@ -795,6 +821,10 @@ function getBottomPanel()
return gameBottomPanel
end
function getShowTopMenuButton()
return showTopMenuButton
end
function onLeftPanelVisibilityChange(leftPanel, visible)
if not visible and g_game.isOnline() then
local children = leftPanel:getChildren()

View File

@@ -1,4 +1,3 @@
GameSidePanel < UIMiniWindowContainer
image-source: /images/ui/panel_side
image-border: 4
@@ -33,6 +32,14 @@ UIWidget
anchors.bottom: gameBottomPanel.top
focusable: false
Button
id: showTopMenuButton
anchors.top: parent.top
anchors.left: parent.left
!text: tr('Show Top Menu')
height: 32
visible: false
GameBottomPanel
id: gameBottomPanel
anchors.left: gameLeftPanel.right

View File

@@ -2,7 +2,7 @@ Module
name: game_interface
description: Create the game interface, where the ingame stuff starts
author: OTClient team
website: www.otclient.info
website: https://github.com/edubart/otclient
sandboxed: true
scripts: [ widgets/uigamemap, widgets/uiitem, gameinterface ]
load-later:

View File

@@ -30,16 +30,30 @@ function UIGameMap:onDragLeave(droppedWidget, mousePos)
end
function UIGameMap:onDrop(widget, mousePos)
if not self:canAcceptDrop(widget, mousePos) then return false end
if not self:canAcceptDrop(widget, mousePos) then
return false
end
local tile = self:getTile(mousePos)
if not tile then return false end
if not tile then
return false
end
local thing = widget.currentDragThing
local toPos = tile:getPosition()
local thingPos = thing:getPosition()
if thingPos.x == toPos.x and thingPos.y == toPos.y and thingPos.z == toPos.z then return false end
if not thingPos then
return false
end
local thingTile = thing:getTile()
if thingPos.x ~= 65535 and not thingTile then
return false
end
local toPos = tile:getPosition()
if thingPos.x == toPos.x and thingPos.y == toPos.y and thingPos.z == toPos.z then
return false
end
if thing:isItem() and thing:getCount() > 1 then
modules.game_interface.moveStackableItem(thing, toPos)

View File

@@ -20,15 +20,26 @@ function UIItem:onDragLeave(droppedWidget, mousePos)
end
function UIItem:onDrop(widget, mousePos)
if not self:canAcceptDrop(widget, mousePos) then return false end
if not self:canAcceptDrop(widget, mousePos) then
return false
end
local item = widget.currentDragThing
if not item:isItem() then return false end
local toPos = self.position
if not item:isItem() then
return false
end
local itemPos = item:getPosition()
if itemPos.x == toPos.x and itemPos.y == toPos.y and itemPos.z == toPos.z then return false end
local itemTile = item:getTile()
if itemPos.x ~= 65535 and not itemTile then
return false
end
local toPos = self.position
if itemPos.x == toPos.x and itemPos.y == toPos.y and itemPos.z == toPos.z then
return false
end
if item:getCount() > 1 then
modules.game_interface.moveStackableItem(item, toPos)

View File

@@ -2,7 +2,7 @@ Module
name: game_inventory
description: View local player equipments window
author: baxnie, edubart, BeniS
website: www.otclient.info
website: https://github.com/edubart/otclient
sandboxed: true
scripts: [ inventory ]
@onLoad: init()

View File

@@ -990,6 +990,7 @@ function Market.close(notify)
if not marketWindow:isHidden() then
marketWindow:hide()
marketWindow:unlock()
modules.game_interface.getRootPanel():focus()
Market.clearSelectedItem()
Market.reset()
if notify then

Some files were not shown because too many files have changed in this diff Show More