• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

[C++] [IDEA] Beds depends on vocation not on sex. - Realistic Beds

Fresh

Quack!
Joined
Oct 21, 2009
Messages
1,855
Solutions
18
Reaction score
671
Hello.
I wanna request you to help me out to do this:
- Beds (sprites) depends on vocation not on sex, I mean:
When you go sleep and you are Master Sorcerer or Sorcerer the bed sprite is changing to bed with master sorcerer face (man with witch hat) [i got custom sprites, added items to tibia.dat, custom client]
When you go sleep and you are Knight or Elite knight the bed sprite is changing to bed with elite knight face...
bla bla bla... etc etc...

I know i can edit it in sources but i dont know how to go about it :/

Thanks in advance,
Fresh
 
Is it really hardcoded? Check in actions.xml what function is called when you use bed. And then just change gender check to vocation check and use proper id in transformation
 
Its hardcoded, first you would need to change method loadFromXML, and items structure aswell I quess.
Next Change xml values ->
<attribute key="maleTransformTo" value="1762" />
<attribute key="femaleTransformTo" value="7778" />

Code:
	if(player && it.transformUseTo[player->getSex(false)])

in
Code:
void BedItem::updateAppearance(const Player* player)

you would need to change this. I would like to help you with that, but im busy and actualy have no time to that for you.
 
Back
Top