Jump to content

Question

Posted

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. 

12 answers to this question

Recommended Posts

  • 0
Posted

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.

  • 0
Posted

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

  • 0
Posted
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?

  • 0
Posted

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.

  • 0
Posted
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..

  • 0
Posted
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?

Guest
This topic is now closed to further replies.


  • Posts

    • Dear friends, right now we are holding a grand competition with a prize fund of more than $ 1000 in our stores https://socnet.store , telegram store: https://socnet.shop and SMM panel: https://socnet.pro There are more than 50 prize places in our competition, each lucky person can take one of the places. Important condition: you must make a purchase at any time before June 1, 2025. The more purchases you make - the more chances you have to win the main prize in the community of $ 300! ➡ Our Online Shop: socnet.store  ➡ Our SMM-Boosting Panel: socnet.pro  ➡ Telegram Shop Bot: socnet.shop  ➡ Telegram Support: https://t.me/solomon_bog  ➡ Telegram Channel: https://t.me/accsforyou_shop  ➡ Discord Support: @AllSocialNetworksShop  ➡ Discord Server: https://discord.gg/y9AStFFsrh  ➡ WhatsApp Support: 79051904467 ➡ WhatsApp Channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n  ➡ Email Support: solomonbog@socnet.store 
    • Dear friends, right now we are holding a grand competition with a prize fund of more than $ 1000 in our stores https://socnet.store , telegram store: https://socnet.shop and SMM panel: https://socnet.pro There are more than 50 prize places in our competition, each lucky person can take one of the places. Important condition: you must make a purchase at any time before June 1, 2025. The more purchases you make - the more chances you have to win the main prize in the community of $ 300! ➡ Our Online Shop: socnet.store  ➡ Our SMM-Boosting Panel: socnet.pro  ➡ Telegram Shop Bot: socnet.shop  ➡ Telegram Support: https://t.me/solomon_bog  ➡ Telegram Channel: https://t.me/accsforyou_shop  ➡ Discord Support: @AllSocialNetworksShop  ➡ Discord Server: https://discord.gg/y9AStFFsrh  ➡ WhatsApp Support: 79051904467 ➡ WhatsApp Channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n  ➡ Email Support: solomonbog@socnet.store 
    • REBORN ETERNAL IL x10 WTS  1gb 8e (a lot in stock) DR set +6 180e Frintezza+6 200e Zaken+6 200e AQ+6 200e You must go first or Pufa middleman service
    • There's many reasons why it would be more NO than YES : Using NCSoft assets is a death wish, they can lawyer any LU3/Unity if they wanted, since it's a plain steal of intellectual property. It's an hobby, as you said it, and it's not specially about money. Money is a way to filter idiots/resellers, nothing more. It's really about trying to replicate old content and optimize it which I find it fun. I just align with the basic idea than an emulator emulates. When you launch Project64 and SuperMario 64, you don't expect to get something more than 120 stars and Bowser boss in the end - which should have been L2J project to begin with Even if I played a lot with TESCS from Morrowind, back in time, it's not enough to handle current engines, and I'm too lazy to learn Unity/Unreal Engine. Moreover, it would mean buying assets. While doing it alone would be a fail, coupling to L2J / L2 community would still be shitty (since the majority is RU/BR) ; people is only about fame/glory/reselling shit on back of others. Opening to others, the project would be leaked day 1, rebranded and resold. MMO genre is basically dead, and that's not a reboot of any game (l2/wow classic :D) which will turn the tide. Regarding L2 or an remastered version of it, you can obviously blatantly copy-cat it (as Propnight did for Dead by daylight).   All frenchies aren't supposed to do Expedition 33 :).
    • 190euro until last month, don't miss it.
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock