Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Help with new player starting level/items DLL

Newbie Spellweaver
Joined
Jul 2, 2016
Messages
93
Reaction score
9
I need help. I am pretty close to getting this right.

 
Experienced Elementalist
Joined
Nov 19, 2011
Messages
245
Reaction score
160
I didnt see everything but I quickly noticed your InsertItem function is wrong, what you need is probably this one:
static int (__stdcall *InsertItem)(int Player, int Value, int Index, int Prefix, int Amount, int Argument) = (int (__stdcall*)(int,int,int,int,int,int))0x004274A0;
or if you wanna keep using your function, the arguments you're calling are wrong. it should be like this:
static int(__thiscall *InsertItem)(void *Player, int Argument, int Item) = (int(__thiscall*)(void*, int, int))0x0045DDC0;
Player isnt the PID, its the offset (in ur case thisPointer) and the Argument isnt the amount.
before using your function u should make sure to create the item first.

using this function:
static int (__cdecl *CreateItem)(int Index, int Prefix, int Value, int Argument) = (int (__cdecl*)(int,int,int,int))0x00426110;
Example:

int xItem = CreateItem(YourIndex, 0, Amount, -1);

if (xItem)
{
if (InsertItem(thisPointer, 27, xItem) == 1)
//successfully given item
}
 
Upvote 0
Junior Spellweaver
Joined
May 14, 2018
Messages
122
Reaction score
36
Btw, is this going to lvl up your player to lvl 9?
  • for(int i = 1; i < 10; i++)
  • {
  • LevelUp(thisPointer);
  • }

Why dont you scan the player inventory if he is lvl 1 and have the item X?
namespace CPlayer
{
static int (__thiscall *FindItem)(void *Player, int ItemIndex, int Amount) = (int (__thiscall*)(void*,int,int))0x0045D190;
}

namespace CItem
{
static int (__thiscall *RemoveItem)(void *Player, int Item) = (int (__thiscall*)(void*,int))0x0046F320;
}
  • void __fastcall Hooked_Tick(int* thisPointer)
  • {
    int Plevel = thisPointer[15];
    int PClass = thisPointer[115];
    if (Plevel == 1)
    {
    if(PClass == 0 && CPlayer::FindItem(thisPointer,1,1))
    {
    //here you insert the items you want
    CItem::RemoveItem(thisPointer,1);
    }
    }
    Tick(thisPointer);
    }
 
Last edited:
Upvote 0
Junior Spellweaver
Joined
May 14, 2018
Messages
122
Reaction score
36
he does, this was just the called func, in the hook he do check for that PLvl ->, Pitem -> X

Hmm, I dont know why he wants his players to be lvl 9, I didnt try the code he shared.
Also I dont think he wants help, since he did answer nobody ^^
 
Upvote 0
Back
Top