EOSERV Forum > EOSERV > code for #compare command [release]
Page: << 1 >>
code for #compare command [release]
Author Message
Post #200750 code for #compare command [release]

I was ***** bored so i decided to code this useful command which let the user compare between the stats of two items by showing a virtual locker where the user adds the two items that he wants to compare.
Tested on Rev 535

gif for illustration 


To add this code : 

1- Go to Locker.cpp , in sources/src/handlers 

*replace this http://pastebin.com/s0hT8fnc with this http://pastebin.com/h1djDmtk

*in the same file 

after  std::size_t lockermax = static_cast<int>(character->world->config["BaseBankSize"]) + character->bankmax * static_cast<int>(character->world->config["BankSizeStep"]);



2-Go to character.hpp in headers/src

*add this #include "eoserv_windows.h" 
before #include "fwd/character.hpp"

*in the same file 

add this http://pastebin.com/BeniufBH

after ~Character();

3-Go to character.cpp , in sources/src

*add this http://pastebin.com/TJ1dLPWy
before Character::~Character()

4-If you already have a player command system make a #compare command including this (if you do have a command system for players and need help adding this just reply) :


    PacketBuilder reply(PACKET_LOCKER, PACKET_OPEN,2);




  *If you don't have a command system for normal players :
  Go to Talk.cpp , in sources/src/handlers
  replace http://pastebin.com/6N7Bs6Dm
  with http://pastebin.com/qRfbaDRH


 The only drawback is that opening a locker in pos 0,0 aka top corner will call this command instead of opening the locker.

2 years, 47 weeks ago
Post #200752 Re: code for #compare command [release]


Glad to see people are still working on EO related code and being generous enough to release it.

2 years, 47 weeks ago
Post #200753 Re: code for #compare command [release]

That's pretty cool. I never thought of doing something like that.

Most of the codes I make rely on systems I put in the source as well, which means a lot of lines would need to be added if I released any. If that weren't the case I would release more code. ;.; Although I have released a few in the past which didn't require too many changes.

2 years, 47 weeks ago
Post #200773 Re: code for #compare command [release]

Nice idea! Good job on the release :)

CN:BH 4 lyfe
2 years, 46 weeks ago
Page: << 1 >>

EOSERV Forum > EOSERV > code for #compare command [release]