الموقع العربي الاول للعبة Silkroad Online

الموقع العربي الاول للعبة Silkroad Online (https://silkroad4arab.com/vb/index.php)
-   قسم الشروحات و البرامج المستخدمة في عمل السيرفرات الخاصة (https://silkroad4arab.com/vb/forumdisplay.php?f=289)
-   -   SQL script for EquipmentsToInvenotry to fixed bugg item crash By Yui (https://silkroad4arab.com/vb/showthread.php?t=527782)

Yui 17-09-2013 05:16 AM

SQL script for EquipmentsToInvenotry to fixed bugg item crash By Yui
 
Hello Silkroad4arab


Today i will add new way to fixed item crash
example you use item get crash every time when login
this script will help you to solved this problem
all item will back to your Invenotry again
كود PHP:

USE [SRO_VT_SHARD]
GO
/****** Create By Yui SQL *****/
/****** Object:  StoredProcedure [dbo].[_emptyEquipmentsToInvenotry]    Script Date: 23/09/2012 07:37:38 م ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO


-- =============================================
-- 
Author:        Megaman
-- Create dateNo specific date
-- Description:    Uneqiupment all WeaponsArmors and Accessories from Character
-- =============================================
CREATE PROCEDURE [dbo].[_emptyEquipmentsToInvenotry]
    -- 
Add the parameters for the stored procedure here
    
@charname16 varchar (16)
AS
BEGIN
    
-- SET NOCOUNT ON added to prevent extra result sets from
    
-- interfering with SELECT statements.
    
SET NOCOUNT ON;
    Declare @
intFlag1 INT -- For Slots
    
Declare @intFlag2 INT -- For Equipments Slots
    
Declare @Flag2Permission INT -- Permissions for Equipments slots
    
Declare @ITEMID INT -- For Gathering ItemID as Temporary
    
Declare @CharID INT -- For Gathering Character ID
    SET 
@intFlag1 13
    SET 
@intFlag2 0
    SET 
@Flag2Permission 0
    
    
-- Checking before starting Actions
    
IF not exists (select CharID from _Char where CharName16 = @charname16)
        
BEGIN
            
Return --- The character is not exists
        END
    SET 
@CharID = (select CharID from _Char where CharName16 = @charname16)
    
    -- 
WARNING !! WARNING !! Starting Actions !! WARNING !! WARNING
    
WHILE (@intFlag1 <=109)
    
Begin
        
IF (select i.ItemID from _Inventory i where i.CharID = @CharID and i.Slot = @intFlag1) = 0
        BEGIN
            SET 
@Flag2Permission 1
            
WHILE (@intFlag2 <= 12) and (@Flag2Permission 1)
            
BEGIN
                
IF (select ItemID from _Inventory where Slot = @intFlag2 and CharID = @CharID) != 0
                BEGIN
                    
-- Checking If ITEMID is not Dummy object
                    
IF (select ItemID from _Inventory where Slot = @intFlag2 and CharID = @CharID) = 0
                    BEGIN
                        
Return --- ITEM is selected wrongly
                    END
                    SET 
@ITEMID = (select ItemID from _Inventory where Slot = @intFlag2 and CharID = @CharID)
                    
UPDATE _Inventory set ItemID = @ITEMID where CharID = @CharID and Slot = @intFlag1
                    Update _Inventory Set ItemID 
0 where CharID = @CharID and Slot = @intFlag2
                END
                SET 
@intFlag2 = @intFlag2 1
                SET 
@Flag2Permission 0
            END
        END
    SET 
@intFlag1 = @intFlag1 1
    END
END
            
GO 


كود PHP:

exec dbo._emptyEquipmentsToInvenotry Character Name

i hope this script will help owner of serve's

MyRȝturn 17-09-2013 10:12 PM

Thx Again :)

Golden sro 17-09-2013 10:18 PM

الله ينور

Ch3tos 22-09-2013 11:38 PM

ميهـ ميهـ

Hoka 23-09-2013 08:01 PM

انا ضفت Stones اللي هيا drop من ال rock بس 5 اشتغلوا و 3 لا مش عارف ليه
Magic stone of Sharpness
Magic stone of IronShield
Magic stone of Guardian
Magic stone of Sorrow
Magic stone of IronHeard
و الباقي لما بكتبهم جوا الجيم بيقولي key fail
Magic stone of Devil
Magic stone of Abyss
Magic stone of Incandescence
هل الكويري دي ممكن تصلح ده ؟

Mostafa Mosaad 25-09-2013 09:59 PM

تمامـ يا كبير :character47:

Tigger 14-05-2014 01:34 AM

تسلم ياكبير وجارى التجربه:nono:


الساعة الآن 07:39 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions, Inc.