Thread: ≈ Auto Soulshots
View Single Post
Old 03.03.2006, 00:49   #9
LIRIK
Архивный участник
 
Join Date: Mar 2006
Posts: 38
Default

HI All.
(I'am not sorry for my bad english )
Anybody have solution's, idea's about how to fix autosoulshot's?
I have some idea's , but i not sure , that it correct.

1. Interesting, what protocol needed for working autoSS? 530 or higher?
2. Where trouble: server side, client dll(s) side or both?
3. So, at java client-server autoSS are working, but help this to us if analyzing java source?

client.Request.AutoSoulshot.Java.
Code:
package net.sf.l2j.gameserver.clientpackets;

import java.nio.ByteBuffer;
import java.util.logging.Logger;
import net.sf.l2j.Config;
import net.sf.l2j.gameserver.ClientThread;
import net.sf.l2j.gameserver.ItemTable;
import net.sf.l2j.gameserver.model.L2ItemInstance;
import net.sf.l2j.gameserver.model.L2PcInstance;
import net.sf.l2j.gameserver.serverpackets.ActionFailed;
import net.sf.l2j.gameserver.serverpackets.ExAutoSoulShot;
import net.sf.l2j.gameserver.serverpackets.SystemMessage;
import net.sf.l2j.gameserver.templates.L2Item;

public class RequestAutoSoulShot extends ClientBasePacket
{
         private static final String _C__CF_REQUESTAUTOSOULSHOT = "[C] CF RequestAutoSoulShot";
       private static Logger _log = Logger.getLogger(RequestAutoSoulShot.class.getName());
    
      // format  cd
      private final int _itemId;
        private final int _type;       // 1 = on : 0 = off;
        public RequestAutoSoulShot(ByteBuffer buf, ClientThread client)
        {
                super(buf, client);
                 _itemId  = readD();
                _type    = readD();
        }

        void runImpl()
         {
         L2PcInstance activeChar = getClient().getActiveChar();
 
                if (activeChar.getPrivateStoreType()==0 && activeChar.getTransactionRequester()==null && !activeChar.isDead())
                 {
                         if (Config.DEBUG) _log.fine("AutoSoulShot:" + _itemId);
                        
                         L2ItemInstance item = activeChar.getInventory().findItemByItemId(_itemId);
            if (item != null)
             {
                 L2Item tempItem = ItemTable.getInstance().getTemplate( item.getItemId() );
              String tempName = tempItem.getName();
                
                if ( _type == 1)
                {
                     
                    if (item == null)
                     {
                         _log.warning("Bad item id ("+_itemId+") was given to RequestAutoSoulShot.");
                        activeChar.sendPacket(new ActionFailed());
                        return;
                   }
                    
                    activeChar.addAutoSoulShot(_itemId);
                    ExAutoSoulShot atk = new ExAutoSoulShot(_itemId, _type);
                    activeChar.sendPacket(atk);
                   
                    //start the auto soulshot use
                    SystemMessage sm = new SystemMessage(1433); 
                     sm.addString(tempName);
                     activeChar.sendPacket(sm);
                 }
                
                else if ( _type == 0)
                {
                   activeChar.removeAutoSoulShot(_itemId);
                    ExAutoSoulShot atk = new ExAutoSoulShot(_itemId, _type);
                    activeChar.sendPacket(atk);
                    
                    //cancel the auto soulshot use
                    SystemMessage sm = new SystemMessage(1434); 
                     sm.addString(tempName);
                     activeChar.sendPacket(sm);
                }
            }
                 }
         }
         
         /* (non-Javadoc)
         * @see net.sf.l2j.gameserver.clientpackets.ClientBasePacket#getType()
          */
        public String getType()
        {
                 return _C__CF_REQUESTAUTOSOULSHOT;
         }
 }
serverExAutoSoulShot.java
Code:
package net.sf.l2j.gameserver.serverpackets;

public class ExAutoSoulShot extends ServerBasePacket
{
        private static final String _S__FE_EXAUTOSOULSHOT = "[S] FE ExAutoSoulShot";
        private int _itemId;
        private int _type;
 
         public ExAutoSoulShot(int itemId, int type)
         {
                _itemId = itemId;
                 _type = type;
         }
 

        final void runImpl()
         {
                // no long-running tasks
         }
        
        final void writeImpl()
         {
                writeC(0xFE);
                writeH(0x12);     //unknown??
                writeD(_itemId);
                 writeD(_type);
         }
 
       /* (non-Javadoc)
        * @see net.sf.l2j.gameserver.serverpackets.ServerBasePacket#getType()
         */
         public String getType()
        {
                return _S__FE_EXAUTOSOULSHOT;
         }
}
4. I think, if you press right mouse button at shortcut with soulshot's, client must be sent to server some data. I sniffed packet's between client-server, and... i recive some information, it's hex code, but I just begining to learn asm/hex etc. and don't understand nothing in section "data" from TCP packet.
So, i execute game, logining, execute sniffer and press right mouse button at shortcut with soulshot's, than stop sniffer and save packet's.
# some packet's - haven't data section, just destination , source etc. may be it's ping like packet's ?...
# many packet's are small , i think , that is transmition , player position/status.
Example data section of client-side packet.
Code:
1f 00 63 6c 01 01 a0 84
3b bc de 27 d6 29 77 6f
56 d1 b3 86 6d 6d cc 10
b5 cd 50 3f 3f 3f 9e
Example data section of server-side packet.
Code:
13 00 61 38 3b 3b 9a f7
a3 24 21 55 56 56 f7 f0
ab 2c 29
# and some packet's are bigger that other.

Example data section of server-side packet (big).
Code:
29 00 5e 69 17 07 ee c2 eb 7c
22 58 53 53 f2 9f cb 4c 5a 2d 2e 2e 8f e3 b7 30
26 30 5e 5e ff db 64 e3 f5 3a c8 37 69 05 51 0b
00 59 3b 3a 3a 9b f7 a3 24 19 23 00 61 17 14 16
b7 db 8f 96 c9 ae ed 86 28 44 10 03 47 30 33 33
92 fe aa 2d 6b 1c 1f 1f be d2 86 01 47 d5 01 63
75 1b 1b ba 9e 21 a6 c1 0e fc 03 5d 31 65 e2 85
b2 cc dc 35 1d 49 8b ec fd fe 98 39 3e 6a ac cb
bc bf be 1f 73 27 a1 c6 b1 b2 ab 0a 66 32 b0 d7
a0 a3 1f aa c6 92 00 67 10 13 0b aa c6 92 0c 6b
1c 1f 3a 9b f7 a3 33 54 23 20 08 a9 c5 91 8f e8
9f 9c 05 a4 c8 9c cf a8 df dc 08 a9 c5 91 a5 c2
b5 b6 64 f9 95 c1 c6 46 30 33 1b ba d6 82 05 62
15 16 8a 32 4e 5a 46 38 5f 1c 81 39 45 51 4c 32
55 16 8f 37 4b 5f 4c 32 55 16 8e 36 4a 5e d9 be
c9 ca 5c e4 98 8c 98 e6 81 c2 50 e8 94 80 92 ec
8b c8 c8 69 05 51 4e 30 57 14 14 b5 d9 8d 0a 6d
1a 19 54 f6 9a ce 04 60 17 14 98 3a 56 02 e8 8c
fb f8 95 37 5b 0f a4 c3 b4 b7 07 a6 ca 9e 19 7e
09 0a 38 99 f5 a1 6b 08 7f 7c 2c 89 e5 b1 10 77
00 03 03 a2 ce 9a ad ca bd be be 1f 73 27 b3 d4
a3 a0 f2 52 3e 6a 8e e9 9e 9d bf 1e 72 26 86 e1
96 95 bc 1d 71 25 ba dd aa a9 15 b5 d9 8d 58 3e
49 4a 33 92 fe aa 2d 4a 3d 3e 3e 9f f3 a7 5a 3d
4a 49 1c bd d1 85 78 1f 68 6b 3e 9f f3 a7 5a 3d
4a 49 1c bd d1 85 78 1f 68 6b 3e 9f f3 a7 84 93
d9 d0 07 05 99 f2 11 2b 80 c5 c6 1f 80 eb 6c 0b
7c 7f 7f de ac b8 3f 58 2f 2c 2c 8d d6 c2 43 24
53 50 52 f3 9f cb 4e 29 5e 5d 5c fd 91 c5 42 25
52 51 51 f0 9c c8 4f 28 5f 5c 5c fd 91 c5 42 25
52 51 51 f0 9c c8 4f 28 5f 5c 5c fd 91 c5 42 25
52 51 51 f0 9c c8 4f d7 5f a3 5c 02 91 3a 42 da
52 ae 51 0f 9c 37 4f d7 5f a3 5c 02 91 3a 42 da
52 ae 51 0f 9c 37 4f 2e 59 5a 5a fb 97 c3 44 73
04 1e 1e bf d3 87 00 67 10 6c 6c cd a1 8a 0d 6a
1d 1e
so... may be i kill my time unusefull.
But, I want to find solution and please stop flooding at this topik - it's not help us.
Thank's.
LIRIK is offline