![]() |
|
Arena Spawn - Printable Version +- LCKB (https://lckb.dev/forum) +-- Forum: ** OLD LCKB DATABASE ** (https://lckb.dev/forum/forumdisplay.php?fid=109) +--- Forum: Release Zone (https://lckb.dev/forum/forumdisplay.php?fid=190) +---- Forum: Episode 4 Releases (https://lckb.dev/forum/forumdisplay.php?fid=156) +----- Forum: Server Side (https://lckb.dev/forum/forumdisplay.php?fid=138) +----- Thread: Arena Spawn (/showthread.php?tid=5061) |
- pwesty - 07-25-2023 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 ? - Andrein95 - 08-05-2024 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? - Desarija - 08-05-2024 3 hours ago, Andrein95 said: Cool feature. If I understood well, this spawn, near arena is triggered only when a pc dies inside arena? exactly, that is the intention - Andrein95 - 09-04-2024 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 ? pwesty, would you mind to share Juno wld map to apply this feature? - Desarija - 09-08-2024 you can use this with any .wld, you just need to set up the correct subzone. His post includes a guide how to add a new subzone in t_zonedata, use its ID (for example if u have 11 subzones, the ID of the last one would be 10) here: extra = 11; //pwesty arena spawn - Andrein95 - 10-23-2024 /index.php?/profile/2016-pwesty/&do=hovercard" data-mentionid="2016" href="/index.php?/profile/2016-pwesty/" rel="">@pwesty would you mind to share correct .wld for this one? Thanks Desarija |