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

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

    • Good luck with your g/o 😃
    • You're talking complete nonsense. The source code of SphereAPI, which handles all requests, is closed and has never been published anywhere.     That return $this doesn't affect anything, PHP just ignores it. Why are you showing it?     Yes, of course I want that, and I’m asking you — go ahead and hack it, I’d even be thankful. The most you can probably do is launch a DDoS attack, but that’s not hacking. The IP you see is just a public one, used by default to handle requests. There are many other IPs involved, which aren’t disclosed for privacy reasons. So, when should I expect your hacker attack? If you fail, it means you talked big for nothing. I hope you're not all talk and can actually back up your words. UPD: To make your task easier, I have disabled limits on incorrect and failed requests, so your site/IP won't get blocked.
    • Lineage2Dex Interlude+ x50 Server launches TODAY!       The wait is over – the Lineage2Dex Interlude+ x50 Server launches TODAY! Grand Opening - April 26 at 19:00 (UTC+3) Over 10,000 registered accounts are ready to dive in! Beta with massive activity over, thx all who participate on it! It's time to begin your real Jorney! 👉 Read full roadmap 👉 Full server description 👉 Download and registration The server will be split into 3 stages, each featuring multiple content episodes. Stage 1: April 26 – May 18 Welcome to the Classic Interlude Phase. This stage is built with minimal custom content, focused on delivering that pure Interlude experience. It’s perfect for both new players unfamiliar with our project and veterans who enjoy a traditional start. Expect a smooth and nostalgic journey with familiar mechanics. Stage 2: May 19 – June 22 Time to expand the world! As most Interlude content gets completed, we gradually introduce new elements. Hellbound will open first, followed by weekly content updates. Midway through this stage, the Isle of Prayer will become available — a new zone featuring Dynasty Gear and fresh challenges. Stage 3: From June 23 Welcome to full content access! Some location become to High-level location, offering great reward! Once this phase concludes, a full merge with Union server will take place — and yes, all your characters and items will carry over safely. We wish everyone a smooth start, fair play, and tons of fun on the new x50 server! See you in-game!
    • Hello everyone! I'm offering professional L2J development services, specialized for aCis projects.   🔹 What I offer: Ready-to-implement existing systems (events, features, gameplay improvements). Custom development: I can create new systems based on your specific requests and ideas. Bug fixing, optimization, and enhancement of your server's code. Professional, clean, and organized Java coding. Support after delivery to ensure smooth integration.   🔹 Some examples of available systems: PvP and PvE Mini-Events (fully automated). Custom Raid Boss Events. Advanced Clan Utilities (regroup features, clan ranking, etc). Reward Systems (based on kills, damage, objectives, etc). Achievements Subscription system Arena Fights (1v1 tournament, scratch made). Advanced event engine (12 events, many features). multi-client aCis project, progressive gameplay C4 to C6   🔹 Why work with me? Years of experience working directly with aCis pack. Fast, reliable communication. I care about performance and long-term stability. I can adjust the systems to fit your server's style and balance.   🔹 Pricing: Flexible depending on the complexity (fixed price per project or per system). Discounts for multiple systems or long-term collaboration.   🔹 Contact: MaxCheaters PM Discord: @Luminous   Serious and passionate about your project? Let's make your server unique!
  • Topics

×
×
  • Create New...