elitepvpers

elitepvpers (https://www.elitepvpers.com/forum/)
-   SRO Coding Corner (https://www.elitepvpers.com/forum/sro-coding-corner/)
-   -   opcode for silk and how to buy from item mall (https://www.elitepvpers.com/forum/sro-coding-corner/4566195-opcode-silk-how-buy-item-mall.html)

maryqueen 12/22/2018 18:47

opcode for silk and how to buy from item mall
 
hi,

sorry but I cant find it out by myself:

how do I get my current silk and how can I buy from item mall clientless, cant find any opcodes for this

thanks

qqdev 12/22/2018 23:07

It is not based on packets iirc

DaxterSoul 12/23/2018 07:28

You can get your current Silk from 0x3153 - SERVER_AGENT_SILK_UPDATE.

Buying items is an inventory operation and therefore part of 0x7034 - CLIENT_AGENT_INVENTORY_OPERATION_REQUEST.

maryqueen 12/23/2018 17:14

Quote:

Originally Posted by DaxterSoul (Post 37301789)
You can get your current Silk from 0x3153 - SERVER_AGENT_SILK_UPDATE.

Buying items is an inventory operation and therefore part of 0x7034 - CLIENT_AGENT_INVENTORY_OPERATION_REQUEST.

thank u :)

one more question: I only get this Paket when I log into the Gameworld / relog, is there anyway to invoke an update on this information, I already tested teleporting but it didnt work.

DaxterSoul 12/23/2018 19:23

Quote:

Originally Posted by maryqueen (Post 37302592)
thank u :)

one more question: I only get this Paket when I log into the Gameworld / relog, is there anyway to invoke an update on this information, I already tested teleporting but it didnt work.

I'm not sure if you get one after buying something with silk but teleportation should definitely triggers an update.

maryqueen 01/02/2019 19:02

Quote:

Originally Posted by DaxterSoul (Post 37302838)
I'm not sure if you get one after buying something with silk but teleportation should definitely triggers an update.

yep, teleporting triggers an update

Im having another problem: understanding Paket 0x7034

I used xsniff to lookup whats happening when I buy a Tiger from the Item Mall, thats the Packet which gets send to the Server:

[0000000000] 18 1B 04 03 02 01 1F 00 50 41 43 4B 41 47 45 5F
[0000000016] 49 54 45 4D 5F 43 4F 53 5F 43 5F 54 49 47 45 52
[0000000032] 5F 53 43 52 4F 4C 4C 01 00 00 00 00 00 00 00 00
[0000000048] 00 91 04 00 00

Ascii: ........PACKAGE_ITEM_COS_C_TIGER_SCROLL........... ..

my -not working code-

Code:

   
Packet BuyTiger = new Packet(0x7034);
BuyTiger.WriteUInt8(0x18);
BuyTiger.WriteUInt8(0x1B);
BuyTiger.WriteUInt8(0x04);
BuyTiger.WriteUInt8(0x03);
BuyTiger.WriteUInt8(0x02);
BuyTiger.WriteUInt8(0x01);
BuyTiger.WriteUInt8(0x1F);
BuyTiger.WriteUInt8(0x00);
BuyTiger.WriteAscii("PACKAGE_ITEM_COS_C_TIGER_SCROLL");
BuyTiger.WriteUInt8(0x00);
BuyTiger.WriteUInt8(0x00);
BuyTiger.WriteUInt8(0x00);
BuyTiger.WriteUInt8(0x00);
BuyTiger.WriteUInt8(0x00);
BuyTiger.WriteUInt8(0x00);
BuyTiger.WriteUInt8(0x00);
BuyTiger.WriteUInt8(0x00);
BuyTiger.WriteUInt8(0x00);
BuyTiger.WriteUInt8(0x91);
BuyTiger.WriteUInt8(0x04);
BuyTiger.WriteUInt8(0x00);
BuyTiger.WriteUInt8(0x00);
C.AG.Security.Send(BuyTiger);

I dont get how the Packet is structured, since I found its used for a lot of different things.

DaxterSoul 01/02/2019 20:40

"1F 00" is the string length and already written by the WriteAscii function.

I suggest you look into public bot/emulator source code to get a general idea of how the packet is structured.

maryqueen 01/03/2019 02:35

Quote:

Originally Posted by DaxterSoul (Post 37319548)
"1F 00" is the string length and already written by the WriteAscii function.

I suggest you look into public bot/emulator source code to get a general idea of how the packet is structured.

thanks for the info my function is now working :)

I looked into some different bots and their buy control but they dont even have a txt file with item mall items parsed.

I made some difference tests with xsniff and thats what I found so far:

Code:

18 //storetype - uint8 - 24
1B //UNKNOWN - uint8 - 27
04 //UNKNOWN - uint8 - 4
03 //tab/pagenumber - uint8 - 3
02 01 //UNKNOWN - uint16 - 258
PACKAGE_ITEM_COS_C_TIGER_SCROLL //Ascii - 50 41 43 4b 41 47 45 5f 49 54 45 4d 5f 43 4f 53 5f 43 5f 54 49 47 45 52 5f 53 43 52 4f 4c 4c
01 00 //count - uint16 - 1
00 00 00 00 //count? - uint32 - 0
00 00 00 00 //count? - uint32 - 0
91 04 00 00 //item id - uint32 - 1169


oksn123 01/03/2019 11:02

Inventory movement MallShopto Inventory starts with 24
Code:

case 24:
                        MoveItemMallToInv(packet.ReadByte(), packet.ReadByte(), packet.ReadByte(), packet.ReadByte(), packet.ReadByte(), packet.ReadByte(), packet.ReadByte(), packet.ReadUShort());//Mall <> Invetory

Code:

public static void MoveItemMallToInv(byte a1, byte a2, byte Kategori, byte SubKategori, byte ItemIndex, byte a3, byte Slot, ushort Count)
        {
          // byte a1 = packet.ReadByte();//Icant find what this is always 27
          // byte a2 = packet.ReadByte(); //Icant find what this is always 4
          // byte categori = packet.ReadByte();//Item Mall Kategori index id
          // byte Subcategori = packet.ReadByte();//Item Mall SubKategori index id
          // byte ItemIndex = packet.ReadByte();//İnside the subcategory - item index like global index = 0
          // byte a3 = packet.ReadByte();//Icant find what this is always 1
          // byte Slot = packet.ReadByte();//Inventory slot
          //ushort Count = packet.ReadUShort();//Count

            FindMallItemAdd(Kategori, SubKategori, ItemIndex, Slot, Count);


        }



All times are GMT +2. The time now is 22:36.

Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.