Jump to content

Auto Announcing From Website


Recommended Posts

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

Guest Elfocrash

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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:

Link to comment
Share on other sites

Guest Elfocrash

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.



  • Posts

    • rename the l2.bin into l2.exe
    • L2LIVE.PRO- Dynamic Mid-rates Essence Seven Signs GRAND OPENING - July 5, 20:00 GMT+3 (EEST) TEST SERVER IS OPEN - COME AND CHECK IT OUT TODAY! Join our community and be part of it at: https://www.l2live.pro https://discord.gg/k3NMgR4Dmu   Server description * EXP/SP: Dynamic (x1- x100 based on your level, *before* Sayha and EXP buffs * Adena: x50 / Item Drop: x10 / Fishing EXP increased / Attribute EXP increased * Simplified gameplay to stay in the loop while not spending hours and hours farming * Starter Pack containing very useful items for beginners * MP replenishing potions with auto-consumption * No overpowered donations L2LIVE shop * All spellbook coupons, pet spellbook coupons and master books are sold via Game Assistant * Additionally you can buy SP pouches, enchanted talismans, pet training guides and various other consumables for Adena and L-Coin * More items such as cloaks, more talismans, agathions, belts, pendants, enchantment scrolls of various grades, evolution stones, etc will be added! Shop server as a shortcut, and all retail-like ways of earning items are still here! L-Coins * Drops with small change and in random amounts from Lv60+ monsters  * All raidbosses drop random amount of L-Coin Pouches generating up to 420 Lcoin per unit. **Grand Olympiad and Events** * Grand Olympiad is held week day * Format is 1v1, unlimited weekly fights  * Heroes are declared weekly at Sunday * There are three automated events - TvT, CTF and Deathmatch, running at evenings * Orc Fortress, Battle with Balok, Keber Hunter, Archievements Box, Daily Gift Calendar provisional events are active too Custom user commands * .offlineplay command, your character will keep playing till death or server restart * .offlineshop command, keeps your shop sitting until all items are purchased * .apon / .apoff - enable/disable HP/MP autoconsume And lots of other small improvements are waiting for you!   Join our community and be part of it at: https://www.l2live.pro https://discord.gg/k3NMgR4Dmu
  • Topics

×
×
  • Create New...