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

[Help] Keys! [silverkey (3088)]

ond

Veteran OT User
Joined
Mar 24, 2008
Messages
2,775
Solutions
25
Reaction score
483
Location
Sweden
Server: Avesta 0.6.3 Converted down to 7.6 by Ferrus

A key on tibia, when you look at it the client tells you this:

13:37 You see a sliver key (3088). It weighs 1337.0 oz.

But on my server it only tells me "Silver key"
Which equals that if you have 2000 keys you'll never know which one is which! So I'm requesting some kind of help to make they keys numbers visible when they have a certain action id!

I think this is the right place to ask for it. Post if I were unclear with what I want!
 
Last edited:
item.cpp after
Code:
	else if(it.isContainer()){
		s << " (Vol:" << (int)it.maxItems << ").";
	}
add
Code:
	else if(it.isKey())
	{
		if(item)
			s << " (Key:" << (int)item->getActionId() << ").";
		else
			s << " (Key:" << (int)0 << ").";
	}
 
already have that, that's what bugging me...!

It's almost like this attribute in items.xml ain't working

Code:
<attribute key="type" value="key"/>
 
items.cpp
Code:
if(readXMLString(itemAttributesNode, "key", strValue))
{
	if(asLowerCaseString(strValue) == "type")
	{
		if(readXMLString(itemAttributesNode, "value", strValue))
		{
			if(asLowerCaseString(strValue) == "key")
				it.type = ITEM_TYPE_KEY;
got something like this?

If so, edit in items.h group -> type, ITEM_GROUP_KEY -> ITEM_TYPE_KEY
Code:
bool isKey() const {return (group == ITEM_GROUP_KEY);}
 
Well the keys WORKS, they fill their function but the actiod id should be shown whenever you take a look at the key,
which it is supposed to by this code
Code:
s << " (Key:" << (int)item->getActionId() << ").";
 
If so, edit in items.h group -> type, ITEM_GROUP_KEY -> ITEM_TYPE_KEY
Code:
bool isKey() const {return (group == ITEM_GROUP_KEY);}

So just change group to type?
 
My compiler really didn't like that

Just to make clear, change only that line

Code:
bool isKey() const {return (group == ITEM_GROUP_KEY);}

to

Code:
bool isKey() const {return (group == ITEM_TYPE_KEY);}
 
Looks better now, I have to rebuild all and I don't have the fastest CPU in the world ...

ok done, gonna try it now and see if works

WHATAAAHAHAAHAHASUHAIUHAUIHIAUHAUIHAIU WOOOOOOOORKS YOU'RE AWESOME MAN THANKS!
 
Last edited:
Back
Top