From 6f12261aefa7afd84d62c33e9f317f888d143995 Mon Sep 17 00:00:00 2001 From: Eduardo Bart Date: Thu, 5 Jul 2012 17:03:41 -0300 Subject: [PATCH] Move otclientrc.lua to top dir * Use markdown for README --- .gitignore | 1 + README.rdoc => README.md | 37 ++++++++++++------------ init.lua | 8 +++-- modules/client/client.lua | 1 + modules/otclientrc.lua => otclientrc.lua | 2 +- 5 files changed, 26 insertions(+), 23 deletions(-) rename README.rdoc => README.md (78%) rename modules/otclientrc.lua => otclientrc.lua (65%) diff --git a/.gitignore b/.gitignore index 93093c5e..7faada40 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ CMakeLists.txt.user* *.otb *.otbm *.log +*.bak /modules/myconfig.otml /modules/myotclientrc.lua !.gitignore diff --git a/README.rdoc b/README.md similarity index 78% rename from README.rdoc rename to README.md index 9e88e16e..18017d7b 100644 --- a/README.rdoc +++ b/README.md @@ -1,4 +1,4 @@ -== What is OTClient? +### What is OTClient? OTClient is an alternative Tibia client for usage with otserv. It aims to be complete and flexible, for that it uses LUA scripting for all game interface functionality and configurations files with a syntax @@ -7,7 +7,7 @@ that each functionality is a separated module, giving the possibility to users m 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. -== Features +### Features Beyond of it's flexibility with scripts, otclient comes with tons of other features that make possible the creation of new client side stuff in otserv that was not possible before. These include, @@ -17,34 +17,33 @@ run on mobile platforms like Androi/iPhon/iPad and much more. Otclient is also f create tibia tools like map editors just using scripts, because it wasn't designed to be just a client, instead otclient was designed to be a combination of a framework and tibia APIs. -== Download +### Download Daily snapshots of otclient master branch compiled for Windows and protocol 860 is available in the {downloads section}[https://github.com/edubart/otclient/downloads] of the project's github page. For any other platform or protocol you will need to compile the source code. Currently Linux/Windows platforms and protocols 860/861/862 are supported. -== Compiling +### Compiling In short, if you need to compile OTClient, follow these tutorials: -* {Compiling on Windows}[http://otclient.info/index.php?app=ccs&module=pages§ion=pages&id=2&record=9] -* {Compiling on Ubuntu}[http://otclient.info/index.php?app=ccs&module=pages§ion=pages&id=2&record=12] +* [Compiling on Windows](http://otclient.info/index.php?app=ccs&module=pages§ion=pages&id=2&record=9) +* [Compiling on Ubuntu](http://otclient.info/index.php?app=ccs&module=pages§ion=pages&id=2&record=12) -== Need help? +### Need help? -Checkout our website at {http://otclient.info}[http://otclient.info/] for tutorials and more information. +Checkout our website at for tutorials and more information. If you have any questions or are looking for more information, please feel free to ask on our official -forum at http://otclient.info or talk with us at #otclient irc.freenode.net +forum at or talk with us at #otclient irc.freenode.net -== Bugs +### Bugs -Have found a bug? Please create an issue in our bug tracker -http://otclient.info/tracker +Have found a bug? Please create an issue in our [bug tracker](http://otclient.info/tracker) -== Contributing +### Contributing We encourage you to contribute to OTClient! Please check out -{our website}[http://otclient.info/] for guidelines about how to proceed. Join us! +[our website](http://otclient.info/) for guidelines about how to proceed. Join us! We are currently needing help in the following areas: * Designing new UI themes or improving the current one @@ -55,18 +54,18 @@ We are currently needing help in the following areas: * Spreading otclient project over the web and bring it to new possible contributors * Testing the client itself to report bugs and missing features in our bug tracker -== Contact +### Contact -You have 3 options, use the forum at http://otclient.info , talk directly with us at -#otclient irc.freenode.net or send an email directly to the project leader edub4rt@gmail.com +You have 3 options, use the forum at http://otclient.info , talk directly with us at #otclient irc.freenode.net +or send an email directly to the project leader edub4rt@gmail.com -== License +### License OTClient is made available under the MIT License, thus this means that you are free to do whatever you want, commercial, non-commercial, closed or open. -== Donate +### Donate OTClient needs your support, if you really like and use it, please donate. Anyone can donate by clicking the Donate button in otclient website. We might prioritize features diff --git a/init.lua b/init.lua index e597ef30..73bb6f26 100644 --- a/init.lua +++ b/init.lua @@ -12,9 +12,12 @@ g_logger.setLogFile(g_resources.getWorkDir() .. g_app.getCompactName() .. ".log" -- print first terminal message g_logger.info(g_app.getName() .. ' ' .. g_app.getVersion() .. ' (rev ' .. g_app.getBuildRevision() .. ') built on ' .. g_app.getBuildDate()) +--add base folder to search path +g_resources.addToSearchPath(g_resources.getWorkDir()) + -- add modules directory to the search path if not g_resources.addToSearchPath(g_resources.getWorkDir() .. "modules", true) then - g_logger.fatal("Unable to add modules directory to the search path.") + g_logger.fatal("Unable to add modules directory to the search path.") end -- try to add addons path too @@ -44,6 +47,5 @@ g_modules.ensureModuleLoaded("game") g_modules.autoLoadModules(9999) if g_resources.fileExists("/otclientrc.lua") then - dofile("/otclientrc.lua") + dofile("/otclientrc.lua") end - diff --git a/modules/client/client.lua b/modules/client/client.lua index cb5476d6..1ba09a2a 100644 --- a/modules/client/client.lua +++ b/modules/client/client.lua @@ -34,6 +34,7 @@ function Client.init() g_window.setTitle('OTClient') g_window.setIcon(resolvepath('clienticon.png')) + g_keyboard.bindKeyDown('Ctrl+Shift+R', Client.reloadScripts) addEvent(function() scheduleEvent(function() diff --git a/modules/otclientrc.lua b/otclientrc.lua similarity index 65% rename from modules/otclientrc.lua rename to otclientrc.lua index ee2fec84..b8b0805b 100644 --- a/modules/otclientrc.lua +++ b/otclientrc.lua @@ -1,4 +1,4 @@ -- this file is loaded after all modules are loaded and initialized -- you can place any custom user code here -g_keyboard.bindKeyDown('Ctrl+Shift+R', Client.reloadScripts) \ No newline at end of file +print 'Startup done :]'