Jump to content
  • 0

Olympiad teleport


Tehygun

Question

Hello, friends! I have problem in my server. After olympiad match, teleporting back players not near olympiad manager, but random spot in town. How i can fix it? I'm using aCis platform. 

Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 0

Wrong file, still. Read again what I said above. But ok, this time I will use bold' font with color.

 

1 hour ago, SweeTs said:

you are lucky enough, the file you are looking for is FIRST inside the package

I said first and you opened file .. no8. Well, not bad. Here is a picture with order.

 

XOhnMQb.png

 

Now, you know where to dig. All you have to do is to READ methods names and replace it with old code - from free svn. Profit.

Link to comment
Share on other sites

  • 0

Find the teleport back and remove the town tp, use coordinates instead. You can compare and replace the method with free rev. 

Link to comment
Share on other sites

  • 0
11 hours ago, SweeTs said:

Find the teleport back and remove the town tp, use coordinates instead. You can compare and replace the method with free rev. 

where i can find it?

Link to comment
Share on other sites

  • 0

I didn't say Olympiad.java, just PACKAGE, the folder. Also, don't post whole files like that.

There are 10 Olympiad related files, you could open one by one and read the code - you are lucky enough, the file you are looking for is FIRST inside the package. Method names says it all. Don't expect ready solution. Do some errort, at least try, find the method.

Link to comment
Share on other sites

  • 0
22 minutes ago, SweeTs said:

I didn't say Olympiad.java, just PACKAGE, the folder. Also, don't post whole files like that.

There are 10 Olympiad related files, you could open one by one and read the code - you are lucky enough, the file you are looking for is FIRST inside the package. Method names says it all. Don't expect ready solution. Do some errort, at least try, find the method.

Ok, i found some in OlympiadGameTask.java:

 

    

public static final int[] TELEPORT_TO_TOWN =
    {
        40,
        30,
        20,
        10,
        5,
        4,
        3,
        2,
        1,
        0
    };
// End of the battle
                case GAME_STOPPED:
                {
                    _state = GameState.TELE_TO_TOWN;
                    _countDown = Config.ALT_OLY_WAIT_END;
                    stopGame();
                    delay = getDelay(TELEPORT_TO_TOWN);
                    break;
                }
                // Teleport to town countdown
                case TELE_TO_TOWN:
                {
                    _game.broadcastPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_WILL_BE_MOVED_TO_TOWN_IN_S1_SECONDS).addNumber(_countDown));
                    
                    delay = getDelay(TELEPORT_TO_TOWN);
                    if (_countDown <= 0)
                        _state = GameState.CLEANUP;
                    
                    break;
                }
                // Removals
                case CLEANUP:
                {
                    cleanupGame();
                    _state = GameState.IDLE;
                    _game = null;
                    return;
                }
            }
            ThreadPool.schedule(this, delay * 1000);
        }
        catch (Exception e)
        {
            switch (_state)
            {
                case GAME_STOPPED:
                case TELE_TO_TOWN:
                case CLEANUP:
                case IDLE:
                {
                    _log.log(Level.WARNING, "Unable to return players back in town, exception: " + e.getMessage());
                    _state = GameState.IDLE;
                    _game = null;
                    return;
                }
            }
            
            _log.log(Level.WARNING, "Exception in " + _state + ", trying to port players back: " + e.getMessage(), e);
            _state = GameState.GAME_STOPPED;
            ThreadPool.schedule(this, 1000);
        }
    }

What should i change? I'm not pro on it, that's why i'm asking for help..

Link to comment
Share on other sites

  • 0
10 minutes ago, SweeTs said:

Wrong file, still. Read again what I said above. But ok, this time I will use bold' font with color.

 

I said first and you opened file .. no8. Well, not bad. Here is a picture with order.

 

XOhnMQb.png

 

Now, you know where to dig. All you have to do is to READ methods names and replace it with old code - from free svn. Profit.

If i understand correct, i need change this:

 

    

protected static final void portPlayerBack(Player player)
    {
        if (player == null)
            return;
        
        Location loc = player.getSavedLocation();
        if (loc.equals(Location.DUMMY_LOC))
            return;
        
        final TownZone town = MapRegionData.getTown(loc.getX(), loc.getY(), loc.getZ());
        if (town != null)
            loc = town.getSpawnLoc();
        
        player.teleToLocation(loc, 0);
        player.getSavedLocation().clean();
    }

with this:

protected static final void portPlayerBack(L2PcInstance player)
	{
		if (player == null)
			return;
		
		final Location loc = player.getSavedLocation();
		if (loc.equals(Location.DUMMY_LOC))
			return;
		
		player.teleToLocation(loc, 0);
		player.getSavedLocation().set(player.getX(), player.getY(), player.getZ());
	}

Or i'm wrong?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


  • Posts

    • to my store : https://topestore.mysellix.io/fr/ 2015-2022 Aged Discord Account 2015 Discord Account : 50.99 $ 2016 Discord Account : 10$ 2017 Discord Account :3.99 $ 2018 Discord Account : 3.50$ 2019 Discord Account : 2.70 $ 2020 Discord Account :1.50$ 2021 Discord Account :0.99$ 2022 Discord Account :0.70$ Warranty :Lifetime Payment Methods : Crypto/ PayPal Contact Me On Discord Or Telegram Discord : @ultrasstore11 Telegram : https://t.me/ultrastore11 Whatsapp ; +212614849119
    • This is my first and last topic created on a Lineage Forum, because if there's one thing that causes headaches for a lot of people, it's the critical error, that's why I decided to share it...   I'm creating a server again and before starting configurations I started collecting dozens of customs, without realizing my system folder had 950MB of files, so I started to enter the game, every 1 to 2 hours my client was reaching the maximum limit of virtual memory of the game due to the absurd amount of customs inside the system folder, reaching the maximum limit of 2047MB virtual ram, automatically we get critical, regardless of the error that appears on your screen, "THE WORDS ARE IRRELEVANT, unless it is a critical error before the ram memory limit reaches its limit", if you are seeing "2047 MB", it means that the game's virtual memory has reached its limit, and this memory is not configurable due to the game being created on 32-bit architecture, so I significantly reduced the amount of customs within the system from 950MB to 625MB, so my client started to reach the maximum memory limit every 10 to 12h, a huge progress, but my goal was at least 24h before reaching the virtual memory limit (playing frantically), so I reduced the system's custom files from 625MB to 267MB, the result was a first virtual memory limit critical error appearing after 41h.   My client is H5, the only types of customs I added to the game were focused only on equipment, one of the main causes were these skins and cloaks, they consume a huge amount of MB's within the "system", the problem is not adding customs to the client, the problem is adapting a custom and adding it inside the system folder, the system folder was not created with the intention of storing a huge amount of files.   Adding customs to the system folder means significantly reducing the time your client can remain open before reaching the virtual ram limit and make no mistake, there are hundreds of different critical errors with a small summary of the cause of the error, but if the critical table shows 2047MB of RAM, the problem is only 1. Example: I can see 3, 5, 9 critical error with different messages, but if this table is showing 2047MB ram, the reason was the virtual memory limit, an important detail is that this 2047MB ram is not a "fixed message or information from your computer", this 2047MB only appear when the cause is the virtual ram limit, it means that when you get a critical error with random numbers of ram memory appearing, such as 358MB ram, 715MB ram, it means that the cause of this error has no connection with ram virtual memory.
    • DISCORD : utchiha_market telegram : https://t.me/utchiha_market SELLIX STORE : https://utchihamkt.mysellix.io/ Join our server for more products  https://discord.gg/hoodservices https://campsite.bio/utchihaamkt
  • Topics

×
×
  • Create New...