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

الموقع العربي الاول للعبة Silkroad Online (https://silkroad4arab.com/vb/index.php)
-   قسم المواضيع المكررة و المخالفة (https://silkroad4arab.com/vb/forumdisplay.php?f=58)
-   -   استفسار بخصوص Scroll remove advanced (https://silkroad4arab.com/vb/showthread.php?t=569984)

Hamza FiGo 20-10-2014 04:33 PM

استفسار بخصوص Scroll remove advanced
 
انا عملت 3 سكرولات تمام واشتغلو تمام وكل حاجة

Remove advanced elixir- Change char name - Reset stat points

بس لما عملت الاسكرولات دي حصل باج في الــ FGW لما حد يدخل بيجيلة DC

شيلت الــ Procedures بتاعتها وحطيت بتاعتي الاصلية الـ FGW اشتغلت تمام

سؤالي بقا اية المشكلة في الـ Procedures دي اللي في _AddTimedJob

كود:

USE [SRO_VT_SHARD]
GO
/****** Object:  StoredProcedure [dbo].[_AddTimedJob]    Script Date: 12/28/2013 22:12:00 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER  procedure [dbo].[_AddTimedJob]
@CharID            int,
@Category        tinyint,
@JobID            int,
@TimeToKeep    int,
@Data1            int,
@Data2            int,
--##begin due to develop composite item
@Data3            int,
@Data4            int,
@Data5            int,
@Data6            int,
@Data7            int,
@Data8            int,
@Serial64        bigint,
@JID            int
--##end due to develop composite item
as
      if(@JobID = '45000')
        BEGIN
declare @CharName16 varchar(64)
        Select @CharName16=CharName16 from _Char where CharID = @CharID
        Update _Char Set CharName16 = '@'+ @CharName16 Where CharID = @CharID
        END 
    if(@JobID = '45001')
        begin
            declare @Strength int
            declare @Intellect int
            declare @MaxLevel int
            declare @RemainStatPoint int
            select @MaxLevel = MaxLevel from _Char where CharID = @CharID
            set @RemainStatPoint = (@MaxLevel*3)-3
            set @MaxLevel = @MaxLevel+19
            UPDATE _Char SET Strength=@MaxLevel, Intellect=@MaxLevel, RemainStatPoint=@RemainStatPoint WHERE CharID=@CharID
        end 
if(@JobID        =        '34005')
begin

Update        _Char        Set        DailyPK        =        0        Where        CharID        =        @CharID
Update        _Char        Set        TotalPK        =        0        Where        CharID        =        @CharID
Update        _Char        Set        PKPenaltyPoint        =        0        Where        CharID        =        @CharID
end
    if(@JobID= '55000')
                begin
                        declare @TotalSP int
                        declare @TotalSPMastery int
                        SELECT @TotalSP = SUM(_RefSkill.ReqLearn_SP) FROM _RefSkill, _CharSkill WHERE _RefSkill.ID=_CharSkill.SkillID AND _CharSkill.CharID=@CharID AND _RefSkill.ReqCommon_MasteryLevel1 <= '130'
                        SELECT @TotalSPMastery = SUM(_RefLevel.Exp_M) FROM _CharSkillMastery, _RefLevel WHERE _RefLevel.Lvl=_CharSkillMastery.Level AND _CharSkillMastery.CharID=@CharID AND _CharSkillMastery.Level <= '130'
                        UPDATE _Char SET RemainSkillPoint=RemainSkillPoint+@TotalSP+@TotalSPMastery+200000 WHERE CharID=@CharID
                        DELETE _CharSkill FROM _RefSkill, _CharSkill WHERE _RefSkill.ID=_CharSkill.SkillID AND _CharSkill.CharID=@CharID AND _RefSkill.ReqCommon_MasteryLevel1 <= '130' AND _RefSkill.ID NOT IN (1,70,40,2,8421,9354,9355,11162,9944,8419,8420,11526,10625)
                        UPDATE _CharSkillMastery SET Level='0' WHERE CharID=@CharID AND Level <= '130'
                end 
                if(@JobID= '34038')
                begin
                        Update _Items Set MagParamNum = 0, MagParam1 = NULL, MagParam2 = NULL, MagParam3 = NULL, MagParam4 = NULL, MagParam5 = NULL, MagParam6 = NULL, MagParam7 = NULL, MagParam8 = NULL, MagParam9 = NULL, MagParam10 = NULL, MagParam11 = NULL, MagParam12 = NULL where ID64 in (select ItemID from _Inventoryforavatar where CharID = @CharID and Slot between 0 and 2 and ItemID>0)
                end
       
    if(@JobID= '34003') --
                begin
                Select @CharName16=CharName16 from _Char where CharID = @CharID
                begin
                DELETE FROM  _BindingOptionWithItem where nItemDBID IN (SELECT ItemID FROM _Inventory
                WHERE  CharID=@CharID) and bOptType=2
                end
                end
      if(@JobID = '45010')---gift---
        begin
                    declare @tradenum  int
                    declare @gift varchar(128)
                    set @gift =('ITEM_ETC_SD_TOKEN_02')
                    SET @tradenum =(SELECT ABLECOUNT from _CharTrijobSafeTrade where CharID =@CharID )       
    if (@tradenum >=1)
    begin
select @CharName16 =CharName16  from _Char where CharID=@CharID
exec _ADD_ITEM_EXTERN @CharName16,@gift,10,1
update _CharTrijobSafeTrade set AbleCount =0 where CharID =@CharID
end
end

if
(@JobID= '99999')
                BEGIN
        DECLARE @CharName Varchar (MAX)
    Select @CharName16=CharName16 from _Char where CharID = @CharID
      Begin
    DELETE FROM _TimedJob WHERE Data2 between  1 AND 11000 AND CharID = @CharID

          end
          end


    if (not exists (select CharID from _Char with (nolock) where CharID = @CharID))
                return -1
            if (@TimeToKeep <= 0)
                return -2
            declare @NewJobID int
            set @NewJobID = 0

            --##JobID 1 = Guild // JobID 2 = Thief/Hunter/Trader
            --##If you want to only have one not both, then just modify the line below!
            if (@JobID = 1 or @JobID = 2)
            BEGIN
                insert into _TimedJob(CharID,Category,JobID,TimeToKeep,Data1,Data2,Data3,Data4,Data5,Data6,Data7,Data8,Serial64,JID)
                values(@CharID, @Category, @JobID, 1, @Data1, @Data2, @Data3, @Data4, @Data5, @Data6, @Data7, @Data8, @Serial64, @JID)
            END
            ELSE
            BEGIN
                --##begin due to develop composite item
                insert into _TimedJob(CharID,Category,JobID,TimeToKeep,Data1,Data2,Data3,Data4,Data5,Data6,Data7,Data8,Serial64,JID)
                values(@CharID, @Category, @JobID, @TimeToKeep, @Data1, @Data2, @Data3, @Data4, @Data5, @Data6, @Data7, @Data8, @Serial64, @JID)
            END
                --##end due to develop composite item
            set @NewJobID = @@identity
            if (@@error <> 0 or @@rowcount = 0)
          return -3
    return @NewJobID

دي Procedures بتاعت che9299 . دلوقتي الاسكرولات مش شغال علشان لازم اضيف البروسيدجر

اية المشكلة فيها ومالها ومال الـ FGW

شكرا

Hamza FiGo 22-10-2014 01:24 PM

UP

™Shi6on 22-10-2014 04:23 PM

بص حضــرتكـ الـ scroll ملهاش دعوه بــ الFTW


راجع علي علي لي انت عملتو في الــ DB و اتأكد


ممكن انت تكون غيرت ID تبع الفورترس

شوف بقي و جرب


:111 (4)::111 (4):

Hamza FiGo 22-10-2014 05:19 PM

لا حضرتك كل حاجة تمام . بس كل الحكاية شيلت البروسيدر وعملتها بايدي تاني

واشتغلت تمام . شكرا

Mr.Viper 22-10-2014 08:00 PM

تمام حطلى ال Procedures ال انتا شغال بيه هنا وهظبتهولك

Mr.Viper 22-10-2014 08:10 PM

طيب لما تفتح ابقا جرب ده
ولو لسه المشكله زاى ما هيا قول D
وابقا ارفع ال Procedures القديم ال بترجعو ميحصلكش DC

كود PHP:

USE [SRO_VT_SHARD]
GO
/****** Object:  StoredProcedure [dbo].[_AddTimedJob]    Script Date: 12/28/2013 22:12:00 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER   procedure 
[dbo].[_AddTimedJob]
@
CharID            int,
@
Category        tinyint,
@
JobID            int,
@
TimeToKeep    int,
@
Data1            int,
@
Data2            int,
--
##begin due to develop composite item
@Data3            int,
@
Data4            int,
@
Data5            int,
@
Data6            int,
@
Data7            int,
@
Data8            int,
@
Serial64        bigint,
@
JID            int
--##end due to develop composite item
as
       if(@
JobID '45000')
        
BEGIN 
declare @CharName16 varchar(64
         
Select @CharName16=CharName16 from _Char where CharID = @CharID 
         Update _Char Set CharName16 
'@'+ @CharName16 Where CharID = @CharID 
        END 
    
if (not exists (select CharID from _Char with (nolockwhere CharID = @CharID))
                return -
1
            
if (@TimeToKeep <= 0)
                return -
2
            
declare @NewJobID int
            set 
@NewJobID 0

            
--##JobID 1 = Guild // JobID 2 = Thief/Hunter/Trader
            
--##If you want to only have one not both, then just modify the line below!
     
if (@JobID or @JobID 2)
            
BEGIN
                insert into _TimedJob
(CharID,Category,JobID,TimeToKeep,Data1,Data2,Data3,Data4,Data5,Data6,Data7,Data8,Serial64,JID)
                
values(@CharID, @Category, @JobID1, @Data1, @Data2, @Data3, @Data4, @Data5, @Data6, @Data7, @Data8, @Serial64, @JID)
            
END
            
ELSE
            
BEGIN
                
--##begin due to develop composite item
                
insert into _TimedJob(CharID,Category,JobID,TimeToKeep,Data1,Data2,Data3,Data4,Data5,Data6,Data7,Data8,Serial64,JID)
                
values(@CharID, @Category, @JobID, @TimeToKeep, @Data1, @Data2, @Data3, @Data4, @Data5, @Data6, @Data7, @Data8, @Serial64, @JID)
            
END
                
--##end due to develop composite item 
    
if(@JobID '45001')
        
begin 
            
declare @Strength int 
            
declare @Intellect int 
            
declare @MaxLevel int 
            
declare @RemainStatPoint int 
            select 
@MaxLevel MaxLevel from _Char where CharID = @CharID 
            set 
@RemainStatPoint = (@MaxLevel*3)-
            set 
@MaxLevel = @MaxLevel+19 
            UPDATE _Char SET Strength
=@MaxLevelIntellect=@MaxLevelRemainStatPoint=@RemainStatPoint WHERE CharID=@CharID 
        end  
if(@JobID    =    '34005')
begin

Update    _Char    Set    DailyPK    
=    0    Where    CharID    =    @CharID
Update    _Char    Set    TotalPK    
=    0    Where    CharID    =    @CharID
Update    _Char    Set    PKPenaltyPoint    
=    0    Where    CharID    =    @CharID
end
    
if(@JobID'55000')
        
begin 
            
declare @TotalSP int 
            
declare @TotalSPMastery int 
            SELECT 
@TotalSP SUM(_RefSkill.ReqLearn_SPFROM _RefSkill_CharSkill WHERE _RefSkill.ID=_CharSkill.SkillID AND _CharSkill.CharID=@CharID AND _RefSkill.ReqCommon_MasteryLevel1 <= '130'
            
SELECT @TotalSPMastery SUM(_RefLevel.Exp_MFROM _CharSkillMastery_RefLevel WHERE _RefLevel.Lvl=_CharSkillMastery.Level AND _CharSkillMastery.CharID=@CharID AND _CharSkillMastery.Level <= '130' 
            
UPDATE _Char SET RemainSkillPoint=RemainSkillPoint+@TotalSP+@TotalSPMastery+200000 WHERE CharID=@CharID 
            DELETE _CharSkill FROM _RefSkill
_CharSkill WHERE _RefSkill.ID=_CharSkill.SkillID AND _CharSkill.CharID=@CharID AND _RefSkill.ReqCommon_MasteryLevel1 <= '130' AND _RefSkill.ID NOT IN (1,70,40,2,8421,9354,9355,11162,9944,8419,8420,11526,10625
            
UPDATE _CharSkillMastery SET Level='0' WHERE CharID=@CharID AND Level <= '130' 
        
end  
        
if(@JobID'34038'
        
begin 
            Update _Items Set MagParamNum 
0MagParam1 NULLMagParam2 NULLMagParam3 NULLMagParam4 NULLMagParam5 NULLMagParam6 NULLMagParam7 NULLMagParam8 NULLMagParam9 NULLMagParam10 NULLMagParam11 NULLMagParam12 NULL where ID64 in (select ItemID from _Inventoryforavatar where CharID = @CharID and Slot between 0 and and ItemID>0)
        
end
    
     
if(@JobID'34003') --
        
begin 
        Select 
@CharName16=CharName16 from _Char where CharID = @CharID 
        begin
        DELETE FROM  _BindingOptionWithItem where nItemDBID IN 
(SELECT ItemID FROM _Inventory 
        WHERE  CharID
=@CharID) and bOptType=2
        end
        end
      
if(@JobID '45010')---gift---
         
begin
                    
declare @tradenum  int
                    
declare @gift varchar(128)
                    
set @gift =('ITEM_ETC_SD_TOKEN_02')
                    
SET @tradenum =(SELECT ABLECOUNT from _CharTrijobSafeTrade where CharID =@CharID )        
    if (@
tradenum >=1)
    
begin
select 
@CharName16 =CharName16  from _Char where CharID=@CharID
exec _ADD_ITEM_EXTERN 
@CharName16,@gift,10,1
update _CharTrijobSafeTrade set AbleCount 
=0 where CharID =@CharID
end
end 

if
(@
JobID'99999')
         
BEGIN 
        
DECLARE @CharName Varchar (MAX
     
Select @CharName16=CharName16 from _Char where CharID = @CharID 
      Begin
     DELETE FROM _TimedJob WHERE Data2 between  1 
AND 11000 AND CharID = @CharID 

       end
    end
            set 
@NewJobID = @@identity
            
if (@@error <> or @@rowcount 0)
          return -
3
    
return @NewJobID 


Hamza FiGo 22-10-2014 08:59 PM

اللي حضرتك رافعها دي اعتقد زي بتاع che9299 وهيا اللي بتجبلي باج في الـ FGW

بحط البروسيدر القديمة العادية بيشتغل عادي . بس انا ضيفتها بايدي والفورجوتن شغالة تمام

شكرا لاهتمامك يا Viper

Mr.Viper 22-10-2014 09:41 PM

اقتباس:

اللي حضرتك رافعها دي اعتقد زي بتاع che9299 وهيا اللي بتجبلي باج في الـ FGW

بحط البروسيدر القديمة العادية بيشتغل عادي . بس انا ضيفتها بايدي والفورجوتن شغالة تمام

شكرا لاهتمامك يا Viper
العفو يانجم :)


الساعة الآن 12:44 PM.

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