- Mesaj
- 262
- Çözümler
- 9
- Beğeni
- 158
- Puan
- 779
- Ticaret Puanı
- 0
Başlangıç itemlerini sunucudan veya srcden veya quest'ten çektirmek düzenlemek zahmetli oluyordu bi nevi şuan üzerinde
çalışmış olduğum metin2 yönetim paneli için ayarladım diyebilirim ama kullanılmasını
tavsiye ederim çünkü en ufak değişiklikte herhangi bir reload gerektirmez anlık çeker.
baslangic_itemleri.sql'yi player kısmına atıp sunucunuza göre düzenleyebilirsiniz.
Örnek Video:
çalışmış olduğum metin2 yönetim paneli için ayarladım diyebilirim ama kullanılmasını
tavsiye ederim çünkü en ufak değişiklikte herhangi bir reload gerektirmez anlık çeker.
baslangic_itemleri.sql'yi player kısmına atıp sunucunuza göre düzenleyebilirsiniz.
Örnek Video:
input_db.cpp Arat::
void CInputDB::PlayerCreateSuccess(LPDESC d, const char * data)
input_db.cpp Fonksiyonu Komple Değiştir::
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));
unsigned job = pPacketDB->player.byJob;
if (job >= JOB_MAX_NUM)
job = job % 4;
DWORD dwPlayerID = r_Tab.players[pPacketDB->bAccountCharacterIndex].dwID;
char szQuery[1024];
snprintf(szQuery, sizeof(szQuery),
"SELECT window_type, position, count, item_vnum, "
"socket0, socket1, socket2, socket3, socket4, "
"attrtype0, attrvalue0, attrtype1, attrvalue1, attrtype2, attrvalue2, "
"attrtype3, attrvalue3, attrtype4, attrvalue4, attrtype5, attrvalue5, "
"attrtype6, attrvalue6 "
"FROM player.baslangic_itemleri "
"WHERE job = %u AND is_active = 1 "
"ORDER BY window_type DESC, position",
job);
std::unique_ptr<SQLMsg> pMsg(DBManager::instance().DirectQuery(szQuery));
if (pMsg.get() && pMsg->Get()->uiNumRows > 0)
{
MYSQL_ROW row;
TPlayerItem t;
while ((row = mysql_fetch_row(pMsg->Get()->pSQLResult)))
{
memset(&t, 0, sizeof(t));
int col = 0;
t.owner = dwPlayerID;
t.id = ITEM_MANAGER::instance().GetNewID();
t.window = atoi(row[col++]);
t.pos = atoi(row[col++]);
t.count = atoi(row[col++]);
t.vnum = atoi(row[col++]);
// Socketler (5 taş Sizde Kaç Taş Varsa Ona Göre Ayarlayın)
t.alSockets[0] = atoll(row[col++]);
t.alSockets[1] = atoll(row[col++]);
t.alSockets[2] = atoll(row[col++]);
t.alSockets[3] = atoll(row[col++]);
t.alSockets[4] = atoll(row[col++]);
// Efsunlar (5+2 7 bonus)
for (int i = 0; i < 7; i++)
{
t.aAttr[i].bType = atoi(row[col++]);
t.aAttr[i].sValue = atoi(row[col++]);
}
db_clientdesc->DBPacketHeader(HEADER_GD_ITEM_SAVE, 0, sizeof(TPlayerItem));
db_clientdesc->Packet(&t, sizeof(TPlayerItem));
}
}
else
{
sys_err("baslangic_itemleri: [HATA] İtemler Karaktere Verilemedi Lütfen Mysql baslangic_temleri Tablosunu Kontrol Ediniz.", job);
}
LogManager::instance().CharLog(pack.player.dwID, 0, 0, 0, "CREATE PLAYER", "", d->GetHostName());
}
baslangic_itemleri.sql:
/*
Navicat Premium Dump SQL
Source Server : 1-99 Altay2 Börü
Source Server Type : MySQL
Source Server Version : 110403 (11.4.3-MariaDB)
Source Host : 192.168.1.99:3306
Source Schema : player
Target Server Type : MySQL
Target Server Version : 110403 (11.4.3-MariaDB)
File Encoding : 65001
Date: 08/01/2026 19:48:10
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for baslangic_itemleri
-- ----------------------------
DROP TABLE IF EXISTS `baslangic_itemleri`;
CREATE TABLE `baslangic_itemleri` (
`id` int NOT NULL AUTO_INCREMENT,
`job` tinyint NOT NULL COMMENT '0=Savasci, 1=Ninja, 2=Sura, 3=Saman',
`window_type` tinyint NOT NULL COMMENT '0=EQUIPMENT, 1=INVENTORY',
`position` tinyint NOT NULL,
`count` int NULL DEFAULT 1,
`item_vnum` int NOT NULL,
`attrtype0` tinyint NULL DEFAULT 0,
`attrvalue0` smallint NULL DEFAULT 0,
`attrtype1` tinyint NULL DEFAULT 0,
`attrvalue1` smallint NULL DEFAULT 0,
`attrtype2` tinyint NULL DEFAULT 0,
`attrvalue2` smallint NULL DEFAULT 0,
`attrtype3` tinyint NULL DEFAULT 0,
`attrvalue3` smallint NULL DEFAULT 0,
`attrtype4` tinyint NULL DEFAULT 0,
`attrvalue4` smallint NULL DEFAULT 0,
`attrtype5` tinyint NULL DEFAULT 0,
`attrvalue5` smallint NULL DEFAULT 0,
`attrtype6` tinyint NULL DEFAULT 0,
`attrvalue6` smallint NULL DEFAULT 0,
`socket0` bigint NULL DEFAULT 0,
`socket1` bigint NULL DEFAULT 0,
`socket2` bigint NULL DEFAULT 0,
`socket3` bigint NULL DEFAULT 0,
`socket4` bigint NULL DEFAULT 0,
`is_active` tinyint(1) NULL DEFAULT 1,
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_job`(`job`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 38 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci ROW_FORMAT = Fixed;
-- ----------------------------
-- Records of baslangic_itemleri
-- ----------------------------
INSERT INTO `baslangic_itemleri` VALUES (1, 0, 1, 8, 1, 11207, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28443, 28438, 28442, 28439, 28441, 1);
INSERT INTO `baslangic_itemleri` VALUES (2, 0, 1, 0, 1, 12207, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
INSERT INTO `baslangic_itemleri` VALUES (3, 0, 1, 1, 1, 15007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
INSERT INTO `baslangic_itemleri` VALUES (4, 0, 1, 2, 1, 14007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
INSERT INTO `baslangic_itemleri` VALUES (5, 0, 1, 9, 1, 17, 63, 50, 72, 50, 71, 35, 17, 25, 9, 20, 0, 0, 0, 0, 28430, 28431, 28432, 28437, 28433, 1);
INSERT INTO `baslangic_itemleri` VALUES (6, 0, 1, 3, 1, 16007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
INSERT INTO `baslangic_itemleri` VALUES (7, 0, 1, 4, 1, 17007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
INSERT INTO `baslangic_itemleri` VALUES (8, 0, 1, 6, 1, 13007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
INSERT INTO `baslangic_itemleri` VALUES (9, 0, 1, 5, 1, 40004, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
INSERT INTO `baslangic_itemleri` VALUES (10, 1, 1, 0, 1, 11407, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28443, 28438, 28442, 28439, 28441, 1);
INSERT INTO `baslangic_itemleri` VALUES (11, 1, 1, 1, 1, 12347, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
INSERT INTO `baslangic_itemleri` VALUES (12, 1, 1, 2, 1, 15007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
INSERT INTO `baslangic_itemleri` VALUES (13, 1, 1, 3, 1, 14007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
INSERT INTO `baslangic_itemleri` VALUES (14, 1, 1, 4, 1, 1007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28430, 28431, 28432, 28437, 28433, 1);
INSERT INTO `baslangic_itemleri` VALUES (15, 1, 1, 5, 1, 16007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
INSERT INTO `baslangic_itemleri` VALUES (16, 1, 1, 6, 1, 17007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
INSERT INTO `baslangic_itemleri` VALUES (17, 1, 1, 10, 1, 13007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
INSERT INTO `baslangic_itemleri` VALUES (18, 1, 1, 0, 1, 40004, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
INSERT INTO `baslangic_itemleri` VALUES (19, 2, 1, 0, 1, 11607, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28443, 28438, 28442, 28439, 28441, 1);
INSERT INTO `baslangic_itemleri` VALUES (20, 2, 1, 1, 1, 12487, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
INSERT INTO `baslangic_itemleri` VALUES (21, 2, 1, 2, 1, 15007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
INSERT INTO `baslangic_itemleri` VALUES (22, 2, 1, 3, 1, 14007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
INSERT INTO `baslangic_itemleri` VALUES (23, 2, 1, 4, 1, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28430, 28431, 28432, 28437, 28433, 1);
INSERT INTO `baslangic_itemleri` VALUES (24, 2, 1, 5, 1, 16007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
INSERT INTO `baslangic_itemleri` VALUES (25, 2, 1, 6, 1, 17007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
INSERT INTO `baslangic_itemleri` VALUES (26, 2, 1, 10, 1, 13007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
INSERT INTO `baslangic_itemleri` VALUES (27, 2, 1, 0, 1, 40004, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
INSERT INTO `baslangic_itemleri` VALUES (28, 3, 1, 0, 1, 11807, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28443, 28438, 28442, 28439, 28441, 1);
INSERT INTO `baslangic_itemleri` VALUES (29, 3, 1, 1, 1, 12627, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
INSERT INTO `baslangic_itemleri` VALUES (30, 3, 1, 2, 1, 15007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
INSERT INTO `baslangic_itemleri` VALUES (31, 3, 1, 3, 1, 14007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
INSERT INTO `baslangic_itemleri` VALUES (32, 3, 1, 4, 1, 7007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28430, 28431, 28432, 28437, 28433, 1);
INSERT INTO `baslangic_itemleri` VALUES (33, 3, 1, 5, 1, 16007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
INSERT INTO `baslangic_itemleri` VALUES (34, 3, 1, 6, 1, 17007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
INSERT INTO `baslangic_itemleri` VALUES (35, 3, 1, 10, 1, 13007, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
INSERT INTO `baslangic_itemleri` VALUES (36, 3, 1, 0, 1, 40004, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
SET FOREIGN_KEY_CHECKS = 1;
Linkleri görebilmek için
giriş yap veya kayıt ol.