Teleport to Nearest Controlled Graveyard BG Command

Archive of discussions that have went stale. Lots o' dust over here!
User avatar
Gnurg
Posts: 2420
Joined: 28 Jan 2013 19:38
Location: Oslo, Norway

Teleport to Nearest Controlled Graveyard BG Command

#1 » Post by Gnurg » 24 Oct 2016 18:41

Back on Bloodcraft we had the function .st (stuck, I guess), which would teleport you the nearest graveyard. It might have worked outside battlegrounds, but I used it primarily for when I wasn't teleported to a new GY when someone stole your graveyard (which happens here sometimes).

I would rename it to .gy (graveyard)

Syntax would just be .gy and the result would be:
1. Check if player is dead and is in a battleground. If not, do nothing and give user feedback.
2. Teleport player to nearest graveyard.

I've tested the command handler below locally, and it works according to what I wrote above. :-)

Code: Select all


static bool HandleGraveyardCommand(ChatHandler* handler, char const* /* args */ )
{

Player* player = handler->GetSession()->GetPlayer();
if (!player)
return false;

if (!player->InBattleground()) {
handler->SendSysMessage("Graveyard can only be used in battlegrounds.");
handler->SetSentErrorMessage(true);
return false;
}

if (!player->isDead()) {
handler->SendSysMessage("Graveyard can only be used while dead.");
handler->SetSentErrorMessage(true);
return false;
}

if (Battleground * bg = player->GetBattleground()) {
if (WorldSafeLocsEntry const* closestGrave = bg->GetClosestGraveYard(player)) {
player->TeleportTo(bg->GetMapId(), closestGrave->x, closestGrave->y, closestGrave->z, player->GetOrientation());
}
}

return true;
}
Last edited by Gnurg on 06 Nov 2016 19:29, edited 4 times in total.
HAI
CAN HAZ STDIO?
VISIBLE "HAI WORLD, IZ GNURF!"
KTHXBYE

User avatar
Eronox
MVP
Posts: 2331
Joined: 24 Apr 2016 11:03
Location: in ICC & Healing

Re: Teleport to Nearest Controlled Graveyard BG Command

#2 » Post by Eronox » 24 Oct 2016 23:05

+1
.

There's things that never will be right I know, and things need changin' everywhere you go.
But 'til we start to make a move to make a few things right,
You'll never see me wear a suit of white.

- J.R Cash


User avatar
benzviliran
Posts: 1342
Joined: 16 Mar 2013 05:46
Location: Israel (the Jewish state)

Re: Teleport to Nearest Controlled Graveyard BG Command

#3 » Post by benzviliran » 24 Oct 2016 23:17

-1 this is not how it should be, players should not be able to teleport to nearest graveyard that will result in many abuses both in bgs and outside bgs.
I am the swarm

User avatar
Fastor
Posts: 4031
Joined: 16 Dec 2012 17:38

Re: Teleport to Nearest Controlled Graveyard BG Command

#4 » Post by Fastor » 24 Oct 2016 23:23

Add check is user dead.
+1

User avatar
Longi
Posts: 768
Joined: 07 Jan 2014 11:14
Location: Cenarion Hold

Re: Teleport to Nearest Controlled Graveyard BG Command

#5 » Post by Longi » 24 Oct 2016 23:25

I thought that the server has done this automatically :-) I mean move a player to nearest controlled graveyard if your team lost one where you are waiting for respawn. I think it was working on GC like this


Image



User avatar
Gnurg
Posts: 2420
Joined: 28 Jan 2013 19:38
Location: Oslo, Norway

Re: Teleport to Nearest Controlled Graveyard BG Command

#6 » Post by Gnurg » 24 Oct 2016 23:30

benzviliran wrote:-1 this is not how it should be, players should not be able to teleport to nearest graveyard that will result in many abuses both in bgs and outside bgs.
I see now that I forgot to mention that the player should be dead. Thought it was kind of obvious when it came to the graveyard stealing part, but whatever, updating first post. :-)

It's to counter the bug that when someone captures the graveyard you get placed at, you don't get teleported to a new graveyard, which to me seems to happen if it gets captured just as you get teleported there. You end up having to walk to the next graveyard in ghost-form.

I did state in the first topic that it should only work inside battleground, so outside battlegrounds shouldn't be a problem, which you'd know if you read the post (even just the title in this case).
HAI
CAN HAZ STDIO?
VISIBLE "HAI WORLD, IZ GNURF!"
KTHXBYE

User avatar
benzviliran
Posts: 1342
Joined: 16 Mar 2013 05:46
Location: Israel (the Jewish state)

Re: Teleport to Nearest Controlled Graveyard BG Command

#7 » Post by benzviliran » 25 Oct 2016 01:47

Gnurg wrote:
benzviliran wrote:-1 this is not how it should be, players should not be able to teleport to nearest graveyard that will result in many abuses both in bgs and outside bgs.
I see now that I forgot to mention that the player should be dead. Thought it was kind of obvious when it came to the graveyard stealing part, but whatever, updating first post. :-)

It's to counter the bug that when someone captures the graveyard you get placed at, you don't get teleported to a new graveyard, which to me seems to happen if it gets captured just as you get teleported there. You end up having to walk to the next graveyard in ghost-form.

I did state in the first topic that it should only work inside battleground, so outside battlegrounds shouldn't be a problem, which you'd know if you read the post (even just the title in this case).

again it can be abused in bgs and outside bgs.
I am the swarm

User avatar
kermo14k
Posts: 455
Joined: 05 Jul 2013 15:46

Re: Teleport to Nearest Controlled Graveyard BG Command

#8 » Post by kermo14k » 25 Oct 2016 09:50

How can it be abused? You are dead, opposite faction steals your graveyard, instead of getting automatically(how it should be) teleported to the nearest graveyard your faction owns, you have to run there manually or wait for your 'respawn' timer to run out so you can ress yourself manually. During that 2minutes you are dead, you could be useful and helping your team with the battleground goal, but instead you are stubborn a.f and wait for your 2minute ress.
Wtfnoheals Prot PvE/Retri PvE
Izu - Marksmanship PvE/PvP
Windcaller - Resto PvE/ Ele PvP
Retired from TW.Went off to find cheeki breeki in different places. Didn't find it here!

User avatar
Gnurg
Posts: 2420
Joined: 28 Jan 2013 19:38
Location: Oslo, Norway

Re: Teleport to Nearest Controlled Graveyard BG Command

#9 » Post by Gnurg » 25 Oct 2016 10:00

kermo14k wrote:How can it be abused? You are dead, opposite faction steals your graveyard, instead of getting automatically(how it should be) teleported to the nearest graveyard your faction owns, you have to run there manually or wait for your 'respawn' timer to run out so you can ress yourself manually. During that 2minutes you are dead, you could be useful and helping your team with the battleground goal, but instead you are stubborn a.f and wait for your 2minute ress.
The only way I can see it being 'abused' is if you as a ghost walk a bit over half of the way to next graveyard and use the command. That way only have to walk half the way, but I don't see why that would be very beneficial for you compared to just resurrecting on your current graveyard. =P

On the other hand, Liran might have misunderstood the suggestion, considering he still thinks it can be used outside battlegrounds.
HAI
CAN HAZ STDIO?
VISIBLE "HAI WORLD, IZ GNURF!"
KTHXBYE

User avatar
Kniteknite
Posts: 2090
Joined: 09 Feb 2013 16:40
Location: Great Lakes

Re: Teleport to Nearest Controlled Graveyard BG Command

#10 » Post by Kniteknite » 25 Oct 2016 10:24

+Juan~ gy can get taken, and then its a foot race to another controlled gy , that might be captured as well, having to run dead from farm to start area would not be fun ~ or if possible tweak it so one ports to controlled gy , instead of ino purgatory.
" French fries are like steaks, where the potato is the cow and gets cut up, like meat does, only on a smaller scale. "

User avatar
Gnurg
Posts: 2420
Joined: 28 Jan 2013 19:38
Location: Oslo, Norway

Re: Teleport to Nearest Controlled Graveyard BG Command

#11 » Post by Gnurg » 31 Oct 2016 13:18

Bump for visibility. Even in EotS it doesn't always work.
HAI
CAN HAZ STDIO?
VISIBLE "HAI WORLD, IZ GNURF!"
KTHXBYE

User avatar
Rohit
Posts: 202
Joined: 29 Sep 2012 07:00

Re: Teleport to Nearest Controlled Graveyard BG Command

#12 » Post by Rohit » 31 Oct 2016 15:02

+1
I think we had it on Spermik as well. It was really helpful. We need it here as well.
Character list:

Rohit Co-GM of Gentlemen Club - Holy PvP / Retribution PvE
Androgeus - Unholy PvE / Frost PvE
Xerses - Fury PvE / Protection PvE
Yantrik - Fire PvE
Feraligator - Restoration PvE / Feral PvE
Shamanz - Restoration PvE
Ameliorate - Shadow PvE / Discipline PvE
Hawkeyez - Marksmanship PvE
Zhingalala - Demonology PvE / Destruction PvE
Cryptian - Subtlety PvP 29 twink

Quit TW, amazing staff, REALLY!

User avatar
Gnurg
Posts: 2420
Joined: 28 Jan 2013 19:38
Location: Oslo, Norway

Re: Teleport to Nearest Controlled Graveyard BG Command

#13 » Post by Gnurg » 05 Nov 2016 20:55

I implemented the function locally in cs_misc.cpp (had to include battleground.h) and tested it. Worked according to the first post.

Considering the majority is in favour of this command, could a staff member take a verdict on whenever we want this implemented or not? The command handler is done, so you just have to add it to a command table. I would prefer if syntax was: .gy

Code: Select all

static bool HandleGraveyardCommand(ChatHandler* handler, char const* /* args */ )
{

Player* player = handler->GetSession()->GetPlayer();
if (!player)
return false;

if (!player->InBattleground()) {
handler->SendSysMessage("Graveyard can only be used in battlegrounds.");
handler->SetSentErrorMessage(true);
return false;
}

if (!player->isDead()) {
handler->SendSysMessage("Graveyard can only be used while dead.");
handler->SetSentErrorMessage(true);
return false;
}

if (Battleground * bg = player->GetBattleground()) {
if (WorldSafeLocsEntry const* closestGrave = bg->GetClosestGraveYard(player)) {
player->TeleportTo(bg->GetMapId(), closestGrave->x, closestGrave->y, closestGrave->z, player->GetOrientation());
}
}

return true;
}
HAI
CAN HAZ STDIO?
VISIBLE "HAI WORLD, IZ GNURF!"
KTHXBYE

User avatar
Wilcox
Posts: 1589
Joined: 16 Dec 2012 13:37
Location: Kebabland

Re: Teleport to Nearest Controlled Graveyard BG Command

#14 » Post by Wilcox » 06 Nov 2016 09:15

something similar to this exists on retail already, by a button on the center top of your screen while you're dead. so yeah, it does increase quality of life, supported

User avatar
adiba
Posts: 143
Joined: 11 Mar 2013 09:35
Location: Sewers

Re: Teleport to Nearest Controlled Graveyard BG Command

#15 » Post by adiba » 06 Nov 2016 09:29

+1

Locked

Who is online

Users browsing this forum: No registered users and 0 guests