08-05-2024, 09:06 AM
On 7/25/2023 at 4:59 AM, pwesty said:
Not sure if this is liked or wanted but im gonna share some code for arena spawn. There is a few ways you can do it but this is the way i did it.
in file
in your sharelib config.h or config localize usa etc
make sure you define #define ARENA_SPAWN in one of them.
GameServer\doFuncRebirth.cpp
around line ~50
you will see this
int zone = ZONE_START;
int extra = 0;
int posX = GET_X(ch), posZ = GET_Z(ch);
switch (ch->m_pZone->m_index)
you wont have this line "int posX = GET_X(ch), posZ = GET_Z(ch);"
So add this to yours first.
second at line ~95 you'll see this
#endif
zone = ch->m_pZone->m_index;
extra = 0;
Below this add this define
#ifdef ARENA_SPAWN
if (ch->m_pZone->m_index == ZONE_START && posX < 1315 && posX > 1270 && posZ < 1030 && posZ > 920)
{
extra = 11; //pwesty arena spawn
}
#endif
This here "posX < 1315 && posX > 1270 && posZ < 1030 && posZ > 920"
is the dimension of your arena. What i have here is the ep1 style juno arena, non modified so you're welcome to use these cords for yours if you use juno ep1 style
extra = 11 is where your new t_zonedata spawn is for where you want people to resurrect at.
the best thing to do is put a spawn pad down and mouse over the middle of the spawn pad and get those cords and use that as your "extra"
if you need a small tutorial how to add a new extra position here's this
t_zonedata
adjust zone 0 = juno
columns
a_poscount
a_posylayer
a_posleft
a_postop
a_posright
a_posbottom
will need to be adjusted to add the extra.
increment the poscount by 1
poslayer = 0 for juno
positions left right top bottom will be the x z of your positon of the cords of of the arena.
posleft and posright will be your X
postop and posbottom will be your Z
you can have a range of X and a range of Z
but for today we're going to make it simple.
2
this is the x and z cord of the center of the of the spawn.
hope you enjoy this if you need any help ask away ?
Cool feature.
If I understood well, this spawn, near arena is triggered only when a pc dies inside arena?

