Jump to content
  • 0

Augmented Items Storage?


Question

Posted (edited)

Hi,

 

I'm trying to figure out where augmented info is stored on an item. I'm using L2OFF Epilogue.

 

I know that usually augmentations are stored in dbo.user_items table, in the variation_opt1 and variation_opt2. But where is it stored before then?

 

Let's say an augmented item dropped on the ground. I know it's not possible by default, but how does the item know that it's augmented?

 

I'm using Emca's extender to do my testing, and I'm able to generate an augmentation on an item as soon as it drops. It works completely, but the augmentation doesn't save on logout. I need to figure out a way to call some kind of force-item-save functionality. I don't know where to look!

 

I hope someone here can help me out.

 

I'm also looking into removing the cannot drop/trade limitation.

 

Thanks!

-B

Edited by Bumble

13 answers to this question

Recommended Posts

  • 0
Posted

You will save yourself alot of work in the long run, to just properly define classes so you can do pItem->m_nVariationOption1 ect

  • 0
Posted

I'm able to generate augmented items that are stored in the database, now they persist between sessions.

 

I'm looking for two last things:

 

1. Where can I disable the "augmented items cannot be traded/dropped" limitation? I've looked through all the interface files to see if I could find anything, but no dice. Am I missing something?

 

2. What's the packet I need to send from the server to make the character do the pickup animation? The way I'm generating the augments makes the pickup animation disappear.

 

Thanks!

  • 0
Posted

To get the item to "save" properly, this might be one of the cases you have to implement your own Server ->cached packets, and save it yourself in cached, as far as picking up an item goes, something as simple as 

pUser->Action(pItem2, false, false);

will cause the player to walk to the item, and pick it up

As far as for where to patch to allow dropping, it should be somewhere inside User::OnDropItemPacket
and User::DropAndDestroyItem for when a user dies, if you want augment items to drop on player death

  • 0
Posted
12 minutes ago, pada said:

To get the item to "save" properly, this might be one of the cases you have to implement your own Server ->cached packets, and save it yourself in cached, as far as picking up an item goes, something as simple as 

pUser->Action(pItem2, false, false);

will cause the player to walk to the item, and pick it up

As far as for where to patch to allow dropping, it should be somewhere inside User::OnDropItemPacket
and User::DropAndDestroyItem for when a user dies, if you want augment items to drop on player death

 

Thank you for your reply! I've been fighting this issue for days :)

 

I've made it work with a workaround. The "cannot be dropped" seems to be a hardcoded limitation in the epilogue client, it doesn't even send the packet unless it's a viable option. My workaround is to send the RequestDestroyItem packet instead, and before destroying the item on the server, I drop a copy of the item on the ground. One issue is that I don't know where the augmentations are stored on the dropped copy (or the original item for that matter), so I don't know what to check for when the player picks it up. Because I don't know where to check for this, I can drop and pick up the item again, and it'll re-roll augments.

 

I'll look into the cached packet option, but I'm still learning. If you have any examples, that'd be awesome.

 

I'll try the pUser->Action thing soon!

Thanks!

-B

 

 

  • 0
Posted

I've managed to make the augments stay on items, as well as making the items droppable.

 

The "last" thing I need now, is to figure out where the augments are stored on an item. I know it's in the database, but where are the augment skills located in the CItem object?

  • 0
Posted
class CItem : public CWorldObject
{
public:
	CSharedItemData* SD;						// 0x058	*
	CItemData* pItemData;						// 0x060	*
	CYieldLock* pLock;							// 0x068	*
	DWORD _unk60;								// 0x070	*
	int nOwnerNpcID;							// 0x074	*
	bool bIsOwnerBoss;							// 0x078	*
	BYTE _arUnk79[7];							// 0x079	*
	unsigned long nDropTime;					// 0x080	*
	bool bContribute;							// 0x084	*
	BYTE _arUnk85[3];							// 0x085	*
	CSmartID<CContributeData> spContributeID;	// 0x088	*
	int nVariationOption1;
	int nVariationOption2;
	BYTE _arUnk8C[0x124];						// 0x08C	*
	BYTE etcitemdata[8]; // DO NOT USE THIS, IT IS HERE TO HOLD THE SIZE TO CEtcItem size, for extending reasons

I dont know if its the same in GF, as i do not have the time to check quickly, but this is what it is in what i am working with, augments being VariationOptions

  • 0
Posted (edited)
1 hour ago, pada said:

class CItem : public CWorldObject
{
public:
	CSharedItemData* SD;						// 0x058	*
	CItemData* pItemData;						// 0x060	*
	CYieldLock* pLock;							// 0x068	*
	DWORD _unk60;								// 0x070	*
	int nOwnerNpcID;							// 0x074	*
	bool bIsOwnerBoss;							// 0x078	*
	BYTE _arUnk79[7];							// 0x079	*
	unsigned long nDropTime;					// 0x080	*
	bool bContribute;							// 0x084	*
	BYTE _arUnk85[3];							// 0x085	*
	CSmartID<CContributeData> spContributeID;	// 0x088	*
	int nVariationOption1;
	int nVariationOption2;
	BYTE _arUnk8C[0x124];						// 0x08C	*
	BYTE etcitemdata[8]; // DO NOT USE THIS, IT IS HERE TO HOLD THE SIZE TO CEtcItem size, for extending reasons

I dont know if its the same in GF, as i do not have the time to check quickly, but this is what it is in what i am working with, augments being VariationOptions

 

Thanks for posting that. It's different from GF as far as I know. Which chronicle is that from?

 

The CItem I have access to looks like this:

	/* 0x0000 */ unsigned char padding0x0000[0x001C - 0x0000];
	/* 0x001C */ UINT32 itemId;
	/* 0x0020 */ unsigned char padding0x0020[0x0048 - 0x0020];
	/* 0x0048 */ CSharedItemData *sd;
	/* 0x0050 */ ItemInfo *itemInfo;
	/* 0x0058 */ class CYieldLock *lock;
	/* 0x0060 */ unsigned char padding0x0060[0x0078 - 0x0060];
	/* 0x0078 */ std::vector<CSkillInfo*> skills;
	/* 0x0098 */ unsigned char padding0x0098[0x00B8 - 0x0098];
	/* 0x00B8 */ UINT32 contributeDataObjectId;
	/* 0x00BC */ unsigned char padding0x00BC[0x0130 - 0x00BC];
	/* 0x0130 */ UINT16 attributeAttackType;
	/* 0x0132 */ UINT16 attributeAttackValue;
	/* 0x0134 */ UINT16 attributeFire;
	/* 0x0136 */ UINT16 attributeWater;
	/* 0x0138 */ UINT16 attributeWind;
	/* 0x013A */ UINT16 attributeEarth;
	/* 0x013C */ UINT16 attributeDivine;
	/* 0x013E */ UINT16 attributeDark;

There is no direct reference to variationOptions, itemOptionKeys or augments. But looking at your addresses, it kinda looks like they might be hiding in the skills pointers.

 

I'll report back, thanks!

Update: There's nothing in the skills array :/ I'm still not sure where to look.

Edited by Bumble
  • 0
Posted

found my GF DB, it is at 

 

00000070 m_vItemSkill    std::xvector_CSkillInfo ?
00000090 m_Unkn_0098     dq ?                    ; offset
00000098 m__Unkn_00A0    dq 3 dup(?)             ; offset
000000B0 m_ContributeDataSmartId dd ?
000000B4 field_B4        dd ?
000000B8 m_nVariationOption1 dd ?
000000BC m_nVariationOption2 dd ?

 

  • Thanks 1
  • 0
Posted
12 hours ago, pada said:

found my GF DB, it is at 

 


00000070 m_vItemSkill    std::xvector_CSkillInfo ?
00000090 m_Unkn_0098     dq ?                    ; offset
00000098 m__Unkn_00A0    dq 3 dup(?)             ; offset
000000B0 m_ContributeDataSmartId dd ?
000000B4 field_B4        dd ?
000000B8 m_nVariationOption1 dd ?
000000BC m_nVariationOption2 dd ?

 

Thanks for this! I was doing some testing in setvariation, and I calculated the 0xB8 offset as well, but I wasn’t sure I was correct. It’s great to see that I’m on the right track. 
 

now I just need to find a way to grab that address at the same time... efforts don’t far are not really successful. I’d like to grab it during the useitem packet. I feel like I’m getting close!

  • 0
Posted

use item packet you have access to the items ServerID, so a simple call to CInventory::GetByServerID will get the CItem and you can do what ever checks you want on UseItem packet

  • 0
Posted (edited)
36 minutes ago, pada said:

use item packet you have access to the items ServerID, so a simple call to CInventory::GetByServerID will get the CItem and you can do what ever checks you want on UseItem packet

 

I've gotten that far, but any attempts I've made at isolating the augment IDs after that have not been working. I have the correct CItem pointer, but I'm really unsure of what to do next. I'm just trying a bunch of things, seeing if I can grab the data. I'm just not getting anywhere yet.

 

It feels like it should be simple. Like something like this:

 

            UINT32* itemOptionKeyA = reinterpret_cast<UINT32(*)>(item + 0xB8);
            INT16 testAA = static_cast<INT16>(itemOptionKeyA[0]);
            INT16 testAB = static_cast<INT16>(itemOptionKeyA[1]);

Edited by Bumble
  • 0
Posted
1 minute ago, pada said:

You will save yourself alot of work in the long run, to just properly define classes so you can do pItem->m_nVariationOption1 ect

 

I'm sure you're right, and I would do that if I knew how :) I'm still learning! Thanks for helping out.

  • 0
Posted (edited)

I'm still trying to figure this out.. I have so many questions, but I really just need to know how to grab the data that one time during the useitem packet.

 

Could someone please give an example of how to do it? I'd be so thankful. C++ is not my strong suit.

 

E: Solved, thanks pada

Edited by Bumble
  • Upvote 1
Guest
This topic is now closed to further replies.


  • Posts

    • L2 DEVS - HTML DESIGN (ALL NPC'S)    
    • I only share for free what they are reselling 🙂 You keep crying in all the publications, and if you are looking for h5 or gd wait for 5 or 6 years... cheers.... GENERAL Cached Extended to 8192kb IOBuffer Hair2SlotCache ItemBidAuctioner Clan Hall Current Olympiad Season Rank pages System (Shows Points/Games - Fully Configurable) Automatic Flag Around Raidboss System Offline Shop & Buffers Restore After Restart (Fixed location) Offline Buffer System PvP Auto Announce System Rebuilt with Extra Addons (Fully Configurable, Name, Zones, Rewards) Automatic Announce System Rebuilt with Extra Addons (Fully Configurable) ALT+B Augmentation House Shift+Click Droplist/Spoil List Epic Items Rank RB points Rank ChangeColorName ChangeColorTitle Change Skin (Race) Change Gender Custom Subclass (Acumulative) Achievements Item Delivery System  Augmentations/Enchants Automatic Announce System Auto Learn Skills PvP Reward Pk Reward War Reward Scheme buffer GlobalChatTrade Trade Augment Items Castle Announce Time Castle Standby Time Fix Spiritshots delay SpellbooksDrop Enable/Disable Drop custom Fully configurable, lvl min max allmobs, allrb, individual New cancel effect min,max BlessedarmorEnchantRate BlessedmagicWeaponEnchantRate BlessednormalWeaponEnchantRate MaxSlosChars MaxSlotsDwarfs Enable or disable all commands Fix fast loading npc OlympiadRestoreStatsOnFightStart OlympiadSystemSecondTimeEnabled OlympiadEnterLast10Minute OlympiadThirdClassSummons MinLevelTrade AnnounceSubClassMsg1 AnnounceSubClassMsg2 AnnounceSubClassMsg3 LimitedSubClassRace NoSellItems Change ID SealStones for AA NoPrivateBuyItems NoDropPlayerOnDie DisableSkillEnchantData Show Level Mobs Show npc clan flag DespawnSummonEnBattle SummonPetEnBattle RideSummonPetEnBattle DitanceToTargetMove EnterWorld_Undying EnterWorld_UnHide BlockWhispMessagePlayerToGM UseItemsWithHide CriticalSkillDamageBonusPer=4.0 Disable SSQSystem OnCastle Siege End Use any dyes Buy halls directly in auctioneer without waiting for the auction, configuration to change the item you consume MensajeEnterWorldServer Command .hero enable/disable hero aura Config vip global chat character, chat by systemsg Soulshots: NoSendSystemMessageUse Panel //admin Global vote reward Agathions system Anti Interface, control all patch files by md5 Command .menu configurable, last restart, name, maxusers, privatestores Spawn protection activate deactivate consume items to activate  Activate or deactivate autoloot for vip characters EVENTS Happy Hour Event reworked Configurable by announcements or systemsg Team VS Team Capture The Flag Death Match Last Man Standing Destroy The Base Korean Style Castle Siege Check if the player is inside the tvt event due to disconnection/critical error Top 1/5 killer reward/announce TimeAfk ResetReuseSkills ResetBuffsOnFinish Firework effect Reward win/lost Add Team Location Title custom Red/blue Open Door/Wall System BalanceBishops Show kills in title Invest positions Show Death To Top Delete Non-Subclass Skills     RELOADS Reload Enterworld Html Option Reload Faction System Reload Donate Shop Reload OfflineBuffer Reload Champion NPC Reload CliExt Reload AntiBot Reload Vip System Reload Auction Reload AutoLoot Reload CastleSiegeManager Reload CharacterLock Reload ClanPvPStatus Reload AutoLearn Reload ClanReputationRank Reload ClanSystem Reload CreatureAction Reload Customs.ini Reload L2server.ini Reload SkillData.txt Reload doordata.txt Reload decodata.txt Reload Multisell Reload DropList   Extender tested for more than 3 years. Assured stability. Possibility of adding MOD's upon request. (Not included, consult).
    • some peoples trash is another mans treasure, is that your treasure?   people might like the content but you are still the rat in the room     thats the community judging you.  
    • Keep reselling what I publish here for free!!! 🙂 GG  
  • Topics

×
×
  • Create New...