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

Showing MENUS on OTServ

Linkay

#tpwn
Joined
Dec 12, 2009
Messages
77
Reaction score
4
Location
Brazil
Hello.

So ... Some of you may have seen in P.O. and other OTs this "menu" which actually is the window to open a channel.

So I ask you, how is this done?

I came to some basic conclusions:
* A function (coded in sources) to open the window to choose the Channel.
* A change (sources) in channels.xml to display X channels for who have X storage, or something else.

If you don't know what i'm talking about look at this draft i make.

C0E4ENmvL.png


Thank you all, and sorry for my bad english.

Thanks again p:
 
This is a window made in the Tibia.exe . There's no way to create a new window type by server side. The server just fills the window.
 
Here you are a simple usage a this system - Subversion. Zoom for line:​
PHP:
output->AddByte(0x64);

0x64 stands for characters list, not channel.

@Topic:
You have to send packet with channel list and assign to the channels some specified ID, and then handle channel open function and write proper code depending on Channel ID.
 
unbenanntss.png


I made a LUA function for that:
doPlayerPopupList(cid, "some blabla channel", 500004, "hi", 500005, "This works", 500006, "Made by Summ :d", 500007)
params: cid, channelname, fakeid, channelname, fakeid etc. xD

It's done:
Creating a fake channellist in luascripts.cpp, sending the list to protocolgame.cpp and choosing between real channels and the "fake" list.
 
I don't care about the function it is just made for private use and I wanted to test how its possible.
 
idk how to check storage in source but here is what i use :p
in chat.cpp
Code:
ChatChannel* tmpChannel = nit->second;
		if(!tmpChannel || !tmpChannel->hasFlag(CHANNELFLAG_ENABLED) || player->getAccess() < tmpChannel->getAccess()
			|| (!player->hasCustomFlag(PlayerCustomFlag_GamemasterPrivileges) && !tmpChannel->checkVocation(
			player->getVocationId())))
you can add something like this
Code:
		ChatChannel* tmpChannel = nit->second;
		if(!tmpChannel || !tmpChannel->hasFlag(CHANNELFLAG_ENABLED) || player->getAccess() < tmpChannel->getAccess()
			|| (!player->hasCustomFlag(PlayerCustomFlag_GamemasterPrivileges) && !tmpChannel->checkVocation(
			player->getVocationId())) || (channelId == 9 && !player->hasCondition(CONDITION_OUTFIT, 1998)) )
this will show only channel id 9 for player who has outfit condition with subid 1998
 
Back
Top