• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action Working Demon Oak Quest

Nice, works perfect, now.

Sometimes when i try start my ot, this messages appears.

Code:
bido@bido-desktop:~/Desktop/svn/servidor$ ./Servidor 
[11:10:21.137] The Forgotten Server, version 0.4_DEV ()
[11:10:21.137] Compiled with GNU C++ version 4.4.3 at Feb  1 2011, 11:28:36.
[11:10:21.137] A server developed by Elf, Talaturen, KaczooH, Stian and Kornholijo.
[11:10:21.137] Visit our forum for updates, support and resources: http://otland.net.

[11:10:21.137] >> Loading config (config.lua)
[11:10:21.138] >> Opening logs

Checking demon oak lib...
...done, 0 problems loaded.

segmentation fault

After i try restart 2,3 x it start, but after a remove 102-demonOak from libs, this never happers again.
 
Last edited:
again when i open my server.

Code:
[21:3:06.088] The Forgotten Server, version 0.4_DEV ()
[21:3:06.088] Compiled with GNU C++ version 4.4.3 at Feb 16 2011, 20:18:15.
[21:3:06.088] A server developed by Elf, Talaturen, KaczooH, Stian and Kornholijo.
[21:3:06.088] Visit our forum for updates, support and resources: http://otland.net.

[21:3:06.088] >> Loading config (config.lua)
[21:3:06.089] >> Opening logs

Checking demon oak lib...
...done, 0 problems loaded.

Segmentation fault

Not all time, some times open perfect.
 
0.4 sometimes has issues with custom function files and lib files. try removing putting the lib and put the constants in each and every file.(at least on windows i dont know about linux) its worth a try
 
0.4 sometimes has issues with custom function files and lib files. try removing putting the lib and put the constants in each and every file.(at least on windows i dont know about linux) its worth a try

If that is truth, then you guys that are using 0.4, put all the demonOak lib iniside 050-function.lua
 
Crash report with this script.

Code:
[19:9:34.738] The Forgotten Server, version 0.4_DEV ()
[19:9:34.738] Compiled with GNU C++ version 4.4.3 at Feb  1 2011, 11:28:36.
[19:9:34.738] A server developed by Elf, Talaturen, KaczooH, Stian and Kornholijo.
[19:9:34.738] Visit our forum for updates, support and resources: http://otland.net.

[19:9:34.738] >> Loading config (config.lua)
[19:9:34.739] >> Opening logs

Checking demon oak lib...
...done, 0 problems loaded.


Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff2ff5700 (LWP 3920)]
0x000000000053adf0 in QTreeNode::getLeaf(unsigned short, unsigned short) ()
(gdb) bt
#0  0x000000000053adf0 in QTreeNode::getLeaf(unsigned short, unsigned short) ()
#1  0x000000000053ba14 in Map::getSpectatorsInternal(std::list<Creature*, std::allocator<Creature*> >&, Position const&, bool, int, int, int, int, int, int) ()
#2  0x000000000053d0e7 in Map::getSpectators(std::list<Creature*, std::allocator<Creature*> >&, Position const&, bool, bool, int, int, int, int) ()
#3  0x000000000050a117 in LuaInterface::luaGetSpectators(lua_State*) ()
#4  0x00007ffff7bbcbc1 in ?? () from /usr/lib/liblua5.1.so.0
#5  0x00007ffff7bc7959 in ?? () from /usr/lib/liblua5.1.so.0
#6  0x00007ffff7bbd08d in ?? () from /usr/lib/liblua5.1.so.0
#7  0x00007ffff7bbc737 in ?? () from /usr/lib/liblua5.1.so.0
#8  0x00007ffff7bbc7b2 in ?? () from /usr/lib/liblua5.1.so.0
#9  0x00007ffff7bb81a1 in lua_pcall () from /usr/lib/liblua5.1.so.0
#10 0x00000000005299f2 in LuaInterface::loadFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Npc*) ()
#11 0x000000000052b854 in LuaInterface::loadDirectory(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Npc*) ()
#12 0x000000000052bd76 in LuaInterface::initState() ()
#13 0x00000000005f30a4 in OutputHandler::overflow(int) ()
#14 0x00007ffff5b77293 in std::basic_ostream<char, std::char_traits<char> >::put(char) () from /usr/lib/libstdc++.so.6
#15 0x00007ffff5b774ea in std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&) () from /usr/lib/libstdc++.so.6
---Type <return> to continue, or q <return> to quit---
#16 0x00000000005709f1 in otserv(std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, ServiceManager*) ()
#17 0x0000000000576001 in boost::detail::function::void_function_obj_invoker0<boost::_bi::bind_t<void, void (*)(std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, ServiceManager*), boost::_bi::list2<boost::_bi::value<std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, boost::_bi::value<ServiceManager*> > >, void>::invoke(boost::detail::function::function_buffer&) ()
#18 0x000000000048904f in Task::operator()() ()
#19 0x0000000000487e8a in Dispatcher::dispatcherThread(void*) ()
#20 0x00007ffff65bdb70 in thread_proxy ()
   from /usr/lib/libboost_thread.so.1.40.0
#21 0x00007ffff50b4971 in start_thread () from /lib/libpthread.so.0
#22 0x00007ffff53b092d in clone () from /lib/libc.so.6
#23 0x0000000000000000 in ?? ()

If somebody can tell to a TFS developer check it!
 
I'm not sure but maybe the crash is caused because script is trying to get info from positions without without having load the map first (Not sure)

Try deleting this from lib
Lua:
function demonOakThink()
 
	local thinkTime = 10000
	local chance = 30
	if math.random(100) <= chance then
		if positions and positions.demonOak and type(positions.demonOak) == "table" and questAreaPosition and questAreaPosition[1] and type(questAreaPosition[1]) == "table" and questAreaPosition[2] and type(questAreaPosition[2]) == "table" then
			local rangeX, rangeY = getDistanceBetween(positions.demonOak, questAreaPosition[1]) + 3, getDistanceBetween(positions.demonOak, questAreaPosition[2]) + 3
			local list = getSpectators(positions.demonOak, rangeX, rangeY)
			if list and #list > 0 then
				for _, uid in ipairs(list) do
					if isPlayer(uid) and not isInArea(getCreaturePosition(uid), questAreaPosition[1], questAreaPosition[2]) and getCreaturesInRange(TYPE_PLAYER, questAreaPosition[1], questAreaPosition[2], GET_COUNT, false) == 0 then
						doCreatureSay(uid, sounds[1][math.random(table.maxn(sounds[1]))], TALKTYPE_MONSTER_YELL, false, uid, positions.demonOak)
					end
				end
			end
		end
	end

	addEvent(demonOakThink, thinkTime)
end
 
if getStorage(STORAGE_THINK) < 1 and enableOakThink then
	demonOakThink()
	doSetStorage(STORAGE_THINK, 1)
end

Removing this, demon oak won't yell like a monster but maybe it can fix the problem.

EDIT:

Check main post, lib was updated (Rev: 33), now demonOakThink will work only when gamestate is normal and not starting.
 
Last edited:
Back
Top