Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Coding Corner
You last visited: Today at 12:29

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



CLIENT PET FILTER USING DEVKIT

Discussion on CLIENT PET FILTER USING DEVKIT within the SRO Coding Corner forum part of the Silkroad Online category.

Reply
 
Old   #1
 
bimbum*'s Avatar
 
elite*gold: 47
Join Date: Oct 2017
Posts: 580
Received Thanks: 1,022
CLIENT PET FILTER USING DEVKIT

You may saw this , i havent read the entire thread but, thanks to him for giving a detailed description for the pick pet function, i was able to kind of replacing the function using devkit.

the function responsible for returning the item is a boolean function returns either 0 or 1, it loops through the items and finds one based at your pet settings.

my aim was to always return 0, while handling the function and the rest of the pick mechanism..

the first thing you would want to start with is hooking the function

Code:
replaceOffset(0x008AFCF9,addr_from_this(&CDropItemManager::sub_8AF7F0));
note, the following function will be looping over all entities that are around you, you may make the search better with using issame function or a pointer to the ciitem class.

inside the function you will find all information needed to filter the item based at current pet settings and the new custom settings that you will create.

this function is being called as long as you have a pet spawned and the pet is enabled, so you may make some flag when you send the pick packet and release it when you receive a reply from the server

all the datas are provided as offsets , recommending to populate your devkit classes with them not to look weirdo as me

Code:
int CDropItemManager::sub_8AF7F0(char a2,UINT16 a3,int a4,DWORD a5)
{
    int petUniqueID = *(int *) ((DWORD32) (a4 - 0x6C0) + 0xF8);

    for (std::map<int, CIObject *>::iterator it = g_pGfxEttManager->entities.begin();
         it != g_pGfxEttManager->entities.end(); ++it) {

        //TODO REPLACE STRING COMPARISON WITH isSame Function
        if (!strcmp(it->second->GetRuntimeClass()->m_lpszClassName, "CIItem")) {
		   
		   CIItem* item = (CIItem*) it->second;

		   if(a2 == 192)
				//pick all (nothing)
		   if(a2 == 193)
				//pick all (gold only)
		   if(a2 == 194)
				//pick all (equipements only)
		   if(a2 == 196)
				//pick all (other items only)
		   if(a2 == 198)
				//pick all (other items and equipements)
		   if(a2 == 199)
				//pick all (gold, equipements and other items)
				//by logic you should know that for picking something like gold , equipements = 192 + 1 + 2

		   if(a2 == 128)
				//pick only my (nothing)
		   if(a2 == 129)
				//pick only my (gold only)
		   if(a2 == 130)
				//pick only my (equipements only)
				//and so on
				
		   int refObjID = *(int *) ((int) (it->second) + 0x21C); //item refobjid

		   int uniqueID = *(int *) ((int) (it->second) + 0xF8); //item uniqueid

			
		   const CItemData::SData *data = &g_CGlobalDataManager->GetItemData(refObjID); 
			//you can get from here other informations needed like codename,typeids so that you can filter the item 
			
			if(item->m_bPickAbbilty != 0)
                             continue;
			//checking if the owner was the player && settings is only me
            if(item->hasOwner && a2 > 127 && a2 < 139)
            {
                if(item->SomeCheckForPlayerOwnerName != *(int *) ((int) (g_pCICPlayer)) + 0x2094);
					continue;
            }
           continue;
        }
    }
    return 0;
}

Code:
#pragma once
#include "IGIDObject.h"

class CIItem : public CIGIDObject {
    GFX_DECLARE_DYNAMIC_EXISTING(CIItem,0x00EF1C28)
public:
   byte hasOwner; //0x254
   char pad_0255[0x3]; //0x255
   int SomeCheckForPlayerOwnerName; //0x258;
   char pad_025C[0x30]; //0x25C
   int m_bPickAbbilty; //0x28C
   char pad_0290[0x1C]; //0x290
BEGIN_FIXTURE()
        ENSURE_SIZE(0x2AC)
END_FIXTURE()
RUN_FIXTURE(CIItem)
};
bimbum* is offline  
Thanks
13 Users
Old 08/16/2022, 13:41   #2
 
elite*gold: 0
Join Date: Dec 2013
Posts: 72
Received Thanks: 7
thanks bro you are doing well ♥️
gmhasan13 is offline  
Old 08/16/2022, 15:08   #3
 
concucu's Avatar
 
elite*gold: 0
Join Date: Sep 2012
Posts: 215
Received Thanks: 124
good job
concucu is offline  
Old 08/16/2022, 15:09   #4
 
elite*gold: 0
Join Date: May 2020
Posts: 70
Received Thanks: 6
Niceeee!
WolfgangNeverDie is offline  
Old 09/10/2022, 23:58   #5
 
bimbum*'s Avatar
 
elite*gold: 47
Join Date: Oct 2017
Posts: 580
Received Thanks: 1,022
Code:
int GetSuitableSlotByTID(UINT TID)
{
    return reinterpret_cast<int (__cdecl *)(UINT)>(0x009DB5E0)(TID);
}
this function returns the suitable slot of an equipment in inventory between 0,12 so it will be easy to filter equipments.
bimbum* is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
[Release] Vsro Filter Devkit - [Athena Filter] - v1.2 Cracked
03/13/2025 - SRO PServer Guides & Releases - 70 Replies
Vsro-Filter demo image : https://uphinh.vn/image/sro2021-11-18-00-37-34-03. trNf9O How to use ? _Addlogchar : IF(@EventID = 6) BEGIN DECLARE @StrUserID varchar(64) = (SELECT DISTINCT StrUserID FROM .. WITH (NOLOCK) WHERE JID = (SELECT DISTINCT UserJID FROM .. WITH (NOLOCK) WHERE CharID = @CharID)) EXEC VSRO.._LogPlayers @StrUserID, 'non', 0, 'non', 'non', 'non', 'non', 0 ----------------ITEM POINT------------------- UPDATE .._Char set ItemPoints = (
[Pet-Filter] Pet Filter Problem
12/28/2011 - Flyff Private Server - 3 Replies
Hab ein kleines Problem mit nen Pet-Filter und zwar sobald ich auf Speichern drücke schmiert meine neuz ab. 2011/12/28 00:20:15 GetDlgItem : nID=912 not Found. 2011/12/28 00:20:15 GetDlgItem : nID=699 not Found. 2011/12/28 00:20:15 GetDlgItem : nID=533 not Found.



All times are GMT +1. The time now is 12:30.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.