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

    • It's also the players' fault, because there have been decent servers implementing some of the things you said plus some other 'innovations', plus many QOL things for newbies (ingame bestiary, with drops searchers, etc). In the end, it's the players who decide to feed into that shit and play the most garbage servers simply because the owners of the servers gave their clan leaders 100 euros, or they insta quit the server because they didn't win the first QA, etc, etc, etc.   In the end, if a server is garbage or great it doesn't really matter if the players don't wanna stay in there.   Players are no better than the devs themselves, in the end it seems there are abusive devs who will milk the shit out of their willingly milkable players, or there are none, goes both ways.
    • In my opinion, L2 is dead because the people who make servers didn’t adapt to today’s reality. People are getting older, life moves faster, there are more responsibilities, and less free time. And I’m not even talking about newcomers—how can you expect someone new to this game to learn by Googling every drop location or quest requirement? These things should’ve been integrated into the game, made accessible with just a few clicks through the interface. Instead, so much time was wasted trying to recreate retail-like features that no one asked for. Everyone hates autofarm, but why? Because admins never found a smart way to implement it. You could have made it available only in specific zones, with reduced drops, working like Adrenaline, or auto-teleporting to farm for a limited time per day—just enough to help people with limited time stay relevant in-game. There should also be zones with better drops, where active farming actually matters. Other features feel pointless—like the Life Stone system. Spamming LS to get a skill? Instead, you could create a system where you level up the skill with low chances per level, something that feels progressive and fair. Crafting should be simpler too. Right-click a recipe, and the required materials should show up right there. As for sieges, why not create daily clan war events at peak hours—one for Europeans, one for Latinos? You could spawn crystals inside or outside castles that give points and trigger PvP. Add a boss during the event that gives even more points, and let the top clan in the ranking take the castle. I could go on forever, but what’s the point? The community died because the people who had the knowledge to improve the game just took the easy way out, copying the same server formula over and over until no one could enjoy playing it anymore.
    • It's not because I'm an admin that he treated me differently. I actually gave him several clients from my side without him even knowing they came from me, and most of them had no issues. I was also waiting 3–4 weeks at times for things I bought from AvE, even when I was in a rush. He still delivered in the end. That said, I'm not defending him blindly. I'm just saying it's unlikely he’d risk scamming someone over 60–100€, especially knowing how quickly word spreads here.
    • For exact same reason - there were accusation that I scammed. When was it? 2016? But in that time, admins actually didn't listen. I got banned, then unbaned (when I prooved I've refunded) but I was trash talking to mods. When few months later same shit happened, Grisom (?) old global mod, banned me anyway. You can read somewhere on forum how I was shitting on him for doing that (from other account because original account was banned) - which was banned too. He is not here anymore I think. Back in the days I was well know for not carring that much if I was talking to mod or admin, I didn't hold my tongue. Now You know. Just like You know - if I delay, I deliver or refund. I'm not a scammer, even if my old time haterz love to repeat themselfs like mantra. I don't care.
    • Okay I respect that but why is your other account banned?   I don't think this happened just because you delayed somebodys work even in 2012
  • Topics

×
×
  • Create New...