Code Monkey home page Code Monkey logo

forgottenserver's Introduction

forgottenserver Build Status Build Status

The Forgotten Server is a free and open-source MMORPG server emulator written in C++. It is a fork of the OpenTibia Server project. To connect to the server, you can use OTClient.

Getting Started

Support

If you need help, please visit the support forum on OTLand. Our issue tracker is not a support forum, and using it as one will result in your issue being closed. If you were unable to get assistance in the support forum, you should consider becoming a premium user on OTLand which grants you access to the premium support forum and supports OTLand financially.

Issues

We use the issue tracker on GitHub. Keep in mind that everyone who is watching the repository gets notified by e-mail when there is activity, so be thoughtful and avoid writing comments that aren't meaningful for an issue (e.g. "+1"). If you'd like for an issue to be fixed faster, you should either fix it yourself and submit a pull request, or place a bounty on the issue.

forgottenserver's People

Contributors

arturknopik avatar asamy avatar comedinha avatar cosmosbr avatar dalkon avatar danyelvarejao avatar dbjorkholm avatar djarek avatar dspeichert avatar epuncker avatar erza avatar evilhero90 avatar kornholi avatar marksamman avatar marmichalski avatar millhiorebt avatar mkalo avatar nclx avatar nekiro avatar omarcopires avatar ramon-bernardo avatar ranisalt avatar raymondtfr avatar reyaleman avatar ronpetit avatar rookgaard avatar wibbenz avatar yamaken93 avatar zbizu avatar znote avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

forgottenserver's Issues

House message

"You have successfully bought this house, be sure to have the money for the rent in the bsnk"

Where is the bsnk?

Error on login

I try login in the server with my friends and get this error
mysql_store_result(): SELECT id, name, password, type, premdays, lastday, key, warnings FROM accounts WHERE name = 'kevin': MYSQL ERROR: Unknown column 'key' in 'field list'

Using site znoteacc to create accounts, error in site or server?

doItemSetAttribute / getItemAttribute

Are those functions planned?
Is there any alternative uid-based way to get/change item attributes such as attack and defense?
It would be very useful in upgrade and other systems.

I'd like to apologise if I posted something in wrong section or posts like this are unwanted here in general.
I've never used Git before.

On startup

tfs: /home/nclx/Documents/mygit/forgottenserver/src/luascript.h:300: static ScriptEnvironment* LuaScriptInterface::getScriptEnv(): Assertion `m_scriptEnvIndex >= 0 && m_scriptEnvIndex < 16' failed.
Aborted (core dumped)

?

Npc execute long text to slow

Hello,

Well, i just noticed, i added to npc like this:
npcHandler:say({"Here..", "Is..", "The..", "Story"}, cid)

Npc say those words to slow, anywhere i could make it bit faster?

Thanks.

Move channels to XML.

Hello.

I would like to see channels.xml in your mighty distribution.
This provides more flexibility.

Thank you, my master.
With love,
Marcin.

Lua doCreatureSay

Help me understand this behavior which may be a bug I don't understand, in this example if you do:

function onUse(cid, item, fromPosition, itemEx, toPosition)
    doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)
    doRemoveItem(item.uid, 1)
    return true
end

It doesnt remove the item because "item not found", but just by removing oncreaturesay:

function onUse(cid, item, fromPosition, itemEx, toPosition)
    doRemoveItem(item.uid, 1)
    return true
end

Works perfectly.

This behavior was not like this before, something changed in latest commits and this is what broke my script in issue #36

compat not works

the getPlayerStorageValue of compat get error:

arena.lua:3: attempt to call global 'getPlayerStorageValue' (a nil value)

Compiling error

In function void Container::onAddContainerItem(Item* item)
error with two arguments related

Down Spot with script

When I set a actionid on a hole spot for example and walk into the hole using a script like this:

function onStepIn(cid, item, position, fromPosition)
    if item.actionid == 5016 then
        doTeleportThing(cid, {x=214, y=349, z=14})
    elseif item.actionid == 5017 then
        doTeleportThing(cid, {x=261, y=308, z=7})
    end
    return true
end

The TFS crashes

buff icon is not displayed

Today I tested some scripts which use condition_attributes. Everything works fine, but icon isn't sended to the client. I tried this, but still didn't managed to see that condition icon:

local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, 10 * 60 * 1000) -- 10 minutes
setConditionParam(condition, CONDITION_PARAM_SKILL_MELEE, 5)
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, -10)
setConditionParam(condition, CONDITION_PARAM_BUFF_SPELL, true)
setConditionParam(condition, CONDITION_PARAM_SUBID, 99)

doAddCondition(cid, condition)

Is something wrong in this code or it's source-related?

Reload items

/reload items command is broken:

When you /reload items weapons stop affecting skills (if you use axe, sword or club it will still increase only fist fihgting), I tested this without even modifying anything in items.xml (I mean my items.xml is modified, but when I open the server it works, with no further change I do /reload items.xml and stops working)

Missing columns

The database optimizer didnt add the columns "kills" to guild_wars and "description" to guilds (I'm assuming these columns exists and are used because of schema.sql) not sure if others are missing

sendToPlayer error

The function ModalWindow:sendToPlayer close the server (segmentation fault)

Latest commit compile error

/forgottenserver/src/globalevent.cpp: In member function 'void GlobalEvents::timer()':
/forgottenserver/src/globalevent.cpp:165:27: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
cc1plus: all warnings being treated as errors
make[2]: *** [CMakeFiles/tfs.dir/globalevent.cpp.o] Error 1
make[1]: *** [CMakeFiles/tfs.dir/all] Error 2
make: *** [all] Error 2

Error in Compile Debian 6

I test the Compile in Debian 6

------ And I received this error ------

root@~:/forgottenserver/build# cmake ..
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Performing Test COMPILER_KNOWS_CXX11
-- Performing Test COMPILER_KNOWS_CXX11 - Failed
-- Performing Test COMPILER_KNOWS_CXX0X
-- Performing Test COMPILER_KNOWS_CXX0X - Success
-- Found LibXml2: /usr/lib/libxml2.so
-- Found GMP: /usr/include
-- MySQL Include dir: /usr/include/mysql library dir: /usr/lib
-- MySQL client libraries: mysqlclient_r
-- REQUIRED_VARS (missing: LUA_LIBRARIES LUA_INCLUDE_DIR VERSION_VAR LUAJIT_VERSION_STRING)
-- REQUIRED_VARS (missing: VERSION_VAR)
-- Boost version: 1.42.0
-- Found the following Boost libraries:
-- system
-- thread
-- Configuring done
CMake Error in CMakeLists.txt:
Cannot find source file "actions.cpp". Tried extensions .c .C .c++ .cc
.cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx

-- Build files have been written to: /forgottenserver/build
root@~:/forgottenserver/build# make
make: *** No targets specified and no makefile found. Stop.

------ The CMakeError.log ------

Performing C++ SOURCE FILE Test COMPILER_KNOWS_CXX11 failed with the following output:
Change Dir: /forgottenserver/build/CMakeFiles/CMakeTmp

Run Build Command:/usr/bin/make "cmTryCompileExec/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build
make[1]: Entering directory /forgottenserver/build/CMakeFiles/CMakeTmp' /usr/bin/cmake -E cmake_progress_report /forgottenserver/build/CMakeFiles/CMakeTmp/CMakeFiles 1 Building CXX object CMakeFiles/cmTryCompileExec.dir/src.cxx.o /usr/bin/c++ -Wall -Werror -DCOMPILER_KNOWS_CXX11 -std=c++11 -o CMakeFiles/cmTryCompileExec.dir/src.cxx.o -c /forgottenserver/build/CMakeFiles/CMakeTmp/src.cxx cc1plus: error: unrecognized command line option "-std=c++11" make[1]: *** [CMakeFiles/cmTryCompileExec.dir/src.cxx.o] Error 1 make[1]: Leaving directory/forgottenserver/build/CMakeFiles/CMakeTmp'
make: *** [cmTryCompileExec/fast] Error 2

Source file was:
int main() { return 0;}

Dove mode, is not working?

Hello,

Well, ive downloaded the files and compiled and tried dove mode, i can click on the button like they are useless. But in shadowcores, when i click on the dove med button, it says: Sorry, only dove mode is allowed... etc.

Map is not loading

Default forgotten map works perfectly, but my map doesnt.

I can say that is not something I did on the map because problem still happening even using the map I'm using in the server right now that uses the commit 7e02d7f so some further commit started to cause my crash:

Loading map
Map size: 5000x5000.
Map loading time: 9.618 seconds.
Segmentation fault (core dumped)

After it says "loading time 9.6128 seconds." it stays like that around 3~ seconds and drops the segmentation fault.

NPCs loading with npcs.xml.

Hello,

I would like to suggest possibility to spawn NPCs from inside the npcs.xml file.
An example of it would be the following:

<?xml version="1.0" encoding="UTF-8"?>
<npcs>
    <npc name="Ahmet" file="Ahmet.xml" home="33126,32810,6" radius="2" />
</npcs>

home = spawn position
radius = walk radius

Thanks.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Error on startup

Default datafolder/database latest commit:

>> Initializing gamestate
*** Error in `./tfs': malloc(): memory corruption: 0x0000000001bf90c0 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x8222d)[0x7f88ac22b22d]
/lib/x86_64-linux-gnu/libc.so.6(+0x82b81)[0x7f88ac22bb81]
/lib/x86_64-linux-gnu/libc.so.6(realloc+0xf2)[0x7f88ac22cb92]
/usr/lib/x86_64-linux-gnu/liblua5.1.so.0(+0xfd0c)[0x7f88ad64ad0c]
/usr/lib/x86_64-linux-gnu/liblua5.1.so.0(+0x17991)[0x7f88ad652991]
/usr/lib/x86_64-linux-gnu/liblua5.1.so.0(+0x16072)[0x7f88ad651072]
/usr/lib/x86_64-linux-gnu/liblua5.1.so.0(+0x1637c)[0x7f88ad65137c]
/usr/lib/x86_64-linux-gnu/liblua5.1.so.0(+0xc80d)[0x7f88ad64780d]
/usr/lib/x86_64-linux-gnu/liblua5.1.so.0(+0xba5a)[0x7f88ad646a5a]
/usr/lib/x86_64-linux-gnu/liblua5.1.so.0(+0xc9bf)[0x7f88ad6479bf]
/usr/lib/x86_64-linux-gnu/liblua5.1.so.0(lua_pcall+0x51)[0x7f88ad6434d1]
./tfs(_ZN18LuaScriptInterface13protectedCallEP9lua_Stateii+0x60)[0x7a1bf2]
./tfs(_ZN18LuaScriptInterface12callFunctionEj+0x41)[0x7a28e5]
./tfs(_ZN11GlobalEvent12executeEventEv+0xcf)[0x757a21]
./tfs(_ZN12GlobalEvents7executeE13GlobalEvent_t+0x5d)[0x756ce5]
./tfs(_ZN12GlobalEvents7startupEv+0x1d)[0x7566e9]
./tfs(_ZN4Game12setGameStateE11GameState_t+0xf5)[0x718f1b]
./tfs(_Z10mainLoaderiPPcP14ServiceManager+0xd09)[0x8161f2]
./tfs(_ZN5boost3_bi5list3INS0_5valueIiEENS2_IPPcEENS2_IP14ServiceManagerEEEclIPFviS5_S8_ENS0_5list0EEEvNS0_4typeIvEERT_RT0_i+0x83)[0x81c99b]
./tfs(_ZN5boost3_bi6bind_tIvPFviPPcP14ServiceManagerENS0_5list3INS0_5valueIiEENS9_IS3_EENS9_IS5_EEEEEclEv+0x39)[0x81bfb5]
./tfs(_ZN5boost6detail8function26void_function_obj_invoker0INS_3_bi6bind_tIvPFviPPcP14ServiceManagerENS3_5list3INS3_5valueIiEENSC_IS6_EENSC_IS8_EEEEEEvE6invokeERNS1_15function_bufferE+0x23)[0x81b153]
./tfs(_ZNK5boost9function0IvEclEv+0x52)[0x8a4d6c]
./tfs(_ZN4TaskclEv+0x1c)[0x8a4c16]
./tfs(_ZN10Dispatcher16dispatcherThreadEPv+0x117)[0x8a4611]
./tfs(_ZN5boost3_bi5list1INS0_5valueIPvEEEclIPFvS3_ENS0_5list0EEEvNS0_4typeIvEERT_RT0_i+0x47)[0x884f63]
./tfs(_ZN5boost3_bi6bind_tIvPFvPvENS0_5list1INS0_5valueIS2_EEEEEclEv+0x39)[0x884f0b]
./tfs(_ZN5boost6detail11thread_dataINS_3_bi6bind_tIvPFvPvENS2_5list1INS2_5valueIS4_EEEEEEE3runEv+0x1e)[0x884ed0]
/usr/lib/libboost_thread.so.1.49.0(+0xe6e9)[0x7f88ad2296e9]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7f8e)[0x7f88ad005f8e]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f88ac2a2e1d]
======= Memory map: ========
00400000-009ff000 r-xp 00000000 08:05 8009649                            /home/nclx/Documents/forgottenserver/tfs
00bfe000-00bff000 r--p 005fe000 08:05 8009649                            /home/nclx/Documents/forgottenserver/tfs
00bff000-00c01000 rw-p 005ff000 08:05 8009649                            /home/nclx/Documents/forgottenserver/tfs
00c01000-00c06000 rw-p 00000000 00:00 0 
01b5d000-01c1c000 rw-p 00000000 00:00 0                                  [heap]
7f8894000000-7f8896e53000 rw-p 00000000 00:00 0 
7f8896e53000-7f8898000000 ---p 00000000 00:00 0 
7f889c000000-7f88a0000000 rw-p 00000000 00:00 0 
7f88a0000000-7f88a0021000 rw-p 00000000 00:00 0 
7f88a0021000-7f88a4000000 ---p 00000000 00:00 0 
7f88a4000000-7f88a4021000 rw-p 00000000 00:00 0 
7f88a4021000-7f88a8000000 ---p 00000000 00:00 0 
7f88aa15c000-7f88aa168000 r-xp 00000000 08:05 11796738                   /lib/x86_64-linux-gnu/libnss_files-2.17.so
7f88aa168000-7f88aa367000 ---p 0000c000 08:05 11796738                   /lib/x86_64-linux-gnu/libnss_files-2.17.so
7f88aa367000-7f88aa368000 r--p 0000b000 08:05 11796738                   /lib/x86_64-linux-gnu/libnss_files-2.17.so
7f88aa368000-7f88aa369000 rw-p 0000c000 08:05 11796738                   /lib/x86_64-linux-gnu/libnss_files-2.17.so
7f88aa369000-7f88aa36a000 ---p 00000000 00:00 0 
7f88aa36a000-7f88aab6a000 rw-p 00000000 00:00 0 
7f88aab6a000-7f88aab6b000 ---p 00000000 00:00 0 
7f88aab6b000-7f88ab36b000 rw-p 00000000 00:00 0                          [stack:25661]
7f88ab36b000-7f88ab36c000 ---p 00000000 00:00 0 
7f88ab36c000-7f88abb6c000 rw-p 00000000 00:00 0                          [stack:25660]
7f88abb6c000-7f88abb8d000 r-xp 00000000 08:05 11796553                   /lib/x86_64-linux-gnu/liblzma.so.5.0.0
7f88abb8d000-7f88abd8c000 ---p 00021000 08:05 11796553                   /lib/x86_64-linux-gnu/liblzma.so.5.0.0
7f88abd8c000-7f88abd8d000 r--p 00020000 08:05 11796553                   /lib/x86_64-linux-gnu/liblzma.so.5.0.0
7f88abd8d000-7f88abd8e000 rw-p 00021000 08:05 11796553                   /lib/x86_64-linux-gnu/liblzma.so.5.0.0
7f88abd8e000-7f88abda4000 r-xp 00000000 08:05 11796787                   /lib/x86_64-linux-gnu/libz.so.1.2.7
7f88abda4000-7f88abfa3000 ---p 00016000 08:05 11796787                   /lib/x86_64-linux-gnu/libz.so.1.2.7
7f88abfa3000-7f88abfa4000 r--p 00015000 08:05 11796787                   /lib/x86_64-linux-gnu/libz.so.1.2.7
7f88abfa4000-7f88abfa5000 rw-p 00016000 08:05 11796787                   /lib/x86_64-linux-gnu/libz.so.1.2.7
7f88abfa5000-7f88abfa8000 r-xp 00000000 08:05 11796718                   /lib/x86_64-linux-gnu/libdl-2.17.so
7f88abfa8000-7f88ac1a7000 ---p 00003000 08:05 11796718                   /lib/x86_64-linux-gnu/libdl-2.17.so
7f88ac1a7000-7f88ac1a8000 r--p 00002000 08:05 11796718                   /lib/x86_64-linux-gnu/libdl-2.17.so
7f88ac1a8000-7f88ac1a9000 rw-p 00003000 08:05 11796718                   /lib/x86_64-linux-gnu/libdl-2.17.so
7f88ac1a9000-7f88ac367000 r-xp 00000000 08:05 11796716                   /lib/x86_64-linux-gnu/libc-2.17.so
7f88ac367000-7f88ac566000 ---p 001be000 08:05 11796716                   /lib/x86_64-linux-gnu/libc-2.17.so
7f88ac566000-7f88ac56a000 r--p 001bd000 08:05 11796716                   /lib/x86_64-linux-gnu/libc-2.17.so
7f88ac56a000-7f88ac56c000 rw-p 001c1000 08:05 11796716                   /lib/x86_64-linux-gnu/libc-2.17.so
7f88ac56c000-7f88ac571000 rw-p 00000000 00:00 0 
7f88ac571000-7f88ac585000 r-xp 00000000 08:05 11796841                   /lib/x86_64-linux-gnu/libgcc_s.so.1
7f88ac585000-7f88ac785000 ---p 00014000 08:05 11796841                   /lib/x86_64-linux-gnu/libgcc_s.so.1
7f88ac785000-7f88ac786000 r--p 00014000 08:05 11796841                   /lib/x86_64-linux-gnu/libgcc_s.so.1
7f88ac786000-7f88ac787000 rw-p 00015000 08:05 11796841                   /lib/x86_64-linux-gnu/libgcc_s.so.1
7f88ac787000-7f88ac88a000 r-xp 00000000 08:05 11796728                   /lib/x86_64-linux-gnu/libm-2.17.so
7f88ac88a000-7f88aca8a000 ---p 00103000 08:05 11796728                   /lib/x86_64-linux-gnu/libm-2.17.so
7f88aca8a000-7f88aca8b000 r--p 00103000 08:05 11796728                   /lib/x86_64-linux-gnu/libm-2.17.so
7f88aca8b000-7f88aca8c000 rw-p 00104000 08:05 11796728                   /lib/x86_64-linux-gnu/libm-2.17.so
7f88aca8c000-7f88acb71000 r-xp 00000000 08:05 3408178                    /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17
7f88acb71000-7f88acd70000 ---p 000e5000 08:05 3408178                    /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17
7f88acd70000-7f88acd78000 r--p 000e4000 08:05 3408178                    /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17
7f88acd78000-7f88acd7a000 rw-p 000ec000 08:05 3408178                    /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17
7f88acd7a000-7f88acd8f000 rw-p 00000000 00:00 0 
7f88acd8f000-7f88acdf6000 r-xp 00000000 08:05 3411883                    /usr/lib/x86_64-linux-gnu/libgmp.so.10.0.5
7f88acdf6000-7f88acff5000 ---p 00067000 08:05 3411883                    /usr/lib/x86_64-linux-gnu/libgmp.so.10.0.5
7f88acff5000-7f88acff6000 r--p 00066000 08:05 3411883                    /usr/lib/x86_64-linux-gnu/libgmp.so.10.0.5
7f88acff6000-7f88acffe000 rw-p 00067000 08:05 3411883                    /usr/lib/x86_64-linux-gnu/libgmp.so.10.0.5
7f88acffe000-7f88ad016000 r-xp 00000000 08:05 11796726                   /lib/x86_64-linux-gnu/libpthread-2.17.so
7f88ad016000-7f88ad215000 ---p 00018000 08:05 11796726                   /lib/x86_64-linux-gnu/libpthread-2.17.so
7f88ad215000-7f88ad216000 r--p 00017000 08:05 11796726                   /lib/x86_64-linux-gnu/libpthread-2.17.so
7f88ad216000-7f88ad217000 rw-p 00018000 08:05 11796726                   /lib/x86_64-linux-gnu/libpthread-2.17.so
7f88ad217000-7f88ad21b000 rw-p 00000000 00:00 0 
7f88ad21b000-7f88ad234000 r-xp 00000000 08:05 3417486                    /usr/lib/libboost_thread.so.1.49.0
7f88ad234000-7f88ad434000 ---p 00019000 08:05 3417486                    /usr/lib/libboost_thread.so.1.49.0
7f88ad434000-7f88ad436000 r--p 00019000 08:05 3417486                    /usr/lib/libboost_thread.so.1.49.0
7f88ad436000-7f88ad437000 rw-p 0001b000 08:05 3417486                    /usr/lib/libboost_thread.so.1.49.0
7f88ad437000-7f88ad43a000 r-xp 00000000 08:05 3416697                    /usr/lib/libboost_system.so.1.49.0
7f88ad43a000-7f88ad639000 ---p 00003000 08:05 3416697                    /usr/lib/libboost_system.so.1.49.0
7f88ad639000-7f88ad63a000 r--p 00002000 08:05 3416697                    /usr/lib/libboost_system.so.1.49.0
7f88ad63a000-7f88ad63b000 rw-p 00003000 08:05 3416697                    /usr/lib/libboost_system.so.1.49.0
7f88ad63b000-7f88ad666000 r-xp 00000000 08:05 3415658                    /usr/lib/x86_64-linux-gnu/liblua5.1.so.0.0.0
7f88ad666000-7f88ad865000 ---p 0002b000 08:05 3415658                    /usr/lib/x86_64-linux-gnu/liblua5.1.so.0.0.0
7f88ad865000-7f88ad867000 r--p 0002a000 08:05 3415658                    /usr/lib/x86_64-linux-gnu/liblua5.1.so.0.0.0
7f88ad867000-7f88ad868000 rw-p 0002c000 08:05 3415658                    /usr/lib/x86_64-linux-gnu/liblua5.1.so.0.0.0
7f88ad868000-7f88adb18000 r-xp 00000000 08:05 3413685                    /usr/lib/x86_64-linux-gnu/libmysqlclient.so.18.0.0
7f88adb18000-7f88add17000 ---p 002b0000 08:05 3413685                    /usr/lib/x86_64-linux-gnu/libmysqlclient.so.18.0.0
7f88add17000-7f88add1d000 r--p 002af000 08:05 3413685                    /usr/lib/x86_64-linux-gnu/libmysqlclient.so.18.0.0
7f88add1d000-7f88add9b000 rw-p 002b5000 08:05 3413685                    /usr/lib/x86_64-linux-gnu/libmysqlclient.so.18.0.0
7f88add9b000-7f88adda0000 rw-p 00000000 00:00 0 
7f88adda0000-7f88adef8000 r-xp 00000000 08:05 3408806                    /usr/lib/x86_64-linux-gnu/libxml2.so.2.9.0
7f88adef8000-7f88ae0f8000 ---p 00158000 08:05 3408806                    /usr/lib/x86_64-linux-gnu/libxml2.so.2.9.0
7f88ae0f8000-7f88ae100000 r--p 00158000 08:05 3408806                    /usr/lib/x86_64-linux-gnu/libxml2.so.2.9.0
7f88ae100000-7f88ae102000 rw-p 00160000 08:05 3408806                    /usr/lib/x86_64-linux-gnu/libxml2.so.2.9.0
7f88ae102000-7f88ae103000 rw-p 00000000 00:00 0 
7f88ae103000-7f88ae126000 r-xp 00000000 08:05 11796708                   /lib/x86_64-linux-gnu/ld-2.17.so
7f88ae2a0000-7f88ae2d2000 rw-p 00000000 00:00 0 
7f88ae2fb000-7f88ae305000 rw-p 00000000 00:00 0 
7f88ae321000-7f88ae325000 rw-p 00000000 00:00 0 
7f88ae325000-7f88ae326000 r--p 00022000 08:05 11796708                   /lib/x86_64-linux-gnu/ld-2.17.so
7f88ae326000-7f88ae328000 rw-p 00023000 08:05 11796708                   /lib/x86_64-linux-gnu/ld-2.17.so
7fffda0b5000-7fffda0d6000 rw-p 00000000 00:00 0                          [stack]
7fffda1fe000-7fffda200000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
Aborted (core dumped)

`key` column

Not 100% sure but I head somewhere that tfs is not using the key column anymore? if so, the optimizer didnt delete it yet

Npc Vial [No nametag]!

Hello,

I made a npc then added this into the npc xml.
Vial of Water,2006,8,1;
when i trade with the npc it show only Vial and when i look on it its correct, its vial of water but on the trade it only show Vial.

Here is pic:
http://1.ii.gl/1Sae2.png

Yes ive tried with other vials which have other subtype and they show same Vial. But it contain the right liquid.

Summon teleport.

I don't know how it should be, but is not teleporting summons to the owner when the owner is far away.

It can be scripted easily so feel free to close this if it wont be added soon.

House rent

House rent is not taking rent * sqm, only rent, looks like the iterator adds the rent price to the "housePrice" variable for no reason xD

Guild deletion

Deleting guild from the table guilds deletes guild_membership, guild_ranks but it doesnt delete guild_invites (didnt test any other and didnt import new schema, is old database "optimized").

Raids

Hello,

i just wonder is it possible to execute raids through globalevent, to add like monday-sunday which day it getting executed.

Thanks

new error

Lua Script Error: [TalkAction Interface]
data/talkactions/scripts/teleporttiles.lua:onSay
data/talkactions/scripts/teleporttiles.lua:21: attempt to call global 'getCreatureLookDirection' (a nil value)
stack traceback:
[C]: in function 'getCreatureLookDirection'
data/talkactions/scripts/teleporttiles.lua:21: in function <data/talkactions/scripts/teleporttiles.lua:1>

Console error

Lua Script Error: luaDoRemoveItem(). Item not found

Lua Script Error: luaDoRemoveItem(). Item not found

I see a big spam of that error in console but no reference to any script file or anything, shouldnt it give any reference? if no, in which cases lua script errors wont give reference?

House message

When you buy the house you get the message: "You have successfully bought this house, be sure to have the money for the rent in your depot of this city."

But money is taken from player's bank

onPrepareDeath

onPrepareDeath only works for players I guess it should work for creatures (onDeath works on creatures).

Doc and globalevent

  • Missing DOC folder
  • Globalevent "interval" is not really interval, interval="1000" waits 1 sec to execute script but doesn't loop (is executed just once)

error npc

error hi when speaking with npc

Code:
Lua Script Error: [Main Interface]
In a timer event called from:
(Unknown scriptfile)
data / npc / lib / npcsystem / npchandler.lua: 599: attempt to call global 'doCreatureSay' (a nil value)
stack traceback:
[C]: in function 'doCreatureSay'
data / npc / lib / npcsystem / npchandler.lua: 599: in function <data/npc/lib/npcsystem/npchandler.lua:599>

Add ; and -

Hello, I've been seeing the server and noticed it does not support ; and -
I know that adding this can cause delays when opening the server, but you can add a setting to the config.lua choose whether we use it or not, so if you do not want so select on the config.lua and he will open usually...

Function doPlayerAddDialog

Add function doPlayerAddDialog, this function 0.3 is perfect, and can generate new creative scripts to servers...

Add text into storage value

Hello,

Well, im trying to add text into storage value but it appears 0, any reason for that?
setPlayerStorageValue(cid, 4008, test)

Thanks.

Boost 1.54 error

Hello, i have updated my boost to 1.54 and get this error:
Linking CXX executable tfs
CMakeFiles/tfs.dir/src/scheduler.cpp.o: in function boost::thread::start_thread()': scheduler.cpp:(.text._ZN5boost6thread12start_threadEv[_ZN5boost6thread12start_threadEv]+0xe): undefined reference toboost::thread::start_thread_noexcept()'
CMakeFiles/tfs.dir/src/scheduler.cpp.o: in function boost::thread::join()': scheduler.cpp:(.text._ZN5boost6thread4joinEv[_ZN5boost6thread4joinEv]+0x6d): undefined reference toboost::thread::join_noexcept()'
collect2: error: ld returned 1 exit status
make[2]: ** [tfs] Error 1
make[1]: ** [CMakeFiles/tfs.dir/all] Error 2
make: ** [all] Error 2

Crash on reload (I think)

This is not something that a player can reproduce I think, I'm not 100% sure but I think it crashed because I /reload npc with a shop window opened, I'm posting the dump anyway because crashes are never good and it would be good if all errors some day are handled nicely showing errors in console or something instead of crashing the server like this.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff5e6e700 (LWP 6765)]
0x0000000000843e88 in std::less<Player*>::operator()(Player* const&, Player* const&) const ()
#0  0x0000000000843e88 in std::less<Player*>::operator()(Player* const&, Player* const&) const ()
#1  0x000000000084410c in std::_Rb_tree<Player*, Player*, std::_Identity<Player*>, std::less<Player*>, std::allocator<Player*> >::equal_range(Player* const&) ()
#2  0x0000000000843311 in std::_Rb_tree<Player*, Player*, std::_Identity<Player*>, std::less<Player*>, std::allocator<Player*> >::erase(Player* const&) ()
#3  0x0000000000842a15 in std::set<Player*, std::less<Player*>, std::allocator<Player*> >::erase(Player* const&) ()
#4  0x000000000083e562 in Npc::removeShopPlayer(Player*) ()
#5  0x000000000083de83 in Npc::onPlayerEndTrade(Player*, int, int) ()
#6  0x0000000000861680 in Player::closeShopWindow(bool) ()
#7  0x000000000083e5c4 in Npc::closeAllShopWindows() ()
#8  0x000000000083c4e8 in Npcs::reload() ()
#9  0x00000000006f0587 in Commands::reloadInfo(Player*, std::string const&, std::string const&) ()
#10 0x00000000006eec55 in Commands::exeCommand(Player*, std::string const&) ()
#11 0x0000000000755aee in Game::playerSayCommand(Player*, SpeakClasses, std::string const&) ()
#12 0x0000000000755837 in Game::playerSay(unsigned int, unsigned short, SpeakClasses, std::string const&, std::string const&) ()
#13 0x00000000008a4e60 in boost::_mfi::mf5<bool, Game, unsigned int, unsigned short, SpeakClasses, std::string const&, std::string const&>::operator()(Game*, unsigned int, unsigned short, SpeakClasses, std::string const&, std::string const&) const ()
#14 0x00000000008a1b95 in bool boost::_bi::list6<boost::_bi::value<Game*>, boost::_bi::value<unsigned int>, boost::_bi::value<unsigned short>, boost::_bi::value<SpeakClasses>, boost::_bi::value<std::string>, boost::_bi::value<std::string> >::operator()<bool, boost::_mfi::mf5<bool, Game, unsigned int, unsigned short, SpeakClasses, std::string const&, std::string const&>, boost::_bi::list0>(boost::_bi::type<bool>, boost::_mfi::mf5<bool, Game, unsigned int, unsigned short, SpeakClasses, std::string const&, std::string const&>&, boost::_bi::list0&, long) ()
#15 0x000000000089ecb9 in boost::_bi::bind_t<bool, boost::_mfi::mf5<bool, Game, unsigned int, unsigned short, SpeakClasses, std::string const&, std::string const&>, boost::_bi::list6<boost::_bi::value<Game*>, boost::_bi::value<unsigned int>, boost::_bi::value<unsigned short>, boost::_bi::value<SpeakClasses>, boost::_bi::value<std::string>, boost::_bi::value<std::string> > >::operator()() ()
#16 0x000000000089c583 in boost::detail::function::void_function_obj_invoker0<boost::_bi::bind_t<bool, boost::_mfi::mf5<bool, Game, unsigned int, unsigned short, SpeakClasses, std::string const&, std::string const&>, boost::_bi::list6<boost::_bi::value<Game*>, boost::_bi::value<unsigned int>, boost::_bi::value<unsigned short>, boost::_bi::value<SpeakClasses>, boost::_bi::value<std::string>, boost::_bi::value<std::string> > >, void>::invoke(boost::detail::function::function_buffer&) ()
#17 0x00000000008d5160 in boost::function0<void>::operator()() const ()
#18 0x00000000008d500a in Task::operator()() ()
#19 0x00000000008d4a05 in Dispatcher::dispatcherThread(void*) ()
#20 0x00000000008b503d in void boost::_bi::list1<boost::_bi::value<void*> >::operator()<void (*)(void*), boost::_bi::list0>(boost::_bi::type<void>, void (*&)(void*), boost::_bi::list0&, int) ()
#21 0x00000000008b4fe5 in boost::_bi::bind_t<void, void (*)(void*), boost::_bi::list1<boost::_bi::value<void*> > >::operator()() ()
#22 0x00000000008b4faa in boost::detail::thread_data<boost::_bi::bind_t<void, void (*)(void*), boost::_bi::list1<boost::_bi::value<void*> > > >::run() ()
#23 0x00007ffff7e79629 in ?? () from /usr/lib/libboost_thread.so.1.49.0
#24 0x00007ffff7453b50 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#25 0x00007ffff678fa7d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#26 0x0000000000000000 in ?? ()

Deathlist

Deathlist.lua is broken not a big deal only missing params and used parameters name are not the same name as creatureevent.cpp

//onDeath(cid, corpse, lasthitkiller, mostdamagekiller, lasthitunjustified, mostdamageunjustified)

you made small changes in the script like mostDamage_unjustified etc

doPlayerAddDialog and remove Get

I think to make it easier for beginners should add in global.lua this function

By dalkon and me

function doPlayerAddDialog(cid, id, func)
    modalWindow = ModalWindow(id, func.title, func.message)
    if modalWindow:getId() == id then
        for _, v in ipairs(func.buttons) do
                modalWindow:doAddButton(v.id, v.text)
        end
        for _, v in ipairs(func.choices) do
                modalWindow:doAddChoice(v.id, v.text)
        end
        modalWindow:setDefaultEnterButton(func.buttonEnter)
        modalWindow:setPriority(func.popup)
        modalWindow:setDefaultEscapeButton(func.buttonEscape)
    end
    modalWindow:sendToPlayer(cid)
    return FALSE
end

Exemple script:

modaldialog = {
    title = "Offline Training",
    message = "Choose your room",
    buttons = {
        { id = 1, text = "Go" },
    },
    buttonEnter = 1,
    buttonEscape = 2,
    choices = {
        { id = 1, text = "Sword" },
        { id = 2, text = "Axe" },
        { id = 3, text = "Club" },
        { id = 4, text = "Distance" },
        { id = 5, text = "Magic Level" }
    },
    popup = true
}

function onStepIn(cid, item, position, fromPosition)
    doPlayerAddDialog(cid, 1001, modaldialog)
    registerCreatureEvent(cid, "ModalOffline")
    return true
end

As I said before the "get" function of modals should be removed, it has no utility
Only need "getId()"
Others gets have in onModalWindow
Exemple my script (button 0 and 29 is enter button):

function onModalWindow(cid, modalWindowId, buttonId, choiceId)
    if modalWindowId == 1001 then
        if buttonId == 1 or buttonId == 29 or buttonId == 0 then
            local pos = 0
            if (choiceId == 1) then
                pos = {x=98, y=45, z=15}
            elseif (choiceId == 2) then
                pos = {x=108, y=45, z=15}
            elseif (choiceId == 3) then
                pos = {x=117, y=45, z=15}
            elseif (choiceId == 4) then
                pos = {x=98, y=55, z=15}
            elseif (choiceId == 5) then
                pos = {x=117, y=55, z=15}
            end
            doTeleportThing(cid, pos)
        end
    end
    return true
end

onUpdateDatabase()

I have just a suggestion this time, in the onUpdateDatabase() the version could be passsed by parameter for the lua function instead of opening each file version, and the errors should be handled by lua using assert, so that what i think that could be improved, not something really important hahahaha.

something like that:

http://pastebin.com/2EihYUdx

doPlayerSendTextMessage

//doPlayerSendTextMessage(cid, MessageClasses, message[, position, value, color])

int parameters = lua_gettop(L);
PositionEx position;
uint32_t value = 0;

value should be int32_t since we can display negative values, like when player loose health

TFS Documentation

I notice that the TFS documentation files are not included here.

I plan on contributing (sometime soon) to refurbish the LUA_FUNCTIONS doc so that it contains every function with general information about the function, its parameters, what it returns, and possibly an example.

I know this is probably something that is really needed, but I don't know if it should be done in a separate file on here or on another Wiki page (if we have one). Maybe somewhere where it is open to anyone to modify.

Support for vc10

Can add support for vc10 because i'm using win xp or upload libs for vc12?

Lua states suggestion

I think the Lua states should be Separated so erros in scripts should not be so dangerous, and create a way to import/export metatable between states, maybe this can help and I think is a good solution, so I would like to discuss this with the community

Missing mount option

doSetCreatureOutfit(cid, outfit, time)
addOutfitCondition(condition, lookTypeEx, lookType, lookHead, lookBody, lookLegs, lookFeet)
doCreatureChangeOutfit(cid, outfit)

No support for change mount

getTileItemByX() returns

Alright, I have a simple script here that involves getTileItemById()

local middleTable = {x = 1111, y = 994, z = 8}
local pc_moneyOnMiddle = Item(getTileItemById(middleTable, 2152).uid)
if (pc_moneyOnMiddle:getId() > 0) then
   -- platinum coin found
else
   -- platinum coin not found
end

The issue is in the third line, if the item is not found; it ends the script, and then the console prints an error telling me that it fails to index pc_moneyOnMiddle since it's a nil value. I haven't checked the code for getTileItemById(), but it should return an item userdata that contains 0's for everything or something, right?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.