• 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.

TalkAction deleted thread

Is it possible to be added to the queue upon onStepIn?
I don't need anything with must-be-in-x/y/z-square like I suggested in my previous posts anymore.

Also, I don't know if it's already made, but when you enter the dungeon, I want it so they have X minutes to hunt before they (whole team) get kicked out.
Is this possible?

Also, is it possible to remove yourself from the queue?
 
I have problem :S
I added both file in luascripts.cpp, i use tfs 0.3.6pl1

Code:
luascript.cpp: In member function 'virtual void LuaScriptInterface::registerFunctions()':
luascript.cpp:2161: error: 'luaDoPlayerInviteToParty' is not a member of 'LuaScriptInterface'
luascript.cpp: At global scope:
luascript.cpp:8384: error: no 'int32_t LuaScriptInterface::luaDoPlayerInviteToParty(lua_State*)' member function declared in class 'LuaScriptInterface'

Someone have some idea?
 
Lua:
query = db.getResult("SELECT * FROM `dungeon_finder` WHERE `player_id` = " ..  getPlayerGUID(cid) .. "")
		if(isInParty(cid)) then
			doPlayerSendCancel(cid, "You can't join queue while you are in party group.")
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
			return true
		end
		if(query:getID() == 0) then
			doPlayerSendCancel(cid, "You are already listed in queue.")
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
			return true
		end

You can do like this and you wont need to make a possible unnecessary query:
Lua:
		if(isInParty(cid)) then
			doPlayerSendCancel(cid, "You can't join queue while you are in party group.")
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
			return true
		end
                query = db.getResult("SELECT * FROM `dungeon_finder` WHERE `player_id` = " ..  getPlayerGUID(cid) .. "")
		if(query:getID() == 0) then
			doPlayerSendCancel(cid, "You are already listed in queue.")
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
			return true
		end

The queries can also be optimized...
 
Yes the same error...
I think i do all good...
Stop spam guy.

Someone can help me or send working luascript.cpp?
 
BIG UPDATE!

ADDED CONFIG WITH SOME NEW HANDY FEATURES,
WHEN PLAYER LEAVES PARTY HE RECIVES DESERTER DEBUFF,
ADDED ONLEAVEPARTY(CID) FUNCTION

Is it possible to be added to the queue upon onStepIn?
I don't need anything with must-be-in-x/y/z-square like I suggested in my previous posts anymore.

Also, I don't know if it's already made, but when you enter the dungeon, I want it so they have X minutes to hunt before they (whole team) get kicked out.
Is this possible?

Also, is it possible to remove yourself from the queue?

Added CONFIG lib, you can set there area and so on.
I'm working on the kick function feature, but it won't take too long to release it.
You can remove yourself saying f.e. /dungeon remove or simply reloging.

Nice script but:
  • You should make table `dungeon_finder` where will be 2 coulmuns (or 3 if you want: `id`): `player_id`, `dungeon_id`.
  • If someone "logout/login/leave from party/kick from party" when is on dungeon he should be kicked out from dungeon and get 30 min (you can change it in config) colddown to join dungeon finder.
  • If one team is on "Dungeon 1" then other team can't join to the same dungeon.
  • Every party member can kick another one if other members from team also agree.
  • Dungeon leader should be able to join missing member if team isn't full (4/5 or smth).
  • As in above post players can leave out dungeon (not from party) and should be teleported to place from have been telepoted to dungeon. And if player want to enter to dungeon again he is teleporting to party leader.
  • When team kill last boss then they can leave party without colddown.
  • Also you should optimize globalevent function.



This is just suggestion. You can add it or not. It's your choice.

I added the idea with leaveing the party: when someone leaves the party he recives DESERTER_DEBUFF and can't rejoin the queue.
Now, I'm working on some other features you posted.

The queries can also be optimized...

If you know how to optimize them I'd be very thankfull. :)
 
I have problem :S
I added both file in luascripts.cpp, i use tfs 0.3.6pl1

Code:
luascript.cpp: In member function 'virtual void LuaScriptInterface::registerFunctions()':
luascript.cpp:2161: error: 'luaDoPlayerInviteToParty' is not a member of 'LuaScriptInterface'
luascript.cpp: At global scope:
luascript.cpp:8384: error: no 'int32_t LuaScriptInterface::luaDoPlayerInviteToParty(lua_State*)' member function declared in class 'LuaScriptInterface'

Someone have some idea?

What revision do you use?
 
Huh, i compile that on my dedicated server...

using that command:
chmod +x autogen.sh && ./autogen.sh && ./configure --enable-mysql --enable-server-diag && make
 
I have problem :S
I added both file in luascripts.cpp, i use tfs 0.3.6pl1

Code:
luascript.cpp: In member function 'virtual void LuaScriptInterface::registerFunctions()':
luascript.cpp:2161: error: 'luaDoPlayerInviteToParty' is not a member of 'LuaScriptInterface'
luascript.cpp: At global scope:
luascript.cpp:8384: error: no 'int32_t LuaScriptInterface::luaDoPlayerInviteToParty(lua_State*)' member function declared in class 'LuaScriptInterface'

I compile in my dedicated server using command:
Code:
chmod +x autogen.sh && ./autogen.sh && ./configure --enable-mysql --enable-server-diag && make

PLEASE HELP, is one of greatest script i even seen.
 
I have problem :S
I added both file in luascripts.cpp, i use tfs 0.3.6pl1

Code:
luascript.cpp: In member function 'virtual void LuaScriptInterface::registerFunctions()':
luascript.cpp:2161: error: 'luaDoPlayerInviteToParty' is not a member of 'LuaScriptInterface'
luascript.cpp: At global scope:
luascript.cpp:8384: error: no 'int32_t LuaScriptInterface::luaDoPlayerInviteToParty(lua_State*)' member function declared in class 'LuaScriptInterface'

I compile in my dedicated server using command:
Code:
chmod +x autogen.sh && ./autogen.sh && ./configure --enable-mysql --enable-server-diag && make

PLEASE HELP, is one of greatest script i even seen.

Code:
Change 'int32_t LuaScriptInterface::luaDoPlayerInviteToParty(lua_State*)' to 'int32_t LuaInterface::luaDoPlayerInviteToParty(lua_State*)'
 
That's awesome, but could you make it so If they leave the party they have 30 second's to join again before telepored to there home town?
 
Tazer:

when i do that:
Code:
luascript.cpp: In member function 'virtual void LuaScriptInterface::registerFunctions()':
luascript.cpp:2161: error: 'luaDoPlayerInviteToParty' is not a member of 'LuaScriptInterface'
luascript.cpp: At global scope:
luascript.cpp:8388: error: 'LuaInterface' has not been declared
luascript.cpp: In function 'int32_t luaDoPlayerInviteToParty(lua_State*)':
luascript.cpp:8391: error: 'getEnv' was not declared in this scope
luascript.cpp:8393: error: 'L' was not declared in this scope
luascript.cpp:8393: error: 'popNumber' was not declared in this scope
luascript.cpp:8396: error: 'getError' was not declared in this scope
luascript.cpp:8396: error: 'error' was not declared in this scope
luascript.cpp:8403: error: 'getError' was not declared in this scope
luascript.cpp:8403: error: 'error' was not declared in this scope
 
can you make some like that:

5players type /dungeon "test dungeon"
if player dont have req lvl (or too high lvl) cannot join to that dungeon.
I think that was better.
 
Back
Top