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

    • Good morning. I have new implementations Now working Friends tab in CB - its a custom work, but I think is useful 🙂
    • olá amigo sou da comunidade Brasileiro cera que vc poderia perguntar se ele me vende essa interface do l2rock?
    • Te esperamos este viernes en  L2 Seal Proyecto Hunter . Open : 1/12/23 a las 21:00hs GMT-3 Para cerrar el año,de la mejor manera te esperamos en el servidor mid más grande de habla hispana.   !!!Te lo vas a perder!!! Estamos de regreso, con mucho contenido nuevo. Cliente : H5. Rates: EXP/SP: x20 Adena: x10 Seal Stones: x4 Raid Boss EXP/SP: x5 Spoil: x10 Keymats Drop/Spoil: x5 Raid Boss Drop: x5 Drop: x8 Manor: x2 Eppaulletes: x5  Features : NPC Buffer com buffs de 2 hora GM-Shop up to Dynasty Mana Potions (1000 MP, 10 seg. Cooldown) Skills autolearn inclusive los 81/83 Buff Slots: 24 (+4 com Divine Inspiration LVL 4) Auto pickup configurable Offline Shop (Colocar el char en modo store y cerrar el cliente.) Cambio de 1ª classe (10.000 adena) Cambio de 2ª classe (500.000 adena) Cambio de 3ª classe (2.000.000 adena) Sub class No requiere quest items ni quest. Nobless Via quest (H5 Quest) Community con status de Raid Boss Shift + Click para ver a lista de drops (Rate Server) Global Shout / Delay 20 segundos. Max. Clientes/PC: 4 Max. Ventanas de Autofarm 1 por HWID Max. Miembros de clan en Zonas Épicas: Sin Restriccion Allys permitidas (Max. 2 Clanes) Cancellation: 2-4 buff con chance y random. Puedes contactarnos en : Discord: https://discord.com/invite/hmVaZFrFEy 🦸 Website:  www.l2seal.com
    • Good day everybody.   A credible team that SGuard represents is looking for java developers.    These positions is full time only i.e. your time is mostly dedicated within the team and team tasks.  All necessary tools are provided.  The team is consistent with > 6 team members and the team is looking to expand to meet various goals. A decent Lineage 2 Essense OR Main (GOD) knowledge is needed.  Experience with l2r/l2p/l2s (not l2j or mobius) type of servers. The team is friendly and goal oriented, very active and resourceful.   Requirements are standard however strong java codding skill is necessary for the position.  Multi language is a plus but not necessary (English/Russian), any is accepted.   Terms and conditions including compensation are reasonable and considered to be up for the industry standards. Details are negotiable with suitable candidates.   You have to have either a public name that can be checked out or a strong reference from credible sources. You will need to have a headset and a mic just for the initial processing, there're no team meetings or conferences after that.   The team has decided it is in their best interest to not publish their information at this time. Details will be available only for suitable candidates.   If you think you're a good fit. Please contact me at:   skype: live:sguard.soft telegram: https://t.me/tech_support_s2    
  • Topics

×
×
  • Create New...