Jump to content

Recommended Posts

Posted (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 by Ventricle
Posted (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 by ^Wyatt
Guest Elfocrash
Posted

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.

Posted (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 by ^Wyatt
Posted

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:

Guest Elfocrash
Posted

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.

Posted (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 by ^Wyatt
Posted (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:

 

big-glasses.jpg

Edited by SweeTs

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...