Cancel skill

custom
    
  1. Atsijungęs

    djjapulis

    Pranešimai: 0

    ar yra čia kietų programišių,kas galėtų padaryt Cancel skillo modą Frozenui,kad užmetus cancelą nuimtų bufus tik tam tikram laikotarpiui?
    pvz.: gauni cancel>>netenki keletos bufų>>>po 10 minučių tie buffai,kurių netekai cancelo metu,atsistato..
    yra toks dalykas acis packui..man reikia frozenui..
    va pavyzdys acis packui..cia gal ir nekiekvienas supras kas parašyta forume,bet kam reiks,tas puikiai susigaudys:

    Custom Cancel Buff

    gebančius padaryt tokį dalyką,prašau parašyti čia ar i pm..dėl užmokesčio susitarsim..
    Paskutinį kartą redagavo: djjapulis 4 Sausio 2015 - 14:11
    4 Sausio 2015 - 14:10 / #1
  2. 
  3. Atsijungęs

    Jeppi

    Pranešimai: 0

    Imesk kaip atrodo ant acio, nes ten 100 postu reik turet kad perziuret
    4 Sausio 2015 - 15:17 / #2
  4. 
  5. Atsijungęs

    djjapulis

    Pranešimai: 0

    blem,gali būt,kad neregistruotiems nerodo..sorry,my fault :) va kodas:

    ### Eclipse Workspace Patch 1.0
    Index: java/net/sf/l2j/gameserver/handler/skillhandlers/Cancel.java
    ===================================================================
    --- java/net/sf/l2j/gameserver/handler/skillhandlers/Cancel.java    (revision 1)
    +++ java/net/sf/l2j/gameserver/handler/skillhandlers/Cancel.java    (working copy)
    @@ -14,14 +14,19 @@
      */
     package net.sf.l2j.gameserver.handler.skillhandlers;
    
    +import java.util.Vector;
    +
     import net.sf.l2j.Config;
    +import net.sf.l2j.gameserver.ThreadPoolManager;
     import net.sf.l2j.gameserver.handler.ISkillHandler;
     import net.sf.l2j.gameserver.model.L2Effect;
     import net.sf.l2j.gameserver.model.L2Object;
     import net.sf.l2j.gameserver.model.L2Skill;
     import net.sf.l2j.gameserver.model.ShotType;
     import net.sf.l2j.gameserver.model.actor.L2Character;
    +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
     import net.sf.l2j.gameserver.skills.Formulas;
    +import net.sf.l2j.gameserver.taskmanager.CustomCancelTaskManager;
     import net.sf.l2j.gameserver.templates.skills.L2SkillType;
     import net.sf.l2j.util.Rnd;
     
    @@ -56,6 +61,8 @@
    
                 if (target.isDead())
                     continue;
               
    +            Vector cancelledBuffs = new Vector<>();
    +            
                 int lastCanceledSkillId = 0;
                 int count = skill.getMaxNegatedEffects();
                
    @@ -98,6 +105,9 @@
    
                     // Calculate the success chance following previous variables.
                     if (calcCancelSuccess(effect.getPeriod(), diffLevel, skillPower, skillVuln, minRate, maxRate))
                     {
    +                    if (!cancelledBuffs.contains(effect.getSkill()) && !((L2PcInstance)activeChar).isInOlympiadMode())                        
    +                        cancelledBuffs.add(effect.getSkill());
    +                    
                         // Stores the last canceled skill for further use.
                         lastCanceledSkillId = effect.getSkill().getId();
                      
    @@ -105,6 +115,9 @@
    
                         effect.exit();
                     }
                    
    +                if (cancelledBuffs.size() > 0)                    
    +                    ThreadPoolManager.getInstance().scheduleGeneral(new CustomCancelTaskManager((L2PcInstance)target, cancelledBuffs), 10*1000);
    +
                     // Remove 1 to the stack of buffs to remove.
                     count--;
                    
    Index: java/net/sf/l2j/gameserver/taskmanager/CustomCancelTaskManager.java
    ===================================================================
    --- java/net/sf/l2j/gameserver/taskmanager/CustomCancelTaskManager.java    (revision 0)
    +++ java/net/sf/l2j/gameserver/taskmanager/CustomCancelTaskManager.java    (working copy)
    @@ -0,0 +1,51 @@
    +/*
    + * This program is free software: you can redistribute it and/or modify it under
    + * the terms of the GNU General Public License as published by the Free Software
    + * Foundation, either version 3 of the License, or (at your option) any later
    + * version.
    + *
    + * This program is distributed in the hope that it will be useful, but WITHOUT
    + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
    + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
    + * details.
    + *
    + * You should have received a copy of the GNU General Public License along with
    + * this program. If not, see .
    + */
    +package net.sf.l2j.gameserver.taskmanager;
    +
    +import java.util.Vector;
    +
    +import net.sf.l2j.gameserver.model.L2Skill;
    +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
    +
    + /**
    + * @author Anarchy, Bluur
    + *
    + */
    +public class CustomCancelTaskManager implements Runnable
    +{
    +    private L2PcInstance player = null;
    +    private Vector buffsCanceled = null;
    +
    +    public CustomCancelTaskManager(L2PcInstance p, Vector skill)
    +    {
    +        player = p;
    +        buffsCanceled = skill;
    +    }
    +    
    +    @Override
    +    public void run()
    +    {
    +        if (player == null)        
    +            return;
    +        
    +        for (L2Skill skill : buffsCanceled)
    +        {
    +            if (skill == null)
    +                continue;
    +            
    +            skill.getEffects(player, player);
    +        }
    +    }
    +}
    
    \ No newline at end of file
    Paskutinį kartą redagavo: djjapulis 4 Sausio 2015 - 16:48
    4 Sausio 2015 - 16:42 / #3
  6. 
  7. Atsijungęs

    djjapulis

    Pranešimai: 0

    dar vienas kodas,kuris pasharintas jau senai maxcheateriuose,tik neišdirbtas pilnai,galima suprast iš komentarų:
    uber cancellation
    skirtumų neieškojau tarp šių dviejų,bet kodas is brazilų forumo,kiek supratau yra patobulintas,oly buffai po cancelo nebeatsistato..
    4 Sausio 2015 - 17:02 / #4
  8. 
  9. Atsijungęs

    Grax

    Pranešimai: 0

    turetu veikt be jokiu addaptinimu. tik importus pasikeisk, jei mes error rasyk cia.
    4 Sausio 2015 - 18:20 / #5
  10. 
  11. Atsijungęs

    djjapulis

    Pranešimai: 0

    tai,kad frozene skillhandleriuose nėra cancel.java failo..vargu ar čia vien importų pakeitimas padės.žvalgausi acis failų,bus paprasčiau,nes kiek pastebėjau,frozenas miręs..veltui su juo prasidėjau :/ gal kokių patarimų,nuorodų kas galit,kad pagreitį greičiau išvystyt? :) kiek čia dabar žiūrineju,rodos sunku gaut naujus acis rev..koks jų paskutinis rev,kas žinot?

    parsisiunčiau 335 rev..žiūrim ką turim :)
    Paskutinį kartą redagavo: djjapulis 4 Sausio 2015 - 19:04
    4 Sausio 2015 - 18:52 / #6
  12. 
  13. Atsijungęs

    wewewe

    Pavadinimas: L2 žaidėjas

    Narys

    Pranešimai: 727

    Vartotojo apdovanojimai: 16

    4 Sausio 2015 - 20:01 / #7
  14. 
  15. Atsijungęs

    djjapulis

    Pranešimai: 0

    na jo,bet skiriasi nuo acis....per sudėtinga man,todėl prašau,kas sugebat,padarykit,sumokėsiu jei kaina nebus kosmoso lygio..

    o dabar peržiūrėjau acis packus,taip nebesinori pradėt kažko išnaujo..liksiu kolkas prie frozeno ir labai reikia sito modo..
    4 Sausio 2015 - 20:24 / #8
  16. 
  17. Atsijungęs

    djjapulis

    Pranešimai: 0

    nebereikia cancel modo,turiu jau...
    5 Sausio 2015 - 20:04 / #9