EOSERV Forum > EOSERV > Party Add Command 535
Page: << 1 >>
Party Add Command 535
Author Message
Post #204367 Party Add Command 535

I found this command while looking through the revision mod I released and thought I'd share it. It's a super basic command I used to invite people to parties without having to warp to them & click on them. It's more a novelty & I'm surprised one hasn't been made before tbh:

void AddToParty(const std::vector<std::string>& arguments, Character* from)

{

    Character * ch = from->SourceWorld()->GetCharacter(arguments[0]);


    if(ch){

        if(!from->party){

            new Party(from->world, from, ch);

        }

        else{

            from->party->Join(ch);

        }

        ch->StatusMsg(util::ucfirst(from->SourceName())+" added you to a party");

    }else{

    from->ServerMsg("Player not found");

    }

}


&&


RegisterCharacter({"partyadd", {"name"}, {}, 8}, AddToParty, CMD_FLAG_DUTY_RESTRICT);

---
https://Havenshost.net/web-hosting.php   - Free 5GB web host
34 weeks, 3 days ago
Post #204384 Re: Party Add Command 535

Nice release! I think someone had it at one point on a server, my memory may be lying though! 

---
CN:BH 4 lyfe
33 weeks, 5 days ago
Post #204424 Re: Party Add Command 535

how do i make this command work? do i copy the code into a notepad and rename it and create a folder in data that says commands? or idk

30 weeks, 3 days ago
Post #204467 Re: Party Add Command 535
Afroman posted: (20th Oct 2018, 05:20 am)

how do i make this command work? do i copy the code into a notepad and rename it and create a folder in data that says commands? or idk


You have to put it in your commands source code file , add the source code for the command name and make it pass its arguments to this function. Then re-compile eoserv.
---
I not hacker

“Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its
whole life believing that it is stupid.” - Albert Einstein : Really Great Quote Ramy!
27 weeks, 2 days ago
Page: << 1 >>

EOSERV Forum > EOSERV > Party Add Command 535