Inventory editor çalıştırmak.(SQL 2008)

  • Konbuyu başlatan Konbuyu başlatan Admin
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 0
  • Görüntüleme Görüntüleme 109

Admin

Knight Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
45,967
mevcut olanları silin, bunlara bi f5 çakın tamamdır:f:



Kod:
USE [kn_online] GO /****** Object:  StoredProcedure [dbo].[itemleri_bul]    Script Date: 01/17/2013 00:14:55 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER OFF GO Create procedure [dbo].[itemleri_bul] @StrUserID varchar(30) AS DECLARE @length int, -- stritem uzunluğu @i int, -- item'in stritem deki yeri @dwid int, @dur int, @duar int, @StackSize1 int, @Sira int, @Row int, @name varchar(100), @extname varchar(100), @ext int set @i = 14*0+1 set @length = 601 select @row=count(*) from userdata where struserid=@StrUserID delete from itemler where struserid=@StrUserID if @row>0 begin WHILE @i < @length Begin Select @dwid=cast(cast(substring(cast(substring(strItem, @i,4) as varbinary(4)), 4, 1)+substring(cast(substring(strItem, @i,4) as varbinary(4)), 3, 1)+substring(cast(substring(strItem, @i,4) as varbinary(4)), 2, 1)+substring(cast(substring(strItem, @i,4) as varbinary(4)), 1, 1) as varbinary(4)) as int), @dur = cast(cast(cast( substring(strItem, @i+5, 1) as varbinary(1))+cast(substring(strItem, @i+4, 1) as varbinary(1)) as varbinary(2)) as int), @StackSize1 = cast(cast(cast( substring(strItem, @i+7, 1) as varbinary(1))+cast(substring(strItem, @i+6, 1) as varbinary(1)) as varbinary(2)) as int), @StrUserID = strUserID From UserData Where strUserID = @StrUserID insert into itemler (dwid,stacksize,durability,struserid,sira,itembasicname,extname) values(@dwid,@stacksize1,@dur,@StrUserID,(@i-1) / 8,@extname,@name ) set @i=@i+8 end end



Kod:
USE [kn_online] GO /****** Object:  StoredProcedure [dbo].[itemleri_encode]    Script Date: 01/17/2013 00:15:45 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER OFF GO Create procedure [dbo].[itemleri_encode] @StrUserID varchar(30) AS DECLARE @length int, -- stritem uzunluğu @row int, -- yerine göre deişior. @i int, -- item'in stritem deki yeri @dwid int, -- dwid @pos int, @dur int, @dur1 int, @ext int, @StackSize1 int, @strName varchar(30), @strExtName varchar(30), @Cdwid varbinary(4), @cdur varchar(2), @Source tinyint, @NEWdwid int, @StackSize int, @cstack varchar(2), @sira int set @sira=0 set @i = 14*0 set @length = 601 select @row=count( * ) from userdata where struserid=@StrUserID if @row>0 begin Select @dwid=dwid, @dur = durability, @StackSize1 = stacksize, @StrUserID = strUserID From itemler Where strUserID = @StrUserID and sira=@sira Set @Cdwid = Substring(cast(@dwid as varbinary(4)), 4, 1) + Substring(cast(@dwid as varbinary(4)), 3, 1) + Substring(cast(@dwid as varbinary(4)), 2, 1) + Substring(cast(@dwid as varbinary(4)), 1, 1) Set @Cdur = cast(Substring(cast(@dur as varbinary(2)), 2, 1)+Substring(cast(@dur as varbinary(2)), 1, 1) as varchar(2)) Set @Cstack = cast(Substring(cast(@StackSize1 as varbinary(2)), 2, 1)+Substring(cast(@StackSize1 as varbinary(2)), 1, 1) as varchar(2)) update UserData set strItem = cast(cast(cast(@Cdwid as varchar(4)) + @Cdur + @Cstack as varchar(8)) as binary(600)) where strUserID = @strUserID set @i=@i+8 set @sira=@sira+1 WHILE @sira < 50 Begin Select @dwid=dwid, @dur = durability, @StackSize1 = stacksize, @StrUserID = strUserID From itemler Where strUserID = @StrUserID and sira=@sira Set @Cdwid = Substring(cast(@dwid as varbinary(4)), 4, 1) + Substring(cast(@dwid as varbinary(4)), 3, 1) + Substring(cast(@dwid as varbinary(4)), 2, 1) + Substring(cast(@dwid as varbinary(4)), 1, 1) Set @Cdur = cast(Substring(cast(@dur as varbinary(2)), 2, 1)+Substring(cast(@dur as varbinary(2)), 1, 1) as varchar(2)) Set @Cstack = cast(Substring(cast(@StackSize1 as varbinary(2)), 2, 1)+Substring(cast(@StackSize1 as varbinary(2)), 1, 1) as varchar(2)) update UserData set strItem = cast( substring(strItem, 1, @i) + cast(cast(@Cdwid as varchar(4)) + @Cdur + @Cstack as varchar(8)) + substring(strItem, @i+8, 601-@i) as binary(600)) where strUserID = @strUserID set @i=@i+8 set @sira=@sira+1 end end delete from itemler

Inventory Editor çalıştırmak (SQL 2008)

Knight Online özel sunucularında geliştirme yaparken, özellikle veritabanı üzerinde değişiklikler yapmak isteyen geliştiriciler için Inventory Editor, önemli bir araçtır. Bu araç sayesinde oyuncu envanterleri, eşyalar ve karakter verileri üzerinde doğrudan düzenlemeler yapılabilir. Ancak bu işlem sırasında dikkatli olunması gerekir çünkü hatalı bir işlem sunucuda ciddi sorunlara yol açabilir. Bu makalede, SQL Server 2008 ortamında Inventory Editor'ün nasıl çalıştırılacağı detaylı olarak anlatılacaktır.

Gerekli Ortamın Hazırlanması

Knight Online özel sunucularında Inventory Editor kullanabilmek için öncelikle doğru veritabanı ortamına sahip olmanız gerekir. Genellikle KO geliştiricileri Microsoft SQL Server 2008 sürümünü tercih eder. Bu sürüm, hem eski sistemlerle uyumlu hem de KO veritabanı dosyalarıyla çalışması açısından idealdir. Ayrıca, Inventory Editor genellikle Visual Studio veya benzeri bir geliştirme ortamında derlenmiş uygulamalardan oluşur. Bu nedenle, .NET Framework yüklü olması da önemlidir.

Knight Online özel sunucularında geliştirme yaparken kullanılan veritabanları genellikle 'KO_GameServer' ve 'KO_User' adlarında iki ayrı veritabanını içerir. Inventory Editor bu veritabanlarına doğrudan bağlanarak çalışır.

Inventory Editor Uygulamasının Kurulumu

Inventory Editor, genellikle bir EXE dosyası olarak sunulur. Bu uygulama, geliştirici tarafından paylaşılan KO sunucu dosyaları arasında bulunabilir. Eğer uygulama mevcut değilse, internet üzerinden güvenilir kaynaklardan indirilebilir. Ancak mutlaka virüs taramasından geçirilmelidir. Uygulama başlatıldığında, veritabanına bağlanmak için kullanıcı adı, şifre ve server bilgileri istenir. Burada doğru veritabanı sunucusu bilgileri girilmelidir.

Bağlantı Ayarlarının Yapılması

Inventory Editor başlatıldığında, karşınıza bağlantı penceresi gelir. Burada SQL Server 2008 ortamınızın IP adresi, kullanıcı adı ve şifresi girilmelidir. Örneğin, localhost kullanıyorsanız server kısmına 'localhost' veya '.' yazabilirsiniz. Kullanıcı adı genellikle 'sa' olabilir ancak güvenlik açısından başka bir kullanıcı oluşturulması önerilir. Veritabanı olarak ise 'KO_GameServer' seçilmelidir. Bağlantı sağlandığında, envanter verilerine erişim sağlanabilir.

Envanter Verileri Üzerinde Değişiklik Yapmak

Inventory Editor ile oyuncuların envanterlerinde bulunan eşyalar, karakter seviyesi, TP miktarı gibi veriler üzerinde doğrudan değişiklik yapılabilir. Bu özellik, test süreçlerinde oldukça faydalıdır. Örneğin bir oyuncunun envanterine belirli bir eşyayı eklemek istiyorsanız, önce o karakterin ID'sini bulmanız gerekir. Sonrasında envanter tablosuna giderek, boş slotlara yeni eşya ekleyebilirsiniz. Eşya ID'leri genellikle item.bin dosyasında tanımlanmıştır.

Dikkat: Hatalı veri girişi, karakterlerin silinmesine veya sunucuda çökme yaşanmasına neden olabilir. Her işlem öncesi veritabanı yedek alınmalıdır.

Sunucu ile Senkronizasyon

Inventory Editor ile yapılan değişiklikler veritabanında doğrudan yapılır. Ancak bu değişikliklerin sunucu tarafında aktif olarak görünmesi için bazı durumlarda sunucunun yeniden başlatılması gerekebilir. Özellikle oyuncu aktifken yapılan değişiklikler, sunucu yeniden başlatılmadan yansımayabilir. Bu yüzden test sürecinde sunucuyu durdurup başlatmak iyi bir yöntemdir.

Sonuç

Inventory Editor, Knight Online özel sunucu geliştiricileri için güçlü bir araçtır. Ancak bu gücün farkında olarak dikkatli kullanılmalıdır. SQL Server 2008 ile uyumlu çalışan bu araç, doğru yapılandırmalarla birlikte veritabanı üzerinde hızlı ve etkili değişiklikler yapmanıza olanak tanır. Geliştirme ve test süreçlerinde büyük kolaylık sağlar. Knight Lobby gibi platformlar üzerinden paylaşılan sunucu dosyaları ile birlikte.Inventory Editor kullanımı daha da kolay hale gelmektedir.


Running Inventory Editor (SQL 2008)

When developing Knight Online private servers, Inventory Editor is an essential tool for developers who need to make direct changes to the database, especially concerning player inventories, items, and character data. However, caution must be exercised during this process, as incorrect operations can lead to serious issues on the server. This article will detail how to run the Inventory Editor within the SQL Server 2008 environment.

Preparing the Required Environment

To use the Inventory Editor on Knight Online private servers, you first need to have the correct database environment. Generally, KO developers prefer Microsoft SQL Server 2008. This version is both compatible with older systems and ideal for working with KO database files. Additionally, the Inventory Editor is often an application compiled using environments like Visual Studio, so having .NET Framework installed is also important.

The databases used in Knight Online private server development typically consist of two separate databases named 'KO_GameServer' and 'KO_User'. The Inventory Editor connects directly to these databases to operate.

Installing the Inventory Editor Application

The Inventory Editor is usually provided as an EXE file. It can often be found among the server files shared by developers. If the application is not available, it can be downloaded from trusted sources online. However, it should definitely be scanned for viruses. When launched, the application requests username, password, and server information to connect to the database. Correct database server details must be entered here.

Configuring Connection Settings

Upon launching the Inventory Editor, a connection window appears. Here, you need to enter the IP address, username, and password of your SQL Server 2008 instance. For example, if using localhost, you can write 'localhost' or '.' in the server field. The username is usually 'sa', but for security reasons, it's recommended to create another user. The database should be selected as 'KO_GameServer'. Once connected, access to inventory data is granted.

Making Changes to Inventory Data

With the Inventory Editor, you can directly modify data such as items in players' inventories, character levels, and TP amounts. This feature is particularly useful during testing phases. For instance, if you want to add a specific item to a player's inventory, you first need to find that character's ID. Then, go to the inventory table and add the new item to empty slots. Item IDs are generally defined in the item.bin file.

Caution: Incorrect data entry may cause characters to be deleted or crashes on the server. Always take a backup of the database before any operation.

Synchronization with the Server

Changes made through the Inventory Editor are applied directly to the database. However, for these changes to appear actively on the server side, the server might sometimes need to be restarted. Particularly, changes made while a player is active may not reflect until the server is restarted. Therefore, restarting the server during testing phases is a good practice.

Conclusion

Inventory Editor is a powerful tool for developers of Knight Online private servers. However, it must be used carefully, aware of its power. With proper configurations, this tool, compatible with SQL Server 2008, allows quick and effective changes to the database. It greatly facilitates development and testing processes. With server files shared via platforms like Knight Lobby, using the Inventory Editor becomes even easier.
 

Şuan Bu Konuyu Görüntüleyen Kullanıcılar (Toplam : 0, Üye : 0, Misafir : 0)

Benzer konular

Geri
Üst Alt