l2jkain Posted November 15, 2016 Posted November 15, 2016 Good as the title speaks everything I want. I want for a 5-second interval to appear a second message. I use google translator if you have something wrong, sorry.
0 Versus Posted November 15, 2016 Posted November 15, 2016 Depends on the pack you're using, but here's an example for aCis. activeChar.sendPacket(new ExShowScreenMessage("SCREEN MSG", 5000, SMPOS.TOP_CENTER, false));
0 l2jkain Posted November 15, 2016 Author Posted November 15, 2016 I want this to appear after 10 seconds after the player logs on how? Because as soon as the play loga opens the days of vip they still have if (Config.SERVER_TIME_ON_START) activeChar.sendPacket(new ExShowScreenMessage("L2 Serve Time is " + fmt.format(new Date(System.currentTimeMillis())), 10000, 0x02, true));
0 Versus Posted November 15, 2016 Posted November 15, 2016 (edited) if (Config.SERVER_TIME_ON_START) ThreadPoolManager.getInstance().scheduleGeneral(() -> activeChar.sendPacket(new ExShowScreenMessage("L2 Serve Time is " + fmt.format(new Date(System.currentTimeMillis())), 10000, 0x02, true)), 10000); Edited November 16, 2016 by Versus
0 Versus Posted November 16, 2016 Posted November 16, 2016 ThreadPoolManager class exists in different variations among packs. Find the right class, the right method and the code i posted will work 100%.
0 l2jkain Posted November 16, 2016 Author Posted November 16, 2016 It appears more of the vip no longer appears if (Config.SERVER_TIME_ON_START) ThreadPool.schedule(() -> activeChar.sendPacket(new ExShowScreenMessage("L2 Serve Time is " + fmt.format(new Date(System.currentTimeMillis())), 10000, 0x02, true)), 10000);
0 AccessDenied Posted November 16, 2016 Posted November 16, 2016 ThreadPoolManager.getInstance().scheduleGeneral(new Runnable() { @Override public void run() { //Code here } }, 10000L,);
0 Versus Posted November 16, 2016 Posted November 16, 2016 (edited) @l2jkain I don't understand what you wanna say, anyway i think it's pretty simple.. That should work: activeChar.sendPacket(new ExShowScreenMessage("VIP SCREEN MSG", 5000, SMPOS.TOP_CENTER, false)); if (Config.SERVER_TIME_ON_START) ThreadPoolManager.getInstance().scheduleGeneral(() -> activeChar.sendPacket(new ExShowScreenMessage("L2 Serve Time is " + fmt.format(new Date(System.currentTimeMillis())), 5000, 0x02, true)), 6000); @AccessDenied, the code you posted does exactly the same as what i posted. Only difference, the way i used can be done in 1 line. Edited November 16, 2016 by Versus
0 AccessDenied Posted November 16, 2016 Posted November 16, 2016 (edited) @l2jkain I don't understand what you wanna say, anyway i think it's pretty simple.. That should work: activeChar.sendPacket(new ExShowScreenMessage("VIP SCREEN MSG", 5000, SMPOS.TOP_CENTER, false)); if (Config.SERVER_TIME_ON_START) ThreadPoolManager.getInstance().scheduleGeneral(() -> activeChar.sendPacket(new ExShowScreenMessage("L2 Serve Time is " + fmt.format(new Date(System.currentTimeMillis())), 5000, 0x02, true)), 6000); @AccessDenied, the code you posted does exactly the same as what i posted. Only difference, the way i used can be done in 1 line. You're silly kid, the code you write is only for Java 8, you cannot know what java v he uses. JAVA 6-7: ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new Runnable() { @Override public void run() { } } JAVA 8: ThreadPoolManager.getInstance().scheduleGeneral(() -> Edited November 16, 2016 by AccessDenied
0 Versus Posted November 16, 2016 Posted November 16, 2016 You're silly kid, the code you write is only for Java 8, you cannot know what java v he uses. Java 8 has been released since early 2014 and he's obviously using aCis, but yes call me a silly kid for trying to educate you.
0 AccessDenied Posted November 16, 2016 Posted November 16, 2016 Java 8 has been released since early 2014 and he's obviously using aCis, but yes call me a silly kid for trying to educate you. awwwwwww u so cute :DDDDDDD
Question
l2jkain
Good as the title speaks everything I want. I want for a 5-second interval to appear a second message.
I use google translator if you have something wrong, sorry.
11 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now