Could someone please explain how to add the inventory case ( if it's needed) and some example for the items.
Could someone please explain how to add the inventory case ( if it's needed) and some example for the items.
Here...
PD: In here you have the ranks.Code:CNtlPacket packet(sizeof(sGU_ITEM_CREATE)); sGU_ITEM_CREATE * sPacket = (sGU_ITEM_CREATE *)packet.GetPacketData(); sPacket->wOpCode = GU_ITEM_CREATE; sPacket->handle = AcquireSerialId(); // sPacket->sItemData.itemNo = ItemID; sPacket->sItemData.byPlace = Where; sPacket->sItemData.byPosition = PositionOfWhere; sPacket->sItemData.byRank = ITEM_RANK_NORMAL; sPacket->sItemData.byStackcount = 0; sPacket->sItemData.byCurrentDurability = 100; packet.SetPacketLen( sizeof(sGU_ITEM_CREATE) ); int rc = g_pApp->Send( this->GetHandle(), &packet );
Code:ITEM_RANK_NOTHING ITEM_RANK_NORMAL ITEM_RANK_SUPERIOR ITEM_RANK_EXCELLENT ITEM_RANK_RARE ITEM_RANK_LEGENDARY
I used the following lines, added them to my GameServer.
And for some reason when i try to Enter the GameServer, I get this error:Code:////////////////////////////////////////////////////////////////////////////////////// ////item infosGU_AVATAR_ITEM_INFO sPacket; // CNtlPacket packet3(sizeof(sGU_AVATAR_ITEM_INFO)); sGU_AVATAR_ITEM_INFO * sPacket3 = (sGU_AVATAR_ITEM_INFO *)packet3.GetPacketData(); sPacket3->wOpCode =GU_AVATAR_ITEM_INFO; sPacket3->byBeginCount = 1; sPacket3->byItemCount = 1; sPacket3->aItemProfile[0].handle = AcquireSerialId(); sPacket3->aItemProfile[0].tblidx = 19901; sPacket3->aItemProfile[0].byPlace = CONTAINER_TYPE_BAGSLOT; sPacket3->aItemProfile[0].byPos = 0; sPacket3->aItemProfile[0].byStackcount = 0; sPacket3->aItemProfile[0].byRank = 1; sPacket3->aItemProfile[0].byCurDur = 10; packet3.SetPacketLen(sizeof(sGU_AVATAR_ITEM_INFO)); rc = g_pApp->Send(this->GetHandle() ,&packet3);
Does anyone have any idea why this could happen?
bad packet i think, exceed allow size.
you should add std::cout for see what is happening.
I do the bind to world function now and then I also wanted to work on the items function. Maybe we can work together.
I'm working with he too. We can work the three of us.
The problem is the following.
RwInt32 iDataLen = sizeof(sNTLPACKETHEADER);
iDataLen += sizeof(BYTE);
iDataLen += sizeof(sITEM_PROFILE)*sPacket.byItemCount;
SendEvent(iDataLen, &sPacket);
the code should look something like this
No, that is for DBOVirtualServer.
- - - Updated - - -
I have that form and doesn't work.
Well, I did this , and I belive it is correctly written, my gameserver lets me connect now.
But I can't see any inventory.
Code:////////////////////////////////////////////////////////////////////////////////////// ////item infos GU_AVATAR_ITEM_INFO sPacket3; Not yet working CNtlPacket packet3(sizeof(sGU_AVATAR_ITEM_INFO)); sGU_AVATAR_ITEM_INFO * sPacket3 = (sGU_AVATAR_ITEM_INFO *)packet3.GetPacketData(); sPacket3->wOpCode =GU_AVATAR_ITEM_INFO; sPacket3->byItemCount = 11; sPacket3->aItemProfile[0].handle = AcquireSerialId(); sPacket3->aItemProfile[0].tblidx = 19901; sPacket3->aItemProfile[0].byPlace = CONTAINER_TYPE_BAGSLOT; sPacket3->aItemProfile[0].byPos = 0; sPacket3->aItemProfile[0].byStackcount = 0; sPacket3->aItemProfile[0].byRank = 1; sPacket3->aItemProfile[0].byCurDur = 10; sPacket3->aItemProfile[1].handle = AcquireSerialId(); sPacket3->aItemProfile[1].tblidx = 13001; sPacket3->aItemProfile[1].byPlace = CONTAINER_TYPE_BAG1; sPacket3->aItemProfile[1].byPos = 0; sPacket3->aItemProfile[1].byStackcount = 0; sPacket3->aItemProfile[1].byRank = 1; sPacket3->aItemProfile[1].byCurDur = 100; sPacket3->aItemProfile[2].handle = AcquireSerialId(); sPacket3->aItemProfile[2].tblidx = 19905; sPacket3->aItemProfile[2].byPlace = CONTAINER_TYPE_BAG1; sPacket3->aItemProfile[2].byPos = 1; sPacket3->aItemProfile[2].byStackcount = 1; sPacket3->aItemProfile[2].byRank = 1; sPacket3->aItemProfile[2].byCurDur = 100; sPacket3->aItemProfile[3].handle = AcquireSerialId(); sPacket3->aItemProfile[3].tblidx = 13002; sPacket3->aItemProfile[3].byPlace = CONTAINER_TYPE_BAG1; sPacket3->aItemProfile[3].byPos = 2; sPacket3->aItemProfile[3].byStackcount = 1; sPacket3->aItemProfile[3].byRank = 1; sPacket3->aItemProfile[3].byCurDur = 100; sPacket3->aItemProfile[4].handle = AcquireSerialId(); sPacket3->aItemProfile[4].tblidx = 13003; sPacket3->aItemProfile[4].byPlace = CONTAINER_TYPE_BAG1; sPacket3->aItemProfile[4].byPos = 3; sPacket3->aItemProfile[4].byStackcount = 0; sPacket3->aItemProfile[4].byRank = 1; sPacket3->aItemProfile[4].byCurDur = 100; sPacket3->aItemProfile[5].handle = AcquireSerialId(); sPacket3->aItemProfile[5].tblidx = 14001; sPacket3->aItemProfile[5].byPlace = CONTAINER_TYPE_BAG1; sPacket3->aItemProfile[5].byPos = 4; sPacket3->aItemProfile[5].byStackcount = 0; sPacket3->aItemProfile[5].byRank = 1; sPacket3->aItemProfile[5].byCurDur = 100; sPacket3->aItemProfile[6].handle = AcquireSerialId(); sPacket3->aItemProfile[6].tblidx = 14002; sPacket3->aItemProfile[6].byPlace = CONTAINER_TYPE_BAG1; sPacket3->aItemProfile[6].byPos = 5; sPacket3->aItemProfile[6].byStackcount = 0; sPacket3->aItemProfile[6].byRank = 1; sPacket3->aItemProfile[6].byCurDur = 100; sPacket3->aItemProfile[7].handle = AcquireSerialId(); sPacket3->aItemProfile[7].tblidx = 14003; sPacket3->aItemProfile[7].byPlace = CONTAINER_TYPE_BAG1; sPacket3->aItemProfile[7].byPos = 6; sPacket3->aItemProfile[7].byStackcount = 0; sPacket3->aItemProfile[7].byRank = 1; sPacket3->aItemProfile[7].byCurDur = 100; sPacket3->aItemProfile[8].handle = AcquireSerialId(); sPacket3->aItemProfile[8].tblidx = 15001; sPacket3->aItemProfile[8].byPlace = CONTAINER_TYPE_BAG1; sPacket3->aItemProfile[8].byPos = 7; sPacket3->aItemProfile[8].byStackcount = 0; sPacket3->aItemProfile[8].byRank = 1; sPacket3->aItemProfile[8].byCurDur = 100; sPacket3->aItemProfile[9].handle = AcquireSerialId(); sPacket3->aItemProfile[9].tblidx = 15002; sPacket3->aItemProfile[9].byPlace = CONTAINER_TYPE_BAG1; sPacket3->aItemProfile[9].byPos = 8; sPacket3->aItemProfile[9].byStackcount = 0; sPacket3->aItemProfile[9].byRank = 1; sPacket3->aItemProfile[9].byCurDur = 100; sPacket3->aItemProfile[10].handle = AcquireSerialId(); sPacket3->aItemProfile[10].tblidx = 15003; sPacket3->aItemProfile[10].byPlace = CONTAINER_TYPE_BAG1; sPacket3->aItemProfile[10].byPos = 9; sPacket3->aItemProfile[10].byStackcount = 0; sPacket3->aItemProfile[10].byRank = 1; sPacket3->aItemProfile[10].byCurDur = 100; int iDataLen = sizeof(sNTLPACKETHEADER); iDataLen += sizeof(BYTE); iDataLen += sizeof(sITEM_PROFILE)*sPacket3->byItemCount; rc = g_pApp->Send(iDataLen, &packet3);
Topic Closed.
@maximojoni you have this problem.
Try to change your code to
PD:Code:int rc = g_pApp->Send( this->GetHandle(), &packet ); int rc = g_pApp->Send(iDataLen, &packet);
maximojoni has exceeded their stored private messages quota and cannot accept further messages until they clear some space.
- - - Updated - - -
@maximojoni so? works? And delete recived messages, because you have a full inbox.