Você não é registrado, por favor registre-se para ter acesso ao conteúdo completo.
Caso seja registrado, efetue login.
Esqueceu sua senha? Clique aqui
Recomendamos o uso do Mozilla Firefox para uma melhor visualização.    


Início Postados Hoje Marcar Fóruns Como Lidos Álbums Banidos SE Team Medalhas
Voltar   Secret Experience > Área L2J > [L2J] Downloads > [Lineage] Java Mods
Registrar Loteria VIPStaff SERegras do fórum Comunidade Arcade Postados Hoje Pesquisar Experience
   

Secret Experience.NET   Secret Experience Corporation - Welcome To The Real World
     Anúncios SE

Resposta
 
Ferramentas do Tópico Modos de Exibição
Antigo 01-10-2013, 03:09 PM   #1
Setokaiba
Jesus Te Ama, Mas EU Não!
 
Avatar de Setokaiba
 
Registrado em: Oct 2008
Localização: 45º 33º 34º N | 122º 41º 41º W DESTINATION: ANYWHERE Adidas
Posts: 4,133
Agradeceu: 837
Agradecido 6,058 Vezes em 2,106 Posts
Achei Ruim:
Acharam ruim Vezes em Posts
Meu Estado:
Pontos: 20,442, Nível: 90
Pontos: 20,442, Nível: 90 Pontos: 20,442, Nível: 90 Pontos: 20,442, Nível: 90
Atividade: 99%
Atividade: 99% Atividade: 99% Atividade: 99%

Nome Real: Anderson Andrade

Inventório de Setokaiba Usuário possui 1x Lock Fan Usuário possui 1x Oakley Usuário possui 1x Apple Inc. Fan/User Usuário possui 1x Honda Usuário possui 1x Windows Seven User

Padrão Auto Soulshot

Descrição: Automatiza o uso dos soulshots, sem a necessidade de haver tal item no inventário.
Testado no High Five.

[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]

[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]

[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]

Código: [Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]
	

    ### Eclipse Workspace Patch 1.0
    #P L2J_Server
    Index: java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java
    ===================================================================
    --- java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java        (revision 6193)
    +++ java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java        (working copy)
    @@ -44,6 +44,12 @@
     import javolution.util.FastMap;
     import javolution.util.FastSet;
     
    +import com.custom.AutoShots;
    @@ -881,6 +894,18 @@
                    }
            }
           
    +       private AutoShots _autoshotss;
    +      
    +       public AutoShots getAutoShots()
    +       {
    +               return _autoshotss;
    +       }
    +      
    +       public void setAutoShots(AutoShots _shot)
    +       {
    +               _autoshotss = _shot;
    +       }
    +      
            public void stopPvpRegTask()
            {
                    if (_PvPRegTask != null)
    @@ -2592,6 +2894,11 @@
                            else
                            {
                                    items = getInventory().unEquipItemInBodySlotAndRecord(slot);
    +                              
    +                               if (getAutoShots() != null)
    +                               {
    +                                       _activeSoulShots.clear();
    +                               }
                            }
                    }
                    else
    @@ -2618,6 +2925,10 @@
                                   
                                    if ((item.getItem().getBodyPart() & L2Item.SLOT_MULTI_ALLWEAPON) != 0)
                                    {
    +                                       if (getAutoShots() != null)
    +                                       {
    +                                               getAutoShots().updateAutoShots(this);
    +                                       }
                                            rechargeShots(true, true);
                                    }
                            }
    @@ -10258,8 +10666,18 @@
                    {
                            item = getInventory().getItemByItemId(itemId);
                           
    -                       if (item != null)
    +                       if (getAutoShots() != null)
                            {
    +                               L2ItemInstance shot = new L2ItemInstance(0, ItemTable.getInstance().getTemplate(itemId));
    +                               handler = ItemHandler.getInstance().getHandler(shot.getEtcItem());
    +                              
    +                               if (handler != null)
    +                               {
    +                                       handler.useItem(this, item, false);
    +                               }
    +                       }
    +                       else if (item != null)
    +                       {
                                    if (magic)
                                    {
                                            if (item.getItem().getDefaultAction() == L2ActionType.spiritshot)
    Index: java/com/custom/AutoShots.java
    ===================================================================
    --- java/com/custom/AutoShots.java      (revision 0)
    +++ java/com/custom/AutoShots.java      (revision 0)
    @@ -0,0 +1,76 @@
    +/*
    + * Copyright (C) 2004-2013 L2J Server
    + *
    + * This file is part of L2J Server.
    + *
    + * L2J Server 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.
    + *
    + * L2J Server 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 <http://www.gnu.org/licenses/>.
    + */
    +package com.custom;
    +
    +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
    +
    +/**
    + * @author Wyatt
    + */
    +
    +public class AutoShots
    +{
    +       public AutoShots(L2PcInstance activeChar)
    +       {
    +               updateAutoShots(activeChar);
    +               activeChar.setAutoShots(this);
    +               activeChar.rechargeShots(true, true);
    +       }
    +      
    +       public void updateAutoShots(L2PcInstance activeChar)
    +       {
    +               if (activeChar.getActiveWeaponItem() != null)
    +               {
    +                       ItemGrade itemgrade = ItemGrade.values()[activeChar.getActiveWeaponItem().getItemGrade()];
    +                       activeChar.addAutoSoulShot(itemgrade.getSoulshot());
    +                       activeChar.addAutoSoulShot(itemgrade.getBlessedSpiritshot());
    +               }
    +       }
    +      
    +       public enum ItemGrade
    +       {
    +               NOGRADE(1835, 2509),
    +               D(1463, 2510),
    +               C(1464, 2511),
    +               B(1465, 2512),
    +               A(1466, 2513),
    +               S(1467, 2514),
    +               S80(1467, 2514),
    +               S84(1467, 2514);
    +              
    +               private int soulshot;
    +               private int blessedspiritshot;
    +              
    +               private ItemGrade(int soulshot_id, int blessedspirit_id)
    +               {
    +                       soulshot = soulshot_id;
    +                       blessedspiritshot = blessedspirit_id;
    +               }
    +              
    +               public int getSoulshot()
    +               {
    +                       return soulshot;
    +               }
    +              
    +               public int getBlessedSpiritshot()
    +               {
    +                       return blessedspiritshot;
    +               }
    +       }
    +}
    \ No newline at end of file
    Index: java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java
    ===================================================================
    --- java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java (revision 6193)
    +++ java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java (working copy)
    @@ -18,10 +18,12 @@
      */
     package com.l2jserver.gameserver.network.clientpackets;
     
     import javolution.util.FastList;
     
    +import com.custom.AutoShots;
     
    @@ -579,6 +581,23 @@
    +               new AutoShots(activeChar);
    +              
                    if (Config.WELCOME_MESSAGE_ENABLED)
                    {
                            activeChar.sendPacket(new ExShowScreenMessage(Config.WELCOME_MESSAGE_TEXT, Config.WELCOME_MESSAGE_TIME));
    Index: dist/game/data/scripts/handlers/itemhandlers/SpiritShot.java
    ===================================================================
    --- dist/game/data/scripts/handlers/itemhandlers/SpiritShot.java        (revision 9937)
    +++ dist/game/data/scripts/handlers/itemhandlers/SpiritShot.java        (working copy)
    @@ -20,6 +20,7 @@
     
     import java.util.logging.Level;
     
    +import com.custom.AutoShots.ItemGrade;
     import com.l2jserver.gameserver.handler.IItemHandler;
     import com.l2jserver.gameserver.model.ShotType;
     import com.l2jserver.gameserver.model.actor.L2Playable;
    @@ -45,6 +46,20 @@
                   
                    final L2PcInstance activeChar = (L2PcInstance) playable;
                    final L2ItemInstance weaponInst = activeChar.getActiveWeaponInstance();
    +              
    +               if ((activeChar.getAutoShots() != null))
    +               {
    +                       if (weaponInst != null)
    +                       {
    +                               ItemGrade grade = ItemGrade.values()[weaponInst.getItem().getItemGrade()];
    +                               item = new L2ItemInstance(0, grade.getSoulshot());
    +                       }
    +                       else if (item == null)
    +                       {
    +                               return false;
    +                       }
    +               }
    +              
                    final L2Weapon weaponItem = activeChar.getActiveWeaponItem();
                    final SkillHolder[] skills = item.getItem().getSkills();
                   
    @@ -56,6 +71,14 @@
                            return false;
                    }
                   
    +               if ((activeChar.getAutoShots() != null) && (weaponInst != null))
    +               {
    +                       activeChar.setChargedShot(ShotType.SPIRITSHOTS, true);
    +                       activeChar.sendPacket(SystemMessageId.ENABLED_SPIRITSHOT);
    +                       Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUse(activeChar, activeChar, skills[0].getSkillId(), skills[0].getSkillLvl(), 0, 0), 600);
    +                       return true;
    +               }
    +              
                    // Check if Spirit shot can be used
                    if ((weaponInst == null) || (weaponItem.getSpiritShotCount() == 0))
                    {
    Index: dist/game/data/scripts/handlers/itemhandlers/SoulShots.java
    ===================================================================
    --- dist/game/data/scripts/handlers/itemhandlers/SoulShots.java (revision 9937)
    +++ dist/game/data/scripts/handlers/itemhandlers/SoulShots.java (working copy)
    @@ -20,6 +20,7 @@
     
     import java.util.logging.Level;
     
    +import com.custom.AutoShots.ItemGrade;
     import com.l2jserver.gameserver.handler.IItemHandler;
     import com.l2jserver.gameserver.model.ShotType;
     import com.l2jserver.gameserver.model.actor.L2Playable;
    @@ -46,6 +47,20 @@
                   
                    final L2PcInstance activeChar = playable.getActingPlayer();
                    final L2ItemInstance weaponInst = activeChar.getActiveWeaponInstance();
    +              
    +               if (activeChar.getAutoShots() != null)
    +               {
    +                       if (weaponInst != null)
    +                       {
    +                               ItemGrade grade = ItemGrade.values()[weaponInst.getItem().getItemGrade()];
    +                               item = new L2ItemInstance(0, grade.getSoulshot());
    +                       }
    +                       else if (item == null)
    +                       {
    +                               return false;
    +                       }
    +               }
    +              
                    final L2Weapon weaponItem = activeChar.getActiveWeaponItem();
                    final SkillHolder[] skills = item.getItem().getSkills();
                   
    @@ -57,6 +72,14 @@
                            return false;
                    }
                   
    +               if ((activeChar.getAutoShots() != null) && (weaponInst != null))
    +               {
    +                       weaponInst.setChargedShot(ShotType.SOULSHOTS, true);
    +                       activeChar.sendPacket(SystemMessageId.ENABLED_SOULSHOT);
    +                       Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUse(activeChar, activeChar, skills[0].getSkillId(), skills[0].getSkillLvl(), 0, 0), 600);
    +                       return true;
    +               }
    +              
                    // Check if Soul shot can be used
                    if ((weaponInst == null) || (weaponItem.getSoulShotCount() == 0))
                    {
Coded by ^Wyatt

Setokaiba está online agora  
O seguinte membro ao lado disse Obrigado(a) a : Setokaiba por gostar deste Post :
CavaleiroNegro (02-10-2013)
Links Patrocinados
Resposta

Tags
auto, automatico, soulshots, uso


Regras para Posts
Você não pode postar novos tópicos
Você não pode postar respostas
Você não pode postar anexos
Você não pode editar seus posts

Código [IMG] Sim
Código HTML Não

Ir para...


Horários baseados na GMT -3. Agora são 11:54 PM.