How to change the smc drop plus value

Results 1 to 13 of 13
  1. #1
    King Canadian whhacker93 is offline
    MemberRank
    Apr 2008 Join Date
    CanadaLocation
    926Posts

    How to change the smc drop plus value

    Hey everyone. Just making a quick tutorial to show you how you can change the smc drop value to make it higher then 8.

    What does this do exactly?
    It allows you to set the + value higher within SMC. So instead of the max value being 12. The Max value with this procedure is now 249! You cannot make it higher then 249, your silkroad client will crash and your account will bug when attempting to create higher then this value.

    How do i do this?
    You do this using the following procedure:

    Code:
    USE [SRO_VT_SHARD]
    GO
    /****** Object:  StoredProcedure [dbo].[_SMC_ADD_ITEM]    Script Date: 05/19/2012 06:27:38 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER OFF
    GO
    
    
    ----------------------------------------------------------------------------------------
    ----------------------------------------------------------------------------------------
    ----------------------------------------------------------------------------------------
    -- 20_SMC__ShardDB.sql  _SMC_ADD_ITEM ¼öÁ¤ 
    ----------------------------------------------------------------------------------------
    ----------------------------------------------------------------------------------------
    ----------------------------------------------------------------------------------------
    
     -----------------------------------------------------------------------  
    ALTER       procedure [dbo].[_SMC_ADD_ITEM]  
    ----------------------------------------------------- params to find target item  
     @TargetStorage int,  /* 0 = inventory, 1 = chest , 2 = guild chest, 3 = Avatar Inventory */  
     @OwnerName varchar(128),  
     ----------------------------------------------------- params to modify the item  
     @RefItemID  int,  
     @OptLvl   tinyint,  
     @Variance  bigint,  
     @Data   int,  
     @szCreater  varchar(32),  
     @MagParamNum int,  
     @MagParam1 bigint,  
     @MagParam2 bigint,  
     @MagParam3 bigint,  
     @MagParam4 bigint,  
     @MagParam5 bigint,  
     @MagParam6 bigint,  
     @MagParam7 bigint,  
     @MagParam8 bigint,  
     @MagParam9 bigint,  
     @MagParam10 bigint,  
     @MagParam11 bigint,  
     @MagParam12 bigint  
    as  
     ----------------------------------------------------  
     -- step 1. check validity of parameters  
     ----------------------------------------------------  
     if (@TargetStorage <> 0 and @TargetStorage <> 1 and @TargetStorage <> 2 and @TargetStorage <> 3)  
     begin  
      select -1, cast(0 as bigint), cast(0 as bigint) -- invalid target storage  
      return  
     end  
     declare @ownerid int  
     declare @ItemID bigint  
     set @ownerid = 0  
     set @ItemID = 0  
     declare @empty_slot int  
     set @empty_slot = -1  
     if (@TargetStorage = 0)  
     begin  
      select @ownerid = charid from _char where charname16 = @OwnerName  
      if (@@rowcount = 0 or @ownerid = 0 or @ownerid is null)  
      begin  
       select -2, cast(0 as bigint), cast(0 as bigint)-- can't find owner  
       return  
      end  
      
      select top 1 @empty_slot = slot from _inventory   
      where charid = @ownerid and slot >= 13   
       and itemid = 0   
       and slot < (select top 1 InventorySize from _Char where CharID = @ownerid)  
      order by slot asc  
      
      if (@@rowcount = 0)  
      begin  
       select -3, cast(0 as bigint), cast(0 as bigint) -- inventory full  
       return  
      end  
     end  
     else if (@TargetStorage = 1)  
     begin  
      select @ownerid = JID from _AccountJID where AccountID = @ownername  
      if (@@rowcount = 0 or @ownerid = 0 or @ownerid is null)  
      begin  
       select -2, cast(0 as bigint), cast(0 as bigint) -- can't find owner  
       return  
      end  
      select top 1 @empty_slot = slot from _chest where userjid = @ownerid and (itemid = 0 or ItemID is null) order by slot asc  
      if (@@rowcount = 0)  
      begin  
       select -3, cast(0 as bigint), cast(0 as bigint) -- chest full  
       return  
      end  
     end  
     else if (@TargetStorage = 2)  
     begin  
      select @ownerid = [ID] from _guild where [name] = @ownername  
      if (@@rowcount = 0 or @ownerid = 0 or @ownerid is null)  
      begin  
       select -2, cast(0 as bigint), cast(0 as bigint) -- can't find owner  
       return  
      end   
      select top 1 @empty_slot = slot from _guildchest where guildid = @ownerid and (itemid = 0 or ItemID is null) order by slot asc  
      if (@@rowcount = 0)  
      begin  
       select -3, cast(0 as bigint), cast(0 as bigint) -- chest full  
       return  
      end   
        
      -- ±æµå ·¹º§¿¡ µû¸¥ ±æµå ½½·Ô¼ö Á¦ÇÑÀ» È®ÀÎÇÏÀÚ.  
      declare @lvl tinyint  
      declare @max_slot tinyint  
      select @lvl = Lvl from _guild where [id] = @ownerid  
      set @max_slot = 30 * (@lvl - 1) - 1  
      
      if @empty_slot > @max_slot   
      begin  
       select -3, cast(0 as bigint), cast(0 as bigint) -- chest full  
       return  
      end      
     end  
     else  
     begin  
      select @ownerid = charid from _char where charname16 = @OwnerName  
      if (@@rowcount = 0 or @ownerid = 0 or @ownerid is null)  
      begin  
       select -2, cast(0 as bigint), cast(0 as bigint)-- can't find owner  
       return  
      end  
      
      select top 1 @empty_slot = slot from _InventoryForAvatar  
      where charid = @ownerid  
       and itemid = 0   
       and slot < 4     -- ÇÁ·Î½ÃÁ® ÇϵåÄÚµù(¾Æ¹ÙŸ ½½·ÔÀº 0, 1, 2, 3ÀÌ´Ù.)  
      order by slot asc  
      
      if (@@rowcount = 0)  
      begin  
       select -3, cast(0 as bigint), cast(0 as bigint) -- inventory full  
       return  
      end  
     end  
       
      
     if (@empty_slot < 0 or @empty_slot is null)  
     begin   
      select -4, cast(0 as bigint), cast(0 as bigint)  -- unknown error ???  
      return  
     end  
       
     declare @tid1 int  
     declare @tid2 int  
     declare @tid3 int  
      declare @tid4 int  
       
     select @tid1 = TypeID1, @tid2 = TypeID2, @tid3 = TypeID3, @tid4 = TypeID4 from _RefObjCommon where ID = @RefItemID  
     if (@tid1 <> 3)  
     begin  
      select -5, cast(0 as bigint), cast(0 as bigint) -- about to assign non-item object  
      return  
     end  
     if (@tid2 <> 1)  -- is not equipment  
     begin  
      -- can't assign magic param or optlevel to non-equip item  
      if (@MagParamNum > 0 or @OptLvl > 0)  
      begin  
       select -6, cast(0 as bigint), cast(0 as bigint)  
       return  
      end  
     end  
       
     ----------------------------------------------------  
     -- step 2. correct some non-critical parameters  
     ----------------------------------------------------  
     if (@tid2 = 3 and @Data = 0) -- can't assign overlap count 0 to expendable item  
     begin  
      set @Data = 1  
     end  
      
     if (LEN(@szCreater) = 0)  
      set @szCreater = NULL  
      
     ----------------------------------------------------  
     -- step add. equip and pet @data setting  
     ----------------------------------------------------  
     declare @IS_EQUIP int  
     declare @IS_PET int  
      
     set @IS_EQUIP = 0  
     set @IS_PET = 0  
      
     if (@tid1 = 3 and @tid2 = 1)  
      set @IS_EQUIP = 1  
     else if (@tid1 = 3 and @tid2 = 2 and @tid3 = 1 and (@tid4 = 1 or @tid4 = 2))  
      set @IS_PET = 1  
      
     if (@IS_EQUIP = 1)  
     begin  
      
        -- Àß ¸øµÈ ID·Î select Çϰí ÀÖÀ½. ¼öÁ¤ (by binu 2008-10-17)
        --    select @Data = Dur_L from _RefObjItem where ID =  @RefItemID
        select @Data = Dur_L from _RefObjItem where ID = (select Link from _RefObjCommon where ID = @RefItemID )
        
       if (@OptLvl < 0)  
        set @OptLvl = 0  
       else if (@OptLvl > 249)  
        set @OptLvl = 249  
      
     end  
     else  
     begin  
      
      if( @IS_PET = 1 )  
       set @Data = 0  
      else  
      begin  
       declare @MaxCount int  
       select @MaxCount = MaxStack from _RefObjItem where ID = @RefItemID  
       
       if (@Data <= 0 or @Data > @MaxCount)    
        set @Data = @MaxCount    
      end  
      
      set @OptLvl = 0  
     end  
      
      
     ----------------------------------------------------------  
     -- Step3. create item and set to associated storage  
     ----------------------------------------------------------  
     set xact_abort on  
    begin transaction  
       
     declare @NewItemID  bigint  
     declare @Serial64 bigint  
     set @NewItemID  = 0  
     set @Serial64 = 0  
     exec @NewItemID = _STRG_ALLOC_ITEM_NoTX @Serial64 OUTPUT  
     if (@NewItemID = 0)  
     begin  
      rollback transaction  
      select -7, cast(0 as bigint), cast(0 as bigint)  
      return  
     end  
     if (@MagParamNum = 0)  
     begin  
      update _Items set RefItemID = @RefItemID, OptLevel = @OptLvl, Variance = @Variance, Data = @Data, MagParamNum = 0, Serial64 = @Serial64   
      where ID64 = @NewItemID  
     end  
     else  
     begin  
      update _Items set RefItemID = @RefItemID, OptLevel = @OptLvl, Variance = @Variance, Data = @Data, MagParamNum = @MagParamNum,   
        MagParam1 = @MagParam1, MagParam2 = @MagParam2, MagParam3 = @MagParam3, MagParam4 = @MagParam4,  
        MagParam5 = @MagParam5, MagParam6 = @MagParam6, MagParam7 = @MagParam7, MagParam8 = @MagParam8,  
        MagParam9 = @MagParam9, MagParam10= @MagParam10, MagParam11 = @MagParam11, MagParam12 = @MagParam12, Serial64 = @Serial64  
      where ID64 = @NewItemID  
     end  
     if (@@error <> 0)  
     begin  
      rollback transaction  
      select -8, cast(0 as bigint), cast(0 as bigint)  
      return  
     end  
     if (@TargetStorage = 0)  
      update _Inventory set ItemID = @NewItemID where CharID = @OwnerID and Slot = @empty_slot  
     else if (@TargetStorage = 1)  
      update _chest set ItemID = @NewItemID where UserJID = @OwnerID and slot = @empty_slot  
     else if (@TargetStorage = 2)  
      update _guildchest set ItemID = @NewItemID where guildid = @OwnerID and slot = @empty_slot  
     else  
      update _InventoryForAvatar set ItemID = @NewItemID where CharID = @OwnerID and Slot = @empty_slot  
       
     if (@@rowcount = 0 or @@error <> 0)  
     begin  
      rollback transaction  
      select -9, cast(0 as bigint), cast(0 as bigint)  
      return  
     end  
       
     commit transaction  
     select @empty_slot, @NewItemID, @Serial64  
     return
    If you have any additional questions please feel free to ask and for those of you that are wondering how to lower the value i have set in this procedure.

    The value can be lowered by changing the following lines

    HIT CTRL + F and search for " @OptLvl > 249 " and "@OptLvl = 249" Change both of those values to your desired max level but do not exceed 249!

    Which procedure do i need to update?

    StoredProcedure [dbo].[_SMC_ADD_ITEM]

    this procedure is under your shard database.


  2. #2
    ✗ ¤ Kira ¤ ✗ Kira is offline
    MemberRank
    Nov 2011 Join Date
    ✗¤EGYPT¤✗Location
    578Posts

    Re: How to change the smc drop plus value

    i did like u said

    SRO_VT_SHARD >>> programmability >>>> stored procedures >>>> and modify _SMC_ADD_ITEM and i put 249 for

    if (@OptLvl < 0)
    set @OptLvl = 0
    else if (@OptLvl > 249)
    set @OptLvl = 249

    and i close all program and i start again and when i put for item +20 didn't work the game give me +12 :(
    any idea or what i did wrong ?

    Edit work fine now +249 work
    but we should to it too
    same with _SMC_EDIT_ITEM

  3. #3
    #Yummi.sql Caipi is offline
    MemberRank
    Sep 2011 Join Date
    GermanyLocation
    403Posts

    Re: How to change the smc drop plus value

    Quote Originally Posted by MR5 View Post
    i did like u said

    SRO_VT_SHARD >>> programmability >>>> stored procedures >>>> and modify _SMC_ADD_ITEM and i put 249 for

    if (@OptLvl < 0)
    set @OptLvl = 0
    else if (@OptLvl > 249)
    set @OptLvl = 249

    and i close all program and i start again and when i put for item +20 didn't work the game give me +12 :(
    any idea or what i did wrong ?


    Why dun you simply edit the OptLevel under _Items? ^^

  4. #4
    Account Upgraded | Title Enabled! VanSoR is offline
    MemberRank
    May 2012 Join Date
    279Posts
    Quote Originally Posted by Caipi View Post
    Why dun you simply edit the OptLevel under _Items? ^^
    Thx For The Guide , but i have a problem LIke MR5

    and i don't know how to do this (Edit OPT Level)

    Where is This? And what i should Write Thx again ^^

  5. #5
    ✗ ¤ Kira ¤ ✗ Kira is offline
    MemberRank
    Nov 2011 Join Date
    ✗¤EGYPT¤✗Location
    578Posts

    Re: How to change the smc drop plus value

    i edit my reply

    Edit work fine now +249 work
    but we should to it too
    same with _SMC_EDIT_ITEM

  6. #6
    #Yummi.sql Caipi is offline
    MemberRank
    Sep 2011 Join Date
    GermanyLocation
    403Posts

    Re: How to change the smc drop plus value

    PHP Code:
    USE SRO_VT_SHARD --> Overview of your inventory
    SELECT invent
    .CharIDinvent.Slotref.CodeName128items.OptLevel FROM _Inventory as invent
    JOIN _Items 
    as items on invent.ItemID items.ID64
    JOIN _RefObjCommon 
    as ref on items.RefItemID ref.ID
    JOIN _Char 
    as chart on invent.CharID chart.CharID
    WHERE chart
    .CharName16 like 'Manuel' --> Your Charname
    ORDER BY invent
    .Slot asc

    USE SRO_VT_SHARD --> Update to your desired +Value
    UPDATE _Items
    SET OptLevel 
    249
    FROM _Inventory 
    as invent
    JOIN _Items 
    as items on invent.ItemID items.ID64
    JOIN _RefObjCommon 
    as ref on items.RefItemID ref.ID
    JOIN _Char 
    as chart on invent.CharID chart.CharID
    WHERE chart
    .CharName16 like 'Manuel' --> Your Charname
    AND invent.Slot BETWEEN 0 AND --> or Slot AND Slot 2...etc

  7. #7
    Account Upgraded | Title Enabled! SnapPop is offline
    MemberRank
    Feb 2012 Join Date
    EgyptLocation
    388Posts

    Re: How to change the smc drop plus value

    its the same as making item +200++ via smc actually i didn't understand well when i read the title i thought that you can change the item drop + like for example moobs drop novas + 100 is that what you mean or you just mean making the item + via smc ?
    anyway nice work

  8. #8
    Account Upgraded | Title Enabled! VanSoR is offline
    MemberRank
    May 2012 Join Date
    279Posts

    Re: How to change the smc drop plus value

    MR5 How u Fixed it Can any One Tell Me , i have This problem

    and i don't know how to do this (Edit OPT Level)

    Where is This? And what i should Write

  9. #9
    Apprentice adrianrele is offline
    MemberRank
    Jun 2012 Join Date
    Puerto Cabello,Location
    23Posts

    Re: How to change the smc drop plus value

    Max Oplvl 250 :(

  10. #10
    Valued Member myShinichi is offline
    MemberRank
    Aug 2005 Join Date
    144Posts

    Re: How to change the smc drop plus value

    Why 249 only ? I used 250 still work perfect.

  11. #11
    Apprentice homester is offline
    MemberRank
    Jul 2012 Join Date
    17Posts

    Re: How to change the smc drop plus value

    my SQL do not support varchar(128), to work i must change to varchar(50)

  12. #12
    Apprentice F50 is offline
    MemberRank
    Feb 2012 Join Date
    24Posts

    Re: How to change the smc drop plus value

    working fine :)

    thank you
    Last edited by F50; 20-08-12 at 09:53 AM.

  13. #13
    King Canadian whhacker93 is offline
    MemberRank
    Apr 2008 Join Date
    CanadaLocation
    926Posts

    Re: How to change the smc drop plus value

    Quote Originally Posted by F50 View Post
    working fine :)

    thank you
    Not a Problem.



Advertisement