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
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

    • Hello, I'm completely sharing my first attempt of functional PvE & PvP level/gear based independed phantoms. This source is completely made by AI so no hard critisism please. The extension is in a very early stage and it's not tested properly so its NOT supposed to be used in a live server yet because it still needs stability/optimization improvements.   The architecture is already done, third class behaviors are looking good (but still needs adjustments mostly for melee classes). I am currently dealing with second occupation classes functionality (most of them are functional).   The extension will automatically create the lucera_autobots table on starting the gameserver and then you will be able to populate the table with many rows of bots manually or save them to DB through the ingame bot's panel, you can also create temporary bots by not hitting the "Save Bot" button. The clan can be added to the bots as clanID through lucera_autobots DB table, the clan has to be owned by a real player with or without alliance, the bot will be spawned with the clan or clan+ally crest.     Request for advices and ideas: At the moment i haven't figured out an easy way (other than building a full navigation system of the world) to make the bot understand the geodata, avoid all the city obstacles and walk to gatekeeper, then travel back to the farming location on foot and avoid any obstacles and town layout so at this current state the bots are doing this: on death > go to village > stay idle for 30 seconds (time delay can be configured from the bot's management panel or through the DB table) > directly teleport back to death location.   On in-game, use //autobots command and create bots normally through the panel's options. NOTE: The bots will not attack a gm character.               LATEST CHANGELOGS SINCE BUILD M28: M29: Improved the mechanics and behavior for all the second and third classes. Added/adjusted PvP skills and self-buffs for many classes. Improved Tyrant/Grand Khavatari combat and force-charge behavior. Added tank skill/auto-attack rotations. Added Bladedancer dances/debuff behavior. Added mage skills such as Silence, Curse Fear, Aura Flash, Ice Dagger and Frost Bolt with usage limits. Increased dagger Switch usage to 25%. Added obstacle escape movement when bots get stuck while RETURNING to their farm area. M30: Reduced the pause after tank and archer sidestep movements so they re-engage faster. Improved Titan/Destroyer combat recovery and added Braveheart condition. Started fixing Gladiator/Duelist charge/combat behavior. Verified all classes can use Idle, AttackFlagged, and AttackEveryone. Reinforced the rule that skills are used only when actually learned by the bot. M31: Fixed offensive mage combat-entry logic for AttackEveryone. Prevented hostile mage debuffs from being used as the initial action against peaceful players. M32: Added a farming-area watchdog so bots outside their configured farm range return instead of remaining stuck in FARMING. Fixed automatic teleport recovery so it cannot silently replace the bot's configured farm origin. M33: Removed the newer broken Gladiator/Duelist charge state-machine and restored more of the older M27-style combat logic. M34: Completely rewrote Gladiator/Duelist combat behavior Gladiator/Duelist now use the same core combat system in PvE and PvP. All skills remain level/learned-skill dependent. M43: Fixed a visual “jump/teleport” issue during PvP. Removed the extra manual position correction that was interfering with Lucera’s normal movement updates. Kept the old movement safety protections that prevent real long-distance rollback bugs. Added Vicious Stance toggle always ON for fighter classes when learned. Added Arcane Power toggle always ON for offensive mages level 78+ when learned. Improved potion usage so bots follow Lucera’s normal item cooldown behavior. Changed Warsmith weapons/shields for several level ranges. Added None as a buff package (the bot will spawn without buffs). Removed Greater CP Potions from level 1–39 bots. Reworked starter fighter equipment for levels 1–10 and 11–19. Corrected several starter class names in the autobots UI panel. Improved the Autobots panel layout. Improved spacing and descriptions on the Create Bot page. Added basic pagination to the autobots UI panel. Changed buttons toward Lucera’s native button style. Improved spacing around the bot list and search area. Added a search layout. Reworked the main page, Create Bot page, class selection and manage pages. No AI, combat, movement, inventory, or DB behavior was changed.   Next update milestone: Ensuring stability and optimization changes.  
    • ASocks.com provides residential, mobile and datacenter proxies with a pool of 7M+ IPs across 150+ locations. Built for web scraping, market research, ad verification, and automation, it offers flexible rotation, city- and ASN-level targeting, 24/7 support and transparent pricing with no traffic expiration.
    • SX.ORG is a global proxy platform offering residential, mobile,  and datacenter IPs for SEO, web scraping, ad verification and multi-account management. It provides flexible IP rotation, precise geo-targeting, HTTP(S)/SOCKS5 support, API access and pay-as-you-go pricing based only on the traffic you use.
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..