i've tried to make a code for L2GuardInstance. I wanted add some checks to guard's target list and make them give more hate (focus) on targets that have the proper checks.
Example if a player hit a guard the guard will attack him and by that time a Karma player can move in tower without guard change target and him him.
So basically what i did.
In L2GuardInstance.java i added some small code:
public ScheduledFuture<?> getScheduler()
{
return _schedule;
}
public void setScheduledTask(ScheduledFuture<?> task)
{
_schedule = task;
}
and then i made a ThreadPoolManager (check every 1250 ms)
for (PcInstance player : guard.getKnownList().getKnownPlayers().values)
{
if (player.getKarma > 0)
{
guard.setTarget(player);
guard.dotAttack(player);
}
{
The threadpool is activated upon @Override addKnonwObject and stop at @Override removeKnownObject. (Like bellow)
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.
🤝 SocNet is looking for new partners and suppliers!
We are building a reliable partner network across all areas of online business.
If you're in digital, traffic, accounts, or media — let’s discuss collaboration opportunities.
📌 Open to:
— Webmasters and media buyers
— Telegram channel and website owners
— Sellers of accounts and auto-registered profiles
— Developers of digital services
— Marketing agencies and freelancers
💬 We value quality, transparency, and growth. If that resonates with you — get in touch!
📎 Our current list of partners:
🔗 https://socnet.bgng.io/partners
📦 Our key products:
🛒 Online Store: Click ✅
🤖 Telegram Bot: Click ✅
📲 SMM Panel: Click ✅
📩 Contact us:
💬 Telegram: https://t.me/solomon_bog
📱 WhatsApp: https://wa.me/79051904467
🎮 Discord: https://discord.gg/y9AStFFsrh
📧 Email: solomonbog@socnet.store
📢 Follow updates: https://t.me/accsforyou_shop ✅
🤝 SocNet is looking for new partners and suppliers!
We are building a reliable partner network across all areas of online business.
If you're in digital, traffic, accounts, or media — let’s discuss collaboration opportunities.
📌 Open to:
— Webmasters and media buyers
— Telegram channel and website owners
— Sellers of accounts and auto-registered profiles
— Developers of digital services
— Marketing agencies and freelancers
💬 We value quality, transparency, and growth. If that resonates with you — get in touch!
📎 Our current list of partners:
🔗 https://socnet.bgng.io/partners
📦 Our key products:
🛒 Online Store: Click ✅
🤖 Telegram Bot: Click ✅
📲 SMM Panel: Click ✅
📩 Contact us:
💬 Telegram: https://t.me/solomon_bog
📱 WhatsApp: https://wa.me/79051904467
🎮 Discord: https://discord.gg/y9AStFFsrh
📧 Email: solomonbog@socnet.store
📢 Follow updates: https://t.me/accsforyou_shop ✅
Question
Ο Χάρος
Hello people,
i've tried to make a code for L2GuardInstance. I wanted add some checks to guard's target list and make them give more hate (focus) on targets that have the proper checks.
Example if a player hit a guard the guard will attack him and by that time a Karma player can move in tower without guard change target and him him.
So basically what i did.
In L2GuardInstance.java i added some small code:
and then i made a ThreadPoolManager (check every 1250 ms)
The threadpool is activated upon @Override addKnonwObject and stop at @Override removeKnownObject. (Like bellow)
So basically whenever a object enter in knownList, if task == null it will start scheduler.
It didn't work at all.. Any advice or how i should do this?
Edited by Ο Χάρος4 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.