[Release] Level Ticker

I never gave you the full file, so if you copied that and repasted over everything ur screwed, if you didn't, it should work fine, maybe try doing the instructions again.
 
I devolp for myself, my server is not public, I simply love to program so I consider it as a project and I want other people to have neat features. Because of this, no lag is caused.

Also, i can kill 1 thing and get 200 lvl's and it wont lag, cause it overwrites itself, it doesn't spam.
 
Mines setup to make a notice instead. Just use:
char sendstring[500] = {'\0'};
strcpy_s(sendstring, player->getName());
strcat_s(sendstring, " has reached level ");
char buffer[500] = {'\0'};
itoaa(player->getLevel(),buffer,10);
strcat_s(sendstring, buffer);
strcat_s(sendstring, "!");
PlayersPacket::showMassage(sendstring, 0);

and in the includes add: #include "PlayersPacket.h"

Works for me.

EDIT: Posted the old broken one, lemme go find the one I have...
EDIT2: Fixed it!
 
Last edited:
i add this so , it only will work ... when someone reach lvl 200

void LevelsPacket::levelUP(Player* player, vector <Player*> players){
Packet packet = Packet();
packet.addHeader(0x23);
packet.addShort(0);
packet.addShort(0x7C10);
packet.addShort(1);
packet.addByte(player->getLevel());
packet.addShort(player->getHP());
packet.addShort(player->getMHP());
packet.addShort(player->getMP());
packet.addShort(player->getMMP());
packet.addShort(player->getAp());
packet.addInt(player->getExp());
packet.packetSend(player); // TODO
packet = Packet();
packet.addHeader(0x85);
packet.addInt(player->getPlayerid());
packet.addByte(0);
packet.sendTo(player, players, 0);
if (player->getLevel() == 200){
char sendstring[500] = {'\0'};
strcpy_s(sendstring, player->getName());
strcat_s(sendstring, " has reached level ");
char buffer[500] = {'\0'};
itoaa(player->getLevel(),buffer,10);
strcat_s(sendstring, buffer);
strcat_s(sendstring, "!");
Server::changeScrollingHeader(sendstring);
}
}


credits to owner of post

have fun
 
How can i make this appear only when someone hits level 200?
 
Mines setup to make a notice instead. Just use:
char sendstring[500] = {'\0'};
strcpy_s(sendstring, player->getName());
strcat_s(sendstring, " has reached level ");
char buffer[500] = {'\0'};
itoaa(player->getLevel(),buffer,10);
strcat_s(sendstring, buffer);
strcat_s(sendstring, "!");
PlayersPacket::showMassage(sendstring, 0);

and in the includes add: #include "PlayersPacket.h"

Works for me.

EDIT: Posted the old broken one, lemme go find the one I have...
EDIT2: Fixed it!
That might probably lag, lol.
 
Back