Jump to content

Recommended Posts

Posted (edited)

Hello members,

Since this section is rly dead and i always like to share things here is another one..

 

How is this working?

  • First of all you have to create your personal l2 page in facebook.
  • After that search in facebook settings to change the url-name of your page to www.facebook.com/L2Tests and not www.facebook.com/HAW#$A#@
  • Create your personal Access Token here
  • It will be generated as short-lived token (means that it will expire in about an hour). change it to long-lived here (means that it will expire after 2 months ,maybe more)
  • Download facebook api restfb-1.46.0
  • Add it in your sources (i will not provide how to...)
  • Implement the code i'm giving

Source / Files

Source Code
Htmls/Database
Config
Dont forget to add the new admin commands in adminCommands.xml

	<aCar name="admin_fbreload" accessLevel="7"/>
	<aCar name="admin_facebook" accessLevel="7"/>
	<aCar name="admin_showPosts" accessLevel="7"/>
	<aCar name="admin_delPost" accessLevel="7"/>
	<aCar name="admin_addPost" accessLevel="7"/>
	<aCar name="admin_turnFb" accessLevel="7"/>
	<aCar name="admin_clean_facebook_database" accessLevel="7"/>
	<aCar name="admin_fb_auto_announce" accessLevel="7"/>


(these commands are used for all actions , you can use these actions direcly by writing the command with the necessary tokens)

 

Videos

 

Admin view

 

 

User view

 

 

More explaination?

 

  • If you successfully passed all the above moves:
  • Set your facebook page name in FacebookPageName in facebook.properties
  • Set your Access Token in FacebookApiToken
  • //facebook command will display the panel you just saw
  • /facebook command for users
  • You can add/remove any of the posts that are inside of your page.
  • You can set an automatic reward:
  • You set the number of  likes you want to collect from the sum of all the pages you have set, item id, item count.
  • When the likes will be >= the num you set, then all the online players will get the reward you set.
  • The players have to like All the posts you added to take the reward.
  • I am mostly using usercommand handlers , if you will too, then don't forget to add one more line in your commandname-e.dat and edit the id of the command (in FaceBook.java) to your id if you have voiced you can add it there.

 

==================================================================================

This code is made for aCis 371 rev.
Note: I havent check it in live server , i just made it in localhost so you have to give a try in my shitty code  and check if any bug will appear.

If anyone wants the buttons (the blue ones) you can get the utx from here (Thanks Sinister Smile)

If someone finds any bug please let me know, i can help. Thank you!
 

Edited by melron
  • Upvote 3
Posted

really nice !
My question is that this will work ONLY IF your facebook name is written in English or Russian letters since only these 2 languages are supported in 99% of servers, is that correct ?

Posted
5 minutes ago, MrPro* said:

really nice !
My question is that this will work ONLY IF your facebook name is written in English or Russian letters since only these 2 languages are supported in 99% of servers, is that correct ?

Well i didnt test this thing but i dont think will be a problem from server side.. its just a save in db (the name) . I have to check the way that facebook sending the user name to check if the letters are corectly appearing so the server can compare . Thanks for this question

Posted (edited)

I made a quick review on the code so far looks good I did not test it but seems to be having a little check's and NPE issues and some typos like WHERE obj_id=? that needs to be WHERE obj_Id=?

you can also add some packets like actionfail

Edited by Nightw0lf
Posted

Very nice. I had implemented something similar in my private Esios sources back in 2012 back it was very basic. You took it to another level.

Great job mate, you are learning insanely fast.

 

Posted (edited)
15 minutes ago, .Elfocrash said:

Very nice. I had implemented something similar in my private Esios sources back in 2012 back it was very basic. You took it to another level.

Great job mate, you are learning insanely fast.

 

Finally i saw a position comment from you, i'm glad sir

@Ontopic, you did great job you just need to improve some things, your codes proves you're learning but you did very very nice job, congratulations sir.

Edited by GamePsychology
Posted
11 minutes ago, GamePsychology said:

Finally i saw a position comment from you, i'm glad sir

You probably meant positive.

If you check my history, I'm positive to things that worth it and negative to things that don't. That's called being objective.

Posted
27 minutes ago, .Elfocrash said:

You probably meant positive.

If you check my history, I'm positive to things that worth it and negative to things that don't. That's called being objective.

Dear god, i wrote position, exquse me. 

Posted (edited)
19 hours ago, Sinister Smile said:

Nice share @melron .This is so unique! Big respect to you!

Thanks mate!

18 hours ago, IpotoniC said:

melron ftw!

Thanks :D

13 hours ago, Nightw0lf said:

I made a quick review on the code so far looks good I did not test it but seems to be having a little check's and NPE issues and some typos like WHERE obj_id=? that needs to be WHERE obj_Id=?

you can also add some packets like actionfail

Thank you mate, Well for field names/sql keywords case doesn't matter.. Only quoted strings like 'Something Else' does case matter

Even with OBJ_ID will be fine
where do you think i should add action fail packets? and why?
Thank you for your hints

1 hour ago, .Elfocrash said:

Very nice. I had implemented something similar in my private Esios sources back in 2012 back it was very basic. You took it to another level.

Great job mate, you are learning insanely fast.

 

Thank you elfo, i'm glad you liked it

1 hour ago, GamePsychology said:

Finally i saw a position comment from you, i'm glad sir

@Ontopic, you did great job you just need to improve some things, your codes proves you're learning but you did very very nice job, congratulations sir.

Thank you sir, I'm not hidding the fact that i'm learning :D I'm always trying for the best i can give.

1 hour ago, PaRaNoiC* said:

add twitch vk.com and youtube 

for youtube like or sub in channel :D

Thanks for the rep, Not bad idea ;)

Edited by melron
Posted (edited)

in the commands there are missing checks for null character missing check for command (if command equals) and the return in cases with action fail

String token = "the token";

sould be used config

String token = Config.FACEBOOK_API_TOKEN;

also you can use try with resources for results of database and make better handle on the multiple sql statement uses for better error handle

the admincommand handler has unessasary text from the ban handler :)

the config has wrong title (clan)

the html has no back button on refreshing posts

the user html does not say the likes left

I found 2 NPE's in the method checkForBigString

you could also add the config on server config

you call unessasarily the config somewhere in your code to load

asside the deprications its good :)

 

 

Edited by Nightw0lf

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

    • Hello Dexters! https://lineage2dex.com    This is pre-announcing of NEW season server, so we want to share some key points of it. Full details with road map, patch notes we will announce a bit latter Opening September 27 at 19:00 (UTC +3) Open Beta Test from September 23 What’s New This Season?, This is just a short preview of the most exciting changes and updates. A patch note with balance change will be posted later in this thread – one topic with all patchnotes history from 2022 year EXP/SP x25 - Over the past few seasons, our servers were drifting closer to a mid-rate style. And hard to call it now pure PVP server. That’s why we’ve reduced EXP/SP rates from x50 to x25 – making progression smoother, more balanced, and more in line with the mid-rate identity., Improved Olympiad matchmaking – opponents will be matched by strength, making feeding much harder., K/D stats for CC – track your real impact!, New In-Game Shop Interface - no more running to NPCs for supplies – buy everything directly from the interface. NPC Astarte will now only handle services like WH, sales, LS insertion, etc., Balance Adjustments - small but important tweaks for a smoother PvP experience (details in patch notes)., Replica Instance System Reworked - upgrading replicas now requires not only fragments but also real jewellery from B to S grades. You can choose from 3 instance types: PvP Instance – biggest rewards (everyone spawns together for mass PvP)., CC Instance – private instance for your CC., Party Instance – private instance for your party., , Dino Island Returns - back by popular demand: Dark Zone (PvP) and Light Zone (PvE)., Newbie Pass Questline - available at character creation – helps you get familiar with the server and make start progression faster., Clan members taxation system, Full announce - read on forum, https://forum.lineage2dex.com/threads/16723/ (edited)   We’re excited to show you how the Newbie Path will look on the Seasonal Server and share a few details about it. The Newbie Path is designed to help new players on Dex adapt more easily on project. While it won’t reveal the full content of the game, it will greatly assist during the early stages of your journey. But it’s not just for newcomers! Even veteran players will find it useful — completing Newbie Path steps will grant you small progression boosts and extra rewards(exp boosts, some gear, potions etc). Definitely worth using! You’ll be able to test the full Newbie Path system yourself during the Open Beta, launching on September 23rd!
    • 📢 [OFFICIAL ANNOUNCEMENT] 🔥 Lineage 2 Interlude x10 Craft-PvP 🔥 🎮 Grand Opening — September 19 @ 19:00 [UTC +2] 🧪 Open Beta — September 15 @ 19:00 [UTC +2]    🌐 Full server description - https://lineage2.ms/en/wiki 💥 Why Interlude x10 Craft-PvP? ✅ GM Shop up to B-Grade + Full Buffs — get straight to action, no pointless grinding. ✅ Unique Geodata & Geopathfinding Engine — smooth, tactical, and truly next-gen. ✅ Two Client Options — play in Classic or Interlude style. ✅ No Pay-to-Win — donations don’t break the balance. ✅ 1+1 Mode Enabled — max 2 windows, only 1 active = no box armies. ✅ Bot-Free Zone — advanced protection + non-intrusive popup captchas. ✅ No GM Interference — fair, competitive PvP environment. ✅ No Wipes — your progress is safe. ✅ Truly International — global reach, not just CIS players. 🛡 2nd Season. Stronger, Smarter, Updated. 🎯 Pure Craft-PvP. 🌍 Real Competition. 📅 Mark your calendars. Tell your clan. Invite your friends. Let’s make this season legendary. 💪 https://discord.gg/lineage2ms
    • As far as I know, L2Gold stated (unofficially) that closed for legal reasons. Although, my estimation is that it had reached such low popularity (believe me I know, I played till the last day), so they closed it because of that. As for "other" copies or w/e. I believe that everyone has the right to do what they think is best.  I have to say, I find your claims a bit exaggerating. Many servers have done a good job at recreating such a server. There are actually leaked files of C4 L2Gold (L2OFF) so many owners started working from there (L2Gold.cc (old Avellan), L2Gold.in, L2Gold.co etc.) There are other owners that took the idea 1 step further, adapting L2Gold in higher Chronicles and started working on a brand-new style with old features along. @Trance @Brado @To4kA (those are some of the owners that I can think of right now). I think you should re-think your opinions and don't judge them all together. Many of the servers you've mentioned has actually done a decent job and tried to take the brand, one step further. The argument here is that everyone should do what they want. Community will judge if it's good or bad.
    • Let’s start from the beginning. The original L2Gold.cc server shut down in 2013. Since that time, the real and authentic L2 Gold Rush has not existed, and the reasons for its closure remain unknown. From what I know, after that moment many copies started to appear – people who had no real idea how to recreate the original server simply began releasing imitations under different names such as gold.in, gold.net, gold.org, gold.us, and so on. Am I wrong?
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock