Register for your free account! | Forgot your password?

You last visited: Today at 20:41

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Release] OptLevel "Limit"

Discussion on [Release] OptLevel "Limit" within the SRO PServer Guides & Releases forum part of the SRO Private Server category.

Reply
 
Old 05/22/2014, 00:57   #16


 
Dracula Untold's Avatar
 
elite*gold: 0
Join Date: Feb 2014
Posts: 1,866
Received Thanks: 517
That's it. No more mushrooms.
Dracula Untold is offline  
Old 05/24/2014, 23:44   #17
 
IceAmStiel's Avatar
 
elite*gold: 0
Join Date: Jul 2011
Posts: 1,058
Received Thanks: 1,118
Returning an error - negative return values are used to indicate errors - in a procedure to disconnect a player is only going to work when the client awaits a server response from this very procedure.

The high byte of dwData holds the new plus value, the low byte the prior one. Both include the advanced elixir value already.
Thus, setting the OptLevel without taking the possibility of an advanced elixir into account might result into an even higher plus value on an item
IceAmStiel is offline  
Old 07/06/2015, 14:23   #18
 
elite*gold: 0
Join Date: Jun 2015
Posts: 63
Received Thanks: 16
It is funny to see this... ofc it is old but ppl thought it works... Please Firstly if a person makes item with that limit lets say our limit is +12 and I make +13 item.... this procedure makes item in database +12 but it is still +13 for client so you just need to drop it and pick it up again. Will stay +13. So many ppl used this shiet... Better to make like that:
jup incomprehensible that guys still have a program wich exec. UPDATE _Items SET OptLevel = 12
every 60 secs [/QUOTE]

Ofc it is better than ur shiet ;p
LogLoft420 is offline  
Old 07/06/2015, 16:59   #19
 
Zoxon's Avatar
 
elite*gold: 0
Join Date: Oct 2010
Posts: 352
Received Thanks: 298
Quote:
Originally Posted by LogLoft420 View Post
It is funny to see this... ofc it is old but ppl thought it works... Please Firstly if a person makes item with that limit lets say our limit is +12 and I make +13 item.... this procedure makes item in database +12 but it is still +13 for client so you just need to drop it and pick it up again. Will stay +13. So many ppl used this shiet... Better to make like that:
jup incomprehensible that guys still have a program wich exec. UPDATE _Items SET OptLevel = 12
every 60 secs

Ofc it is better than ur shiet ;p
Our Lord has spoken.
Zoxon is offline  
Old 07/06/2015, 17:03   #20
 
Syloxx's Avatar
 
elite*gold: 56
Join Date: Oct 2013
Posts: 1,165
Received Thanks: 774
Quote:
Originally Posted by LogLoft420 View Post
It is funny to see this... ofc it is old but ppl thought it works... Please Firstly if a person makes item with that limit lets say our limit is +12 and I make +13 item.... this procedure makes item in database +12 but it is still +13 for client so you just need to drop it and pick it up again. Will stay +13. So many ppl used this shiet... Better to make like that:
jup incomprehensible that guys still have a program wich exec. UPDATE _Items SET OptLevel = 12
every 60 secs

Ofc it is better than ur shiet ;p
yes it is soo awesome if you have every 60 sec a 30 sec lag because your update the _Items table

and btw...

UPDATE _Items SET OptLevel = 12 will set ALL items to +12 gg hf wp

UPDATE _Items Set OptLevel = 12 WHERE OptLevel >= 13 would be correct but how i said already

it will result in permanent lags

best method to do an optlevel limit:
Code:
1) use the query of Certus and insert ItemID in a custom table (ps make it also working for +14 +15 etc)
2) modify all STRG procedures they allows you to move, drop, sell, storage etc the item and block all items they are in that custom table
3) after logout / teleport remove the ItemID from the custom table so the player is aviable to use the item again
Syloxx is offline  
Old 07/06/2015, 17:16   #21
 
elite*gold: 0
Join Date: Apr 2015
Posts: 1,444
Received Thanks: 1,373
There is also other items using OptLevel box for something, not sure what it is but something is using it and that's not a good way.
​Goofie​ is offline  
Old 07/18/2015, 06:39   #22
 
spinal2's Avatar
 
elite*gold: 0
Join Date: Dec 2007
Posts: 242
Received Thanks: 16
Quote:
Originally Posted by Syloxx View Post
Code:
1) use the query of Certus and insert ItemID in a custom table (ps make it also working for +14 +15 etc)
2) modify all STRG procedures they allows you to move, drop, sell, storage etc the item and block all items they are in that custom table
3) after logout / teleport remove the ItemID from the custom table so the player is aviable to use the item again

U ask to do it?

Quote:
IF @Operation = 90 AND @dwData >= 655369
BEGIN
DECLARE @OptLevel INT = (SELECT OptLevel from SRO_CH_SHARD.dbo._Items WHERE Serial64 = @ItemSerial)
IF (@OptLevel > 13)
BEGIN
UPDATE SRO_VT_SHARD.dbo._Items SET OptLevel = 12 WHERE Serial64 = @ItemSerial)
END
END
spinal2 is offline  
Old 07/18/2015, 11:44   #23
 
elite*gold: 1
Join Date: Jul 2015
Posts: 207
Received Thanks: 60
thank you
B1Q B0SS is offline  
Old 07/19/2015, 07:59   #24
 
spinal2's Avatar
 
elite*gold: 0
Join Date: Dec 2007
Posts: 242
Received Thanks: 16
Quote:
Originally Posted by Certus View Post
because there are still some guys they dont know how to write simple querys i´ll release one

PHP Code:
IF (@Operation 90 AND @strDesc like '%Opt: +13%')
BEGIN
UPDATE SRO_VT_SHARD
.dbo._Items SET OptLevel 12 WHERE Serial64 = @ItemSerial
END 
Bonus:

Remove OptLevel limit from SMC:

PHP Code:
USE [SRO_VT_SHARD]
GO
/****** Object:  StoredProcedure [dbo].[_SMC_ADD_ITEM]    Script Date: 04/17/2014 18:50:37 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
-----------------------------------------------------------------------
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 <> and @TargetStorage <> and @TargetStorage <> and @TargetStorage <> 3)
    
begin
        select 
-1cast(as bigint), cast(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 or @ownerid or @ownerid is null)
        
begin
            select 
-2cast(as bigint), cast(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 or ItemID is nullorder by slot asc
        
if (@@rowcount 0)
        
begin
            select 
-3cast(as bigint), cast(as bigint)    -- chest full
            
return
        
end
    end
    
else if (@TargetStorage 2)
    
begin
        select 
@ownerid = [IDfrom _guild where [name] = @ownername
        
if (@@rowcount or @ownerid or @ownerid is null)
        
begin
            select 
-2cast(as bigint), cast(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 
            
and slot 4                    -- &#54532;로시져 하드코딩(아바타 슬롯은 0, 1, 2, 3이다.)
        
order by slot asc

        
if (@@rowcount 0)
        
begin
            select 
-3cast(as bigint), cast(as bigint)    -- inventory full
            
return
        
end
    end
    

    
if (@empty_slot or @empty_slot is null)
    
begin 
        select 
-4cast(as bigint), cast(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 
-5cast(as bigint), cast(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

        
-- clamp optlevel to 12(Equip &#50500;이템에만 적용)

    
if (LEN(@szCreater) = 0)
        
set @szCreater NULL

    
----------------------------------------------------
    -- 
step addequip and pet @data setting
    
----------------------------------------------------
    declare @
IS_EQUIP int
    
declare @IS_PET int

    set 
@IS_EQUIP 0
    set 
@IS_PET 0

    
if (@tid1 and @tid2 1)
        
set @IS_EQUIP 1
    
else if (@tid1 and @tid2 and @tid3 and (@tid4 or @tid4 2))
        
set @IS_PET 1

    
if (@IS_EQUIP 1)
    
begin
        
-- SMC_SR_UserEdit_Char_Item_or_Guild_Item PATCH READY&#50640;서 @RefItemID를 참조하는 쿼리 수정이 빠져 있었다. by zone0000(2008.05.30)
        
select @Data Dur_L from _RefObjItem as Roi with(nolockjoin _RefObjCommon as Roc with(nolockon Roi.id Roc.link 
        where Roc
.ID = @RefItemID
    
            
-- clamp optlevel to 12&#45716; 장비 아이템에만 적용한다.            
          
if (@OptLvl 0)
              
set @OptLvl 0
    end
    
else
    
begin

        
if( @IS_PET )
            
set @Data 0
        
else
        
begin
            
declare @MaxCount int

            
-- 2007. 10. 30 &#49437;민우 -> 단순히 _RefObjItem 의 id와 @RefItemID를 비교하여 질의가 이상한 결과를 반환했다.
            
-- _RefObjCommon &#51032; 정보와 _RefObjItem의 정보를 조인해야 제대로된 질의가 완성된다.
            
select @MaxCount MaxStack from _RefObjItem as Roi with(nolockjoin _RefObjCommon as Roc with(nolockon Roi.id Roc.link 
            where Roc
.ID = @RefItemID
    
            
if (@Data <= or @Data > @MaxCount)  
                
set @Data = @MaxCount  
        end

        set 
@OptLvl 0
    end


    
----------------------------------------------------------
    -- 
Step3create 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 
-7cast(as bigint), cast(as bigint)
        return
    
end
    
if (@MagParamNum 0)
    
begin
        update _Items set RefItemID 
= @RefItemIDOptLevel = @OptLvlVariance = @VarianceData = @DataMagParamNum 0Serial64 = @Serial64 
        where ID64 
= @NewItemID
    end
    
else
    
begin
        update _Items set RefItemID 
= @RefItemIDOptLevel = @OptLvlVariance = @VarianceData = @DataMagParamNum = @MagParamNum
                
MagParam1 = @MagParam1MagParam2 = @MagParam2MagParam3 = @MagParam3MagParam4 = @MagParam4,
                
MagParam5 = @MagParam5MagParam6 = @MagParam6MagParam7 = @MagParam7MagParam8 = @MagParam8,
                
MagParam9 = @MagParam9MagParam10= @MagParam10MagParam11 = @MagParam11MagParam12 = @MagParam12Serial64 = @Serial64
        where ID64 
= @NewItemID
    end
    
if (@@error <> 0)
    
begin
        rollback transaction
        select 
-8cast(as bigint), cast(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 or @@error <> 0)
    
begin
        rollback transaction
        select 
-9cast(as bigint), cast(as bigint)
        return
    
end
    
    commit transaction
    select 
@empty_slot, @NewItemID, @Serial64
    
return 
PHP Code:
USE [SRO_VT_SHARD]
GO
/****** Object:  StoredProcedure [dbo].[_SMC_EDIT_ITEM]    Script Date: 04/17/2014 18:51:30 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE 
[dbo].[_SMC_EDIT_ITEM]  
----------------------------------------------------- 
params to find target item  
 
@TargetStorage int,   /* 0 = inventory, 1 = chest, 2 = guild chest, 3 = Avatar Inventory */  
 
@OwnerName varchar(128),  /* account id or char id */  
 
@Slot  int,  
 @
ItemIDToEdit bigint,   /* just for check validity */  
 
----------------------------------------------------- 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 <> and @TargetStorage <> and @TargetStorage <> and @TargetStorage <> 3)  
 
begin  
  select 
--- invalid target storage  
  
return  
 
end  
 
declare @ownerid int  
 
declare @ItemID bigint  
 set 
@ownerid 0  
 set 
@ItemID 0  
 
if (@TargetStorage 0)  
 
begin  
  select 
@ownerid charid from _char where charname16 = @OwnerName  
  
if (@@rowcount or @ownerid or @ownerid is null)  
  
begin  
   select 
--- can't find owner  
   return  
  end  
  select @ItemID = ItemID from _inventory where charid = @ownerid and slot = @slot  
 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 -- can'
t find owner  
   
return  
  
end  
  select 
@ItemID itemid from _chest where userjid = @ownerid and slot = @slot  
 end  
 
else if (@TargetStorage 2)  
 
begin  
  select 
@ownerid = [idfrom _guild where [name] = @ownername  
  
if (@@rowcount or @ownerid or @ownerid is null)  
  
begin  
   select 
--- can't find owner  
   return  
  end  
  select @ItemID = itemid from _guildchest where guildid = @ownerid and slot = @slot  
 end  
 else  
 begin  
  select @ownerid = charid from _char where charname16 = @OwnerName  
  if (@@rowcount = 0 or @ownerid = 0 or @ownerid is null)  
  begin  
   select -2 -- can'
t find owner  
   
return  
  
end  
  select 
@ItemID ItemID from _InventoryForAvatar where charid = @ownerid and slot = @slot  
 end  
  
 
if (@itemID or @itemid is null)  
 
begin  
  select 
--- can't find the item  
  return  
 end  
 if (@itemid <> @ItemIDToEdit)  
 begin  
  select -4 -- it'
s not the one that you wanna edit  
  
return   
 
end  
 
declare @tid1 int  
 
declare @tid2 int  
 select 
@tid1 TypeID1, @tid2 TypeID2 from _RefObjCommon with(nolockwhere ID = @RefItemID  
 
if (@tid1 <> 3)  
 
begin  
  select 
--- about to assign non-item object  
  
return  
 
end  
 
if (@tid2 <> 1)  -- is equipment  
 begin  
  
-- can't assign magic param or optlevel to non-equip item  
  if (@MagParamNum > 0 or @OptLvl > 0)  
  begin  
   select -6  
   return  
  end  
 end  
   
 ----------------------------------------------------  
 -- step 2. correct some non-critical parameters  
 ----------------------------------------------------  
 if (LEN(@szCreater) = 0)  
  set @szCreater = NULL  
   
 ----------------------------------------------------  
 -- step 3. modify target item to desired values  
 ----------------------------------------------------  
 if (@MagParamNum = 0)  
 begin  
  update _Items   
  set RefItemID = @RefItemID, OptLevel = @OptLvl, Variance = @Variance, Data = @Data, CreaterName = @szCreater, MagParamNum = 0   
  where id64 = @ItemID  
 end  
 else  
 begin  
  update _Items   
  set  RefItemID = @RefItemID, OptLevel = @OptLvl, Variance = @Variance, Data = @Data, CreaterName = @szCreater, 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  
  where id64 = @ItemID  
 end  
    
 if (@@error <> 0 or @@rowcount = 0)  
 begin  
  select -7  
  return  
 end  
 select 1  
 return 
The Item will Back to +12 When Char Disconect or Teleport ? if He don't make it options then item continue +13+ ?
spinal2 is offline  
Reply




All times are GMT +1. The time now is 20:43.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.