• 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] How to add new distance and effects in TFS workin?

Cronos

New Member
Joined
Jul 2, 2007
Messages
51
Reaction score
0
Help] How to add new distance and effects in TFS workin?
If i add a new distance or a effect in a client and run with TFS server doesnt work, if some have the answer.


Here is a request i made it please i need help:



Hello, i have a question, (please answer me). I use The Forgotten Server.
I add to a client (with a help of .spr editor) a new magic effect and a new distance effect, but when i try to use in the server doesnt work.
Example:
Last effect is 56 ( CONST_ME_TUTORIALSQUARE),
I added a new effect (in spr editor is 57 i named test_ffect)
Ok, when i try to use doesnt happen, i was watching the source and i found it the file named const.h and i added =

NM_ME_PLANTATTACK = 0x36, //54
NM_ME_TUTORIALARROW = 0x37, //55
NM_ME_TUTORIALSQUARE = 0x38, //56
NM_ME_TESTEFFECT = 0x39, //57 --- HERE I ADDED

and i added in tools.cpp =

{"plantattack", NM_ME_PLANTATTACK},
{"tutorialarrow", NM_ME_TUTORIALARROW},
{"tutorialsquare", NM_ME_TUTORIALSQUARE},
{"testeffect", NM_ME_TESTEFFECT} --- HERE I ADDED
};


Ok, the compiler work its and i replace the file, but when i test the server its same than first :S

Please if somebody can answer me i give rep.

Pd. Sorry for my bad english

Sincerly,
Cronos.
 
had same problem

go to protocolgame.cpp

find this

and set limit to bigger (limit of effects) ;) hope i helped

void ProtocolGame::sendMagicEffect(const Position& pos, uint8_t type)
{
if(canSee(pos) && type <= 67)
{
NetworkMessage_ptr msg = getOutputBuffer();
if(msg)
{
TRACK_MESSAGE(msg);
AddMagicEffect(msg, pos, type);
}
}
}
 
Back
Top