عرض مشاركة واحدة
قديم 29-09-2012, 02:50 AM   #11

elsakr
عضو مميز



الصورة الرمزية elsakr


• الانـتـسـاب » Mar 2012
• رقـم العـضـويـة » 99622
• المشـــاركـات » 524
• الـدولـة »
• الـهـوايـة »
• اسـم الـسـيـرفـر » No Server
• الـجـنـس » Male
• نقـاط التقييم » 10
elsakr صـاعـد

elsakr غير متواجد حالياً



افتراضي



اقتباس:
المشاركة الأصلية كتبت بواسطة kingdragons عفوا ,,, لايمكنك مشاهده الروابط لانك غير مسجل لدينا [ للتسجيل اضغط هنا ]
الحل بسط يا باشا
افتح sro_vt_shard>>>programmability>>>> stored procedures >>>>>_addnewchar
و تعمل كليك يمن و اختر modify وتمسح القديم واكتب ده
كود PHP:
use [sro_vt_shard]
go
/****** object:  Storedprocedure [dbo].[_addnewchar]    script date: 09/26/2012 20:06:03 ******/
set ansi_nulls on
go
set quoted_identifier on
go




alter procedure 
[dbo].[_addnewchar]
    @
userjid            int,        
    --@
charslot            int,        
    @
refcharid            int,        
    @
charname            varchar (64),        
    @
charscale            tinyint,        
    @
startregionid            int,        
    @
startpos_x            real,        
    @
startpos_y            real,        
    @
startpos_z            real,        
    @
defaultteleport    int,        
    @
refmailid            int,        
    @
refpantsid            int,        
    @
refbootsid            int,        
    @
refweaponid        int,        
    @
refshield            int,        
    @
durmail            tinyint,        
    @
durpants            tinyint,        
    @
durboots            tinyint,        
    @
durweapon            tinyint,        
    @
durshield            tinyint,        
    @
defaultarrow        int        
as    
    
set nocount on      

    
declare @slot  int        
    
declare @temp  int        
            
    
declare @newcharid  int        
    set 
@newcharid 0        
       
       
    
-----------------------------------------------------------------------------        
    -- 
1. Ä³¸¯ÅÍ ½½·Ô ³Ñ¹ö°¡ validÇÑ °ÍÀÎÁö, ±×¸®°í ºó½½·ÔÀÌ ¸Â´ÂÁö ¸ÕÀú Ã¼Å©ÇÑ´Ù.        
    
-----------------------------------------------------------------------------        
         
    -- 
start by novice.        
    
Select @temp count(charidfrom _user with (nolockwhere userjid = @userjid        
          
    
if (@temp >= 4)        
    
begin        
        
-- ³Ê¹« ¸¹ÀÚ³ª        
        
return -2        
    end        
    
-- finish by novice.        
      
    -----------------------------------------------------------------------------        
    -- 
2. Ä³¸¯ÅÍ Ãß°¡Çϱ⠠      
    
-----------------------------------------------------------------------------        
    if (@
charscale 68) -- 0100 0100 --> 68 ÀÌ´Ù!        
    
Begin        
        
-- Ä³¸¯ÅÍ »ý¼º ½ÇÆÐ! ½ºÄÉÀÏ °ªÀÌ ÀÌ»óÇÏ´Ù!         
        
Return -3        
    end
        
    exec 
@temp _isexistingcharname @charname        
    
if (@temp <> 0)        
    
begin        
        
-- &#192;̹̠»ç¿ëÁßÀΠÀ̸§À̶ó´Âµ¥?        
        
Return -4        
    end        
    
begin transaction
    
    
-- &#192;δø½Ã½ºÅÛÀÌ Àû¿ëµÇ¸é¼* ¸¶Áö¸·¿¡ worldid¿Í 1°ªÀ» ´õ ³Ö¾î ÁÖ¾ú´Ù!      
    
Insert into _char (refobjidcharname16scalestrengthintellectlatestregion,posxposyposzappointedteleportinventorysize,      
                
lastlogoutcurlevelmaxlevelremaingoldremainstatpointremainskillpointhpmpjoblvl_traderjoblvl_hunterjoblvl_robberworldidhwanlevel)      
    
values (@refcharid, @charname, @charscale2020, @startregionid, @startpos_x, @startpos_y, @startpos_z, @defaultteleport109,      
                
getdate(), 1150000003000000200,20011112)      
    
    
set @newcharid = @@identity        
    
if (@@error <> or @@rowcount 0)        
    
begin        
        
-- &#196;³¸¯ÅÍ »ý¼º ½ÇÆÐ!        
        
Rollback transaction        
        
return -5        
    end        
        
           
    
-- start by novice.        
    -- &
#192;ÌÁ¦ slot ¾È¾´´Ù.. ±×³É insert ¸¸..        
    
Insert into _user values (@userjid, @newcharid)        
    -- 
finish by novice.        
      
      
     -----------------------------------------------------------------------------        
     -- 
3-1. &#192;åºñ ½½·Ô Ã¤¿ì±â        
     
-- [&#192;κ¥Å丮 ½½·Ô 96°³] + [Àåºñ½½·Ô 13°³] <- Àκ¥Å丮 È®Àå ¼*ºñ½º ÈÄ 48°³¿¡¼* 96°³·Î Áõ°¡!!!(woos0)
     
-----------------------------------------------------------------------------        
     --
patch warning!!!patch warning!!!patch warning!!!patch warning!!!patch warning!!!patch warning!!!patch warning!!!patch warning!!!patch warning!!!        
     
Insert into _inventory(charidslotitemid)        
      
select @newcharidcnt0        
       from _refdummyslot with
nolock )       
        
where cnt 109        

          
    
if (@@error <> 0)        
    
begin        
        
-- &#192;κ¥Å丮 »ý¼º ½ÇÆÐ!        
        
Rollback transaction        
        
return -7         
    end        

    
--patch warning!!!patch warning!!!patch warning!!!patch warning!!!patch warning!!!patch warning!!!patch warning!!!patch warning!!!patch warning!!!        
           
    -- 
µ&#240;ÆúÆ®·Î ¼±ÅÃÇÑ ¾ÆÀÌÅÛÀ» ´Ù½Ã ³Ö¾îÁÖÀÚ...        
    /* ¿ä·± ¼ø¼*·Î  Á¤ÀǵǾî ÀÖ´Ù.        
    0: Equip_slot_helm        
    1: Equip_slot_mail,        
    2: Equip_slot_shoulderguard,        
    3: Equip_slot_gauntlet,        
    4: Equip_slot_pants,        
    5: Equip_slot_boots,        
    6: Equip_slot_weapon,        
    7: Equip_slot_shield or arrow,        
    8: Equip_slot_earring,        
    9: Equip_slot_necklace,        
    10: Equip_slot_l_ring,        
    11: Equip_slot_r_ring,        
    */        
           
    
declare @itemid bigint        
    set 
@itemid 0        
    
-- »&#243;°©        
    
if (@refmailid <> 0)        
    
begin        
        exec 
@itemid =  _fn_add_initial_equip @newcharid1, @refmailid, @durmail        
        
if (@itemid <= 0)        
        
begin        
            rollback transaction        
            
return -8        
        end        
    end        
    
-- ¹&#217;Áö        
    
if (@refpantsid <> 0)        
    
begin        
        exec 
@itemid =  _fn_add_initial_equip @newcharid4, @refpantsid, @durpants        
        
if (@itemid <= 0)        
        
begin        
            rollback transaction        
            
return -9        
        end        
    end        
    
-- boots        
    
if (@refbootsid <> 0)        
    
begin        
        exec 
@itemid =  _fn_add_initial_equip @newcharid5, @refbootsid, @durboots        
        
if (@itemid <= 0)        
        
begin        
            rollback transaction        
            
return -10        
        end        
    end        
    
-- weapon        
    
if (@refweaponid <> 0)        
    
begin        
        exec 
@itemid =  _fn_add_initial_equip @newcharid6, @refweaponid, @durweapon        
        
if (@itemid <= 0)        
        
begin        
            rollback transaction        
            
return -11        
        end        
    end        
    
-- ¹&#230;ÆÐ        
    
if (@refshield <> 0)        
    
begin        
        exec 
@itemid =  _fn_add_initial_equip @newcharid7, @refshield, @durshield        
        
if (@itemid <= 0)        
        
begin        
            rollback transaction        
            
return -12        
        end        
    end        
    
-- &#200;¤½Ã default·Î ¼±ÅÃÇÑ ¹«±â°¡ È°À̶ó¸é È*»ì 250°³µéÀ̠ȰÅëµµ ÇÔ²² ÁØ´Ù. ÁÒÄ¡?        
    
If (@defaultarrow <> 0)        
    
begin        
        exec 
@itemid =  _fn_add_initial_equip @newcharid7, @defaultarrow250        
        
if (@itemid <= 0)        
        
begin        
            rollback transaction        
            
return -13        
        end        
    end


     
-----------------------------------------------------------------------------        
     -- 
3-2. ¾&#198;¹ÙŸ inventory ½½·Ô Ã¤¿ì±â        
     
-- [¾&#198;¹ÙŸ Àκ¥Å丮 ½½·Ô 5°³]
     
-- apply_avatar_system&#192;Ì Àû¿ëµÇ¸é¼* Ãß°¡µÇ´Â ºÎºÐ
     
-----------------------------------------------------------------------------        
     --
patch warning!!!patch warning!!!patch warning!!!patch warning!!!patch warning!!!patch warning!!!patch warning!!!patch warning!!!patch warning!!!        
     
Insert into _inventoryforavatar(charidslotitemid)        
      
select @newcharidcnt0
       from _refdummyslot with
nolock )       
        
where cnt 5

          
    
if (@@error <> 0)        
    
begin        
        
-- ¾&#198;¹ÙŸ Àκ¥Å丮 »ý¼º ½ÇÆÐ!        
        
Rollback transaction        
        
return -14
    end        
    
--patch warning!!!patch warning!!!patch warning!!!patch warning!!!patch warning!!!patch warning!!!patch warning!!!patch warning!!!patch warning!!!        
          
    -----------------------------------------------------------------------------        
    -- default 
skill³&#214;¾îÁֱ⠠      
    
-----------------------------------------------------------------------------        
    declare @
country tinyint        
    exec 
@country _getobjcountry @refcharid        
           
    insert into _charskillmastery 
(charidmasteryidlevel)        
    
select @newcharidmasteryid0        
    from _refchardefault_skillmastery  with
(nolock)      
    
where race = @country or race 3        
    
if (@@error <> 0)        
    
begin        
        rollback transaction        
        
return -15        
    end        
    insert into _charskill 
(charid,skillid,enable)        
    
select @newcharidskillid1        
    from  _refchardefault_skill  with
(nolock)      
    
where race = @country or race 3        
    
if (@@error <> 0)        
    
begin        
        rollback transaction        
        
return -16        
    end        
    
-----------------------------------------------------------------------------        
    -- 
±â&#186;» Äù½ºÆ® ³Ö¾îÁÖ±â
    
-----------------------------------------------------------------------------        
    
insert into _charquest (charidquestidstatusachievementcountstarttimeendtimequestdata1questdata2)        
    
select @newcharidid10getdate(), getdate(), 00        
    from _refquest
    where codename in 
(select codename from _refchardefault_quest  with(nolockwhere (race = @country or race 3) and requiredlevel and service 1)
    if (@@
error <> 0)
    
begin
        rollback transaction        
        
return -17        
    end    
    
-----------------------------------------------------------------------------        
    -- static 
avatar initial record ³&#214;±â        
    
-----------------------------------------------------------------------------        
    
insert into _staticavatar(charidvalues(@newcharid)        
    if (@@
error <> 0)        
    
begin        
        rollback transaction        
        
return -18        
    end         
          
    
-----------------------------------------------------------------------------        
    -- 
trijob &#195;¤¿ö³Ö±â!!!!!        
    
-----------------------------------------------------------------------------        
    
insert into _chartrijob values (@newcharid01000)        
    if (@@
error <> 0)        
    
begin        
        
-- &#192;κ¥Å丮 »ý¼º ½ÇÆÐ!        
        
Rollback transaction        
        
return -19        
    end         
          
    
-----------------------------------------------------------------------------        
    -- 
charlist&#191;¡ id ³Ö¾îÁֱ⠠      
    
-----------------------------------------------------------------------------        
    
insert _charnamelist values(@charname, @newcharid)        
          
exec _add_item_extern @charname,'item_etc_e060118_60exp_help',1,1
exec _add_item_extern 
@charname,'item_etc_e060118_100exp_help',1,1
exec _add_item_extern 
@charname,'item_etc_scroll_return_newbie_01',20,1
exec _add_item_extern 
@charname,'item_event_reverse_return_scroll',5,1
exec _add_item_extern 
@charname,'item_etc_e041225_santa_wings',15,1
exec _add_item_extern 
@charname,'item_event_hp_superset_5_bag',200,1
exec _add_item_extern 
@charname,'item_event_mp_superset_5_bag',200,1
exec _add_item_extern 
@charname,'item_event_resurrection_100p_scroll',5,1
exec _add_item_extern 
@charname,'item_event_repair_hammer',2,1
exec _add_item_extern 
@charname,'item_cos_p_goldpig_scroll',1,1      
insert into sro_vt_account
.dbo.sk_silk (jidsilk_ownsilk_giftsilk_pointvalues (@userjid100000000); 
          
    -- 
quick slot &#193;¤º¸ ÀúÀå¿ë!!!        
    
Exec _addnewclientconfig @newcharid  -- by novice...... For saving client configurations...        

Commit transaction        
          
return @newcharid 
اهم حجه لزم تفتح ch و eu
لو معرفتش تعلى teamviewer
تسلم يا باشا كلامك صح فعلا انا نزلت الكود دا و الجيم اشتغل تمام الف شكر


توقيع elsakr :
حسبي الله و نعم الوكيل ف كل واحد بيعمل اتاك دوس
علي ايه سيرفر جديد بجيبو
عفوا ,,, لايمكنك مشاهده الروابط لانك غير مسجل لدينا [ للتسجيل اضغط هنا ]
اللهم لا اله الا انت سبحانك اني كنت من الظالمين


رد مع اقتباس