Jump to content

Recommended Posts

Posted (edited)

Hi folks, some time has passed since my last share so, i decided to share with you a pretty basic communication between l2 and discord.

 

Q&A

  • Do i need to download external libraries?
  • What is currently implemented on this code?
    • Well, there are 3 features that i have implemented:
      • Whenever a player logs in, the discord bot will send him a Private Message containing the IP Address from which this action was performed .
      • Whenever a grand boss dies, the bot will send a message in a channel (currently #raid-died) with some images,last hit,clan,respawn time etc. Currently, only Baium is implemented with images. You can add the rest at the ImageContent enum.
      • Whenever a player is DiscordLegend (you have to think how a player would get that status) and says something in shout or trade, the bot will also write the same text at the shout, trade channels. (You can play with those channels and think of something smart)
  • How will the bot recognize the discord profile of a member and send him a pm? Where is the profile id located in discord?
    • You have to create your own method for that. In the previews, i have add manually MY id to do the tests. You can add custom html message that would be optional and request from users to enter their discord ID in order to get notifications etc.
    • The ID is not the one that is after the hash (#) . You have to go at My Account tab, and click at the 3 dots that are located just after your name#id by pressing CopyID. (i would say that is a long value and not Integer.)
  • How can i add my own image for a grand boss death feature?
    •  Just upload it somewhere (or even on your own website) and pass that url at the ImageContent enum which is located in GrandBossDeath class.
  • Wont that spamming the whole discord with all those notifications?
    • Well, actually no, its in your hand to handle WHEN the bot should say something.
  • What is bot? And how can i create it?
    • Well, you should go at youtube and watch some tutorials for that. If you dont know what is it just dont implement the code. 
  • I have my own bot, how can i make my bot do this job?
    • Thats nice, all you have to do is to fill the BOT_TOKEN variable in Discord class with your bot token.
  • What's the purpose of the channel messages of transactions?
    • Well, plenty of discord servers have their own channels with trade transactions and many of them are using it to announce a transaction (wts,wtb). It's very convenient, players can see who is selling or buying what without even being ingame.

 

Some previews:

 

Login activity:

 

 

Shout & Trade notification:

 

 

 

Raid killed notification:

 

 

  • Will you support that in the future?
    • No. It took me about 2 weeks to create it while the whole code can be written in 2 days of 3 hours of work per day. My time is limited.
  • In which acis rev can be implemented?
    • Its java. a few adaptions and you're done.
  • Can i add it to l2jfrozen?
    • Read one bullet above.
  • What else could be added to that one? I can't find any idea.
    • Well your imagination sucks. Like mine . BUT! I'll give you an example that is not implemented in the source code. The result of This code is that one:
      spacer.png

 

 

 

Source code

Also, be kind if you find mistakes in the code, as humans we make mistakes... Have fun! 

Edited by melron
  • Like 2
  • Thanks 4
  • Upvote 5
Posted (edited)
21 minutes ago, Williams said:

wouldn't it be possible to replace the lineage msn by Discord?

I guess its possible.  Νevertheless i'm not into client editing. Maybe some client devs could answer that @Asuki.

The fact that all these years it hasn't be replaced with something else like discord, it means it will be pain in the ass.

 

Edit:

Actually @xdem could give you some directions 

Edited by melron
Posted (edited)

noone changed msn cuz its useless to have such thing in game when you have 2nd monitor next to you. Extending game bins to add new UI methods is also beyond level of modding you see in l2.

Edited by AlmostGood
  • 1 month later...
  • 5 months later...
  • 5 months later...
Posted
On 9/25/2021 at 10:46 AM, melron said:

Hi folks, some time has passed since my last share so, i decided to share with you a pretty basic communication between l2 and discord.

 

Q&A

  • Do i need to download external libraries?
  • What is currently implemented on this code?
    • Well, there are 3 features that i have implemented:
      • Whenever a player logs in, the discord bot will send him a Private Message containing the IP Address from which this action was performed .
      • Whenever a grand boss dies, the bot will send a message in a channel (currently #raid-died) with some images,last hit,clan,respawn time etc. Currently, only Baium is implemented with images. You can add the rest at the ImageContent enum.
      • Whenever a player is DiscordLegend (you have to think how a player would get that status) and says something in shout or trade, the bot will also write the same text at the shout, trade channels. (You can play with those channels and think of something smart)
  • How will the bot recognize the discord profile of a member and send him a pm? Where is the profile id located in discord?
    • You have to create your own method for that. In the previews, i have add manually MY id to do the tests. You can add custom html message that would be optional and request from users to enter their discord ID in order to get notifications etc.
    • The ID is not the one that is after the hash (#) . You have to go at My Account tab, and click at the 3 dots that are located just after your name#id by pressing CopyID. (i would say that is a long value and not Integer.)
  • How can i add my own image for a grand boss death feature?
    •  Just upload it somewhere (or even on your own website) and pass that url at the ImageContent enum which is located in GrandBossDeath class.
  • Wont that spamming the whole discord with all those notifications?
    • Well, actually no, its in your hand to handle WHEN the bot should say something.
  • What is bot? And how can i create it?
    • Well, you should go at youtube and watch some tutorials for that. If you dont know what is it just dont implement the code. 
  • I have my own bot, how can i make my bot do this job?
    • Thats nice, all you have to do is to fill the BOT_TOKEN variable in Discord class with your bot token.
  • What's the purpose of the channel messages of transactions?
    • Well, plenty of discord servers have their own channels with trade transactions and many of them are using it to announce a transaction (wts,wtb). It's very convenient, players can see who is selling or buying what without even being ingame.

 

Some previews:

 

Login activity:

 

 

Shout & Trade notification:

 

 

 

Raid killed notification:

 

 

  • Will you support that in the future?
    • No. It took me about 2 weeks to create it while the whole code can be written in 2 days of 3 hours of work per day. My time is limited.
  • In which acis rev can be implemented?
    • Its java. a few adaptions and you're done.
  • Can i add it to l2jfrozen?
    • Read one bullet above.
  • What else could be added to that one? I can't find any idea.
    • Well your imagination sucks. Like mine . BUT! I'll give you an example that is not implemented in the source code. The result of This code is that one:
      spacer.png

 

 

 

Source code

Also, be kind if you find mistakes in the code, as humans we make mistakes... Have fun! 

Hi!
this file is missing, could you help me?

img: https://www.mediafire.com/view/6blmcnde3o3j3mi/Sem_t%25C3%25ADtulo.png/file#

  • 7 months later...
Posted (edited)
On 9/29/2022 at 12:51 AM, raffaeelss said:

Hi!
this file is missing, could you help me?

img: https://www.mediafire.com/view/6blmcnde3o3j3mi/Sem_t%25C3%25ADtulo.png/file#

i have this error too 

replace import net.dv8tion.jda.api.entities.TextChannel;

with import net.dv8tion.jda.api.entities.channel.concrete.TextChannel;

you have new version of jar file. melron use JDA-4.3.0_310-withDependencies.jar 
(4.3.0 310)

and for .tolist (i use acis 401)

replace .toList() with .collect(Collectors.toList())

Edited by MarGaZeaS

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

    • Server owners, Top.MaxCheaters.com is now live and accepting Lineage 2 server listings. There is no voting, no rankings manipulation, and no paid advantages. Visibility is clean and equal, and early listings naturally appear at the top while the platform grows. If your server is active, it should already be listed. Submit here https://Top.MaxCheaters.com This platform is part of the MaxCheaters.com network and is being built as a long-term reference point for the Lineage 2 community. — MaxCheaters.com Team
    • ⚙️ General Changed “No Carrier” title to “Disconnected” to avoid confusion after abnormal DC. On-screen Clan War kill notifications will no longer appear during Sieges, Epics, or Events. Bladedancer or SwordSinger classes can now log in even when Max Clients (2) is reached, you cannot have both at the same time. The max is 3 clients. Duels will now be aborted if a monster aggros players during a duel (retail-like behavior). Players can no longer send party requests to blocked players (retail-like). Fixed Researcher Euclie NPC dialogue HTML error. Changed Clan leave/kick penalty from 12 hours to 3 hours. 🧙 Skills Adjusted Decrease Atk. Spd. & Decrease Speed land rates in Varka & FoG. Fixed augmented weapons not getting cooldown when entering Olympiad. 🎉 Events New Team vs Team map added. New Save the King map added (old TvT map). Mounts disabled during Events. Letter Collector Event enabled Monsters drop letters until Feb. 13th Louie the Cat in Giran until Feb. 16th Inventory slots +10 during event period 📜 Quests Fixed “Possessor of a Precious Soul Part 1” rare stuck issue when exceeding max quest items. Fixed Seven Signs applying Strife buff/debuff every Monday until restart. 🏆 Milestones New milestone: “Defeat 700 Monsters in Varka” 🎁 Rewards: 200 Varka’s Mane + Daily Coin 🌍 NEW EXP Bonus Zones Hot Springs added Varka Silenos added (hidden spots excluded) As always, thank you for your support! L2Elixir keeps evolving, improving, and growing every day 💙   Website: https://l2elixir.org/ Discord: https://discord.gg/5ydPHvhbxs
    • https://sms.pro/ — we are an SMS activation platform  seeking partners  mobile number providers  mobile number owners  owners of GSM modems  SIM card owners We process 1,000,000 activations every day.  寻找合作伙伴  手机号码提供商  手机号码持有者  GSM调制解调器持有者  SIM卡持有者 我们每天处理1,000,000次激活。  Ищем партнеров  Владельцы сим карт  провайдеров  владельцев мобильных номеров  владельцев модемов  Обрабатываем от 1 000 000 активаций в день ⚡️ Fast. Reliable.   https://sms.pro/ Support: https://t.me/alismsorg_bot
    • "WHAT I WILL SEE ON NEW SEASON ? *More easy farm and augment than ever before ! *Free VIP characters for everyone for first 2 days after opening ! Improved olympiad engine to work more correctly. 3 New skins / outfits. Fixed raid boss spawns. Fixed olympiad crit errors. New farming Ivory Tower area. Fixed augmentation rate. Increased all mob drops rate by +20%. And much more..."   1. I have clicked VIP 23.01.2026 20:00 a few second after open server. 2 Days is 48h. Now 24.01.2026 I have 17 hours left, so my VIP will expire 08:00 25.01.2026. Where is 12h? SCAM.   2. Where is ivory tower area?   3. When next wipe?   
  • 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..