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

Error with item specific id

leo18dff

Active Member
Joined
Mar 27, 2023
Messages
71
Reaction score
26
GitHub
leo18dff
1708359240226.png

1708359262860.png

Im faceing a problem here... i "created" this item with unique id 7495, there is NO other item with this id anywhere... i checked my spr with object builder, i checked item.otb with item editor, i re-check items.xml and movements xml... the is nothing with this id 7495, why it ALWAYS appears (speed +25) ? there is no attribute like that anywhere even on anyother items. I need to remove it and just let the description that i've put on the linked photo
 
I don't understand what exactly you want to do, but if you put 50 in the description it will be like 25,
<attribute key="speed" value="50" />
if you put 100 in the description it will be like 50 speed.
I have no idea why it is done like this, you have to ask a tfs developer.
 
I have no idea why it is done like this, you have to ask a tfs developer.
This case, if you put in 100, it will be 50 indeed. It was divided by 2. If you don't want it divided, you can remove the division and it will display normally. Go to protocolgame.cpp and look for this line.

C++:
void ProtocolGame::sendChangeSpeed(const Creature* creature, uint32_t speed)
{
    NetworkMessage msg;
    msg.addByte(0x8F);
    msg.add<uint32_t>(creature->getID());
    msg.add<uint16_t>(creature->getBaseSpeed() / 2);
    msg.add<uint16_t>(speed / 2);
    writeToOutputBuffer(msg);
}

change to
C++:
void ProtocolGame::sendChangeSpeed(const Creature* creature, uint32_t speed)
{
    NetworkMessage msg;
    msg.addByte(0x8F);
    msg.add<uint32_t>(creature->getID());
    msg.add<uint16_t>(creature->getBaseSpeed());
    msg.add<uint16_t>(speed);
    writeToOutputBuffer(msg);
}
In fact, I haven't tested it, but it should work.
 
This case, if you put in 100, it will be 50 indeed. It was divided by 2. If you don't want it divided, you can remove the division and it will display normally. Go to protocolgame.cpp and look for this line.

C++:
void ProtocolGame::sendChangeSpeed(const Creature* creature, uint32_t speed)
{
    NetworkMessage msg;
    msg.addByte(0x8F);
    msg.add<uint32_t>(creature->getID());
    msg.add<uint16_t>(creature->getBaseSpeed() / 2);
    msg.add<uint16_t>(speed / 2);
    writeToOutputBuffer(msg);
}

change to
C++:
void ProtocolGame::sendChangeSpeed(const Creature* creature, uint32_t speed)
{
    NetworkMessage msg;
    msg.addByte(0x8F);
    msg.add<uint32_t>(creature->getID());
    msg.add<uint16_t>(creature->getBaseSpeed());
    msg.add<uint16_t>(speed);
    writeToOutputBuffer(msg);
}
In fact, I haven't tested it, but it should work.
TY in advance, im gonna test it and reply you.
 
Back
Top