البقاء مسجل دائمآ
الإعلانات
04-07-2014, 12:27 PM   #1

abed2006



  abed2006


Aug 2010
73568
412
Male
10
abed2006

abed2006



(1)




:



+8
++ ++
+ sql
sql
.................................................. .................................................. ..............
:


.................................................. ..........................................
: NPC






google

04-07-2014, 12:56 PM   #2

pop2009





Nov 2007
5370
1,261
https://t.me/pump_upp
database editor
No Server
Male
19
pop2009

pop2009


   ICQ  pop2009    AIM  pop2009    Yahoo  pop2009





+8 + smc +
PHP:
USE SRO_VT_SHARD
--Usage:
--
exec _ADD_ITEM_EXTERN 'CHarName','ItemsCodeName',Count,OptLvl
declare @CHarName varCHar(64

set @CHarName 'Your Char Name here'

exec _ADD_ITEM_EXTERN @CHarName,'ITEM_CH_M_LIGHT_11_HA_SET_B_RARE',1,12
exec _ADD_ITEM_EXTERN 
@CHarName,'ITEM_CH_M_LIGHT_11_SA_SET_B_RARE',1,12
exec _ADD_ITEM_EXTERN 
@CHarName,'ITEM_CH_M_LIGHT_11_BA_SET_B_RARE',1,12
exec _ADD_ITEM_EXTERN 
@CHarName,'ITEM_CH_M_LIGHT_11_LA_SET_B_RARE',1,12
exec _ADD_ITEM_EXTERN 
@CHarName,'ITEM_CH_M_LIGHT_11_FA_SET_B_RARE',1,12
exec _ADD_ITEM_EXTERN 
@CHarName,'ITEM_CH_M_LIGHT_11_AA_SET_B_RARE',1,12
exec _ADD_ITEM_EXTERN 
@CHarName,'ITEM_CH_RING_11_SET_B_RARE',1,12
exec _ADD_ITEM_EXTERN 
@CHarName,'ITEM_CH_RING_11_SET_B_RARE',1,12
exec _ADD_ITEM_EXTERN 
@CHarName,'ITEM_CH_EARRING_11_SET_B_RARE',1,12
exec _ADD_ITEM_EXTERN 
@CHarName,'ITEM_CH_NECKLACE_11_SET_B_RARE',1,12
exec _ADD_ITEM_EXTERN 
@CHarName,'ITEM_CH_TBLADE_11_SET_A_RARE',1,13
exec _ADD_ITEM_EXTERN 
@CHarName,'ITEM_CH_BOW_11_SET_B_RARE',1,13
exec _ADD_ITEM_EXTERN 
@CHarName,'ITEM_CH_SHIELD_11_SET_B_RARE',1,13
exec _ADD_ITEM_EXTERN 
@CHarName,'ITEM_CH_BLADE_11_SET_B_RARE',1,13 
Textdata_Object Search
Table RefNest npc 0 1




04-07-2014, 02:27 PM   #3

Hero



  Hero


Jan 2014
116050
7,017
Egypt
;"#string n = "C
No Server
Male
85
Hero

Hero







+8
SMC
Query


PHP:
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
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 <> 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 0   
   
and slot 4     -- ÇÁÎÃÁ ÇÏåÄÚ(ÆÙÅ ÔÀº 0123ÀÌÙ.)  
  
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  
  
 
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  
  
    
-- Àß øÈ 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 12)  
    
set @OptLvl 12  
  
 end  
 
else  
 
begin  
  
  
if( @IS_PET )  
   
set @Data 0  
  
else  
  
begin  
   
declare @MaxCount int  
   select 
@MaxCount MaxStack from _RefObjItem where 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:
if (@OptLvl 0)  
    
set @OptLvl 0  
   
else if (@OptLvl 12)  
    
set @OptLvl 12 

PHP:
if (@OptLvl 0)  
    
set @OptLvl 0  
   
else if (@OptLvl 255)  
    
set @OptLvl 255 

textdata_equip&skill
NPC POP
4 NPC Castaway
Ref.Nest


Hero :
...!!


04-07-2014, 03:18 PM   #4

abed2006



  abed2006


Aug 2010
73568
412
Male
10
abed2006

abed2006

















04-07-2014, 03:23 PM   #5

Hero



  Hero


Jan 2014
116050
7,017
Egypt
;"#string n = "C
No Server
Male
85
Hero

Hero









Hero :
...!!


04-07-2014, 04:16 PM   #6

abed2006



  abed2006


Aug 2010
73568
412
Male
10
abed2006

abed2006











npc
npc 14




04-07-2014, 04:25 PM   #7

Hero



  Hero


Jan 2014
116050
7,017
Egypt
;"#string n = "C
No Server
Male
85
Hero

Hero








Query
PHP:
USE [SRO_VT_SHARD]
GO
/****** Object:  StoredProcedure [dbo].[_SMC_EDIT_ITEM]    Script Date: 06/15/2012 19:51:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
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 
-1    -- 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 
-2    -- 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 
-2    -- 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 
-3    -- 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 where ID = @RefItemID
    
if (@tid1 <> 3)
    
begin
        select 
-5    -- 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 (@OptLvl > 255)
    begin
        set @OptLvl = 255    -- clamp optlevel to 255
    end    
    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 
Query


Hero :
...!!


04-07-2014, 04:40 PM   #8

abed2006



  abed2006


Aug 2010
73568
412
Male
10
abed2006

abed2006







HERO



+

NPC




04-07-2014, 04:41 PM   #9

abed2006



  abed2006


Aug 2010
73568
412
Male
10
abed2006

abed2006










abed2006 ; 04-07-2014 05:26 PM :

04-07-2014, 05:52 PM   #10

Hero



  Hero


Jan 2014
116050
7,017
Egypt
;"#string n = "C
No Server
Male
85
Hero

Hero









Hero :
...!!


04-07-2014, 07:03 PM   #11

DesertStorm



  DesertStorm


Jun 2014
117767
3,691
衙衙
ツSupportingツ
Private Server
Male
64
DesertStorm

DesertStorm










DesertStorm :


04-07-2014, 10:06 PM   #12

abed2006



  abed2006


Aug 2010
73568
412
Male
10
abed2006

abed2006












04-07-2014, 10:17 PM   #13

DesertStorm



  DesertStorm


Jun 2014
117767
3,691
衙衙
ツSupportingツ
Private Server
Male
64
DesertStorm

DesertStorm







##


DesertStorm :




« | »

: 1 (0 1 )
 



Exclamation 12 klose--11 8 04-03-2009 11:05 AM
12 klose--11 4 03-03-2009 11:13 PM
12 klose--11 2 03-03-2009 12:28 AM


10:54 PM.

- - -