...
You need:
PetFilter Source:

Microsoft Visual Studio 2003
Daisy:
Before I start: I will explain not everything, but it should explain enough so that C++ Newbies can do this easily.
I found out that Beads are missing in the PetFilter, so they will be collected the whole time.
We will change this now.
A liitle help for using Daisy in this tutorial:
Search in Resdata.inc for APP_BUFFPET_STATUS and copy everything from APP_BUFFPET_STATUS to the next APP.
The copied code should look like this:
Code:
APP_BUFFPET_STATUS "WndTile00.tga" 1 352 144 0x2410000 26
{
// Title String
IDS_RESDATA_INC_006602
}
{
// Help Key
IDS_RESDATA_INC_006603
}
{
WTYPE_CUSTOM WIDC_CUSTOM1 "" 0 8 6 72 90 0x260000 0 0 0 0
{
// Title String
IDS_RESDATA_INC_006604
}
{
// ToolTip
IDS_RESDATA_INC_006605
}
WTYPE_STATIC WIDC_BUFFPET_SLOT1 "WndElemItemBlank.tga" 0 80 2 112 34 0x2220002 0 0 0 0
{
// Title String
IDS_RESDATA_INC_006606
}
{
// ToolTip
IDS_RESDATA_INC_006607
}
WTYPE_STATIC WIDC_BUFFPET_SLOT3 "WndElemItemBlank.tga" 0 144 2 176 34 0x2220002 0 0 0 0
{
// Title String
IDS_RESDATA_INC_006608
}
{
// ToolTip
IDS_RESDATA_INC_006609
}
WTYPE_STATIC WIDC_BUFFPET_SLOT2 "WndElemItemBlank.tga" 0 112 2 144 34 0x2220002 0 0 0 0
{
// Title String
IDS_RESDATA_INC_006610
}
{
// ToolTip
IDS_RESDATA_INC_006611
}
WTYPE_STATIC WIDC_BUFFPET_SLOT4 "WndElemItemBlank.tga" 0 80 32 112 64 0x2220002 0 0 0 0
{
// Title String
IDS_RESDATA_INC_006612
}
{
// ToolTip
IDS_RESDATA_INC_006613
}
WTYPE_STATIC WIDC_BUFFPET_SLOT7 "WndElemItemBlank.tga" 0 80 62 112 94 0x2220002 0 0 0 0
{
// Title String
IDS_RESDATA_INC_006614
}
{
// ToolTip
IDS_RESDATA_INC_006615
}
WTYPE_STATIC WIDC_BUFFPET_SLOT9 "WndElemItemBlank.tga" 0 144 62 176 94 0x2220002 0 0 0 0
{
// Title String
IDS_RESDATA_INC_006616
}
{
// ToolTip
IDS_RESDATA_INC_006617
}
WTYPE_STATIC WIDC_BUFFPET_SLOT5 "WndElemItemBlank.tga" 0 112 32 144 64 0x2220002 0 0 0 0
{
// Title String
IDS_RESDATA_INC_006618
}
{
// ToolTip
IDS_RESDATA_INC_006619
}
WTYPE_STATIC WIDC_BUFFPET_SLOT8 "WndElemItemBlank.tga" 0 112 62 144 94 0x2220002 0 0 0 0
{
// Title String
IDS_RESDATA_INC_006620
}
{
// ToolTip
IDS_RESDATA_INC_006621
}
WTYPE_STATIC WIDC_BUFFPET_SLOT6 "WndElemItemBlank.tga" 0 144 32 176 64 0x2220002 0 0 0 0
{
// Title String
IDS_RESDATA_INC_006622
}
{
// ToolTip
IDS_RESDATA_INC_006623
}
WTYPE_STATIC WIDC_STATIC2 "WndEditTile200.tga" 1 178 2 340 18 0x2220001 0 0 0 0
{
// Title String
IDS_RESDATA_SYN_000001
}
{
// ToolTip
IDS_RESDATA_SYN_000002
}
WTYPE_BUTTON WIDC_BUFFCKECK_1 "ButtCheck.bmp" 0 180 22 276 38 0x220018 0 0 0 0
{
// Title String
IDS_RESDATA_SYN_000003
}
{
// ToolTip
IDS_RESDATA_SYN_000004
}
WTYPE_BUTTON WIDC_BUFFCKECK_2 "ButtCheck.bmp" 0 180 40 276 56 0x220018 0 0 0 0
{
// Title String
IDS_RESDATA_SYN_000005
}
{
// ToolTip
IDS_RESDATA_SYN_000006
}
WTYPE_BUTTON WIDC_BUFFCKECK_3 "ButtCheck.bmp" 0 180 56 276 72 0x220018 0 0 0 0
{
// Title String
IDS_RESDATA_SYN_000007
}
{
// ToolTip
IDS_RESDATA_SYN_000008
}
WTYPE_BUTTON WIDC_BUFFCKECK_4 "ButtCheck.bmp" 0 180 72 276 88 0x220018 0 0 0 0
{
// Title String
IDS_RESDATA_SYN_000009
}
{
// ToolTip
IDS_RESDATA_SYN_000010
}
WTYPE_BUTTON WIDC_BUFFCKECK_5 "ButtCheck.bmp" 0 258 24 354 40 0x220018 0 0 0 0
{
// Title String
IDS_RESDATA_SYN_000011
}
{
// ToolTip
IDS_RESDATA_SYN_000012
}
WTYPE_BUTTON WIDC_BUFFCKECK_6 "ButtCheck.bmp" 0 258 39 354 55 0x220018 0 0 0 0
{
// Title String
IDS_RESDATA_SYN_000013
}
{
// ToolTip
IDS_RESDATA_SYN_000014
}
WTYPE_BUTTON WIDC_BUFFCKECK_7 "ButtCheck.bmp" 0 258 56 354 72 0x220018 0 0 0 0
{
// Title String
IDS_RESDATA_SYN_000015
}
{
// ToolTip
IDS_RESDATA_SYN_000016
}
WTYPE_BUTTON WIDC_BUFFCKECK_8 "ButtCheck.bmp" 0 259 72 355 88 0x220018 0 0 0 0
{
// Title String
IDS_RESDATA_SYN_000017
}
{
// ToolTip
IDS_RESDATA_SYN_000018
}
{
// ToolTip
IDS_RESDATA_INC_017107
}
}
Now create a new folder on your desktop, name it e.g. Daisy, create a new .txt file and open it with an editor.
Paste the copied code and save the file as ResData.inc.
Now copy the Theme Folder, the ResData.txt.txt, the WndStyle.h, the ResData.h and the Daisy.exe to your new Folder on your Desktop.
This should give less errors and it will be easier to work with it.
First we need to add the CheckBox. Therefor open Daisy. (Should be extracted to your Ressource Folder of your Server Files)
We open Applet an search for APP_BUFFPET_STATUS. Open it by double-clicking.
This should look similar to this:
Mhmmm, looks a little bit small.
We expand the window by dragging down the red line on the bottom of the window. A little bit should do it.
Now we add a CheckBox. How is explained in the next Screenshot. We choose the red-markerd button and add the CheckBox wherever it looks fine.
After this, we open the Properties-Menu by right-clicking the new CheckBox.
In caption we add "Beads" and in ID, we will add WIDC_BUFFCHECK_9. ( I choose this name in addition to the other CheckBoxes )
Now click OK and after this File -> Save.
The modified ResData.h we need to add to the Resource Folder of our Source.
Now we go on to the Source-part.
First we open the AiPet.cpp with VS 2003.
We search for b1.
There we will find something similar to this:
Code:
if(!pOwner->bQuestItem && pItemProp->dwItemKind1 == IK1_GENERAL && pItemProp->dwItemKind2 == IK2_GEM && pItemProp->dwItemKind3 == IK3_GEM)
b1 = TRUE;
else if(!pOwner->bWeapons && pItemProp->dwItemKind1 == IK1_WEAPON)
b1 = TRUE;
else if(!pOwner->bArmor && pItemProp->dwItemKind1 == IK1_ARMOR)
b1 = TRUE;
else if(!pOwner->bCards && pItemProp->dwItemKind1 == IK1_GENERAL && pItemProp->dwItemKind2 == IK2_MATERIAL && pItemProp->dwItemKind3 != IK3_ULTIMATE && pItemProp->dwItemKind3 != IK3_ENCHANT && pItemProp->dwItemKind3 != IK3_PIERDICE)
b1 = TRUE;
else if(!pOwner->bFood && pItemProp->dwItemKind1 == IK1_GENERAL && (pItemProp->dwItemKind2 == IK2_FOOD || pItemProp->dwItemKind2 == IK2_REFRESHER || pItemProp->dwItemKind2 == IK2_POTION))
b1 = TRUE;
else if(!pOwner->bEggs && pItemProp->dwItemKind1 == IK1_GENERAL && pItemProp->dwItemKind2 == IK2_GENERAL && pItemProp->dwItemKind3 == IK3_EGG)
b1 = TRUE;
else if(!pOwner->bStones && pItemProp->dwItemKind1 == IK1_GENERAL && pItemProp->dwItemKind2 == IK2_MATERIAL && (pItemProp->dwItemKind3 == IK3_PIERDICE || pItemProp->dwItemKind3 == IK3_ENCHANT || pItemProp->dwItemKind3 == IK3_ULTIMATE || pItemProp->dwItemKind3 == IK3_SUPSTONE))
b1 = TRUE;
else if(!pOwner->bAccessory && pItemProp->dwItemKind1 == IK1_GENERAL && pItemProp->dwItemKind2 == IK2_JEWELRY)
b1 = TRUE;
else if( pItemProp->dwItemKind1 == IK1_GOLD && pItemProp->dwItemKind2 == IK2_GOLD && pItemProp->dwItemKind3 == IK3_GOLD )
b1 = TRUE;
Below we add:
Code:
else if( [COLOR=Red]!pOwner->bBeads [/COLOR]&& [COLOR=DarkGreen]pItemProp->dwItemKind3 == IK3_VIS[/COLOR] )
b1 = TRUE;
Description:
bBeads: BOOL of Mover, we will add this later.
3. ItemKind of the Item. In this case IK3_VIS (for Beads). Will work with ItemKind1 and 2 as well. Should be specified on the item you wish to add.
The rest should be exlaining itself.
Part 2 of source:
First we add te BOOL bBeads. To do this, we open mover.h and search for
Code:
BOOL bQuestItem, bWeapons, bArmor, bCards, bFood, bEggs, bStones, bAccessory;
Change it to:
Code:
BOOL bQuestItem, bWeapons, bArmor, bCards, bFood, bEggs, bStones, bAccessory, [COLOR=Red]bBeads[/COLOR];
This BOOL we need to add to the DPClient.h too.
We search for
Code:
BOOL bInitializedPetCollection, bQuestItem , bWeapons , bArmor , bCards , bFood, bEggs, bStones , bAccessory;
and again change it to
Code:
BOOL bInitializedPetCollection, bQuestItem , bWeapons , bArmor , bCards , bFood, bEggs, bStones , bAccessory, [COLOR=#ff0000]bBeads[/COLOR];
Save it and open DPClient.cpp
Search for
Code:
bQuestItem = bWeapons = bArmor = bCards = bFood = bEggs = bStones = bAccessory = TRUE;
and change it to
Code:
bQuestItem = bWeapons = bArmor = bCards = bFood = bEggs = bStones = bAccessory [COLOR=#ff0000]= bBeads [/COLOR]= TRUE;
Next we will modify the WndPetSys.cpp
Search for
Code:
chk = (CWndButton*) GetDlgItem( WIDC_BUFFCKECK_8 );
and add below
Code:
chk = (CWndButton*) GetDlgItem( WIDC_BUFFCKECK_8 );
chk->SetCheck(g_DPlay.bAccessory);
Code:
chk = (CWndButton*) GetDlgItem( WIDC_BUFFCKECK_9);
chk->SetCheck(g_DPlay.bBeads);
Next search for
Code:
case WIDC_BUFFCKECK_8
After the break and the } add
Code:
case WIDC_BUFFCKECK_9:
{
g_DPlay.bBeads = !g_DPlay.bBeads;
g_DPlay.SendBuffPetCollectUpdate();
break;
}
Now we have to modify the SendBuffPetCollectUpdate.
To do this we open the DPClient.cpp and search for
Code:
ar << (BYTE) bQuestItem << (BYTE) bWeapons << (BYTE) bArmor << (BYTE) bCards << (BYTE) bFood << (BYTE) bEggs << (BYTE) bStones << (BYTE) bAccessory
and change it to
Code:
ar << (BYTE) bQuestItem << (BYTE) bWeapons << (BYTE) bArmor << (BYTE) bCards << (BYTE) bFood << (BYTE) bEggs << (BYTE) bStones << (BYTE) bAccessory [COLOR=Red]<< (BYTE) bBeads[/COLOR]
Last but not least we open the DPSrvr.cpp and search for
Code:
BYTE cQuestItem , cWeapons , cArmor , cCards , cFood , cEggs , cStones , cAccessory
Change this to
Code:
BYTE cQuestItem , cWeapons , cArmor , cCards , cFood , cEggs , cStones , cAccessory[COLOR=#ff0000], cBeads[/COLOR]
After this we search for
Code:
ar >> cQuestItem >> cWeapons >> cArmor >> cCards >> cFood >> cEggs >> cStones >> cAccessory
and change it to
Code:
ar >> cQuestItem >> cWeapons >> cArmor >> cCards >> cFood >> cEggs >> cStones >> cAccessory [COLOR=#ff0000]>> cBeads[/COLOR]
and below
Code:
if(cAccessory > 0) { pUser->bAccessory = TRUE; } else { pUser->bAccessory = FALSE; }
we add
Code:
if(cBeads > 0){ pUser->bBeads = TRUE; } else { pUser->bBeads = FALSE; }
...
Ingame it will look like: