Slayerduck Posted September 6, 2013 Posted September 6, 2013 Hello, I've made my PVP Zone Mithril Coal Mines. So, now when someones dies.. and he clicks on "To Town" he gets spawned into the nearest town. I want to change that, that he spawns at random spawnpoints in the pvp zone, how do i do that? Core: L2jFrozen Quote
0 ^Wyatt Posted September 6, 2013 Posted September 6, 2013 Add a check inside RequestRestartPoint.java, if the player is inside your custom zone, revive and teleport him to your custom point and 'return;'. Quote
0 Diabaths Posted September 6, 2013 Posted September 6, 2013 or just put spam location inside your zone!!! Quote
0 Vkouk Posted September 7, 2013 Posted September 7, 2013 Guess needs something like this in requestrestartpoint.java if (activeChar.isInsideZone(L2Character.ZONE_UNUSED) && activeChar.isDead()) { activeChar.doRevive(); activeChar.teleToLocation(0, 0, 0); activeChar.sendMessage("You have been teleported ...."); return; } Or even try this code in Die.java if (_activeChar.isInsideZone(L2Character.ZONE_UNUSED)) { _activeChar.doRevive(); _activeChar.teleToLocation(0, 0, 0); return; } Otherwise,we can add a check in zone's file. Quote
0 Slayerduck Posted September 7, 2013 Author Posted September 7, 2013 Guess needs something like this in requestrestartpoint.java if (activeChar.isInsideZone(L2Character.ZONE_UNUSED) && activeChar.isDead()) { activeChar.doRevive(); activeChar.teleToLocation(0, 0, 0); activeChar.sendMessage("You have been teleported ...."); return; } Or even try this code in Die.java if (_activeChar.isInsideZone(L2Character.ZONE_UNUSED)) { _activeChar.doRevive(); _activeChar.teleToLocation(0, 0, 0); return; } Otherwise,we can add a check in zone's file. And how the fuck know the core that i am in the zone lately :P? Quote
0 Vkouk Posted September 7, 2013 Posted September 7, 2013 sorry,what do you want to say cause i didnt understand you? Quote
0 ^Wyatt Posted September 7, 2013 Posted September 7, 2013 Oh god, because inside your zone.java should be something like @Override protected void onEnter(L2Character character) { if (getCastle() != null) { character.setInsideZone(ZoneId.CASTLE, true); } } @Override protected void onExit(L2Character character) { if (getCastle() != null) { character.setInsideZone(ZoneId.CASTLE, false); } } then when u check with something like if(activeChar.isInsideZone(L2Character.ZoneId.CASTLE)) "the server knows" you are inside... and will execute the lines inside the if. Quote
Question
Slayerduck
Hello,
I've made my PVP Zone Mithril Coal Mines. So, now when someones dies.. and he clicks on "To Town" he gets spawned into the nearest town.
I want to change that, that he spawns at random spawnpoints in the pvp zone, how do i do that?
Core: L2jFrozen
8 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.