Ryouken

Joined: 10th Apr 2012
Posts: 1040
Is it possible to warp a party
Is it possible to make a code that warps the user and the party that they're the leader of to a specified location?
If so, how would it be arranged o.o
I'm not too good at coding eo yet :s although i can look in parts of the code and get ideas of how some ideas i have work o.o
I'm not sure how i would get this one to work though.
14 years, 9 weeks ago
|
Re: Is it possible to warp a party
The answer is yes butThe question seems funny...
"is it possible to make a code that warps the user and the party that they're the leader of to a specified location?"
In a command or instance?
Most likely you just gotta check
if( this->player->character->party)
{
this->player->character->Warp(map,x,y,ANIMATION_NONE);
}
14 years, 9 weeks ago
|
Ryouken

Joined: 10th Apr 2012
Posts: 1040
Re: Is it possible to warp a party
Thanks ^^, I'm just wondering if its a lost cause or not. I like making small codes like this to better understand how eoserv works. :P
And i was thinking of making it a command like "#home". This would warp the user and party to their home map but only if they were the lead of the party.
14 years, 9 weeks ago
|
Re: Is it possible to warp a party
else if (command.length() >= 4 && command.compare(0,4,"home") == 0 && arguments.size() >= 0)
{
Character *par = this->player->character->world->GetCharacter(this->player->character->party);
if(this->player->character->party->leader)
{
this->player->character->Warp(map,x,y,WARP_ANIMATION_NONE);
par->Warp(map,x,y,WARP_ANIMATION_NONE);
}
}
Somthin like that
14 years, 9 weeks ago
|
Ryouken

Joined: 10th Apr 2012
Posts: 1040
Re: Is it possible to warp a party
Oh thanks, I was just going to go through tons of errors till I got it right xP
This saves time though. Much appreciated :3
14 years, 9 weeks ago
|
Misca

Joined: 10th May 2011
Posts: 2738
Re: Is it possible to warp a party
Should add in a line making party members accept the warp otherwise you could just mass warp players to an area they don't want to be at. ---
Former multi-server mapper.
14 years, 9 weeks ago
|
Ryouken

Joined: 10th Apr 2012
Posts: 1040
Re: Is it possible to warp a party
I don't think its possible to do that because request boxes and stuff like that are usually client side. The server sends the packets and such to make it pop up and the buttons you push triggers the client to send packets back. but if the functions not on the client its not possible. x.x
Although i could have the exit from the home have one of the special tiles and have the tile warp the player to their last location before then. and have it save their last location before that.
14 years, 9 weeks ago
|
Jimbo
Joined: 17th Mar 2009
Posts: 416
Re: Is it possible to warp a party
Sure it's possible.
UTIL_FOREACH(this->party->members, x)
{
x->warp(x, y, map); // etc...
}
When you create a party in EOServ there's a vector that stores a reference of everyone in that party.
---
I forgot what I was going to write...
14 years, 9 weeks ago
|
Ryouken

Joined: 10th Apr 2012
Posts: 1040
Re: Is it possible to warp a party
Awesome :D didn't know that. Pretty useful
The vector is x?
14 years, 9 weeks ago
|
Re: Is it possible to warp a party
You can call the x anything its just an examle
14 years, 9 weeks ago
|
Re: Is it possible to warp a party
this->party->members would be the vector. You could have a local system message pop up and they could say a command wether to accept the warp or not.
---
Andrewbob - I would be on the fucking copter of rofls
Programmer, Web Developer, and Graphics Designer
14 years, 9 weeks ago
| | | | | | | | | | | |