- Katılım
- 6 Mayıs 2022
- Mesajlar
- 45,967
Öncelikle GameServer(Ebenezer) > User.cpp Açıyoruz ve CUser::Home() Fonksiyonumuzu Silip Yerine Bunu Koyuyoruz...
############################
Yeni Eklenecek Dosya StartPositionSet.h
############################
##################################
Bu İki Dosyayı Projemize Ekliyoruz...
EbenezerDlg.cpp Değiliklikleri ;
Aranacak : #include "HomeSet.h"
Üstüne Eklenecek : #include "StartPositionSet.h"
Aranacak : if( LoadHomeTable() == FALSE ){
Üstüne Eklenecek ;
##################################
#############################
Aranacak : if ( !m_HomeArray.IsEmpty() )
Üstüne Eklenecek ;
#############################
--------------------------------------------------
Aranacak : CEbenezerDlg::LoadHomeTable()
Üstüne Eklencek ;
---------------------------------------------------
##################################################
Şimdi GameDefine.h Açıyoruz, struct _HOME_INFO Arıyoruz ve Üzerine Aşağadaki Structumuzu Ekliyoruz...
##################################################
#################################################
Bu Kadar Artık Town Koordinatları START_POSITION Tablosuna Bağlanmış Olacaktır.. Kolay Gelsin..
#################################################
START_POSITION Tablosu Nedir?
Knight Online özel sunucularında (pserver), oyuncuların oyun içi konumlarını yönetmek ve başlatma noktalarını belirlemek için önemli bir yapıdır START_POSITION tablosu. Bu tablo, oyuncu karakterlerinin sunucuya giriş yaptığında hangi koordinatlarda belireceğini tanımlar. Özellikle özel sunucu geliştiricileri için, farklı şehirlere veya özel bölgelere yönlendirme yapabilmek amacıyla bu tabloya müdahale edilir.
START_POSITION Tablosunun Yapısı
Genellikle veritabanında bulunan START_POSITION tablosu şu sütunları içerir:
- strAccountID: Oyuncunun hesap kimliği.
- strCharID1: Karakterin adı.
- ZoneNo: Bulunduğu bölge numarası (örneğin: Delos, Ronark).
- x, y, z: Oyuncunun spawn olacağı koordinatlar.
- sAddPoint: Ekstra puan gibi düşünülebilir, bazı özel durumlarda kullanılır.
Neden START_POSITION Tablosuna Bağlanılır?
Özel sunucularda oyuncuların belirli bölgelerde başlamasını sağlamak isteyen geliştiriciler, bu tabloya özel giriş koordinatları ekleyerek oyuncuları doğrudan savaş alanlarına, PvP bölgelerine veya özel sunucu olay alanlarına yönlendirebilir. Bu, kullanıcı deneyimini artırmak ve sunucuya özgü oynanış kuralları oluşturmak için oldukça etkilidir.
Tabloya Veri Ekleme İşlemi
Veritabanında bulunan START_POSITION tablosuna manuel olarak yeni satırlar eklenerek, oyuncuların giriş konumları ayarlanabilir. Örneğin, bir oyuncu belirli bir bölgeye girmek istediğinde, onun için özel olarak hazırlanmış bir konuma yönlendirilmesi sağlanabilir. Bu işlem genellikle INSERT INTO komutu ile yapılır.
Dikkat Edilmesi Gerekenler
Bu tabloya yapılan değişiklikler, oyuncu girişlerinde doğrudan etkili olur. Yanlış koordinat girildiğinde oyuncular harita dışı bir alana düşebilir veya hata alabilir. Bu nedenle, koordinatların doğru ve test edilmiş olması büyük önem taşır. Ayrıca, sunucu dosyalarında (serverfiles) bu tablonun doğru şekilde tanımlandığından emin olunmalıdır.
START_POSITION ve Sunucu Geliştirme
Knight Online özel sunucu geliştiricileri, START_POSITION tablosunu kullanarak PvP sunucularında oyuncuların başlangıç bölgelerini belirleyebilir, PvE sunucularda ise oyuncuların doğrudan kutsal alanlara yönlendirilmesini sağlayabilir. Bu sayede oyun akışı daha kontrollü hale getirilir. Bu tablo, aynı zamanda sunucu olayları için de stratejik bir araçtır.
KnightLobby.com ile Özel Sunucu Geliştirme
KnightLobby.com, Knight Online özel sunucu geliştirme konusunda birçok kaynak sunar. START_POSITION tablosu gibi teknik yapıların nasıl kullanılacağına dair bilgi alabileceğiniz forumlar, rehberler ve örnek kodlar mevcuttur. Özel sunucu geliştiricileri için kapsamlı destek sağlar.
What is the START_POSITION Table?
In Knight Online private servers (pserver), the START_POSITION table is crucial for managing player locations and defining starting points within the game. This table determines where player characters will appear upon logging into the server. For private server developers, modifying this table allows directing players to different cities or custom areas.
Structure of the START_POSITION Table
The START_POSITION table typically includes these columns in the database:
- strAccountID: Player's account ID.
- strCharID1: Character name.
- ZoneNo: Zone number (e.g., Delos, Ronark).
- x, y, z: Spawn coordinates for the player.
- sAddPoint: May be used for additional points or special cases.
Why Connect to the START_POSITION Table?
Developers who want players to start in specific regions can use this table to direct them directly to battlefields, PvP zones, or event areas unique to the server. This enhances the gaming experience and helps establish unique gameplay rules for the server.
Inserting Data into the Table
New entries can be manually added to the START_POSITION table in the database, allowing customization of entry locations for players. For example, a player can be directed to a specially prepared location when entering a certain area. This process is typically done with the INSERT INTO command.
Important Considerations
Changes made to this table directly affect player logins. Incorrect coordinates may cause players to fall outside the map or encounter errors. Therefore, it is essential that coordinates are accurate and tested. Additionally, ensure that the table is properly defined in server files (serverfiles).
START_POSITION and Server Development
Knight Online private server developers can use the START_POSITION table to define starting zones in PvP servers or direct players straight into sacred areas in PvE servers. This allows for more controlled gameplay flow. The table also serves as a strategic tool for server events.
Private Server Development with KnightLobby.com
KnightLobby.com provides numerous resources for Knight Online private server development. You can find guides, forums, and sample codes explaining how to use technical structures like the START_POSITION table. It offers comprehensive support for private server developers.
Kod:
// StartPositionSet.cpp : implementation file // #include "stdafx.h" #include "ebenezer.h" #include "StartPositionSet.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[*] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CStartPositionSet IMPLEMENT_DYNAMIC(CStartPositionSet, CRecordset) CStartPositionSet::CStartPositionSet(CDatabase* pdb) : CRecordset(pdb) { //{{AFX_FIELD_INIT(CStartPositionSet) m_ZoneID = 0; m_sKarusX = 0; m_sKarusZ = 0; m_sElmoradX = 0; m_sElmoradZ = 0; m_bRangeX = 0; m_bRangeZ = 0; // m_sKarusGateX = 0; m_sKarusGateZ = 0; m_sElmoGateX = 0; m_sElmoGateZ = 0; // // m_nFields = 7; m_nFields = 11; //}}AFX_FIELD_INIT m_nDefaultType = snapshot; } CString CStartPositionSet::GetDefaultConnect() { return _T("ODBC;DSN=KO_GAME;UID=KOUSER;PWD=KX852456"); } CString CStartPositionSet::GetDefaultSQL() { return _T("[dbo].[START_POSITION]"); } void CStartPositionSet::DoFieldExchange(CFieldExchange* pFX) { //{{AFX_FIELD_MAP(CStartPositionSet) pFX->SetFieldType(CFieldExchange::outputColumn); RFX_Long(pFX, _T("[ZoneID]"), m_ZoneID); RFX_Long(pFX, _T("[sKarusX]"), m_sKarusX); RFX_Long(pFX, _T("[sKarusZ]"), m_sKarusZ); RFX_Long(pFX, _T("[sElmoradX]"), m_sElmoradX); RFX_Long(pFX, _T("[sElmoradZ]"), m_sElmoradZ); RFX_Byte(pFX, _T("[bRangeX]"), m_bRangeX); RFX_Byte(pFX, _T("[bRangeZ]"), m_bRangeZ); RFX_Long(pFX, _T("[sKarusGateX]"), m_sKarusGateX); RFX_Long(pFX, _T("[sKarusGateZ]"), m_sKarusGateZ); RFX_Long(pFX, _T("[sElmoGateX]"), m_sElmoGateX); RFX_Long(pFX, _T("[sElmoGateZ]"), m_sElmoGateZ); // //}}AFX_FIELD_MAP } ///////////////////////////////////////////////////////////////////////////// // CStartPositionSet diagnostics #ifdef _DEBUG void CStartPositionSet::AssertValid() const { CRecordset::AssertValid(); } void CStartPositionSet::Dump(CDumpContext& dc) const { CRecordset::Dump(dc); } #endif //_DEBUG
############################
Yeni Eklenecek Dosya StartPositionSet.h
############################
Kod:
#if !defined(AFX_STARTPOSITIONSET_H__496F83FF_F4B8_4DBF_803B_BA8E741D9FDB__INCLUDED_) #define AFX_STARTPOSITIONSET_H__496F83FF_F4B8_4DBF_803B_BA8E741D9FDB__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // StartPositionSet.h : header file // ///////////////////////////////////////////////////////////////////////////// // CStartPositionSet recordset class CStartPositionSet : public CRecordset { public: CStartPositionSet(CDatabase* pDatabase = NULL); DECLARE_DYNAMIC(CStartPositionSet) // Field/Param Data //{{AFX_FIELD(CStartPositionSet, CRecordset) long m_ZoneID; long m_sKarusX; long m_sKarusZ; long m_sElmoradX; long m_sElmoradZ; BYTE m_bRangeX; BYTE m_bRangeZ; // long m_sKarusGateX; long m_sKarusGateZ; long m_sElmoGateX; long m_sElmoGateZ; // //}}AFX_FIELD // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CStartPositionSet) public: virtual CString GetDefaultConnect(); // Default connection string virtual CString GetDefaultSQL(); // Default SQL for Recordset virtual void DoFieldExchange(CFieldExchange* pFX); // RFX support //}}AFX_VIRTUAL // Implementation #ifdef _DEBUG virtual void AssertValid() const; virtual void Dump(CDumpContext& dc) const; #endif }; //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_STARTPOSITIONSET_H__496F83FF_F4B8_4DBF_803B_BA8E741D9FDB__INCLUDED_)
##################################
Bu İki Dosyayı Projemize Ekliyoruz...
EbenezerDlg.cpp Değiliklikleri ;
Aranacak : #include "HomeSet.h"
Üstüne Eklenecek : #include "StartPositionSet.h"
Aranacak : if( LoadHomeTable() == FALSE ){
Üstüne Eklenecek ;
##################################
Kod:
if( LoadStartPositionTable() == FALSE ){ AfxMessageBox("LoadStartPositionTable Load Fail"); AfxPostQuitMessage(0); return FALSE; }
#############################
Aranacak : if ( !m_HomeArray.IsEmpty() )
Üstüne Eklenecek ;
#############################
--------------------------------------------------
Kod:
if ( !m_StartPositionArray.IsEmpty() ) m_StartPositionArray.DeleteAllData();
Aranacak : CEbenezerDlg::LoadHomeTable()
Üstüne Eklencek ;
---------------------------------------------------
Kod:
BOOL CEbenezerDlg::LoadStartPositionTable() { CStartPositionSet StartPositionSet; if( !StartPositionSet.Open() ) { AfxMessageBox(_T("Start Position Data Open Fail!")); return FALSE; } if(StartPositionSet.IsBOF() || StartPositionSet.IsEOF()) { AfxMessageBox(_T("Start Position Data Empty!")); return FALSE; } StartPositionSet.MoveFirst(); while( !StartPositionSet.IsEOF() ) { _START_POSITIONINFO* pStartPositionSet = new _START_POSITIONINFO; pStartPositionSet->ZoneID= StartPositionSet.m_ZoneID; pStartPositionSet->sKarusX = StartPositionSet.m_sKarusX; pStartPositionSet->sKarusZ = StartPositionSet.m_sKarusZ; pStartPositionSet->sElmoradX = StartPositionSet.m_sElmoradX; pStartPositionSet->sElmoradZ = StartPositionSet.m_sElmoradZ; pStartPositionSet->bRangeX = StartPositionSet.m_bRangeX; pStartPositionSet->bRangeZ = StartPositionSet.m_bRangeZ; // pStartPositionSet->sKarusGateX = StartPositionSet.m_sKarusGateX; pStartPositionSet->sKarusGateZ = StartPositionSet.m_sKarusGateZ; pStartPositionSet->sElmoGateX = StartPositionSet.m_sElmoGateX; pStartPositionSet->sElmoGateZ = StartPositionSet.m_sElmoGateZ; // if( !m_StartPositionArray.PutData(pStartPositionSet->ZoneID, pStartPositionSet) ) { TRACE("Start Position PutData Fail - %d\n", pStartPositionSet->ZoneID ); delete pStartPositionSet; pStartPositionSet = NULL; } StartPositionSet.MoveNext(); } return TRUE; }
##################################################
Şimdi GameDefine.h Açıyoruz, struct _HOME_INFO Arıyoruz ve Üzerine Aşağadaki Structumuzu Ekliyoruz...
##################################################
Kod:
struct _START_POSITIONINFO { float ZoneID; float sKarusX; float sKarusZ; float sElmoradX; float sElmoradZ; BYTE bRangeX; BYTE bRangeZ; float sKarusGateX; float sKarusGateZ; float sElmoGateX; float sElmoGateZ; };
#################################################
Bu Kadar Artık Town Koordinatları START_POSITION Tablosuna Bağlanmış Olacaktır.. Kolay Gelsin..
#################################################
START_POSITION Tablosu Nedir?
Knight Online özel sunucularında (pserver), oyuncuların oyun içi konumlarını yönetmek ve başlatma noktalarını belirlemek için önemli bir yapıdır START_POSITION tablosu. Bu tablo, oyuncu karakterlerinin sunucuya giriş yaptığında hangi koordinatlarda belireceğini tanımlar. Özellikle özel sunucu geliştiricileri için, farklı şehirlere veya özel bölgelere yönlendirme yapabilmek amacıyla bu tabloya müdahale edilir.
START_POSITION Tablosunun Yapısı
Genellikle veritabanında bulunan START_POSITION tablosu şu sütunları içerir:
- strAccountID: Oyuncunun hesap kimliği.
- strCharID1: Karakterin adı.
- ZoneNo: Bulunduğu bölge numarası (örneğin: Delos, Ronark).
- x, y, z: Oyuncunun spawn olacağı koordinatlar.
- sAddPoint: Ekstra puan gibi düşünülebilir, bazı özel durumlarda kullanılır.
Neden START_POSITION Tablosuna Bağlanılır?
Özel sunucularda oyuncuların belirli bölgelerde başlamasını sağlamak isteyen geliştiriciler, bu tabloya özel giriş koordinatları ekleyerek oyuncuları doğrudan savaş alanlarına, PvP bölgelerine veya özel sunucu olay alanlarına yönlendirebilir. Bu, kullanıcı deneyimini artırmak ve sunucuya özgü oynanış kuralları oluşturmak için oldukça etkilidir.
Tabloya Veri Ekleme İşlemi
Veritabanında bulunan START_POSITION tablosuna manuel olarak yeni satırlar eklenerek, oyuncuların giriş konumları ayarlanabilir. Örneğin, bir oyuncu belirli bir bölgeye girmek istediğinde, onun için özel olarak hazırlanmış bir konuma yönlendirilmesi sağlanabilir. Bu işlem genellikle INSERT INTO komutu ile yapılır.
Dikkat Edilmesi Gerekenler
Bu tabloya yapılan değişiklikler, oyuncu girişlerinde doğrudan etkili olur. Yanlış koordinat girildiğinde oyuncular harita dışı bir alana düşebilir veya hata alabilir. Bu nedenle, koordinatların doğru ve test edilmiş olması büyük önem taşır. Ayrıca, sunucu dosyalarında (serverfiles) bu tablonun doğru şekilde tanımlandığından emin olunmalıdır.
START_POSITION ve Sunucu Geliştirme
Knight Online özel sunucu geliştiricileri, START_POSITION tablosunu kullanarak PvP sunucularında oyuncuların başlangıç bölgelerini belirleyebilir, PvE sunucularda ise oyuncuların doğrudan kutsal alanlara yönlendirilmesini sağlayabilir. Bu sayede oyun akışı daha kontrollü hale getirilir. Bu tablo, aynı zamanda sunucu olayları için de stratejik bir araçtır.
KnightLobby.com ile Özel Sunucu Geliştirme
KnightLobby.com, Knight Online özel sunucu geliştirme konusunda birçok kaynak sunar. START_POSITION tablosu gibi teknik yapıların nasıl kullanılacağına dair bilgi alabileceğiniz forumlar, rehberler ve örnek kodlar mevcuttur. Özel sunucu geliştiricileri için kapsamlı destek sağlar.
What is the START_POSITION Table?
In Knight Online private servers (pserver), the START_POSITION table is crucial for managing player locations and defining starting points within the game. This table determines where player characters will appear upon logging into the server. For private server developers, modifying this table allows directing players to different cities or custom areas.
Structure of the START_POSITION Table
The START_POSITION table typically includes these columns in the database:
- strAccountID: Player's account ID.
- strCharID1: Character name.
- ZoneNo: Zone number (e.g., Delos, Ronark).
- x, y, z: Spawn coordinates for the player.
- sAddPoint: May be used for additional points or special cases.
Why Connect to the START_POSITION Table?
Developers who want players to start in specific regions can use this table to direct them directly to battlefields, PvP zones, or event areas unique to the server. This enhances the gaming experience and helps establish unique gameplay rules for the server.
Inserting Data into the Table
New entries can be manually added to the START_POSITION table in the database, allowing customization of entry locations for players. For example, a player can be directed to a specially prepared location when entering a certain area. This process is typically done with the INSERT INTO command.
Important Considerations
Changes made to this table directly affect player logins. Incorrect coordinates may cause players to fall outside the map or encounter errors. Therefore, it is essential that coordinates are accurate and tested. Additionally, ensure that the table is properly defined in server files (serverfiles).
START_POSITION and Server Development
Knight Online private server developers can use the START_POSITION table to define starting zones in PvP servers or direct players straight into sacred areas in PvE servers. This allows for more controlled gameplay flow. The table also serves as a strategic tool for server events.
Private Server Development with KnightLobby.com
KnightLobby.com provides numerous resources for Knight Online private server development. You can find guides, forums, and sample codes explaining how to use technical structures like the START_POSITION table. It offers comprehensive support for private server developers.
