EOSERV Forum > Seose > Is there anyway i can add new commands to my server?
Topic is locked.
Page: << 1 >>
Is there anyway i can add new commands to my server?
Author Message
Post #47748 Is there anyway i can add new commands to my server?

I need to add new commands such as:


+home  (Any player can do it)


                                                       All i need is anything as simple as a warp home command




              Please Help!

---
Hell yeah! Got myself some Eoserv.
15 years, 42 weeks ago
Post #47758 Re: Is there anyway i can add new commands to my server?

if (message[0] == '#')   // or case '#': if you using EOMaximum source
{
std::string command;
std::vector<std::string> arguments = util::explode(' ', message);
command = arguments.front().substr(1);
arguments.erase(arguments.begin());

if (command.length() == 4 && command.compare(0,4,"home") == 0)
{
this->player->character->Warp(5,40,47,WARP_ANIMATION_NONE);
}
}

5,40,47 takes you to aeven square so just set that to whatever you want,i'msure someoine will tell you how to do it reading from a .ini but that's just a quick mock up :)

EDIT: OOPS didnt see the forum section. Sorry.

---
If money doesn't grow on trees, then why do banks have branches?
15 years, 42 weeks ago
Page: << 1 >>
Topic is locked.
EOSERV Forum > Seose > Is there anyway i can add new commands to my server?