Jump to content
  • 0

offline mode l2jfrozen 1132


scraw

Question

Hello once again, i would like a little help with offline shops/craft ,when a players goes offline shop/craft is still counting as online member as effect he still getting vote reward ,etc  and  if he use vpn he can take multiple of them.
I just need to make offline traders NOT count as online .
 


Thx in advance

Edited by scraw
Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0
9 hours ago, scraw said:

Hello once again, i would like a little help with offline shops/craft ,when a players goes offline shop/craft is still counting as online member as effect he still getting vote reward ,etc  and  if he use vpn he can take multiple of them.
I just need to make offline traders NOT count as online .
 


Thx in advance

 

Which means that your code doesn't update setOnlineStatus(false, false); 

So what you gonna do is to search in i guess L2GameClient judging by L2JServer, where your code is checking whether a player is going into store mode, to set him offline status. 

 

Edited by Kara
Link to comment
Share on other sites

  • 0
13 hours ago, Kara said:

 

Which means that your code doesn't update setOnlineStatus(false, false); 

So what you gonna do is to search in i guess L2GameClient judging by L2JServer, where your code is checking whether a player is going into store mode, to set him offline status. 

 

i already did that ..

Spoiler

            L2PcInstance player = null;
                
                try
                {
                    final L2GameClient client = new L2GameClient(null);
                    player = L2PcInstance.load(rs.getInt("charId"));
                    client.setActiveChar(player);
                    client.setAccountName(player.getAccountName());
                    client.setState(GameClientState.IN_GAME);
                    player.setClient(client);
                    player.setOfflineMode(true);
                    player.setOnlineStatus(false);<-------
                    player.setOfflineStartTime(time);

is any chance that cost at my reward code?

Link to comment
Share on other sites

  • 0
1 minute ago, scraw said:

i already did that ..

  Hide contents

            L2PcInstance player = null;
                
                try
                {
                    final L2GameClient client = new L2GameClient(null);
                    player = L2PcInstance.load(rs.getInt("charId"));
                    client.setActiveChar(player);
                    client.setAccountName(player.getAccountName());
                    client.setState(GameClientState.IN_GAME);
                    player.setClient(client);
                    player.setOfflineMode(true);
                    player.setOnlineStatus(false);<-------
                    player.setOfflineStartTime(time);

is any chance that cost at my reward code?

 

Let's reverse the question. Your vote reward does check for online/offline characters?

Link to comment
Share on other sites

  • 0
2 minutes ago, Kara said:

 

Let's reverse the question. Your vote reward does check for online/offline characters?

you right..

Spoiler

 public static void AutoReward ()
 {
     List<String> ips = new ArrayList<>();
 Collection <L2PcInstance> pls = L2World.getInstance (). getAllPlayers ();

is getting all players..with what i need to change?  

Link to comment
Share on other sites

  • 0
2 minutes ago, scraw said:

you right..

  Hide contents

 public static void AutoReward ()
 {
     List<String> ips = new ArrayList<>();
 Collection <L2PcInstance> pls = L2World.getInstance (). getAllPlayers ();

is getting all players..with what i need to change?  

 

You basically need to retrieve only online players so replace this with 

L2World.getInstance().getPlayers().stream().filter(L2PcInstance::isOnline).collect(Collectors.toList());

(Java 8+)

Link to comment
Share on other sites

  • 0
Just now, Kara said:

 

You basically need to retrieve only online players so replace this with 

L2World.getInstance().getPlayers().stream().filter(L2PcInstance::isOnline).collect(Collectors.toList());

(Java 8+)

for java 7 ? :)

Link to comment
Share on other sites

  • 0
Just now, scraw said:

for java 7 ? :)

 

:) I'm pretty sure if you give it a try you gonna make it on your own. Inside the for loop make a check 

if player is not online to continue

Link to comment
Share on other sites

  • 0
Just now, Kara said:

 

:) I'm pretty sure if you give it a try you gonna make it on your own. Inside the for loop make a check 

if player is not online to continue

ok thank you and welcome back kara :)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


  • Posts

    • It looks like you're using a script for an Adrenaline bot in a game environment. To check for a target's name in your script, you can use the CharList.Items(i).Name property. Here's an example of how you can modify your script to print the names of attackable characters: var   i: integer; begin   while true do   begin     delay(200);     for i := 0 to CharList.count - 1 do     begin       if (not CharList.Items(i).Dead) then       begin         print(CharList.Items(i).Name);         // Add your additional conditions here         // e.g., if ((CharList.Items(i).Name = 'NPCName') and (CharList.Items(i).attackable)) then         // Do something with the NPC       end;     end;     // Your existing code for skills and actions here     engine.canceltarget;   end; end.   This modification adds a print statement to display the name of each non-dead character in the CharList. You can extend this logic by adding conditions based on the name of the NPC you want to target. Please note that you need to replace 'NPCName' with the actual name of the NPC you're looking for.  Also If you are a fan of Sports Betting in USA, you can check this comprehensive dedicated page of a friend of mine at https://casinolandia.com/countries/us/sports-betting/.
    • "ps  i watched carefuly the private server scene for more then 14 years, so i kinda know what i m talking about and i have very little money to spare" < What did you watch? For watching private scene (as developer/server owner), you need to understand the servers builds, nothing more you should care about. I connect to private server and instantly know what 'pack' they are using, what are the issues, etc. I understand what is happening under the hood. I doubt you know the difference between List and Set. In 2023 the private server scene is not described by server packs(files), it's based on the marketing budget. You can sell 'Snickers' candy for a cake's price. I was always unsure about L2jMobius builds, until I decided to give some interest for Essence version. My story is that I've bought L2jMobius membership and later on became an Contributor. (Fell out of that roll, because had some IRL problems which did not allow me to dedicate time to L2 Development). While working with L2jMobius I found new connections, which allowed me to develop 'my own' Essence build (I was developing for a person who is a client of L2jMobius and was developing for him a bit faster than I was submitting patches for Mobius itself, it was not based on money, I was receiving patch notes which were not available for public (developed privately) in exchange to work and deliver some new implementations/corrections faster for that person than for whole L2jMobius project, though I always shared later the work with Mobius). That allowed me to gain base of known sources of Essence which are not publicly available (again to mention, I did not exchange any SVN private repos, worked with person who already had access same as me). So where I'm going with this story? You care about 'leaks' when you develop something for L2jMobius, not when you pay him money, get the files and do nothing. Why you're afraid of leaks? The leak happens once per 2 months maybe, the SVN commits are daily. Why I hated leaks? Because I've implemented something dedicated for L2jMobius private clients, not the leachers. While I did not have my own base - those leaks and my code put everyone in same position - having the same features, if you don't have marketing budget, than you want to sell project for players by giving them features(I know it might contradict with the first paragraph of mine, but w/e, who understands - understands). The model is correct for L2jMobius to share a public version, it will attract new clients if they like the public version. Okay, now we covered 'your scene watching of private servers', 'L2jMobius leaks' it's time for why L2jMobius is the only way for small private server to use for example while building Essence based project: 1. L2jMobius has a lot of clients, instead of working on your own, you have maybe 50+ people committing changes. 2. Mobius reviews all commits, does some QA, refactors the code to fit whole code base formatting etc.. 3. You can write a question as a dummy server creator and get the answer (I was shocked what questions Mobius subscribers community receives, though I see that they are patient ones, I could not answer any questions without asking myself WTF is wrong, the person can't set his IP to launch the server and he's thinking about launching project, though even these problems are solved by community) 4. Don't judge book by the cover - if you receive leak of public version and you can't find certain feature working, you can always ask Mobius to check if someone is working on that, maybe day after the leak the feature will be implemented. Best case scenario, if possible, become a subscriber, just to try it. TL;DR: If you're amateur server owner, don't know any of coding = you should not care, maybe Mobius is not dominating in Interlude/H5, but you can check for other version. Everything will be solved for you. If you're developer (working alone and want other people help) - take these sources, make your own base, work on your code yourself + take patch notes submitted by other people.  
    • Still accepting application. I guarantee my client will beat any other compensation to suitable candidates too.
    • @geometry dash meltdown Make that the system requirements of the game are met by your machine. You can have problems with performance if your hardware doesn't meet the minimal requirements.  
  • Topics

×
×
  • Create New...