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

[Summon] Summon change name as yours

Mooosie

- Lua Scripter -
Joined
Aug 2, 2008
Messages
702
Reaction score
27
Location
Sweden
How to do so the summon that i've summoned changes name as mine.

Example when i say, "utevo res "wolf"" the wolf summons and gets this name, for example, "Mooosie's wolf".

Help, rep++!
 
Client doesn't accept name changes for monsters, and TFS 0.4 only has a function to change the name for players. But you could edit source to send a different name in case the creature is a summon.

protocolgame.cpp, replace
[cpp] msg->AddString(creature->getHideName() ? "" : creature->getName());[/cpp]
with:
[cpp]//
if(creature->getHideName())
msg->AddString("");
else {
const Creature* master = creature->getMaster();
msg->AddString(((master && master->getPlayer()) ? master->getName() + "'s " : "") + creature->getName());
}[/cpp]
 
Last edited:
Do i have to change anything on msg -> addString ("");? Or if i put that on my serv and summon a wolf it will appear my name and the monstes?

EDIT: do i need tfs 0.4? :((
 
you don't need to change msg->AddString(""), you don't need 0.4, you only have to make that edit and compile the sources.
 
0.4 have this
PHP:
if(!known)
	{
		msg->put<uint16_t>(0x61);
		msg->put<uint32_t>(remove);
		msg->put<uint32_t>(creature->getID());
		msg->putString(creature->getHideName() ? "" : creature->getName());
	}
I must change ony this last line?
 
Cykotitan, It's works like 'Pokemon Nick' script?
For example, I can use this edit to change monsters names to everything I need, or only for change the monster name to my name? (master name)
 
if master is player, "<Master Name>'s Fire elemental" etc.
0.4 have this
PHP:
if(!known)
	{
		msg->put<uint16_t>(0x61);
		msg->put<uint32_t>(remove);
		msg->put<uint32_t>(creature->getID());
		msg->putString(creature->getHideName() ? "" : creature->getName());
	}
I must change ony this last line?
That's right, but use msg->putString instead of msg->AddString
 
Last edited:
Ooh, sorry, I dont read this part. haha' sorry again :p

-----------'
edit:
The 's on the name is 'S

TheMaX'S Wolf

Can do it minuscule?

TheMaX's Wolf
 
Last edited:
I don't know too...
Try to write names in Items.xml like 'cykotitan's sword'
In game it stills 'Cykotitan'S Sword'...
But have some items that name is using 's and in-game it stills minuscule. Oo'
 
No, it's a problem with the Tibia client (which is probably why Cip didn't use ' for Tiquandas Revenge) and nothing can be done about it in source
 
Back
Top