- Katılım
- 6 Mayıs 2022
- Mesajlar
- 45,967
AŞAĞIDAKİ KODU QA'YA UYGULAYINIZ. BU SAYEDE IRK DEĞISTIRME AKTİF HALE GELECEKTİR
Bu Dosya Demir Tarafından Paylaşılmıştır.
Lütfen Tesekkür Etmeyi Unutmayınız.
Dilek Ve Sikayetleriniz İçin
Skype : Demirbilisim
Kod:
CREATE PROCEDURE [dbo].[ACCOUNT_NATION_CHANGE] @strAccountID as varchar(40), @Nation as tinyint AS DECLARE @strNation tinyint [MENTION=2874]class[/MENTION] int,@Race int,@strCharID1 char(21), @strCharID2 char(21), @strCharID3 char(21) SELECT @strNation = bNation,@strCharID1 = strCharID1,@strCharID2 = strCharID2,@strCharID3 = strCharID3 FROM ACCOUNT_CHAR WHERE strAccountID = @strAccountID SET [MENTION=2874]class[/MENTION] = null SET @Race = null IF @Nation = 1 and @strNation = 2 BEGIN SELECT [MENTION=2874]class[/MENTION] = Class,@Race = Race FROM USERDATA WHERE strUserID = @strCharID1 IF [MENTION=2874]class[/MENTION] = 201 OR [MENTION=2874]class[/MENTION] = 205 OR [MENTION=2874]class[/MENTION] = 206 BEGIN SET @Race = 1 END IF [MENTION=2874]class[/MENTION] = 202 OR [MENTION=2874]class[/MENTION] = 207 OR [MENTION=2874]class[/MENTION] = 208 BEGIN SET @Race = 2 END IF [MENTION=2874]class[/MENTION] = 203 OR [MENTION=2874]class[/MENTION] = 209 OR [MENTION=2874]class[/MENTION] = 210 BEGIN SET @Race = 3 END IF [MENTION=2874]class[/MENTION] = 204 OR [MENTION=2874]class[/MENTION] = 211 OR [MENTION=2874]class[/MENTION] = 211 BEGIN IF @Race = 12 BEGIN SET @Race = 4 END ELSE BEGIN SET @Race = 2 END END UPDATE USERDATA SET Nation = @Nation,Race = @Race,Class = [MENTION=2874]class[/MENTION] - 100 WHERE strUserID = @strCharID1 DELETE FROM KNIGHTS_USER WHERE strUserID = @strCharID1 SELECT [MENTION=2874]class[/MENTION] = Class,@Race = Race FROM USERDATA WHERE strUserID = @strCharID2 IF [MENTION=2874]class[/MENTION] = 201 OR [MENTION=2874]class[/MENTION] = 205 OR [MENTION=2874]class[/MENTION] = 206 BEGIN SET @Race = 1 END IF [MENTION=2874]class[/MENTION] = 202 OR [MENTION=2874]class[/MENTION] = 207 OR [MENTION=2874]class[/MENTION] = 208 BEGIN SET @Race = 2 END IF [MENTION=2874]class[/MENTION] = 203 OR [MENTION=2874]class[/MENTION] = 209 OR [MENTION=2874]class[/MENTION] = 210 BEGIN SET @Race = 3 END IF [MENTION=2874]class[/MENTION] = 204 OR [MENTION=2874]class[/MENTION] = 211 OR [MENTION=2874]class[/MENTION] = 211 BEGIN IF @Race = 12 BEGIN SET @Race = 4 END ELSE BEGIN SET @Race = 2 END END UPDATE USERDATA SET Nation = @Nation,Race = @Race,Class = [MENTION=2874]class[/MENTION] - 100 WHERE strUserID = @strCharID2 DELETE FROM KNIGHTS_USER WHERE strUserID = @strCharID2 SELECT [MENTION=2874]class[/MENTION] = Class,@Race = Race FROM USERDATA WHERE strUserID = @strCharID3 IF [MENTION=2874]class[/MENTION] = 201 OR [MENTION=2874]class[/MENTION] = 205 OR [MENTION=2874]class[/MENTION] = 206 BEGIN SET @Race = 1 END IF [MENTION=2874]class[/MENTION] = 202 OR [MENTION=2874]class[/MENTION] = 207 OR [MENTION=2874]class[/MENTION] = 208 BEGIN SET @Race = 2 END IF [MENTION=2874]class[/MENTION] = 203 OR [MENTION=2874]class[/MENTION] = 209 OR [MENTION=2874]class[/MENTION] = 210 BEGIN SET @Race = 3 END IF [MENTION=2874]class[/MENTION] = 204 OR [MENTION=2874]class[/MENTION] = 211 OR [MENTION=2874]class[/MENTION] = 211 BEGIN IF @Race = 12 BEGIN SET @Race = 4 END ELSE BEGIN SET @Race = 2 END END UPDATE USERDATA SET Nation = @Nation,Race = @Race,Class = [MENTION=2874]class[/MENTION] - 100 WHERE strUserID = @strCharID3 DELETE FROM KNIGHTS_USER WHERE strUserID = @strCharID3 UPDATE ACCOUNT_CHAR SET bNation = @Nation WHERE strAccountID = @strAccountID END IF @Nation = 2 and @strNation = 1 BEGIN SELECT [MENTION=2874]class[/MENTION] = Class,@Race = Race FROM USERDATA WHERE strUserID = @strCharID1 IF [MENTION=2874]class[/MENTION] = 101 OR [MENTION=2874]class[/MENTION] = 105 OR [MENTION=2874]class[/MENTION] = 106 BEGIN SET @Race = 12 END IF [MENTION=2874]class[/MENTION] = 102 OR [MENTION=2874]class[/MENTION] = 107 OR [MENTION=2874]class[/MENTION] = 108 BEGIN SET @Race = 12 END IF [MENTION=2874]class[/MENTION] = 103 OR [MENTION=2874]class[/MENTION] = 109 OR [MENTION=2874]class[/MENTION] = 110 BEGIN SET @Race = 12 END IF [MENTION=2874]class[/MENTION] = 104 OR [MENTION=2874]class[/MENTION] = 111 OR [MENTION=2874]class[/MENTION] = 111 BEGIN IF @Race = 4 BEGIN SET @Race = 12 END ELSE BEGIN SET @Race = 13 END END UPDATE USERDATA SET Nation = @Nation,Race = @Race,Class = [MENTION=2874]class[/MENTION] + 100 WHERE strUserID = @strCharID1 DELETE FROM KNIGHTS_USER WHERE strUserID = @strCharID1 SELECT [MENTION=2874]class[/MENTION] = Class,@Race = Race FROM USERDATA WHERE strUserID = @strCharID2 IF [MENTION=2874]class[/MENTION] = 101 OR [MENTION=2874]class[/MENTION] = 105 OR [MENTION=2874]class[/MENTION] = 106 BEGIN SET @Race = 12 END IF [MENTION=2874]class[/MENTION] = 102 OR [MENTION=2874]class[/MENTION] = 107 OR [MENTION=2874]class[/MENTION] = 108 BEGIN SET @Race = 12 END IF [MENTION=2874]class[/MENTION] = 103 OR [MENTION=2874]class[/MENTION] = 109 OR [MENTION=2874]class[/MENTION] = 110 BEGIN SET @Race = 12 END IF [MENTION=2874]class[/MENTION] = 104 OR [MENTION=2874]class[/MENTION] = 111 OR [MENTION=2874]class[/MENTION] = 111 BEGIN IF @Race = 4 BEGIN SET @Race = 12 END ELSE BEGIN SET @Race = 13 END END UPDATE USERDATA SET Nation = @Nation,Race = @Race,Class = [MENTION=2874]class[/MENTION] + 100 WHERE strUserID = @strCharID2 DELETE FROM KNIGHTS_USER WHERE strUserID = @strCharID2 SELECT [MENTION=2874]class[/MENTION] = Class,@Race = Race FROM USERDATA WHERE strUserID = @strCharID3 IF [MENTION=2874]class[/MENTION] = 101 OR [MENTION=2874]class[/MENTION] = 105 OR [MENTION=2874]class[/MENTION] = 106 BEGIN SET @Race = 12 END IF [MENTION=2874]class[/MENTION] = 102 OR [MENTION=2874]class[/MENTION] = 107 OR [MENTION=2874]class[/MENTION] = 108 BEGIN SET @Race = 12 END IF [MENTION=2874]class[/MENTION] = 103 OR [MENTION=2874]class[/MENTION] = 109 OR [MENTION=2874]class[/MENTION] = 110 BEGIN SET @Race = 12 END IF [MENTION=2874]class[/MENTION] = 104 OR [MENTION=2874]class[/MENTION] = 111 OR [MENTION=2874]class[/MENTION] = 111 BEGIN IF @Race = 4 BEGIN SET @Race = 12 END ELSE BEGIN SET @Race = 13 END END UPDATE USERDATA SET Nation = @Nation,Race = @Race,Class = [MENTION=2874]class[/MENTION] + 100 WHERE strUserID = @strCharID3 DELETE FROM KNIGHTS_USER WHERE strUserID = @strCharID3 UPDATE ACCOUNT_CHAR SET bNation = @Nation WHERE strAccountID = @strAccountID END GO
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
Bu Dosya Demir Tarafından Paylaşılmıştır.
Lütfen Tesekkür Etmeyi Unutmayınız.
Dilek Ve Sikayetleriniz İçin
Skype : Demirbilisim
Irk Değiştirmeyi Aktif Etmek
Knight Online özel sunucularında irk değiştirme işlemi, oyuncuların karakterlerinin sınıfını veya cinsiyetini değiştirebilmesi için geliştirici tarafından aktif edilmesi gereken bir özelliktir. Bu işlem genellikle sunucu dosyalarında belirli ayarların değiştirilmesiyle sağlanır.
Sunucu Tarafında Ayarlar
Irk değiştirme özelliğini aktif etmek için önce sunucu tarafında gerekli ayarlamaların yapılması gerekir. Bu ayarlar genellikle server files dosyaları içerisinde yer alır. Özellikle npc.bin veya mob.bin gibi dosyalarda irk değiştirme görevini üstlenen NPC'lerin doğru şekilde tanımlanmış olması gerekir. Bu NPC'ler genellikle bir selection menu üzerinden oyuncuya seçenek sunar.
Database Ayarları
Sunucu tarafında irk değiştirme işlemi için veritabanında da bazı değişiklikler yapılabilir. Özellikle ko database dosyasında oyuncu karakterlerinin sınıf bilgilerinin tutulduğu tablolarda gerekli güncellemelerin yapılması gerekir. Bu sayede oyuncu isteğinde sınıfı veya cinsiyeti sistemsel olarak değiştirilebilir.
Client-Side Geliştirmeler
Oyuncuların irk değiştirme işlemini kolay yapabilmesi için client tarafında da bazı geliştirmeler yapılabilir. Özellikle KO Client Edit işlemleri sırasında bu özellik kullanıcı dostu hale getirilebilir. Örneğin, bir menü arayüzü ile oyuncuların kolayca sınıf değiştirme işlemi yapması sağlanabilir.
NPC Tanımlamaları
Bu işlem için özel NPC'lerin hazırlanması gerekir. Bu NPC'lerin görevi oyuncudan sınıf veya cinsiyet seçimi almak ve ardından bu bilgiyi sunucuya göndermektir. Bu NPC'ler genellikle zone server üzerinde aktif edilir. NPC'lerin tanımı doğru yapılmazsa, oyuncu seçim yapamaz veya seçim sonrası hata alabilir.
Güvenlik ve Doğrulama
Irk değiştirme işlemi sırasında güvenlik önlemleri alınmalıdır. Özellikle Knight Online Guard veya benzeri koruma sistemleri ile bu işlemler filtrelenmelidir. Yanlışlıkla veya kötü niyetli kullanımlarla karakter bilgilerinin bozulmaması için doğrulama mekanizmaları aktif tutulmalıdır.
Sunucu Tipine Göre Uyum
Farklı sunucu tiplerinde (örneğin USKO, ROFD, iKO) irk değiştirme işlemi farklı şekillerde uygulanabilir. Bu nedenle geliştirme yaparken sunucu tipine özel dosya yapıları göz önünde bulundurulmalıdır.
Sonuç
Irk değiştirme özelliği, oyuncuların karakterlerini daha özgürce yönetebilmeleri için önemli bir özelliktir. Ancak doğru şekilde entegre edilmesi için hem sunucu hem de client tarafında detaylı geliştirmeler yapılması gerekir. Knight Lobby üzerinden sunucu geliştirme konusunda destek alabilir veya örnek dosyalara ulaşabilirsiniz.
Activating Race Change
In Knight Online private servers, race change is a feature that allows players to alter their character's class or gender, which must be enabled by the developer. This process typically involves modifying specific settings within the server files.
Server-Side Settings
To enable the race change feature, certain configurations must first be made on the server side. These settings are usually located within the server files. Specifically, NPCs responsible for race changes must be properly defined in files like npc.bin or mob.bin. These NPCs typically provide players with options via a selection menu.
Database Configurations
Database modifications may also be required for the race change operation. In particular, updates might be needed in the ko database file, where tables storing player class information must be adjusted. This ensures that the player's class or gender can be changed systematically upon request.
Client-Side Modifications
To make the race change process easier for players, some enhancements can be implemented on the client side. During KO Client Edit operations, this feature can be made more user-friendly. For instance, a menu interface can allow players to easily perform class changes.
NPC Definitions
Special NPCs must be prepared for this function. Their role is to receive the player's class or gender selection and send this information to the server. These NPCs are generally activated on the zone server. If the NPC definitions are not correctly configured, players may fail to make selections or encounter errors after choosing.
Security and Validation
Security measures must be taken during race change operations. Especially with protection systems like Knight Online Guard, these processes should be filtered. Validation mechanisms should remain active to prevent character data corruption due to accidental or malicious use.
Compatibility Based on Server Type
The race change process may vary across different server types (e.g., USKO, ROFD, iKO). Therefore, while developing, the file structures specific to the server type should be considered.
Conclusion
The race change feature is important for allowing players to manage their characters more freely. However, detailed developments on both server and client sides are necessary for proper integration. You can find support or sample files regarding server development at Knight Lobby.
