Skip to content

[Share] Tvt Event

Featured Replies

  • Author

Im kinda out of coding for a while. Not sure if there was such admin commad. But if you want to test event for a bit. Change # Time Between TvT events (in minutes, 300 = 5 hours)

TvTEventInterval = 300 to 0

  • 2 weeks later...

Nice job i have a question!

+       public void run()
+       {
+               if (_playerInstance == null)
+                       return;
+
+               L2Summon summon = _playerInstance.getPet();
+
+               if (summon != null)
+                       summon.unSummon(_playerInstance);
+
+               for (L2Effect effect : _playerInstance.getAllEffects())
+               {
+                       if (effect != null)                 <!-- i wanna to put here noblese effect and don't take back their buffs -->
+                               effect.exit();
+               }
+
+               _playerInstance.doRevive();
-----------> _playerInstance.getnoblesse();                    <!-- i wanna to put here noblese effect every time dead player revive -->
+               _playerInstance.setCurrentCp(_playerInstance.getMaxCp());
+               _playerInstance.setCurrentHp(_playerInstance.getMaxHp());
+               _playerInstance.setCurrentMp(_playerInstance.getMaxMp());

 

 

  • Author

Somewhere is line when player dies all buffs are removed, you need to find that line and delete. After that your code should work.

Somewhere is line when player dies all buffs are removed, you need to find that line and delete. After that your code should work.

i  just wanna give them noblese on event enter.

Works well. Thanks

  • Author

i  just wanna give them noblese on event enter.

I know. but even when player dies with noblese effects still stay ? Im pretty sure when player gets killed all effects were removed during re-spawn no matter if he had noblese.

Goto package net.sf.l2j.gameserver.model.entity.tvteventteleporter
and find this --->

public void run()
    {
        if (_playerInstance == null)
            return;

        L2Summon summon = _playerInstance.getPet();

        if (summon != null)
            summon.unSummon(_playerInstance);

        for (L2Effect effect : _playerInstance.getAllEffects())
        {
            if (effect != null)
                effect.exit();
        }

        _playerInstance.doRevive();
        _playerInstance.setCurrentCp(_playerInstance.getMaxCp());
        _playerInstance.setCurrentHp(_playerInstance.getMaxHp());
        _playerInstance.setCurrentMp(_playerInstance.getMaxMp());
        _playerInstance.teleToLocation(_coordinates[0], _coordinates[1], _coordinates[2], 0);

        if (TvTEvent.isStarted() && !_adminRemove)
            _playerInstance.setTeam(TvTEvent.getParticipantTeamId(_playerInstance.getName())+1);
        else
            _playerInstance.setTeam(0);

        _playerInstance.broadcastStatusUpdate();
        _playerInstance.broadcastUserInfo();
    }

 

Remove this ones --->
 for (L2Effect effect : _playerInstance.getAllEffects())
        {
            if (effect != null)
                effect.exit();
        }

Now go to net.sf.l2j.gameserver.model.actor.instance.l2pcinstance

FInd this one

    public void doRevive()
    {
        super.doRevive();
        stopEffects(L2EffectType.CHARMOFCOURAGE);
        sendPacket(new EtcStatusUpdate(this));
        _reviveRequested = 0;
        _revivePower = 0;
        
        if (isMounted())
            startFeed(_mountNpcId);
        
        if (isInParty() && getParty().isInDimensionalRift())
        {
            if (!DimensionalRiftManager.getInstance().checkIfInPeaceZone(getX(), getY(), getZ()))
                getParty().getDimensionalRift().memberRessurected(this);
        }
    }

 

Here is the problem when revive to loose buffs .

Few words from me.

2)Read All of your codes many time untill you know the 100% of what you are typing and what Var use and what to do it.
3)this event should be Good VS Evil or smt like that becouse Team is random, you dont choose what team you will have.
Special thx to

Bunju

For this share.He wanna help other people to learn.

 

Edited by SweeTs

ManaPotion and Escape use !

 

need fix !

I think there is a part in confings about the Potions (didnt check if working becouse i like to reading the codes) But you can find each code in --->

net.sf.l2j.gameserver.model.entity.TvTEvent.java in

 

/**

     * Called on every potion use

     * @param playerName

     * @return boolean

     */

    public static boolean onPotionUse(String playerName)

    {

        if (!isStarted())

            return true;

 

        if (isPlayerParticipant(playerName) && !Config.TVT_EVENT_POTIONS_ALLOWED)

            return false;

 

        return true;

    }

 

    /**

     * Called on every escape use(thanks to nbd)

     * @param playerName

     * @return boolean

     */

    public static boolean onEscapeUse(String playerName)

    {

        if (!isStarted())

            return true;

 

        if (isPlayerParticipant(playerName))

            return false;

 

        return true;

    }

So you can make a specific Config about scrolls.Spend time here and you will figure it out.

1) Never ask for help with people like "Sweets"

If you have money in paypall he will help you for sure.

Sweets just wanna earn money from NOTHING.

Are you fucking kidding me? Someone should slash you right into your mouth for such accusations. I am the one who helps on request section, almost each topic and what do I see, w00t.

 

Show me ONE example where do I ask for the money, otherwise I will fucking ban you. Ohh sorry, there isn't. Ban incoming?

Edited by SweeTs

All you can do is ban me. You never Helped me out. What will you get if you do it ? i am a member here since 2006 10 years ago how many times i ask help ? a lot and how many times i get help by you? NEVER.
You was closed my last topic and we start a comunicate in personal messege and you told me to not use Trances pack becouse it's SH1t so i change the pack to latest from ACIS. And about the money ?
check this -> You lazy banana businesswhore.

i wanna help other people becouse nobody (like you) helped me. To be a good developer is 80% about of your ideas and 20% of codding.You can take EX.-->Facebook.
 

and last one, I didnt talk to you so dont talk to me neither.

Edited by hopakos

You mentioned my name, so you was directly talking to me.

 

You DID the same question in FEW topics, I answered, if you don't understand that's not my problem. I'm not gonna waste my time only bcs I know how to do it and you don't. You are not my buddy to do it. I can only give you tips and advices, if I feel like that. I'm not helping pathetic guys, guess what, you are one of them.

 

Obviously I'm not gonna asnwer on every question/request. I'm not gonna code your custom server features. Now remove my name, since you can't prove a shit.

You mentioned my name, so you was directly talking to me.

 

You DID the same question in FEW topics, I answered, if you don't understand that's not my problem. I'm not gonna waste my time only bcs I know how to do it and you don't. You are not my buddy to do it. I can only give you tips and advices, if I feel like that. I'm not helping pathetic guys, guess what, you are one of them.

 

Obviously I'm not gonna asnwer on every question/request. I'm not gonna code your custom server features. Now remove my name, since you can't prove a shit.

I delete your name.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.