Ventricle Posted January 4, 2014 Share Posted January 4, 2014 (edited) Hello guys , MXC is dead nowadays , so i decided to code this shit. Also I miss L2J Basically it gets the data from the website (Ex : http://l2leaders.comoj.com/announce) and announce it You make new file in your host and name it whatever you want and then put (Announcement here| auto announce time) SO if you put (Vote for US|60) it will announce vote for us every 60 seconds To change website String websiteURL = "the link containing the announce data"; You don't need to restart server each time you change the text it will update automatically Code : http://pastebin.com/FLuaDDpu Not tested but it should work. Credits : Me aka Marwan Edited January 4, 2014 by Ventricle Quote Link to comment Share on other sites More sharing options...
^Wyatt Posted January 4, 2014 Share Posted January 4, 2014 (edited) Which is the point of making a connection to a website and get the info from there? Instead of doing it via configs? Imo is the worst way. You wouldn't need to restart the server via config neither if you load the info from the .properties every time. And this... + @Override + public void run() + { + Announcements.getInstance().announceToAll(text); + getInstance(); + } way more logical to getInstance() before the announcements, to update the info if it's changed. Edited January 4, 2014 by ^Wyatt Quote Link to comment Share on other sites More sharing options...
AbsolutePower Posted January 4, 2014 Share Posted January 4, 2014 whats the point to make a auto announce from website? from the moment that there are far better ways. Quote Link to comment Share on other sites More sharing options...
Guest Elfocrash Posted January 4, 2014 Share Posted January 4, 2014 whats the point to make a auto announce from website? from the moment that there are far better ways. Cuz everyone can log in Lineage from his phone or a pc without lineage and edit auto announcements right? Oh wait. Quote Link to comment Share on other sites More sharing options...
^Wyatt Posted January 4, 2014 Share Posted January 4, 2014 (edited) Cuz everyone can log in Lineage from his phone or a pc without lineage and edit auto announcements right? Oh wait. If you can edit a .txt/html file and upload it to the server with the phone, you can edit a .properties file and upload it to the server too, don't you? :x Edited January 4, 2014 by ^Wyatt Quote Link to comment Share on other sites More sharing options...
SweeTs Posted January 4, 2014 Share Posted January 4, 2014 If you can edit a .txt/html file and upload it to the server with the phone, you can edit a .properties file and upload it to the server too, don't you? :x Gods, Wyatt.. :D That was a sarcasm :happyforever: :happyforever: Quote Link to comment Share on other sites More sharing options...
Guest Elfocrash Posted January 4, 2014 Share Posted January 4, 2014 Gods, Wyatt.. :D That was a sarcasm :happyforever: :happyforever: This. Also i now saw the code and this one is terribly not efficient. Opening a conneciton on top of a vote reward system can be terrible for te server + that the code itself is bad. You already use a site to upload the shit so why no adding a php file where you have 2 textboxes and a button. One for the content of the announcement and one for the seconds. You submit and you save these 2 values in a db table. You simply call the text and seconds from db and you did it properly. If you wanna take it a step too far you can also make a delete and add more than one button in the site but i doubt it you have such a skill no offense. Quote Link to comment Share on other sites More sharing options...
Ventricle Posted January 4, 2014 Author Share Posted January 4, 2014 but i doubt it you have such a skill no offense. Challenge accepted :) Quote Link to comment Share on other sites More sharing options...
^Wyatt Posted January 5, 2014 Share Posted January 5, 2014 (edited) Gods, Wyatt.. :D That was a sarcasm :happyforever: :happyforever: Lolz plix plux no sarcasm allowed nowadays, no brain ready to decrypt elfo's sarcam srsly :happyforever: Edited January 5, 2014 by ^Wyatt Quote Link to comment Share on other sites More sharing options...
SweeTs Posted January 5, 2014 Share Posted January 5, 2014 (edited) Lolz plix plux no sarcasm allowed nowadays, no brain ready to deencrypt elfo's sarcam srsly :happyforever: Trololol, you should trolloucked your brain. Oh wait, unlloucked.. :D Cuz everyone can log in Lineage from his phone or a pc without lineage and edit auto announcements right? Oh wait. You should read carefully nigga, or go to a doctor for new pair of glasses :happyforever: :happyforever: :-beep- yeah: Edited January 5, 2014 by SweeTs Quote Link to comment Share on other sites More sharing options...
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.