Discord : utchiha_market
Telegram : https://t.me/utchiha_market
Auto Buy Store : https://utchihamkt.mysellauth.com/
Not sure if we’re legit? Check Our server — real reviews, real buyers
https://discord.gg/uthciha-servicess | https://campsite.bio/utchihaamkt
Discord : utchiha_market
Telegram : https://t.me/utchiha_market
Auto Buy Store : https://utchihamkt.mysellauth.com/
Not sure if we’re legit? Check Our server — real reviews, real buyers
https://discord.gg/uthciha-servicess | https://campsite.bio/utchihaamkt
Discord : utchiha_market
Telegram : https://t.me/utchiha_market
Auto Buy Store : https://utchihamkt.mysellauth.com/
Not sure if we’re legit? Check Our server — real reviews, real buyers
https://discord.gg/uthciha-servicess | https://campsite.bio/utchihaamkt
Discord : utchiha_market
Telegram : https://t.me/utchiha_market
Auto Buy Store : https://utchihamkt.mysellauth.com/
Not sure if we’re legit? Check Our server — real reviews, real buyers
https://discord.gg/uthciha-servicess | https://campsite.bio/utchihaamkt
Discord : utchiha_market
Telegram : https://t.me/utchiha_market
Auto Buy Store : https://utchihamkt.mysellauth.com/
Not sure if we’re legit? Check Our server — real reviews, real buyers
https://discord.gg/uthciha-servicess | https://campsite.bio/utchihaamkt
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