• Announcement:
    In order to download VIP files, you need to UPGRADE your account.

Solved LYCANLI SRC TABANLI BAŞLANGIÇTA GİYİLİ İTEM VERME (GIVE EQUIPMENTS TO THE PLAYERS LYCAN INCLUDED with src)

Status
Not open for further replies.
Member
Feb
Threads
6
48
81
18
HubMoney
174
Hello there I need the system which gives player beginner equipments with lycan included? I need the one with source code related not quest.
Can you share with me?

Merhaba arkadaşlar başlangıçta efsunlu item verme olayı elinizde var mı lycanının dahil olduğu? SRC tabanlısı lazım.
Lycansızı buldum:



extern BYTE g_bAuthServer;

en altına ekle:

extern bool RaceToJob(unsigned race, unsigned *ret_job);


void CInputDB::playerCreateSuccess(LPDESC d, const char * data)

arat


değiş

void CInputDB::playerCreateSuccess(LPDESC d, const char * data)
{
if (!d)
return;

TPacketDGCreateSuccess * pPacketDB = (TPacketDGCreateSuccess *) data;

if (pPacketDB->bAccountCharacterIndex >= PLAYER_PER_ACCOUNT)
{
d->Packet(encode_byte(HEADER_GC_CHARACTER_CREATE_FAILURE), 1);
return;
}

long lIndex = 0;

if (!CMapLocation::instance().Get(pPacketDB->player.x,
pPacketDB->player.y,
lIndex,
pPacketDB->player.lAddr,
pPacketDB->player.wPort))
{
sys_err("InputDB::playerCreateSuccess: cannot find server for mapindex %d %d x %d (name %s)",
lIndex,
pPacketDB->player.x,
pPacketDB->player.y,
pPacketDB->player.szName);
}

TAccountTable & r_Tab = d->GetAccountTable();
r_Tab.players[pPacketDB->bAccountCharacterIndex] = pPacketDB->player;

TPacketGCPlayerCreateSuccess pack;

pack.header = HEADER_GC_CHARACTER_CREATE_SUCCESS;
pack.bAccountCharacterIndex = pPacketDB->bAccountCharacterIndex;
pack.player = pPacketDB->player;

d->Packet(&pack, sizeof(TPacketGCPlayerCreateSuccess));

// NEW_GIVE_BASIC
TPlayerItem t;
memset(&t, 0, sizeof(t));

t.owner = r_Tab.players[pPacketDB->bAccountCharacterIndex].dwID;

struct SInitialItem
{
BYTE window;
WORD pos;
DWORD count;

DWORD dwVnum;

long socket0;
long socket1;
long socket2;
long socket3;
long socket4;
long socket5;
};

const int MAX_INITIAL_ITEM = 17;

static SInitialItem initialItems[JOB_MAX_NUM][MAX_INITIAL_ITEM] =
{
{
// WARRIOR
{EQUIPMENT, 0, 1, 11207, 0, 0, 0, 0, 0, 0}, // Zirh
{EQUIPMENT, 1, 1, 12207, 0, 0, 0, 0, 0, 0}, // Kafalik
{EQUIPMENT, 2, 1, 15007, 0, 0, 0, 0, 0, 0}, // Ayakkabi
{EQUIPMENT, 3, 1, 14007, 0, 0, 0, 0, 0, 0}, // bracelet
{EQUIPMENT, 4, 1, 17 , 0, 0, 0, 0, 0, 0}, // weapon
{EQUIPMENT, 5, 1, 16007, 0, 0, 0, 0, 0, 0}, // necklace
{EQUIPMENT, 6, 1, 17007, 0, 0, 0, 0, 0, 0}, // earring
{EQUIPMENT, 10, 1, 13007, 0, 0, 0, 0, 0, 0}, // shield

{INVENTORY, 0, 1, 50051, /* sockets => */ 0, 0, 0, 0, 0, 0}, // At Resmi
{INVENTORY, 2, 200, 27001, /* sockets => */ 0, 0, 200, 0, 0, 0}, // Kirmizi iksir (K)
{INVENTORY, 3, 200, 27004, /* sockets => */ 0, 0, 200, 0, 0, 0}, // Mavi iksir (K)
{INVENTORY, 1, 1, 72701, /* sockets => */ 0, 0, 1800, 0, 0, 0}, // Rüzgarin Ayakkabilari
{INVENTORY, 4, 15, 27104, /* sockets => */ 0, 0, 50, 0, 0, 0}, // Mor iksir (O)
{INVENTORY, 5, 15, 27111, /* sockets => */ 0, 0, 50, 0, 0, 0}, // Yesil iksir (O)
},
{
// ASSASSIN
{EQUIPMENT, 0, 1, 11407, 0, 0, 0, 0, 0, 0}, // Zirh
{EQUIPMENT, 1, 1, 12347, 0, 0, 0, 0, 0, 0}, // Kafalik
{EQUIPMENT, 2, 1, 15007, 0, 0, 0, 0, 0, 0}, // Ayakkabi
{EQUIPMENT, 3, 1, 14007, 0, 0, 0, 0, 0, 0}, // bracelet
{EQUIPMENT, 4, 1, 1007 , 0, 0, 0, 0, 0, 0}, // weapon
{EQUIPMENT, 5, 1, 16007, 0, 0, 0, 0, 0, 0}, // necklace
{EQUIPMENT, 6, 1, 17007, 0, 0, 0, 0, 0, 0}, // earring
{EQUIPMENT, 10, 1, 13007, 0, 0, 0, 0, 0, 0}, // shield

{INVENTORY, 0, 1, 50051, /* sockets => */ 0, 0, 0, 0, 0, 0}, // At Resmi
{INVENTORY, 2, 200, 27001, /* sockets => */ 0, 0, 200, 0, 0, 0}, // Kirmizi iksir (K)
{INVENTORY, 3, 200, 27004, /* sockets => */ 0, 0, 200, 0, 0, 0}, // Mavi iksir (K)
{INVENTORY, 1, 1, 72701, /* sockets => */ 0, 0, 1800, 0, 0, 0}, // Rüzgarin Ayakkabilari
{INVENTORY, 4, 15, 27104, /* sockets => */ 0, 0, 50, 0, 0, 0}, // Mor iksir (O)
{INVENTORY, 5, 15, 27111, /* sockets => */ 0, 0, 50, 0, 0, 0}, // Yesil iksir (O)
},
{
// SURA
{EQUIPMENT, 0, 1, 11607, 0, 0, 0, 0, 0, 0}, // Zirh
{EQUIPMENT, 1, 1, 12487, 0, 0, 0, 0, 0, 0}, // Kafalik
{EQUIPMENT, 2, 1, 15007, 0, 0, 0, 0, 0, 0}, // Ayakkabi
{EQUIPMENT, 3, 1, 14007, 0, 0, 0, 0, 0, 0}, // bracelet
{EQUIPMENT, 4, 1, 17 , 0, 0, 0, 0, 0, 0}, // weapon
{EQUIPMENT, 5, 1, 16007, 0, 0, 0, 0, 0, 0}, // necklace
{EQUIPMENT, 6, 1, 17007, 0, 0, 0, 0, 0, 0}, // earring
{EQUIPMENT, 10, 1, 13007, 0, 0, 0, 0, 0, 0}, // shield

{INVENTORY, 0, 1, 50051, /* sockets => */ 0, 0, 0, 0, 0, 0}, // At Resmi
{INVENTORY, 2, 200, 27001, /* sockets => */ 0, 0, 200, 0, 0, 0}, // Kirmizi iksir (K)
{INVENTORY, 3, 200, 27004, /* sockets => */ 0, 0, 200, 0, 0, 0}, // Mavi iksir (K)
{INVENTORY, 1, 1, 72701, /* sockets => */ 0, 0, 1800, 0, 0, 0}, // Rüzgarin Ayakkabilari
{INVENTORY, 4, 15, 27104, /* sockets => */ 0, 0, 50, 0, 0, 0}, // Mor iksir (O)
{INVENTORY, 5, 15, 27111, /* sockets => */ 0, 0, 50, 0, 0, 0}, // Yesil iksir (O)
},
{
// SHAMAN
{EQUIPMENT, 0, 1, 11807, 0, 0, 0, 0, 0, 0}, // Zirh
{EQUIPMENT, 1, 1, 12627, 0, 0, 0, 0, 0, 0}, // Kafalik
{EQUIPMENT, 2, 1, 15007, 0, 0, 0, 0, 0, 0}, // Ayakkabi
{EQUIPMENT, 3, 1, 14007, 0, 0, 0, 0, 0, 0}, // bracelet
{EQUIPMENT, 4, 1, 7007 , 0, 0, 0, 0, 0, 0}, // weapon
{EQUIPMENT, 5, 1, 16007, 0, 0, 0, 0, 0, 0}, // necklace
{EQUIPMENT, 6, 1, 17007, 0, 0, 0, 0, 0, 0}, // earring
{EQUIPMENT, 10, 1, 13007, 0, 0, 0, 0, 0, 0}, // shield

{INVENTORY, 0, 1, 50051, /* sockets => */ 0, 0, 0, 0, 0, 0}, // At Resmi
{INVENTORY, 2, 200, 27001, /* sockets => */ 0, 0, 200, 0, 0, 0}, // Kirmizi iksir (K)
{INVENTORY, 3, 200, 27004, /* sockets => */ 0, 0, 200, 0, 0, 0}, // Mavi iksir (K)
{INVENTORY, 1, 1, 72701, /* sockets => */ 0, 0, 1800, 0, 0, 0}, // Rüzgarin Ayakkabilari
{INVENTORY, 4, 15, 27104, /* sockets => */ 0, 0, 50, 0, 0, 0}, // Mor iksir (O)
{INVENTORY, 5, 15, 27111, /* sockets => */ 0, 0, 50, 0, 0, 0}, // Yesil iksir (O)
},
};

unsigned job = pPacketDB->player.byJob;

RaceToJob(job, &job);

for (int i=0; i < MAX_INITIAL_ITEM; i++)
{
if (initialItems[job].dwVnum == 0)
continue;

t.id = ITEM_MANAGER::instance().GetNewID();
t.window = initialItems[job].window;
t.pos = initialItems[job].pos;
t.count = initialItems[job].count;
t.vnum = initialItems[job].dwVnum;

t.alSockets[0] = initialItems[job].socket0;
t.alSockets[1] = initialItems[job].socket1;
t.alSockets[2] = initialItems[job].socket2;
t.alSockets[3] = initialItems[job].socket3;
t.alSockets[4] = initialItems[job].socket4;
t.alSockets[5] = initialItems[job].socket5;

db_clientdesc->DBPacketHeader(HEADER_GD_ITEM_SAVE, 0, sizeof(TPlayerItem));
db_clientdesc->Packet(&t, sizeof(TPlayerItem));
}
// END_OF_NEW_GIVE_BASIC

LogManager::instance().CharLog(pack.player.dwID, 0, 0, 0, "CREATE PLAYER", "", d->GetHostName());
}
 
Metin2Hub Bot
M2Hub Bot
Feb
Threads
65
1,091
1
412
83
HubMoney
770
Hello there I need the system which gives player beginner equipments with lycan included? I need the one with source code related not quest.
Can you share with me?

Merhaba arkadaşlar başlangıçta efsunlu item verme olayı elinizde var mı lycanının dahil olduğu? SRC tabanlısı lazım.
Lycansızı buldum:



extern BYTE g_bAuthServer;

en altına ekle:

extern bool RaceToJob(unsigned race, unsigned *ret_job);


void CInputDB::playerCreateSuccess(LPDESC d, const char * data)

arat


değiş

void CInputDB::playerCreateSuccess(LPDESC d, const char * data)
{
if (!d)
return;

TPacketDGCreateSuccess * pPacketDB = (TPacketDGCreateSuccess *) data;

if (pPacketDB->bAccountCharacterIndex >= PLAYER_PER_ACCOUNT)
{
d->Packet(encode_byte(HEADER_GC_CHARACTER_CREATE_FAILURE), 1);
return;
}

long lIndex = 0;

if (!CMapLocation::instance().Get(pPacketDB->player.x,
pPacketDB->player.y,
lIndex,
pPacketDB->player.lAddr,
pPacketDB->player.wPort))
{
sys_err("InputDB::playerCreateSuccess: cannot find server for mapindex %d %d x %d (name %s)",
lIndex,
pPacketDB->player.x,
pPacketDB->player.y,
pPacketDB->player.szName);
}

TAccountTable & r_Tab = d->GetAccountTable();
r_Tab.players[pPacketDB->bAccountCharacterIndex] = pPacketDB->player;

TPacketGCPlayerCreateSuccess pack;

pack.header = HEADER_GC_CHARACTER_CREATE_SUCCESS;
pack.bAccountCharacterIndex = pPacketDB->bAccountCharacterIndex;
pack.player = pPacketDB->player;

d->Packet(&pack, sizeof(TPacketGCPlayerCreateSuccess));

// NEW_GIVE_BASIC
TPlayerItem t;
memset(&t, 0, sizeof(t));

t.owner = r_Tab.players[pPacketDB->bAccountCharacterIndex].dwID;

struct SInitialItem
{
BYTE window;
WORD pos;
DWORD count;

DWORD dwVnum;

long socket0;
long socket1;
long socket2;
long socket3;
long socket4;
long socket5;
};

const int MAX_INITIAL_ITEM = 17;

static SInitialItem initialItems[JOB_MAX_NUM][MAX_INITIAL_ITEM] =
{
{
// WARRIOR
{EQUIPMENT, 0, 1, 11207, 0, 0, 0, 0, 0, 0}, // Zirh
{EQUIPMENT, 1, 1, 12207, 0, 0, 0, 0, 0, 0}, // Kafalik
{EQUIPMENT, 2, 1, 15007, 0, 0, 0, 0, 0, 0}, // Ayakkabi
{EQUIPMENT, 3, 1, 14007, 0, 0, 0, 0, 0, 0}, // bracelet
{EQUIPMENT, 4, 1, 17 , 0, 0, 0, 0, 0, 0}, // weapon
{EQUIPMENT, 5, 1, 16007, 0, 0, 0, 0, 0, 0}, // necklace
{EQUIPMENT, 6, 1, 17007, 0, 0, 0, 0, 0, 0}, // earring
{EQUIPMENT, 10, 1, 13007, 0, 0, 0, 0, 0, 0}, // shield

{INVENTORY, 0, 1, 50051, /* sockets => */ 0, 0, 0, 0, 0, 0}, // At Resmi
{INVENTORY, 2, 200, 27001, /* sockets => */ 0, 0, 200, 0, 0, 0}, // Kirmizi iksir (K)
{INVENTORY, 3, 200, 27004, /* sockets => */ 0, 0, 200, 0, 0, 0}, // Mavi iksir (K)
{INVENTORY, 1, 1, 72701, /* sockets => */ 0, 0, 1800, 0, 0, 0}, // Rüzgarin Ayakkabilari
{INVENTORY, 4, 15, 27104, /* sockets => */ 0, 0, 50, 0, 0, 0}, // Mor iksir (O)
{INVENTORY, 5, 15, 27111, /* sockets => */ 0, 0, 50, 0, 0, 0}, // Yesil iksir (O)
},
{
// ASSASSIN
{EQUIPMENT, 0, 1, 11407, 0, 0, 0, 0, 0, 0}, // Zirh
{EQUIPMENT, 1, 1, 12347, 0, 0, 0, 0, 0, 0}, // Kafalik
{EQUIPMENT, 2, 1, 15007, 0, 0, 0, 0, 0, 0}, // Ayakkabi
{EQUIPMENT, 3, 1, 14007, 0, 0, 0, 0, 0, 0}, // bracelet
{EQUIPMENT, 4, 1, 1007 , 0, 0, 0, 0, 0, 0}, // weapon
{EQUIPMENT, 5, 1, 16007, 0, 0, 0, 0, 0, 0}, // necklace
{EQUIPMENT, 6, 1, 17007, 0, 0, 0, 0, 0, 0}, // earring
{EQUIPMENT, 10, 1, 13007, 0, 0, 0, 0, 0, 0}, // shield

{INVENTORY, 0, 1, 50051, /* sockets => */ 0, 0, 0, 0, 0, 0}, // At Resmi
{INVENTORY, 2, 200, 27001, /* sockets => */ 0, 0, 200, 0, 0, 0}, // Kirmizi iksir (K)
{INVENTORY, 3, 200, 27004, /* sockets => */ 0, 0, 200, 0, 0, 0}, // Mavi iksir (K)
{INVENTORY, 1, 1, 72701, /* sockets => */ 0, 0, 1800, 0, 0, 0}, // Rüzgarin Ayakkabilari
{INVENTORY, 4, 15, 27104, /* sockets => */ 0, 0, 50, 0, 0, 0}, // Mor iksir (O)
{INVENTORY, 5, 15, 27111, /* sockets => */ 0, 0, 50, 0, 0, 0}, // Yesil iksir (O)
},
{
// SURA
{EQUIPMENT, 0, 1, 11607, 0, 0, 0, 0, 0, 0}, // Zirh
{EQUIPMENT, 1, 1, 12487, 0, 0, 0, 0, 0, 0}, // Kafalik
{EQUIPMENT, 2, 1, 15007, 0, 0, 0, 0, 0, 0}, // Ayakkabi
{EQUIPMENT, 3, 1, 14007, 0, 0, 0, 0, 0, 0}, // bracelet
{EQUIPMENT, 4, 1, 17 , 0, 0, 0, 0, 0, 0}, // weapon
{EQUIPMENT, 5, 1, 16007, 0, 0, 0, 0, 0, 0}, // necklace
{EQUIPMENT, 6, 1, 17007, 0, 0, 0, 0, 0, 0}, // earring
{EQUIPMENT, 10, 1, 13007, 0, 0, 0, 0, 0, 0}, // shield

{INVENTORY, 0, 1, 50051, /* sockets => */ 0, 0, 0, 0, 0, 0}, // At Resmi
{INVENTORY, 2, 200, 27001, /* sockets => */ 0, 0, 200, 0, 0, 0}, // Kirmizi iksir (K)
{INVENTORY, 3, 200, 27004, /* sockets => */ 0, 0, 200, 0, 0, 0}, // Mavi iksir (K)
{INVENTORY, 1, 1, 72701, /* sockets => */ 0, 0, 1800, 0, 0, 0}, // Rüzgarin Ayakkabilari
{INVENTORY, 4, 15, 27104, /* sockets => */ 0, 0, 50, 0, 0, 0}, // Mor iksir (O)
{INVENTORY, 5, 15, 27111, /* sockets => */ 0, 0, 50, 0, 0, 0}, // Yesil iksir (O)
},
{
// SHAMAN
{EQUIPMENT, 0, 1, 11807, 0, 0, 0, 0, 0, 0}, // Zirh
{EQUIPMENT, 1, 1, 12627, 0, 0, 0, 0, 0, 0}, // Kafalik
{EQUIPMENT, 2, 1, 15007, 0, 0, 0, 0, 0, 0}, // Ayakkabi
{EQUIPMENT, 3, 1, 14007, 0, 0, 0, 0, 0, 0}, // bracelet
{EQUIPMENT, 4, 1, 7007 , 0, 0, 0, 0, 0, 0}, // weapon
{EQUIPMENT, 5, 1, 16007, 0, 0, 0, 0, 0, 0}, // necklace
{EQUIPMENT, 6, 1, 17007, 0, 0, 0, 0, 0, 0}, // earring
{EQUIPMENT, 10, 1, 13007, 0, 0, 0, 0, 0, 0}, // shield

{INVENTORY, 0, 1, 50051, /* sockets => */ 0, 0, 0, 0, 0, 0}, // At Resmi
{INVENTORY, 2, 200, 27001, /* sockets => */ 0, 0, 200, 0, 0, 0}, // Kirmizi iksir (K)
{INVENTORY, 3, 200, 27004, /* sockets => */ 0, 0, 200, 0, 0, 0}, // Mavi iksir (K)
{INVENTORY, 1, 1, 72701, /* sockets => */ 0, 0, 1800, 0, 0, 0}, // Rüzgarin Ayakkabilari
{INVENTORY, 4, 15, 27104, /* sockets => */ 0, 0, 50, 0, 0, 0}, // Mor iksir (O)
{INVENTORY, 5, 15, 27111, /* sockets => */ 0, 0, 50, 0, 0, 0}, // Yesil iksir (O)
},
};

unsigned job = pPacketDB->player.byJob;

RaceToJob(job, &job);

for (int i=0; i < MAX_INITIAL_ITEM; i++)
{
if (initialItems[job].dwVnum == 0)
continue;

t.id = ITEM_MANAGER::instance().GetNewID();
t.window = initialItems[job].window;
t.pos = initialItems[job].pos;
t.count = initialItems[job].count;
t.vnum = initialItems[job].dwVnum;

t.alSockets[0] = initialItems[job].socket0;
t.alSockets[1] = initialItems[job].socket1;
t.alSockets[2] = initialItems[job].socket2;
t.alSockets[3] = initialItems[job].socket3;
t.alSockets[4] = initialItems[job].socket4;
t.alSockets[5] = initialItems[job].socket5;

db_clientdesc->DBPacketHeader(HEADER_GD_ITEM_SAVE, 0, sizeof(TPlayerItem));
db_clientdesc->Packet(&t, sizeof(TPlayerItem));
}
// END_OF_NEW_GIVE_BASIC

LogManager::instance().CharLog(pack.player.dwID, 0, 0, 0, "CREATE PLAYER", "", d->GetHostName());
}

Hello dear user,

Your post will be under surveillance by bots for the next few hours.

Forum description : Metin2 private server, Metin2 download, Metin2 support, Metin2 Forum, Metin2 Pvp Servers, Errors, Bugs, Requests, Metin2 Pvp Forum, Everything About Metin2.
 
Metin2Hub New World
Admin
Valuable
Premium
Designer
Developer
Member
Feb
Threads
135
798
1,783
93
HubMoney
1,711
Status
Not open for further replies.
Top
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features of our website. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock