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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



  • Posts

    • Where's the proof? I can tell you're a scammer.
    • Where was I called a scammer? Is there any proof, etc.? There are a lot of reviews about our store online, etc. https://zhyk.org/forum/showthread.php?t=1108673
    • U was reported as scammer in your previos topic why u create new topic?
    • 🔍 Inventory 1.0 is a next-generation inventory system that stands out with its special minimal clothing system. Carefully designed and prepared according to the highest standards of your server, it not only enhances your gaming experience but also contributes to your server's infrastructure. ⚙️ Supported: QB-CORE Features: ✅ Instant Delivery: All products you purchase will be instantly assigned to your account as soon as your payment is completed. ✅ Clothing System: With the special animated clothing configurations in your inventory, you will be able to change outfits with ease. Experience a unique roleplaying experience with high-quality animations and customizable clothing options. ✅ Minimalist Inventory System: This inventory system, with its visuals, animations, and mechanics, offers maximum efficiency without overwhelming your screen and limiting your roleplaying experience. It’s designed to be user-friendly while enhancing your roleplaying experience. ✅ Continuous Updates: The content in the inventory is regularly updated with innovative features added. New animations, additional clothing options, and cutting-edge features ensure a fresh and dynamic experience. ✅ Easy Setup and Compatibility: Compatible with QB-CORE, this system is easy to install and optimized for quick integration into your server. It works seamlessly with a simple drag-and-drop method. ✅ Performance Optimization: The system is optimized to avoid low FPS and performance drops. All features of the inventory run smoothly without affecting your server’s performance. ✅ Multilingual Support: With support for different languages, you can cater to an international player base and build a larger community on your server. ✅ Flexible Customization Options: You can fully customize the inventory according to your needs and server rules. Choose between different outfits and animations to create a unique gaming experience. ✅ Comprehensive Help and Support: With 24/7 support, you can quickly resolve any issues you encounter. Our technical support and user guides are always here to assist you. Shop Now! Take your game to the next level with Inventory 1.0  and enjoy its unique features. Get ready to make a real difference in your roleplaying experience!   --------------------------TEBEX: https://matza.tebex.io/package/7174862 --------------------------
  • 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