People really like my server. But whenever someone mentions L2Mid, the haters show up and start throwing shits 🙂 I can't really say much about the 50–100 online players. I’m thinking of giving L2Mid a try later this yearif anyone’s interested, let’s keep it positive.
LF a skilled (& affordable 😆 ) developer to help me create some stuff for a project.
Message me your discord or type it as a response here and I'll be adding you if you're providing services.
Im writing for someone that share my vision a good L2 gold style server that won't just randomly shut like L2 Gold.in and will help me maybe build the server for the comunity
Question
Irrelevant
Hello again! XD .
Well i created a zone with auto-revive when a player is dead inside zone.
But i want check if players is dead before auto-revive..
Because even he get res before cooldown of auto-revive, after cooldown he teleport to revived-location even he is alive :/.
i want check if player isDead before auto-revive to avoid if he is alive to revive .
i hope you understand :)
Code i use:
public void onDieInside(final L2Character character)
{
if (character instanceof L2PcInstance)
{
final L2PcInstance activeChar = ((L2PcInstance) character);
if(Config.revive)
{
ThreadPoolManager.getInstance().scheduleGeneral(new Runnable()
{
@Override
public void run()
{
activeChar.doRevive();
heal(activeChar);
int[] loc = Config.spawn_loc[Rnd.get(Config.spawn_loc.length)];
activeChar.teleToLocation(loc[0]+Rnd.get(-Config.radius,Config.radius), loc[1]+Rnd.get(-Config.radius,Config.radius), loc[2]);
}
},Config.revive_delay*1000);
}
}
Also i tried something like this but nothing:
public void onDieInside(final L2Character character)
{
if (character instanceof L2PcInstance)
{
final L2PcInstance activeChar = ((L2PcInstance) character);
try
{
Thread.sleep(600);
}
catch (InterruptedException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
if(Config.revive && activeChar.isDead())
{
ThreadPoolManager.getInstance().scheduleGeneral(new Runnable()
{
@Override
public void run()
{
activeChar.doRevive();
heal(activeChar);
int[] loc = Config.spawn_loc[Rnd.get(Config.spawn_loc.length)];
activeChar.teleToLocation(loc[0]+Rnd.get(-Config.radius,Config.radius), loc[1]+Rnd.get(-Config.radius,Config.radius), loc[2]);
}
},Config.revive_delay*1000);
}
}
Help!! i tried to find similar code to find a solution but couldnt!
Edited by Irrelevant7 answers to this question
Recommended Posts