Jump to content
  • 0

Question

Posted (edited)

Hello, i have an streange idea maybe some of you can help me, im using acis pack  for c6 and i want to make that people who are using teleport will dissapear slowly not instant. Maybe someone know what code and where need to add to java to have this effect?

thanks a lot for those who help me solve this 🙂
 

hope so understand what i mean 

Edited by remigas

7 answers to this question

Recommended Posts

  • 0
Posted (edited)
33 minutes ago, remigas said:

Hello, i have an streange idea maybe some of you can help me, im using acis pack  for c6 and i want to make that people who are using teleport will dissapear slowly not instant. Maybe someone know what code and where need to add to java to have this effect?

thanks a lot for those who help me solve this 🙂
 

hope so understand what i mean 

 

Define "slowly". Like a slow motion nuclear fission ? Like entropy is affecting you in a faster way than the rest and break down your atoms? 

 

Basically if you open up the Teleporter.java (i don't really remember the instance type in aCis of teleporters), you will realise that it uses teleToLocation() now depending on what "delay" mean you have to approach this method in a different way.

 

If you want to teleport after 5 second(s) you have to use a ThreadPoolExecutor for example.

Edited by Kara
  • Haha 1
  • 0
Posted (edited)

Create one new Skill preferrably the one called during /unstuck of type

 

Modify L2SkillTeleport.java

Add this:

Quote


    private static final HashMap<L2Character, L2TeleportLocation> _values = new HashMap<>();

And this

Quote

    public static void initTeleport(L2PcInstance player, int teleId)
    {
        final L2TeleportLocation temp = TeleportLocationTable.getInstance().getTemplate(teleId);
        if (temp == null || player.isCastingNow() || player.isSitting() || player.isMovementDisabled() || player.isOutOfControl() || player.isInOlympiadMode() || player.inObserverMode() || player.isInJail())
        {
            player.sendMessage("Your current state doesn't allow you to cast a teleport!");
            return;
        }
        int id = 7066;
        if (player.isGM() || player.isInsideZone(L2Character.ZONE_PEACE))
            id = 7065;
        else if (player.isInCombat() || player.getPvpFlag() > 0 || player.getKarma() > 0)
            id = 7067;
        player.doCast(SkillTable.getInstance().getInfo(id, 1));
        _values.put(player, temp);
    }

edit useSkill

 

add this 

Quote


                final L2TeleportLocation teleport = _values.get(activeChar);

null check it, make your checks

and call this 

Quote


                        activeChar.teleToLocation(teleport.getLocX(), teleport.getLocY(), teleport.getLocZ(), 30);

 

Now, you have the logic you need to change L2TeleporterInstance

 

change your teleportTo location methods with 

Quote

L2SkillTeleport.initTeleport( ........ )

 

 

Now you have a mechanism that instead of instant teleport your character casts a skill of defined duration that will do the actual teleportation

Edited by xdem
  • 0
Posted
player.disableAllSkills();
player.sendPacket(new ShowBoard());
player.destroyItemByItemId("CB_Teleport", Config.COMMUNITYBOARD_CURRENCY, Config.COMMUNITYBOARD_TELEPORT_PRICE, player, true);
player.setInstanceById(0);
player.sendMessage("You will be teleported in 20 seconds");
ThreadPool.schedule(() -> player.teleToLocation(Config.COMMUNITY_AVAILABLE_TELEPORTS.get(teleBuypass), 0), 20000);
ThreadPool.schedule(player::enableAllSkills, 20000);

 

 

this is what i use on L2j Mobius using CB teleport. You can get an idea and there is no need to edit anything.

 

no animations though, u just stand still and tp after 20 sec.

im sure there a re better ways to write this my java knowledge is bellow beginner but i hope it helps..

 

change:

player.disableAllSkills();--- to--- player.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);

player.doCast(SkillData.getInstance().getSkill(2013, 1));   << add this to add SoE effect. but if you Esc cancel it it will just cancel the skill animation and the tp will occur after 20sec. cant figure out how to cancel tp as well.

  • 0
Posted

If you need only delay w/o any additionally wffects then find this lines in Npc.java

 

        if (Config.FREE_TELEPORT || teleport.getPriceCount() == 0 || player.destroyItemByItemId("InstantTeleport", teleport.getPriceId(), teleport.getPriceCount(), this, true))
            player.teleportTo(teleport, 20);

 

and replace to this

 

        if (Config.FREE_TELEPORT || teleport.getPriceCount() == 0 || player.destroyItemByItemId("InstantTeleport", teleport.getPriceId(), teleport.getPriceCount(), this, true))
        {
		ThreadPool.schedule(() -> 
		{
			player.teleportTo(teleport, 20);
		}, 2000);
	}

 

Guest
This topic is now closed to further replies.


  • Posts

    • Γεια σε ολους, προσπαθω εδω και 2 μερες να κανω αυτο το πραγμα να λειτουργει. το καταφερα για ενα διαστημα 5 ωρων. αλλα φαινεται οτι το discord μου κανει block to dll. ή κατι αλλο που δεν μπορω να ειμαι σιγουρος για το τι φταιει... αν καποιος γνωριζει κατι ας στειλει ενα pm να το δουμε μαζι.  *το source το εφιαξα εγω. https://youtu.be/kMvrbo9VBZc  ενα βιντεο που δειχνει πως δουλευε πριν σταματησει να δουλευει...   
    • thank you, please move to the desired category
    • wrong section, you need move this post to https://maxcheaters.com/forum/72-marketplace-l2packs-files/
    • Unlock Unlimited Access with GoProxy's Residential Proxies!   Experience seamless, secure, and unrestricted connectivity worldwide with GoProxy's Unlimited Residential Proxies. Our service offers access to a global network of rotating residential IPs, ensuring top performance for your large-scale data collection, streaming, and more.     ✔️Unlimited Traffic & IPs: Enjoy unrestricted access with our rotating residential proxies, delivering high performance through a vast global IP pool. ✔️High Success Rate: Achieve a 99.96% success rate with a rapid 0.6-second response time, ensuring efficient and reliable operations. ✔️Flexible Sessions: Customize IP rotation to fit your project needs, with options for automatic rotation and sticky sessions lasting up to 60 minutes. ✔️Global Coverage: Access IPs from over 120 countries, making it ideal for businesses requiring high bandwidth without region-specific constraints.     All plans include unlimited traffic and IPs, unlimited concurrent requests, and access to real residential IP addresses. Elevate your online operations with GoProxy's Unlimited Residential Proxies—your smart choice for large-scale projects.   👉 Learn more and get started today: GoProxy Unlimited Proxies
  • Topics

×
×
  • Create New...