Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Private Server > SRO PServer Guides & Releases
You last visited: Today at 11:47

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

Advertisement



Development Project Of Silkroad Server Files !

Discussion on Development Project Of Silkroad Server Files ! within the SRO PServer Guides & Releases forum part of the SRO Private Server category.

Closed Thread
 
Old 02/08/2012, 15:40   #16
 
Dr.Abdelfattah's Avatar
 
elite*gold: 7
Join Date: May 2010
Posts: 2,115
Received Thanks: 2,374
Quote:
Originally Posted by Shifty* View Post
If he's explaining it wrong it will just confuse people and it will NOT be useful. He shouldn't be doing guides about stuff he doesn't know anything about.
If I'm wrong So tell me where's the part i wrote it wrong or even if i made wrong explain
Also plz don't mention English cuz i use packets in my explain and so not by meaning packet but i mean this package or this stored pro.
But i don't think i give wrong explain about them !
Anyway i try to help but same people SPAM in my thread
Also if all of that is wrong and useless as someone see , I just say in Thread post that don't post shit out here , but some of people keep spamming and insult
anyway i don't care about them they are just un-respectable people But Where's my fault in my work?

------------------------

Named : _ADD_ITEM_EXTERN_CHEST_FAST_FULL_DATA

PHP Code:
/****** Object:  StoredProcedure [dbo].[_ADD_ITEM_EXTERN_CHEST_FAST_FULL_DATA]    Script Date: 02/08/2012 15:28:57 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO


ALTER procedure 
[dbo].[_ADD_ITEM_EXTERN_CHEST_FAST_FULL_DATA]
@
JID            int,
@
ItemToAdd        int,
@
data            int,
@
opt_level        int,
@
MagParamNum tinyint,
@
MagParam1  bigint,
@
MagParam2  bigint,
@
MagParam3  bigint,
@
MagParam4  bigint,
@
MagParam5  bigint,
@
MagParam6  bigint,
@
MagParam7  bigint,
@
MagParam8  bigint,
@
MagParam9  bigint,
@
MagParam10 bigint,
@
MagParam11 bigint,
@
MagParam12 bigint,
@
Serial64   bigint

as

    if (
not exists(select from sysobjects where name '_TEMP_ADDITEMEXTERN_CHEST_LOG'))
    
begin
        create table _TEMP_ADDITEMEXTERN_CHEST_LOG
        
(
            
ID int identity(01not null,
            
LogString varchar(256),
            
LogDate datetime default getdate() not null
        
)
    
end

    
declare @LogString varchar(256)
    declare @
link_to_item int

    
if (not exists (select UserJID from _User with (nolockwhere UserJID = @JID))
    
begin
        set 
@LogString 'not existing account ID: ' cast(@JID as char(15))
        
insert into _TEMP_ADDITEMEXTERN_CHEST_LOG(LogStringvalues(@LogString)
        
raiserror('%s'116, @LogString)
        return -
2
    end

    
if (not exists (select from _chest with (nolockwhere UserJID = @JID and (itemid or itemid is null)))
    
begin
        set 
@LogString 'chest Full! JID is ' cast(@JID as char(15)) + ', item: ' cast(@ItemToAdd as char(15))
        
insert into _TEMP_ADDITEMEXTERN_CHEST_LOG(LogStringvalues(@LogString)
        
raiserror('%s'116, @LogString)
        return -
3
    end

    
declare @empty_slot int
    select top 1 
@empty_slot slot from _chest with (nolockwhere UserJID = @JID and (itemid or itemid is nullorder by slot
    
    set 
@link_to_item 0
    
    select 
@link_to_item link from _RefObjCommon where ID = @ItemToAdd

    
if (@link_to_item or @link_to_item is null)
    
begin
        set 
@LogString 'RefItem Link == NULL JID is ' cast(@JID as char(15))
        
insert into _TEMP_ADDITEMEXTERN_CHEST_LOG(LogStringvalues(@LogString)
        
raiserror('%s'116, @LogString)
        return -
5
    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 = @ItemToAdd

    
declare @IS_EQUIP int
    
declare @IS_PET int

    set 
@IS_EQUIP 0
    set 
@IS_PET 0

    
if (@tid1 <> 3)
    
begin
        set 
@LogString 'not item! JID is '  cast(@JID as char(15)) + 'item is: ' cast(@ItemToAdd as char(15))
        
insert into _TEMP_ADDITEMEXTERN_CHEST_LOG(LogStringvalues(@LogString)
        
raiserror('%s'116, @LogString)
        return -
6        -- &#3615;ภภื! พฦภฬลภฬ พฦดฯพ฿?
    
end

    
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
        select 
@data Dur_L from _RefObjItem where ID = @link_to_item
        
        
if (@opt_level 0)
            
set @opt_level 0
        
else if (@opt_level 12)
            
set @opt_level 12
    end
    
else
    
begin

        
if( @IS_PET )
            
set @data 0
        
else
        
begin
            
declare @max_count int
            select 
@max_count MaxStack from _RefObjItem where ID = @link_to_item
    
            
if (@data <= or @data > @max_count)  
                
set @data = @max_count  
        end

        set 
@opt_level 0
    end

    
-------------------------------------------------------------------------------- let's generate item !!!
    set xact_abort on

begin transaction
    
    declare @dummy_serial_number bigint
    set @dummy_serial_number = 0

    declare @NewItemID bigint
    set @NewItemID = 0

    EXEC @NewItemID = _STRG_ALLOC_ITEM_NoTX @dummy_serial_number OUTPUT
    
    IF (@NewItemID = 0)
    BEGIN
        rollback transaction
        set @LogString = '
failed to allocate new item idJID is '  + cast(@JID as char(15)) + 'Item Is' + cast(@ItemToAdd as char(15))
        
        insert into _TEMP_ADDITEMEXTERN_CHEST_LOG(LogString) values(@LogString)
        raiserror('
%s', 1, 16, @LogString)
        return -7
    END

  if( @IS_PET = 1 )
      UPDATE _Items SET 
        RefItemID = @ItemToAdd, 
        OptLevel = @Opt_Level,
        Data = @Data, 
        Variance = 0 ,
        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
  else
      UPDATE _Items SET 
        RefItemID = @ItemToAdd, 
        OptLevel = @Opt_Level, 
        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
  
    IF (@@ERROR <> 0)
    BEGIN
        rollback transaction
        set @LogString = '
failed to create new itemJID is '  + cast(@JID as char(15)) + 'Item Is' + cast(@ItemToAdd as char(15))

        insert into _TEMP_ADDITEMEXTERN_CHEST_LOG(LogString) values(@LogString)
        raiserror('
%s', 1, 16, @LogString)
        return -8
    END

    UPDATE _chest SET ItemID = @NewItemID WHERE UserJID = @JID AND Slot = @empty_slot
    IF (@@ROWCOUNT = 0 OR @@ERROR <> 0)
    BEGIN
        rollback transaction
        set @LogString = '
failed to insert item to chestJID is ' + cast(@JID as char(15)) + 'Item Is' + cast(@ItemToAdd as char(15))

        insert into _TEMP_ADDITEMEXTERN_CHEST_LOG(LogString) values(@LogString)
        raiserror('
%s', 1, 16, @LogString)
        return -9
    END

    --------------------------------------------------------------------------------
    if (@NewItemID <= 0)
    begin
        rollback transaction
        set @LogString = '
item generation failed for unknown reasonJID is ' + cast(@JID as char(15)) + 'Item Is' + cast(@ItemToAdd as char(15))

        insert into _TEMP_ADDITEMEXTERN_CHEST_LOG(LogString) values(@LogString)
        raiserror('
%s', 1, 16, @LogString)
        return -10
    end

commit transaction

    set @LogString = '
success ' + 'jid' + cast(@JID as char(15)) + 'item' + cast(@ItemToAdd as char(15)) + cast(@data as varchar(10)) + 'slot' + cast(@empty_slot as varchar(10))
    insert into _TEMP_ADDITEMEXTERN_CHEST_LOG(LogString) values(@LogString)

    return 1 
This one don't need any explain as it's same as _ADD_ITEM_EXTERN_CHEST_FAST but checking full data like params and If you need any explain in a part of it just tell me
Dr.Abdelfattah is offline  
Old 02/08/2012, 19:31   #17
 
elite*gold: 0
Join Date: Jan 2012
Posts: 1,867
Received Thanks: 1,091
Finally thread cleaned
•ᵔBeGodOfWarᵔ• is offline  
Thanks
1 User
Old 02/08/2012, 19:35   #18
 
Dr.Abdelfattah's Avatar
 
elite*gold: 7
Join Date: May 2010
Posts: 2,115
Received Thanks: 2,374
Quote:
Originally Posted by •ᵔBeGodOfWarᵔ• View Post
Finally thread cleaned
Hope it stay clean tell i finish out this project
Dr.Abdelfattah is offline  
Closed Thread


Similar Threads Similar Threads
[Tour] Project Redemption Development Server
08/20/2011 - Rappelz - 85 Replies
Introduction: Hello, I am Chris. Or as many of you know me 'ismokedrow' I am the Project Lead and Lead Developer of Project Redemption. This whole project is aimed at sharing with the community and providing new and easy ways to adapt and tame an other-wise unfriendly server. While the project does owe it's roots to the NCarbon Developement Team, it does not hold their values or practices. This project is founded on sharing and will remain that way. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
Project LVL Development [Binary Server]
03/26/2011 - CO2 Private Server - 1 Replies
I start working on Project LVL which is a binary server 5065 based, what were working on is a 0 action server this meaning is scratch off no npcs mobs or anything clean. So I been wanting the community to post ideas/events you would like it to have, cps or not. Note the idea is to bring old co back so the server is balance and attracts veterans co players. Note were not a high rate server so don't post non sense for high rate base servers. Thanks for your time for reading this paragraph....



All times are GMT +1. The time now is 11:52.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.