[Help] CastleSiege

Results 1 to 13 of 13
  1. #1
    Valued Member sk1zzo is offline
    MemberRank
    Dec 2011 Join Date
    Why?Location
    132Posts

    ! [Help] CastleSiege

    Hello, I configured Castle Siege but guild registration failed and when CS started i cant attack the guardian statues and it says the registration was failed?
    I'm using http://forum.ragezone.com/f197/relea...mized-1055512/

    my config:
    Code:
    //=======================
    // CASTLE SIEGE SETTINGS
    //=======================
    //
    
    0
    	7	// How many days will last the entire cycle of the event
    end
    
    
    //=========================================================================
    // Setting of castle periods.. 
    // Period ID	Day	Hour	Minute 
    //=========================================================================
    1
    	1	0	0	0	// register period
    	2	1	23	59	// idle state
    	3	2	0	0	// register mark of the lord state
    	4	5	0	0	// idle state
    	5	5	12	0	// castle attack guild notification state
    	6	5	19	0	// ready for castle siege state
    	7	6	16	0	// castle siege start state
    	8	6	18	0	// castle siege end state
    	9	7	0	0	// end of cycle (restart from state 1, automaticaly)
    end
    
    //=========================================================================
    // Settings of NPC located in loren
    //=========================================================================
    // 	NPC	ID 	DBStore Def 	Recover HP 	StartHP SX 	SY 	DX 	DY 	DIR
    //----------------------------------------------------------------------------------------------------------------------------------
    2
    	283	1	1	1	0	0	1500000	94	227	-1	-1	1   //Guardian Statue
    	283	2	1	1	0	0	1500000	94	182	-1	-1	1   //Guardian Statue
    	283	3	1	1	0	0	1500000	82	130	-1	-1	1   //Guardian Statue
    	283	4	1	1	0	0	1500000	107	130	-1	-1	1   //Guardian Statue
    
    	277	1	1	1	0	0	1900000	93	204	-1	-1	1   //Castle Gate
    	277	2	1	1	0	0	1900000	81	161	-1	-1	1   //Castle Gate
    	277	3	1	1	0	0	1900000	107	161	-1	-1	1   //Castle Gate
    	277	4	1	1	0	0	1900000	67	114	-1	-1	1   //Castle Gate
    	277	5	1	1	0	0	1900000	93	114	-1	-1	1   //Castle Gate
    	277	6	1	1	0	0	1900000	119	114	-1	-1	1   //Castle Gate
    
    	288	1	0	1	0	0	800000	75	130	-1	-1	1   //Canon Tower
    	288	2	0	1	0	0	800000	88	130	-1	-1	1   //Canon Tower
    	288	3	0	1	0	0	800000	99	130	-1	-1	1   //Canon Tower
    	288	4	0	1	0	0	800000	114	130	-1	-1	1   //Canon Tower
    	288	5	0	1	0	0	800000	94	151	-1	-1	1   //Canon Tower
    	288	6	0	1	0	0	800000	88	182	-1	-1	1   //Canon Tower
    	288	7	0	1	0	0	800000	100	182	-1	-1	1   //Canon Tower
    	288	8	0	1	0	0	800000	94	221	-1	-1	1   //Canon Tower
    	288	9	0	1	0	0	800000	94	233	-1	-1	1   //Canon Tower
    
    	215	1	0	1	0	0	10000	94	242	-1	-1	1   //Shield
    
    	222	1	0	1	0	0	10000	80	188	-1	-1	1   //Slingshot Defense
    	222	2	0	1	0	0	10000	105	188	-1	-1	1   //Slingshot Defense
    
    	221	1	0	2	0	0	10000	63	19	-1	-1	5   //Slingshot Attack
    	221	2	0	2	0	0	10000	119	19	-1	-1	5   //Slingshot Attack
    end


  2. #2

    Re: [Help] CastleSiege

    i use this and works fine
    Code:
    //==========================================================================
    //Project: NaMEch
    //Sources: NaM4 
    //Re-Struct & Fixes: Echy-
    //Information: Configuracion del Castle Siegue
    //=========================================================================
    
    0
    	1	// ¿Cuántos días durará el ciclo completo del evento?
    end
    
    
    //=========================================================================
    // Configuracion de los periodos.. 
    //=========================================================================
    // ID Período 	Dia 	Horas 	Minutos 
    1
    	1	0	0	0	// periodo de registro
    	2	1	23	59	// estado de inactividad
    	3	2	0	0	// registro Mark Of The Lord
    	4	5	0	0	// estado de inactividad
    	5	5	12	0	// notificacion a las guilds
    	6	5	19	0	// preparacion para castle siege
    	7	6	17	0	// comienzo castle siege
    	8	6	19	0	// fin castle siege
    	9	7	0	0	// fin del ciclo (automaticamente vuelve al estado 1)
    end
    
    //=========================================================================
    // Configuracion de los NPC en Loren
    //=========================================================================
    // 	NPC	ID 	Store in DB(0/1)?? 	Def 	Recover 	HP 	Start HP 	SX 	SY 	DX 	DY 	DIR
    //----------------------------------------------------------------------------------------------------------------------------------
    2
    	283	1	1	1	0	0	400000	94	227	-1	-1	1   //Guardian Statue
    	283	2	1	1	0	0	400000	94	182	-1	-1	1   //Guardian Statue
    	283	3	1	1	0	0	400000	82	130	-1	-1	1   //Guardian Statue
    	283	4	1	1	0	0	400000	107	130	-1	-1	1   //Guardian Statue
    
    	277	1	1	1	0	0	500000	93	204	-1	-1	1   //Castle Gate
    	277	2	1	1	0	0	500000	81	161	-1	-1	1   //Castle Gate
    	277	3	1	1	0	0	500000	107	161	-1	-1	1   //Castle Gate
    	277	4	1	1	0	0	500000	67	114	-1	-1	1   //Castle Gate
    	277	5	1	1	0	0	500000	93	114	-1	-1	1   //Castle Gate
    	277	6	1	1	0	0	500000	119	114	-1	-1	1   //Castle Gate
    
    	288	1	0	1	0	0	800000	75	130	-1	-1	1   //Canon Tower
    	288	2	0	1	0	0	800000	88	130	-1	-1	1   //Canon Tower
    	288	3	0	1	0	0	800000	99	130	-1	-1	1   //Canon Tower
    	288	4	0	1	0	0	800000	114	130	-1	-1	1   //Canon Tower
    	288	5	0	1	0	0	800000	94	151	-1	-1	1   //Canon Tower
    	288	6	0	1	0	0	800000	88	182	-1	-1	1   //Canon Tower
    	288	7	0	1	0	0	800000	100	182	-1	-1	1   //Canon Tower
    	288	8	0	1	0	0	800000	94	221	-1	-1	1   //Canon Tower
    	288	9	0	1	0	0	800000	94	233	-1	-1	1   //Canon Tower
    
    	215	1	0	1	0	0	10000	94	242	-1	-1	1   //Shield
    
    	222	1	0	1	0	0	10000	80	188	-1	-1	1   //Slingshot Defense
    	222	2	0	1	0	0	10000	105	188	-1	-1	1   //Slingshot Defense
    
    	221	1	0	2	0	0	10000	63	19	-1	-1	5   //Slingshot Attack
    	221	2	0	2	0	0	10000	119	19	-1	-1	5   //Slingshot Attack
    end
    the registration fail where u get that? screens would be great.

  3. #3
    Valued Member sk1zzo is offline
    MemberRank
    Dec 2011 Join Date
    Why?Location
    132Posts

    Re: [Help] CastleSiege

    Quote Originally Posted by KarLi View Post
    i use this and works fine
    Code:
    //==========================================================================
    //Project: NaMEch
    //Sources: NaM4 
    //Re-Struct & Fixes: Echy-
    //Information: Configuracion del Castle Siegue
    //=========================================================================
    
    0
    	1	// ¿Cuántos días durará el ciclo completo del evento?
    end
    
    
    //=========================================================================
    // Configuracion de los periodos.. 
    //=========================================================================
    // ID Período 	Dia 	Horas 	Minutos 
    1
    	1	0	0	0	// periodo de registro
    	2	1	23	59	// estado de inactividad
    	3	2	0	0	// registro Mark Of The Lord
    	4	5	0	0	// estado de inactividad
    	5	5	12	0	// notificacion a las guilds
    	6	5	19	0	// preparacion para castle siege
    	7	6	17	0	// comienzo castle siege
    	8	6	19	0	// fin castle siege
    	9	7	0	0	// fin del ciclo (automaticamente vuelve al estado 1)
    end
    
    //=========================================================================
    // Configuracion de los NPC en Loren
    //=========================================================================
    // 	NPC	ID 	Store in DB(0/1)?? 	Def 	Recover 	HP 	Start HP 	SX 	SY 	DX 	DY 	DIR
    //----------------------------------------------------------------------------------------------------------------------------------
    2
    	283	1	1	1	0	0	400000	94	227	-1	-1	1   //Guardian Statue
    	283	2	1	1	0	0	400000	94	182	-1	-1	1   //Guardian Statue
    	283	3	1	1	0	0	400000	82	130	-1	-1	1   //Guardian Statue
    	283	4	1	1	0	0	400000	107	130	-1	-1	1   //Guardian Statue
    
    	277	1	1	1	0	0	500000	93	204	-1	-1	1   //Castle Gate
    	277	2	1	1	0	0	500000	81	161	-1	-1	1   //Castle Gate
    	277	3	1	1	0	0	500000	107	161	-1	-1	1   //Castle Gate
    	277	4	1	1	0	0	500000	67	114	-1	-1	1   //Castle Gate
    	277	5	1	1	0	0	500000	93	114	-1	-1	1   //Castle Gate
    	277	6	1	1	0	0	500000	119	114	-1	-1	1   //Castle Gate
    
    	288	1	0	1	0	0	800000	75	130	-1	-1	1   //Canon Tower
    	288	2	0	1	0	0	800000	88	130	-1	-1	1   //Canon Tower
    	288	3	0	1	0	0	800000	99	130	-1	-1	1   //Canon Tower
    	288	4	0	1	0	0	800000	114	130	-1	-1	1   //Canon Tower
    	288	5	0	1	0	0	800000	94	151	-1	-1	1   //Canon Tower
    	288	6	0	1	0	0	800000	88	182	-1	-1	1   //Canon Tower
    	288	7	0	1	0	0	800000	100	182	-1	-1	1   //Canon Tower
    	288	8	0	1	0	0	800000	94	221	-1	-1	1   //Canon Tower
    	288	9	0	1	0	0	800000	94	233	-1	-1	1   //Canon Tower
    
    	215	1	0	1	0	0	10000	94	242	-1	-1	1   //Shield
    
    	222	1	0	1	0	0	10000	80	188	-1	-1	1   //Slingshot Defense
    	222	2	0	1	0	0	10000	105	188	-1	-1	1   //Slingshot Defense
    
    	221	1	0	2	0	0	10000	63	19	-1	-1	5   //Slingshot Attack
    	221	2	0	2	0	0	10000	119	19	-1	-1	5   //Slingshot Attack
    end
    the registration fail where u get that? screens would be great.
    I don't have right now, but even after i register the guild and after 2 days i try to add Sign of Lord and it say: https://i.gyazo.com/9dcd6faf0a0f509a...a7e9926bdc.png and in Registered Guild list the status was Failed...

    My commonserver config:
    Code:
    ;==========================================================================
    ;	CASTLE SIEGE & DEEP LOREN
    ;==========================================================================
    CastleSiegeRun				= 1
    CastleDeepEvent				= 1
    BlockCastleSiegeMapEnter		= 0
    
    IsDropSetItemInCastleHuntZone		= 1
    SetItemInCastleHuntZoneDropRate		= 60
    SetItemInCastleHuntZoneDropLevel	= 75
    
    MarkOfTheLord				= 30
    
    IsDropGemOfDefend			= 1
    GemOfDefendDropRate			= 300
    GemOfDefendDropLevel			= 75
    
    ;==========================================================================
    ; CastleSpecificState =
    ;
    ; 1 - Registration of Castle Siege
    ; 2 - Idle State
    ; 3 - Registration of the status of Mark Lord
    ; 4 - Idle State
    ; 5 - Notification of the attack Castle to quilts
    ; 6 - Reading the state of Castle Siege
    ; 7 - ITop of Castle Siege
    ; 8 - End of Castle Siege
    ; 9 - End of the cycle of Castle Siege (Back automatically for 1)
    ;==========================================================================
    CastleSpecificState	=0
    
    CastleCycleStartYear	=0
    CastleCycleStartMonth	=0
    CastleCycleStartDay	=0
    
    CastleStateStartYear	=0
    CastleStateStartMonth	=0
    CastleStateStartDay	=0
    CastleStateStartHour	=0
    CastleStateStartMinute	=0
    Last edited by sk1zzo; 28-10-18 at 11:37 PM.

  4. #4

    Re: [Help] CastleSiege

    Oh not sure there, and i dont think commonserver.cfg is the issue..
    perhaps ur guild or alliance.. or the how many sols u registered..
    did u try adding manually the guilds with sql table? does it work? if not then there is bug in gs_cs.exe (can replace with newer scfmt files of this version for sure) if it works then something else is the issue

  5. #5
    Account Upgraded | Title Enabled! thevjfla is offline
    MemberRank
    Apr 2012 Join Date
    203Posts

    Re: [Help] CastleSiege

    The Castle Siege dont need config from file, all runs by DB.

    If you have this config:

    8 6 19 0 // fin castle siege
    9 7 0 0 // fin del ciclo (automaticamente vuelve al estado 1)

    For example, if you need to run the CS all:

    If you need to run, for example, every Saturday day you need to put in MuCastle_DATA table


    SIEGE_START_DATE: 2018-10-28 00:00:00
    SIEGE_END_DATE: 2018-11-4 00:00:00
    SIEGE_ENDED: True
    CASTLE_OCCUPY: False
    OWNER_GUILD: Any guild like ADMIN or what u want

    Start and end sunday to sunday

    If you want to run it on sundays, you have to set monday to monday.

    The period finishes one more day than the battle.


    Config it and paste the output log for check here ^^

  6. #6
    Valued Member sk1zzo is offline
    MemberRank
    Dec 2011 Join Date
    Why?Location
    132Posts

    Re: [Help] CastleSiege

    I used @KarLi configuration
    Code:
     //==========================================================================
    //Project: NaMEch
    //Sources: NaM4 
    //Re-Struct & Fixes: Echy-
    //Information: Configuracion del Castle Siegue
    //=========================================================================
    
    0
    	1	// ¿Cuántos días durará el ciclo completo del evento?
    end
    
    
    //=========================================================================
    // Configuracion de los periodos.. 
    //=========================================================================
    // ID Período 	Dia 	Horas 	Minutos 
    1
    	1	0	0	0	// periodo de registro
    	2	1	23	59	// estado de inactividad
    	3	2	0	0	// registro Mark Of The Lord
    	4	5	0	0	// estado de inactividad
    	5	5	12	0	// notificacion a las guilds
    	6	5	19	0	// preparacion para castle siege
    	7	6	16	0	// comienzo castle siege
    	8	6	18	0	// fin castle siege
    	9	7	0	0	// fin del ciclo (automaticamente vuelve al estado 1)
    end
    
    //=========================================================================
    // Configuracion de los NPC en Loren
    //=========================================================================
    // 	NPC	ID 	Store in DB(0/1)?? 	Def 	Recover 	HP 	Start HP 	SX 	SY 	DX 	DY 	DIR
    //----------------------------------------------------------------------------------------------------------------------------------
    2
    	283	1	1	1	0	0	400000	94	227	-1	-1	1   //Guardian Statue
    	283	2	1	1	0	0	400000	94	182	-1	-1	1   //Guardian Statue
    	283	3	1	1	0	0	400000	82	130	-1	-1	1   //Guardian Statue
    	283	4	1	1	0	0	400000	107	130	-1	-1	1   //Guardian Statue
    
    	277	1	1	1	0	0	500000	93	204	-1	-1	1   //Castle Gate
    	277	2	1	1	0	0	500000	81	161	-1	-1	1   //Castle Gate
    	277	3	1	1	0	0	500000	107	161	-1	-1	1   //Castle Gate
    	277	4	1	1	0	0	500000	67	114	-1	-1	1   //Castle Gate
    	277	5	1	1	0	0	500000	93	114	-1	-1	1   //Castle Gate
    	277	6	1	1	0	0	500000	119	114	-1	-1	1   //Castle Gate
    
    	288	1	0	1	0	0	800000	75	130	-1	-1	1   //Canon Tower
    	288	2	0	1	0	0	800000	88	130	-1	-1	1   //Canon Tower
    	288	3	0	1	0	0	800000	99	130	-1	-1	1   //Canon Tower
    	288	4	0	1	0	0	800000	114	130	-1	-1	1   //Canon Tower
    	288	5	0	1	0	0	800000	94	151	-1	-1	1   //Canon Tower
    	288	6	0	1	0	0	800000	88	182	-1	-1	1   //Canon Tower
    	288	7	0	1	0	0	800000	100	182	-1	-1	1   //Canon Tower
    	288	8	0	1	0	0	800000	94	221	-1	-1	1   //Canon Tower
    	288	9	0	1	0	0	800000	94	233	-1	-1	1   //Canon Tower
    
    	215	1	0	1	0	0	10000	94	242	-1	-1	1   //Shield
    
    	222	1	0	1	0	0	10000	80	188	-1	-1	1   //Slingshot Defense
    	222	2	0	1	0	0	10000	105	188	-1	-1	1   //Slingshot Defense
    
    	221	1	0	2	0	0	10000	63	19	-1	-1	5   //Slingshot Attack
    	221	2	0	2	0	0	10000	119	19	-1	-1	5   //Slingshot Attack
    end
    and today (Friday) I got this at 5:00 PM


    My DB table:
    Clock:

  7. #7
    Account Upgraded | Title Enabled! thevjfla is offline
    MemberRank
    Apr 2012 Join Date
    203Posts

    Re: [Help] CastleSiege

    Find the Gameserver logs, check when start or when reload the CS if the times are correct.
    Can use the NPCs for check the correct states, editing the config and reloading the CS event.

    If nobody register the event, automaticaly win the owner of the castle... :P

  8. #8
    Valued Member sk1zzo is offline
    MemberRank
    Dec 2011 Join Date
    Why?Location
    132Posts

    Re: [Help] CastleSiege

    Hey @KarLi @thevjfla
    It's Sunday and it's register period for my configuration.
    So I logged in and tried to register.

    GSCS logs
    Code:
    [CastleSiege] CCastleSiege::DataRequest() - REQUEST DATA FIRST
    05:58:51 [CastleSiege] CCastleSiege::LoadData() - Siege Owner:AdminS Occupy:1 Tax:3,3
    05:58:51 [CastleSiege] CCastleSiege::LoadData() - Siege Schedule Start Date (2018-11-4)
    05:58:51 [CastleSiege] CCastleSiege::LoadData() - Siege Schedule Date (7-0-0)
    05:58:51 [CastleSiege] CCastleSiege::LoadData() - Siege Schedule End Date (2018-11-11(0:0:0)
    05:58:51 [CastleSiege][SetCastleNpcData][Update] Count:0 283 1 0 0 400000 400000 94 227 1
    05:58:51 [CastleSiege][SetCastleNpcData][Update] Count:1 283 2 0 0 400000 400000 94 182 1
    05:58:51 [CastleSiege][SetCastleNpcData][Update] Count:2 283 3 0 0 400000 400000 82 130 1
    05:58:51 [CastleSiege][SetCastleNpcData][Update] Count:3 283 4 0 0 400000 400000 107 130 1
    05:58:51 [CastleSiege][SetCastleNpcData][Update] Count:4 277 1 0 0 500000 500000 93 204 1
    05:58:51 [CastleSiege][SetCastleNpcData][Update] Count:5 277 2 0 0 500000 500000 81 161 1
    05:58:51 [CastleSiege][SetCastleNpcData][Update] Count:6 277 3 0 0 500000 500000 107 161 1
    05:58:51 [CastleSiege][SetCastleNpcData][Update] Count:7 277 4 0 0 500000 500000 67 114 1
    05:58:51 [CastleSiege][SetCastleNpcData][Update] Count:8 277 5 0 0 500000 500000 93 114 1
    05:58:51 [CastleSiege][SetCastleNpcData][Update] Count:9 277 6 0 0 500000 500000 119 114 1
    05:58:51 [CastleSiege] CCastleSiege::Init() - START
    05:58:51 [CastleSiege][CreateCsGateLever] gObjAddMonster 1533
    05:58:51 [CastleSiege][CreateCsGateLever] gObjAddMonster 1534
    05:58:51 [CastleSiege][CreateCsGateLever] gObjAddMonster 1535
    05:58:51 [CastleSiege][CreateCsGateLever] gObjAddMonster 1536
    05:58:51 [CastleSiege][CreateCsGateLever] gObjAddMonster 1537
    05:58:51 [CastleSiege][CreateCsGateLever] gObjAddMonster 1538
    05:58:51 SET SetState_REGSIEGE()
    05:59:02 connect : [4000][102.186.148.28]
    05:59:02 [CloseWindow] [][] Closing Window 2
    and my registration is failed i think..


    I thinkg it should be "Processing"

  9. #9
    Account Upgraded | Title Enabled! thevjfla is offline
    MemberRank
    Apr 2012 Join Date
    203Posts

    Re: [Help] CastleSiege

    Quote Originally Posted by sk1zzo View Post
    Hey @KarLi @thevjfla
    It's Sunday and it's register period for my configuration.
    So I logged in and tried to register.

    GSCS logs
    Code:
    [CastleSiege] CCastleSiege::DataRequest() - REQUEST DATA FIRST
    05:58:51 [CastleSiege] CCastleSiege::LoadData() - Siege Owner:AdminS Occupy:1 Tax:3,3
    05:58:51 [CastleSiege] CCastleSiege::LoadData() - Siege Schedule Start Date (2018-11-4)
    05:58:51 [CastleSiege] CCastleSiege::LoadData() - Siege Schedule Date (7-0-0)
    05:58:51 [CastleSiege] CCastleSiege::LoadData() - Siege Schedule End Date (2018-11-11(0:0:0)
    05:58:51 [CastleSiege][SetCastleNpcData][Update] Count:0 283 1 0 0 400000 400000 94 227 1
    05:58:51 [CastleSiege][SetCastleNpcData][Update] Count:1 283 2 0 0 400000 400000 94 182 1
    05:58:51 [CastleSiege][SetCastleNpcData][Update] Count:2 283 3 0 0 400000 400000 82 130 1
    05:58:51 [CastleSiege][SetCastleNpcData][Update] Count:3 283 4 0 0 400000 400000 107 130 1
    05:58:51 [CastleSiege][SetCastleNpcData][Update] Count:4 277 1 0 0 500000 500000 93 204 1
    05:58:51 [CastleSiege][SetCastleNpcData][Update] Count:5 277 2 0 0 500000 500000 81 161 1
    05:58:51 [CastleSiege][SetCastleNpcData][Update] Count:6 277 3 0 0 500000 500000 107 161 1
    05:58:51 [CastleSiege][SetCastleNpcData][Update] Count:7 277 4 0 0 500000 500000 67 114 1
    05:58:51 [CastleSiege][SetCastleNpcData][Update] Count:8 277 5 0 0 500000 500000 93 114 1
    05:58:51 [CastleSiege][SetCastleNpcData][Update] Count:9 277 6 0 0 500000 500000 119 114 1
    05:58:51 [CastleSiege] CCastleSiege::Init() - START
    05:58:51 [CastleSiege][CreateCsGateLever] gObjAddMonster 1533
    05:58:51 [CastleSiege][CreateCsGateLever] gObjAddMonster 1534
    05:58:51 [CastleSiege][CreateCsGateLever] gObjAddMonster 1535
    05:58:51 [CastleSiege][CreateCsGateLever] gObjAddMonster 1536
    05:58:51 [CastleSiege][CreateCsGateLever] gObjAddMonster 1537
    05:58:51 [CastleSiege][CreateCsGateLever] gObjAddMonster 1538
    05:58:51 SET SetState_REGSIEGE()
    05:59:02 connect : [4000][102.186.148.28]
    05:59:02 [CloseWindow] [][] Closing Window 2
    and my registration is failed i think..


    I thinkg it should be "Processing"
    Show me the DB config and the file config.

    I dont understand where are the error.

  10. #10
    Valued Member sk1zzo is offline
    MemberRank
    Dec 2011 Join Date
    Why?Location
    132Posts

    Re: [Help] CastleSiege

    Quote Originally Posted by thevjfla View Post
    Show me the DB config and the file config.

    I dont understand where are the error.


    Code:
    //==========================================================================
    //Project: NaMEch
    //Sources: NaM4 
    //Re-Struct & Fixes: Echy-
    //Information: Configuracion del Castle Siegue
    //=========================================================================
    
    0
    	7	// ¿Cuántos días durará el ciclo completo del evento?
    end
    
    
    //=========================================================================
    // Configuracion de los periodos.. 
    //=========================================================================
    // ID Período 	Dia 	Horas 	Minutos 
    1
    	1	0	0	0	// periodo de registro
    	2	1	23	59	// estado de inactividad
    	3	2	0	0	// registro Mark Of The Lord
    	4	5	0	0	// estado de inactividad
    	5	5	12	0	// notificacion a las guilds
    	6	5	19	0	// preparacion para castle siege
    	7	6	16	0	// comienzo castle siege
    	8	6	18	0	// fin castle siege
    	9	7	0	0	// fin del ciclo (automaticamente vuelve al estado 1)
    end
    
    //=========================================================================
    // Configuracion de los NPC en Loren
    //=========================================================================
    // 	NPC	ID 	Store in DB(0/1)?? 	Def 	Recover 	HP 	Start HP 	SX 	SY 	DX 	DY 	DIR
    //----------------------------------------------------------------------------------------------------------------------------------
    2
    	283	1	1	1	0	0	400000	94	227	-1	-1	1   //Guardian Statue
    	283	2	1	1	0	0	400000	94	182	-1	-1	1   //Guardian Statue
    	283	3	1	1	0	0	400000	82	130	-1	-1	1   //Guardian Statue
    	283	4	1	1	0	0	400000	107	130	-1	-1	1   //Guardian Statue
    
    	277	1	1	1	0	0	500000	93	204	-1	-1	1   //Castle Gate
    	277	2	1	1	0	0	500000	81	161	-1	-1	1   //Castle Gate
    	277	3	1	1	0	0	500000	107	161	-1	-1	1   //Castle Gate
    	277	4	1	1	0	0	500000	67	114	-1	-1	1   //Castle Gate
    	277	5	1	1	0	0	500000	93	114	-1	-1	1   //Castle Gate
    	277	6	1	1	0	0	500000	119	114	-1	-1	1   //Castle Gate
    
    	288	1	0	1	0	0	800000	75	130	-1	-1	1   //Canon Tower
    	288	2	0	1	0	0	800000	88	130	-1	-1	1   //Canon Tower
    	288	3	0	1	0	0	800000	99	130	-1	-1	1   //Canon Tower
    	288	4	0	1	0	0	800000	114	130	-1	-1	1   //Canon Tower
    	288	5	0	1	0	0	800000	94	151	-1	-1	1   //Canon Tower
    	288	6	0	1	0	0	800000	88	182	-1	-1	1   //Canon Tower
    	288	7	0	1	0	0	800000	100	182	-1	-1	1   //Canon Tower
    	288	8	0	1	0	0	800000	94	221	-1	-1	1   //Canon Tower
    	288	9	0	1	0	0	800000	94	233	-1	-1	1   //Canon Tower
    
    	215	1	0	1	0	0	10000	94	242	-1	-1	1   //Shield
    
    	222	1	0	1	0	0	10000	80	188	-1	-1	1   //Slingshot Defense
    	222	2	0	1	0	0	10000	105	188	-1	-1	1   //Slingshot Defense
    
    	221	1	0	2	0	0	10000	63	19	-1	-1	5   //Slingshot Attack
    	221	2	0	2	0	0	10000	119	19	-1	-1	5   //Slingshot Attack
    end

  11. #11

    Re: [Help] CastleSiege

    Quote Originally Posted by sk1zzo View Post


    Code:
    //==========================================================================
    //Project: NaMEch
    //Sources: NaM4 
    //Re-Struct & Fixes: Echy-
    //Information: Configuracion del Castle Siegue
    //=========================================================================
    
    0
    	7	// ¿Cuántos días durará el ciclo completo del evento?
    end
    
    
    //=========================================================================
    // Configuracion de los periodos.. 
    //=========================================================================
    // ID Período 	Dia 	Horas 	Minutos 
    1
    	1	0	0	0	// periodo de registro
    	2	1	23	59	// estado de inactividad
    	3	2	0	0	// registro Mark Of The Lord
    	4	5	0	0	// estado de inactividad
    	5	5	12	0	// notificacion a las guilds
    	6	5	19	0	// preparacion para castle siege
    	7	6	16	0	// comienzo castle siege
    	8	6	18	0	// fin castle siege
    	9	7	0	0	// fin del ciclo (automaticamente vuelve al estado 1)
    end
    
    //=========================================================================
    // Configuracion de los NPC en Loren
    //=========================================================================
    // 	NPC	ID 	Store in DB(0/1)?? 	Def 	Recover 	HP 	Start HP 	SX 	SY 	DX 	DY 	DIR
    //----------------------------------------------------------------------------------------------------------------------------------
    2
    	283	1	1	1	0	0	400000	94	227	-1	-1	1   //Guardian Statue
    	283	2	1	1	0	0	400000	94	182	-1	-1	1   //Guardian Statue
    	283	3	1	1	0	0	400000	82	130	-1	-1	1   //Guardian Statue
    	283	4	1	1	0	0	400000	107	130	-1	-1	1   //Guardian Statue
    
    	277	1	1	1	0	0	500000	93	204	-1	-1	1   //Castle Gate
    	277	2	1	1	0	0	500000	81	161	-1	-1	1   //Castle Gate
    	277	3	1	1	0	0	500000	107	161	-1	-1	1   //Castle Gate
    	277	4	1	1	0	0	500000	67	114	-1	-1	1   //Castle Gate
    	277	5	1	1	0	0	500000	93	114	-1	-1	1   //Castle Gate
    	277	6	1	1	0	0	500000	119	114	-1	-1	1   //Castle Gate
    
    	288	1	0	1	0	0	800000	75	130	-1	-1	1   //Canon Tower
    	288	2	0	1	0	0	800000	88	130	-1	-1	1   //Canon Tower
    	288	3	0	1	0	0	800000	99	130	-1	-1	1   //Canon Tower
    	288	4	0	1	0	0	800000	114	130	-1	-1	1   //Canon Tower
    	288	5	0	1	0	0	800000	94	151	-1	-1	1   //Canon Tower
    	288	6	0	1	0	0	800000	88	182	-1	-1	1   //Canon Tower
    	288	7	0	1	0	0	800000	100	182	-1	-1	1   //Canon Tower
    	288	8	0	1	0	0	800000	94	221	-1	-1	1   //Canon Tower
    	288	9	0	1	0	0	800000	94	233	-1	-1	1   //Canon Tower
    
    	215	1	0	1	0	0	10000	94	242	-1	-1	1   //Shield
    
    	222	1	0	1	0	0	10000	80	188	-1	-1	1   //Slingshot Defense
    	222	2	0	1	0	0	10000	105	188	-1	-1	1   //Slingshot Defense
    
    	221	1	0	2	0	0	10000	63	19	-1	-1	5   //Slingshot Attack
    	221	2	0	2	0	0	10000	119	19	-1	-1	5   //Slingshot Attack
    end
    go to DB\MuOnline\Programmibility> stored procedures on DB> and replace all the cs_ tables with these:

    WZ_CS_CheckSiegeGuild
    Code:
    USE [MuOnline]
    GO
    /****** Object:  StoredProcedure [dbo].[WZ_CS_CheckSiegeGuildList]    Script Date: 04/11/2018 16:13:28 ******/
    SET ANSI_NULLS OFF
    GO
    SET QUOTED_IDENTIFIER OFF
    GO
    
    ALTER Procedure [dbo].[WZ_CS_CheckSiegeGuildList]
    
    	@szGuildName		varchar(8)
    AS
    BEGIN
    	BEGIN TRANSACTION
    	
    	SET NOCOUNT ON
    
    	DECLARE @iEnd INT
    
    	SELECT @iEnd = SIEGE_ENDED FROM MuCastle_DATA
    
    	IF @iEnd = 1
    	BEGIN
    		SELECT 0 As QueryResult
    	END
    	ELSE IF EXISTS ( SELECT GUILD_NAME FROM MuCastle_SIEGE_GUILDLIST  WITH (READUNCOMMITTED) 
    				WHERE GUILD_NAME = @szGuildName)
    	BEGIN
    		SELECT 1 As QueryResult	
    	END
    	ELSE
    	BEGIN
    		IF EXISTS ( SELECT REG_SIEGE_GUILD FROM MuCastle_REG_SIEGE WITH (READUNCOMMITTED) 
    				WHERE REG_SIEGE_GUILD = @szGuildName AND IS_GIVEUP = 0)
    		BEGIN
    			SELECT 1 As QueryResult
    		END
    		ELSE
    		BEGIN
    			SELECT 0 As QueryResult	
    		END
    	END
    
    
    	IF(@@Error <> 0 )
    		ROLLBACK TRANSACTION
    	ELSE	
    		COMMIT TRANSACTION
    
    	SET NOCOUNT OFF	
    END
    WZ_CS_GetAllGuildMarkRegInfo
    Code:
    USE [MuOnline]
    GO
    /****** Object:  StoredProcedure [dbo].[WZ_CS_GetAllGuildMarkRegInfo]    Script Date: 04/11/2018 16:14:00 ******/
    SET ANSI_NULLS OFF
    GO
    SET QUOTED_IDENTIFIER OFF
    GO
    
    ALTER Procedure [dbo].[WZ_CS_GetAllGuildMarkRegInfo]
    
    	@iMapSvrGroup		SMALLINT
    AS
    BEGIN
    	BEGIN TRANSACTION
    	
    	SET NOCOUNT ON	
    
    	SELECT TOP 100 * FROM MuCastle_REG_SIEGE WITH (READUNCOMMITTED)
    	WHERE MAP_SVR_GROUP = @iMapSvrGroup
    	ORDER BY SEQ_NUM DESC
    
    	IF(@@Error <> 0 )
    		ROLLBACK TRANSACTION
    	ELSE	
    		COMMIT TRANSACTION
    
    	SET NOCOUNT OFF	
    END
    WZ_CS_GetCalcRegGuildList
    Code:
    USE [MuOnline]
    GO
    /****** Object:  StoredProcedure [dbo].[WZ_CS_GetAllGuildMarkRegInfo]    Script Date: 04/11/2018 16:14:00 ******/
    SET ANSI_NULLS OFF
    GO
    SET QUOTED_IDENTIFIER OFF
    GO
    
    ALTER Procedure [dbo].[WZ_CS_GetAllGuildMarkRegInfo]
    
    	@iMapSvrGroup		SMALLINT
    AS
    BEGIN
    	BEGIN TRANSACTION
    	
    	SET NOCOUNT ON	
    
    	SELECT TOP 100 * FROM MuCastle_REG_SIEGE WITH (READUNCOMMITTED)
    	WHERE MAP_SVR_GROUP = @iMapSvrGroup
    	ORDER BY SEQ_NUM DESC
    
    	IF(@@Error <> 0 )
    		ROLLBACK TRANSACTION
    	ELSE	
    		COMMIT TRANSACTION
    
    	SET NOCOUNT OFF	
    END
    WZ_CS_GetCastleTotalInfo
    Code:
    USE [MuOnline]
    GO
    /****** Object:  StoredProcedure [dbo].[WZ_CS_GetCastleTotalInfo]    Script Date: 04/11/2018 16:14:52 ******/
    SET ANSI_NULLS OFF
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    
    ALTER Procedure [dbo].[WZ_CS_GetCastleTotalInfo]
    
    	@iMapSvrGroup		SMALLINT,
    	@iCastleEventCycle	INT
    AS
    BEGIN
    	DECLARE	@iCastleSiegeTerm			INT
    	SET		@iCastleSiegeTerm			= @iCastleEventCycle
    	DECLARE	@iFirstCreate				INT
    	SET		@iFirstCreate				= 0
    	
    	BEGIN TRANSACTION
    	
    	SET NOCOUNT ON	
    
    	IF NOT EXISTS ( SELECT MAP_SVR_GROUP FROM MuCastle_DATA  WITH (READUNCOMMITTED) 
    				WHERE MAP_SVR_GROUP = @iMapSvrGroup)
    	BEGIN
    		DECLARE	@dtStartDate			datetime
    		DECLARE	@dtEndDate			datetime
    		DECLARE	@dtStartDateString		varchar(32)
    		DECLARE	@dtEndDateString		varchar(32)
    
    		SET		@dtStartDate			= GetDate()
    		SET		@dtEndDate			= DATEADD(dd, @iCastleSiegeTerm, GetDate())
    		SET		@dtStartDateString		= CAST(DATEPART(YY, @dtStartDate) AS char(4)) + '-' + CAST(DATEPART(MM, @dtStartDate) AS char(2)) + '-' + CAST(DATEPART(DD, @dtStartDate) AS char(2)) + ' 00:00:00'
    		SET		@dtEndDateString		= CAST(DATEPART(YY, @dtEndDate) AS char(4)) + '-' + CAST(DATEPART(MM, @dtEndDate) AS char(2)) + '-' + CAST(DATEPART(DD, @dtEndDate) AS char(2)) + ' 00:00:00'
    
    
    		INSERT INTO MuCastle_DATA  VALUES (
    			@iMapSvrGroup,
    			@dtStartDateString,
    			@dtEndDateString,
    			0,
    			0,
    			0,
    			'',
    			0,
    			0,
    			0,
    			0
    		)
    
    		SET @iFirstCreate				= 1
    	END
    
    	SELECT	 MAP_SVR_GROUP, 
    			DATEPART(YY,SIEGE_START_DATE)	As SYEAR, 
    			DATEPART(MM,SIEGE_START_DATE)	As SMONTH, 
    			DATEPART(DD,SIEGE_START_DATE)	As SDAY, 
    			DATEPART(YY,SIEGE_END_DATE)	As EYEAR, 
    			DATEPART(MM,SIEGE_END_DATE)	As EMONTH, 
    			DATEPART(DD,SIEGE_END_DATE)	As EDAY, 
    			SIEGE_GUILDLIST_SETTED, 
    			SIEGE_ENDED, 
    			CASTLE_OCCUPY, 
    			OWNER_GUILD, 
    			MONEY, 
    			TAX_RATE_CHAOS,
    			TAX_RATE_STORE,
    			TAX_HUNT_ZONE,
    			@iFirstCreate As FIRST_CREATE
    	FROM MuCastle_DATA  WITH (READUNCOMMITTED)
    	WHERE MAP_SVR_GROUP = @iMapSvrGroup
    
    	IF(@@Error <> 0 )
    		ROLLBACK TRANSACTION
    	ELSE	
    		COMMIT TRANSACTION
    
    	SET NOCOUNT OFF	
    END
    WZ_CS_GetCsGuildUnionInfo
    Code:
    USE [MuOnline]
    GO
    /****** Object:  StoredProcedure [dbo].[WZ_CS_GetCsGuildUnionInfo]    Script Date: 04/11/2018 16:15:15 ******/
    SET ANSI_NULLS OFF
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    
    ALTER Procedure [dbo].[WZ_CS_GetCsGuildUnionInfo]
    
    	@szGuildName		VARCHAR(8)
    AS
    BEGIN
    	BEGIN TRANSACTION
    	
    	SET NOCOUNT ON
    
    	DECLARE	@iG_Union	INT
    	SET		@iG_Union	= -1
    	
    	IF EXISTS ( SELECT G_Name FROM Guild  WITH (READUNCOMMITTED) 
    				WHERE G_Name = @szGuildName)
    	BEGIN
    		SELECT @iG_Union = G_Union
    		FROM Guild WITH (READUNCOMMITTED) 
    		WHERE G_Name = @szGuildName
    	END
    
    	IF (@iG_Union = 0)
    	BEGIN
    		SELECT @szGuildName As GUILD_NAME
    	END
    	ELSE
    	BEGIN
    		SELECT G_Name As GUILD_NAME
    		FROM Guild WITH (READUNCOMMITTED) 
    		WHERE G_Union = @iG_Union
    	END
    	
    	IF(@@Error <> 0 )
    		ROLLBACK TRANSACTION
    	ELSE	
    		COMMIT TRANSACTION
    
    	SET NOCOUNT OFF	
    END
    WZ_CS_GetGuildMarkRegInfo
    Code:
    USE [MuOnline]
    GO
    /****** Object:  StoredProcedure [dbo].[WZ_CS_GetGuildMarkRegInfo]    Script Date: 04/11/2018 16:15:39 ******/
    SET ANSI_NULLS OFF
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    
    ALTER Procedure [dbo].[WZ_CS_GetGuildMarkRegInfo]
    
    	@iMapSvrGroup		SMALLINT,
    	@szGuildName		VARCHAR(8)
    AS
    BEGIN
    	BEGIN TRANSACTION
    	
    	SET NOCOUNT ON	
    
    	SELECT * FROM MuCastle_REG_SIEGE WITH (READUNCOMMITTED)
    	WHERE MAP_SVR_GROUP = @iMapSvrGroup and REG_SIEGE_GUILD = @szGuildName
    	ORDER BY SEQ_NUM ASC
    
    	IF(@@Error <> 0 )
    		ROLLBACK TRANSACTION
    	ELSE	
    		COMMIT TRANSACTION
    
    	SET NOCOUNT OFF	
    END
    WZ_CS_GetSiegeGuildInfo
    Code:
    USE [MuOnline]
    GO
    /****** Object:  StoredProcedure [dbo].[WZ_CS_GetSiegeGuildInfo]    Script Date: 04/11/2018 16:15:59 ******/
    SET ANSI_NULLS OFF
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    
    ALTER Procedure [dbo].[WZ_CS_GetSiegeGuildInfo]
    
    	@iMapSvrGroup		SMALLINT
    AS
    BEGIN
    	BEGIN TRANSACTION
    	
    	SET NOCOUNT ON
    
    	SELECT * 
    	FROM MuCastle_SIEGE_GUILDLIST  WITH (READUNCOMMITTED) 
    	WHERE MAP_SVR_GROUP = @iMapSvrGroup
    
    	IF(@@Error <> 0 )
    		ROLLBACK TRANSACTION
    	ELSE	
    		COMMIT TRANSACTION
    
    	SET NOCOUNT OFF	
    END
    WZ_CS_ModifyGuildGiveUp
    Code:
    USE [MuOnline]
    GO
    /****** Object:  StoredProcedure [dbo].[WZ_CS_ModifyGuildGiveUp]    Script Date: 04/11/2018 16:16:41 ******/
    SET ANSI_NULLS OFF
    GO
    SET QUOTED_IDENTIFIER OFF
    GO
    
    ALTER Procedure [dbo].[WZ_CS_ModifyGuildGiveUp]
    
    	@iMapSvrGroup		SMALLINT,
    	@szGuildName		VARCHAR(8),
     @iisGiveUp		INT
    AS
    BEGIN
    	BEGIN TRANSACTION
    	
    	SET NOCOUNT ON
    
    	IF EXISTS ( SELECT MAP_SVR_GROUP FROM MuCastle_REG_SIEGE  WITH (READUNCOMMITTED) 
    				WHERE MAP_SVR_GROUP = @iMapSvrGroup and REG_SIEGE_GUILD = @szGuildName)
    	BEGIN
    		DECLARE	@iMarkCount	INT
    		SELECT @iMarkCount = REG_MARKS FROM MuCastle_REG_SIEGE  WITH (READUNCOMMITTED) 
    				WHERE MAP_SVR_GROUP = @iMapSvrGroup and REG_SIEGE_GUILD = @szGuildName
    
    		UPDATE MuCastle_REG_SIEGE 
    		SET IS_GIVEUP = @iisGiveUp, REG_MARKS = 0
    		WHERE MAP_SVR_GROUP = @iMapSvrGroup and REG_SIEGE_GUILD = @szGuildName
    
    		SELECT 1 As QueryResult, @iMarkCount As DEL_MARKS
    	END
    	ELSE
    	BEGIN
    		SELECT 2 As QueryResult, 0 As DEL_MARKS
    	END
    
    	IF(@@Error <> 0 )
    		ROLLBACK TRANSACTION
    	ELSE	
    		COMMIT TRANSACTION
    
    	SET NOCOUNT OFF	
    END
    WZ_CS_ModifyGuildMarkRegCount
    Code:
    USE [MuOnline]
    GO
    /****** Object:  StoredProcedure [dbo].[WZ_CS_ModifyGuildMarkRegCount]    Script Date: 04/11/2018 16:16:51 ******/
    SET ANSI_NULLS OFF
    GO
    SET QUOTED_IDENTIFIER OFF
    GO
    
    ALTER Procedure [dbo].[WZ_CS_ModifyGuildMarkRegCount]
    
    	@iMapSvrGroup		SMALLINT,
    	@szGuildName		VARCHAR(8),
    	@iMarkCount		INT
    AS
    BEGIN
    	BEGIN TRANSACTION
    	
    	SET NOCOUNT ON
    
    	IF EXISTS ( SELECT MAP_SVR_GROUP FROM MuCastle_REG_SIEGE  WITH (READUNCOMMITTED) 
    				WHERE MAP_SVR_GROUP = @iMapSvrGroup and REG_SIEGE_GUILD = @szGuildName)
    	BEGIN
    		UPDATE MuCastle_REG_SIEGE 
    		SET REG_MARKS = @iMarkCount
    		WHERE MAP_SVR_GROUP = @iMapSvrGroup and REG_SIEGE_GUILD = @szGuildName
    
    		SELECT 1 As QueryResult
    	END
    	ELSE
    	BEGIN
    		SELECT 0 As QueryResult
    	END
    
    	IF(@@Error <> 0 )
    		ROLLBACK TRANSACTION
    	ELSE	
    		COMMIT TRANSACTION
    
    	SET NOCOUNT OFF	
    END
    WZ_CS_ModifyGuildMarkReset
    Code:
    USE [MuOnline]
    GO
    /****** Object:  StoredProcedure [dbo].[WZ_CS_ModifyGuildMarkReset]    Script Date: 04/11/2018 16:17:19 ******/
    SET ANSI_NULLS OFF
    GO
    SET QUOTED_IDENTIFIER OFF
    GO
    
    ALTER Procedure [dbo].[WZ_CS_ModifyGuildMarkReset]
    
    	@iMapSvrGroup		SMALLINT,
    	@szGuildName		VARCHAR(8)
    AS
    BEGIN
    	BEGIN TRANSACTION
    
    	DECLARE		@iMarkCount	INT
    	DECLARE		@bIsGiveUp	INT
    
    	SET NOCOUNT ON
    
    	IF EXISTS ( SELECT MAP_SVR_GROUP FROM MuCastle_REG_SIEGE  WITH (READUNCOMMITTED) 
    				WHERE MAP_SVR_GROUP = @iMapSvrGroup and REG_SIEGE_GUILD = @szGuildName)
    	BEGIN
    		SELECT @iMarkCount = REG_MARKS, @bIsGiveUp = IS_GIVEUP
    		FROM MuCastle_REG_SIEGE
    		WHERE MAP_SVR_GROUP = @iMapSvrGroup and REG_SIEGE_GUILD = @szGuildName
    
    		IF (@iMarkCount > 0)
    		BEGIN
    			IF (@bIsGiveUp = 0)
    			BEGIN
    				UPDATE MuCastle_REG_SIEGE 
    				SET REG_MARKS = 0
    				WHERE MAP_SVR_GROUP = @iMapSvrGroup and REG_SIEGE_GUILD = @szGuildName
    		
    				SELECT 1 As QueryResult, @iMarkCount As DEL_MARKS
    			END
    			ELSE
    			BEGIN
    				SELECT 2 As QueryResult, 0 As DEL_MARKS
    			END
    		END
    		ELSE
    		BEGIN
    			SELECT 1 As QueryResult, 0 As DEL_MARKS
    		END
    	END
    	ELSE
    	BEGIN
    		SELECT 0 As QueryResult, 0 As DEL_MARKS
    	END
    
    	IF(@@Error <> 0 )
    		ROLLBACK TRANSACTION
    	ELSE	
    		COMMIT TRANSACTION
    
    	SET NOCOUNT OFF	
    END
    WZ_CS_ReqRegGuildMark
    Code:
    USE [MuOnline]
    GO
    /****** Object:  StoredProcedure [dbo].[WZ_CS_ReqRegGuildMark]    Script Date: 04/11/2018 16:17:50 ******/
    SET ANSI_NULLS OFF
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    
    ALTER Procedure [dbo].[WZ_CS_ReqRegGuildMark]
    
    	@iMapSvrGroup		SMALLINT,
    	@szGuildName		VARCHAR(8)
    AS
    BEGIN
    	BEGIN TRANSACTION
    	
    	SET NOCOUNT ON
    
    	IF EXISTS ( SELECT MAP_SVR_GROUP FROM MuCastle_REG_SIEGE  WITH (READUNCOMMITTED) 
    				WHERE MAP_SVR_GROUP = @iMapSvrGroup and REG_SIEGE_GUILD = @szGuildName)
    	BEGIN
    		DECLARE	@bIS_GIVEUP	INT
    		SELECT @bIS_GIVEUP = IS_GIVEUP FROM MuCastle_REG_SIEGE  WITH (READUNCOMMITTED) 
    				WHERE MAP_SVR_GROUP = @iMapSvrGroup and REG_SIEGE_GUILD = @szGuildName
    
    		IF (@bIS_GIVEUP = 0)
    		BEGIN
    			UPDATE MuCastle_REG_SIEGE 
    			SET REG_MARKS = REG_MARKS + 1
    			WHERE MAP_SVR_GROUP = @iMapSvrGroup and REG_SIEGE_GUILD = @szGuildName
    	
    			SELECT 1 As QueryResult, REG_MARKS
    			FROM MuCastle_REG_SIEGE  WITH (READUNCOMMITTED)
    			WHERE MAP_SVR_GROUP = @iMapSvrGroup and REG_SIEGE_GUILD = @szGuildName
    		END
    		ELSE
    		BEGIN
    			SELECT 0 As QueryResult, 0 As REG_MARKS
    		END
    	END
    	ELSE
    	BEGIN
    		SELECT 0 As QueryResult, 0 As REG_MARKS
    	END
    
    	IF(@@Error <> 0 )
    		ROLLBACK TRANSACTION
    	ELSE	
    		COMMIT TRANSACTION
    
    	SET NOCOUNT OFF	
    END
    WZ_CS_SetSiegeGuildInfo
    Code:
    USE [MuOnline]
    GO
    /****** Object:  StoredProcedure [dbo].[WZ_CS_SetSiegeGuildInfo]    Script Date: 04/11/2018 16:18:35 ******/
    SET ANSI_NULLS OFF
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    
    ALTER Procedure [dbo].[WZ_CS_SetSiegeGuildInfo]
    
    	@iMapSvrGroup		SMALLINT,
    	@szGuildName		VARCHAR(8),
    	@iGuildID		INT,
    	@iGuildInvolved		INT
    AS
    BEGIN
    	BEGIN TRANSACTION
    	
    	SET NOCOUNT ON
    
    	INSERT INTO MuCastle_SIEGE_GUILDLIST
    	VALUES (@iMapSvrGroup, @szGuildName, @iGuildID, @iGuildInvolved)
    	
    	IF(@@Error <> 0 )
    		ROLLBACK TRANSACTION
    	ELSE	
    		COMMIT TRANSACTION
    
    	SET NOCOUNT OFF	
    END
    WZ_CS_SetSiegeGuildOK
    Code:
    USE [MuOnline]
    GO
    /****** Object:  StoredProcedure [dbo].[WZ_CS_SetSiegeGuildOK]    Script Date: 04/11/2018 16:19:03 ******/
    SET ANSI_NULLS OFF
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    
    ALTER Procedure [dbo].[WZ_CS_SetSiegeGuildOK]
    
    	@iMapSvrGroup		SMALLINT
    AS
    BEGIN
    	BEGIN TRANSACTION
    	
    	SET NOCOUNT ON
    
    	IF EXISTS ( SELECT MAP_SVR_GROUP FROM MuCastle_DATA  WITH (READUNCOMMITTED) 
    				WHERE MAP_SVR_GROUP = @iMapSvrGroup)
    	BEGIN
    		UPDATE MuCastle_DATA
    		SET SIEGE_GUILDLIST_SETTED = 1
    		WHERE MAP_SVR_GROUP = @iMapSvrGroup
    
    		SELECT 1 As QueryResult
    	END
    	ELSE
    	BEGIN
    		SELECT 0 As QueryResult
    	END
    	
    	IF(@@Error <> 0 )
    		ROLLBACK TRANSACTION
    	ELSE	
    		COMMIT TRANSACTION
    
    	SET NOCOUNT OFF	
    END
    If u dont have some of these tables ignore them then but replace the codes to all the tables u do and test!

  12. #12
    Valued Member sk1zzo is offline
    MemberRank
    Dec 2011 Join Date
    Why?Location
    132Posts

    Re: [Help] CastleSiege

    Quote Originally Posted by KarLi View Post
    go to DB\MuOnline\Programmibility> stored procedures on DB> and replace all the cs_ tables with these:

    WZ_CS_CheckSiegeGuild
    Code:
    USE [MuOnline]
    GO
    /****** Object:  StoredProcedure [dbo].[WZ_CS_CheckSiegeGuildList]    Script Date: 04/11/2018 16:13:28 ******/
    SET ANSI_NULLS OFF
    GO
    SET QUOTED_IDENTIFIER OFF
    GO
    
    ALTER Procedure [dbo].[WZ_CS_CheckSiegeGuildList]
    
    	@szGuildName		varchar(8)
    AS
    BEGIN
    	BEGIN TRANSACTION
    	
    	SET NOCOUNT ON
    
    	DECLARE @iEnd INT
    
    	SELECT @iEnd = SIEGE_ENDED FROM MuCastle_DATA
    
    	IF @iEnd = 1
    	BEGIN
    		SELECT 0 As QueryResult
    	END
    	ELSE IF EXISTS ( SELECT GUILD_NAME FROM MuCastle_SIEGE_GUILDLIST  WITH (READUNCOMMITTED) 
    				WHERE GUILD_NAME = @szGuildName)
    	BEGIN
    		SELECT 1 As QueryResult	
    	END
    	ELSE
    	BEGIN
    		IF EXISTS ( SELECT REG_SIEGE_GUILD FROM MuCastle_REG_SIEGE WITH (READUNCOMMITTED) 
    				WHERE REG_SIEGE_GUILD = @szGuildName AND IS_GIVEUP = 0)
    		BEGIN
    			SELECT 1 As QueryResult
    		END
    		ELSE
    		BEGIN
    			SELECT 0 As QueryResult	
    		END
    	END
    
    
    	IF(@@Error <> 0 )
    		ROLLBACK TRANSACTION
    	ELSE	
    		COMMIT TRANSACTION
    
    	SET NOCOUNT OFF	
    END
    WZ_CS_GetAllGuildMarkRegInfo
    Code:
    USE [MuOnline]
    GO
    /****** Object:  StoredProcedure [dbo].[WZ_CS_GetAllGuildMarkRegInfo]    Script Date: 04/11/2018 16:14:00 ******/
    SET ANSI_NULLS OFF
    GO
    SET QUOTED_IDENTIFIER OFF
    GO
    
    ALTER Procedure [dbo].[WZ_CS_GetAllGuildMarkRegInfo]
    
    	@iMapSvrGroup		SMALLINT
    AS
    BEGIN
    	BEGIN TRANSACTION
    	
    	SET NOCOUNT ON	
    
    	SELECT TOP 100 * FROM MuCastle_REG_SIEGE WITH (READUNCOMMITTED)
    	WHERE MAP_SVR_GROUP = @iMapSvrGroup
    	ORDER BY SEQ_NUM DESC
    
    	IF(@@Error <> 0 )
    		ROLLBACK TRANSACTION
    	ELSE	
    		COMMIT TRANSACTION
    
    	SET NOCOUNT OFF	
    END
    WZ_CS_GetCalcRegGuildList
    Code:
    USE [MuOnline]
    GO
    /****** Object:  StoredProcedure [dbo].[WZ_CS_GetAllGuildMarkRegInfo]    Script Date: 04/11/2018 16:14:00 ******/
    SET ANSI_NULLS OFF
    GO
    SET QUOTED_IDENTIFIER OFF
    GO
    
    ALTER Procedure [dbo].[WZ_CS_GetAllGuildMarkRegInfo]
    
    	@iMapSvrGroup		SMALLINT
    AS
    BEGIN
    	BEGIN TRANSACTION
    	
    	SET NOCOUNT ON	
    
    	SELECT TOP 100 * FROM MuCastle_REG_SIEGE WITH (READUNCOMMITTED)
    	WHERE MAP_SVR_GROUP = @iMapSvrGroup
    	ORDER BY SEQ_NUM DESC
    
    	IF(@@Error <> 0 )
    		ROLLBACK TRANSACTION
    	ELSE	
    		COMMIT TRANSACTION
    
    	SET NOCOUNT OFF	
    END
    WZ_CS_GetCastleTotalInfo
    Code:
    USE [MuOnline]
    GO
    /****** Object:  StoredProcedure [dbo].[WZ_CS_GetCastleTotalInfo]    Script Date: 04/11/2018 16:14:52 ******/
    SET ANSI_NULLS OFF
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    
    ALTER Procedure [dbo].[WZ_CS_GetCastleTotalInfo]
    
    	@iMapSvrGroup		SMALLINT,
    	@iCastleEventCycle	INT
    AS
    BEGIN
    	DECLARE	@iCastleSiegeTerm			INT
    	SET		@iCastleSiegeTerm			= @iCastleEventCycle
    	DECLARE	@iFirstCreate				INT
    	SET		@iFirstCreate				= 0
    	
    	BEGIN TRANSACTION
    	
    	SET NOCOUNT ON	
    
    	IF NOT EXISTS ( SELECT MAP_SVR_GROUP FROM MuCastle_DATA  WITH (READUNCOMMITTED) 
    				WHERE MAP_SVR_GROUP = @iMapSvrGroup)
    	BEGIN
    		DECLARE	@dtStartDate			datetime
    		DECLARE	@dtEndDate			datetime
    		DECLARE	@dtStartDateString		varchar(32)
    		DECLARE	@dtEndDateString		varchar(32)
    
    		SET		@dtStartDate			= GetDate()
    		SET		@dtEndDate			= DATEADD(dd, @iCastleSiegeTerm, GetDate())
    		SET		@dtStartDateString		= CAST(DATEPART(YY, @dtStartDate) AS char(4)) + '-' + CAST(DATEPART(MM, @dtStartDate) AS char(2)) + '-' + CAST(DATEPART(DD, @dtStartDate) AS char(2)) + ' 00:00:00'
    		SET		@dtEndDateString		= CAST(DATEPART(YY, @dtEndDate) AS char(4)) + '-' + CAST(DATEPART(MM, @dtEndDate) AS char(2)) + '-' + CAST(DATEPART(DD, @dtEndDate) AS char(2)) + ' 00:00:00'
    
    
    		INSERT INTO MuCastle_DATA  VALUES (
    			@iMapSvrGroup,
    			@dtStartDateString,
    			@dtEndDateString,
    			0,
    			0,
    			0,
    			'',
    			0,
    			0,
    			0,
    			0
    		)
    
    		SET @iFirstCreate				= 1
    	END
    
    	SELECT	 MAP_SVR_GROUP, 
    			DATEPART(YY,SIEGE_START_DATE)	As SYEAR, 
    			DATEPART(MM,SIEGE_START_DATE)	As SMONTH, 
    			DATEPART(DD,SIEGE_START_DATE)	As SDAY, 
    			DATEPART(YY,SIEGE_END_DATE)	As EYEAR, 
    			DATEPART(MM,SIEGE_END_DATE)	As EMONTH, 
    			DATEPART(DD,SIEGE_END_DATE)	As EDAY, 
    			SIEGE_GUILDLIST_SETTED, 
    			SIEGE_ENDED, 
    			CASTLE_OCCUPY, 
    			OWNER_GUILD, 
    			MONEY, 
    			TAX_RATE_CHAOS,
    			TAX_RATE_STORE,
    			TAX_HUNT_ZONE,
    			@iFirstCreate As FIRST_CREATE
    	FROM MuCastle_DATA  WITH (READUNCOMMITTED)
    	WHERE MAP_SVR_GROUP = @iMapSvrGroup
    
    	IF(@@Error <> 0 )
    		ROLLBACK TRANSACTION
    	ELSE	
    		COMMIT TRANSACTION
    
    	SET NOCOUNT OFF	
    END
    WZ_CS_GetCsGuildUnionInfo
    Code:
    USE [MuOnline]
    GO
    /****** Object:  StoredProcedure [dbo].[WZ_CS_GetCsGuildUnionInfo]    Script Date: 04/11/2018 16:15:15 ******/
    SET ANSI_NULLS OFF
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    
    ALTER Procedure [dbo].[WZ_CS_GetCsGuildUnionInfo]
    
    	@szGuildName		VARCHAR(8)
    AS
    BEGIN
    	BEGIN TRANSACTION
    	
    	SET NOCOUNT ON
    
    	DECLARE	@iG_Union	INT
    	SET		@iG_Union	= -1
    	
    	IF EXISTS ( SELECT G_Name FROM Guild  WITH (READUNCOMMITTED) 
    				WHERE G_Name = @szGuildName)
    	BEGIN
    		SELECT @iG_Union = G_Union
    		FROM Guild WITH (READUNCOMMITTED) 
    		WHERE G_Name = @szGuildName
    	END
    
    	IF (@iG_Union = 0)
    	BEGIN
    		SELECT @szGuildName As GUILD_NAME
    	END
    	ELSE
    	BEGIN
    		SELECT G_Name As GUILD_NAME
    		FROM Guild WITH (READUNCOMMITTED) 
    		WHERE G_Union = @iG_Union
    	END
    	
    	IF(@@Error <> 0 )
    		ROLLBACK TRANSACTION
    	ELSE	
    		COMMIT TRANSACTION
    
    	SET NOCOUNT OFF	
    END
    WZ_CS_GetGuildMarkRegInfo
    Code:
    USE [MuOnline]
    GO
    /****** Object:  StoredProcedure [dbo].[WZ_CS_GetGuildMarkRegInfo]    Script Date: 04/11/2018 16:15:39 ******/
    SET ANSI_NULLS OFF
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    
    ALTER Procedure [dbo].[WZ_CS_GetGuildMarkRegInfo]
    
    	@iMapSvrGroup		SMALLINT,
    	@szGuildName		VARCHAR(8)
    AS
    BEGIN
    	BEGIN TRANSACTION
    	
    	SET NOCOUNT ON	
    
    	SELECT * FROM MuCastle_REG_SIEGE WITH (READUNCOMMITTED)
    	WHERE MAP_SVR_GROUP = @iMapSvrGroup and REG_SIEGE_GUILD = @szGuildName
    	ORDER BY SEQ_NUM ASC
    
    	IF(@@Error <> 0 )
    		ROLLBACK TRANSACTION
    	ELSE	
    		COMMIT TRANSACTION
    
    	SET NOCOUNT OFF	
    END
    WZ_CS_GetSiegeGuildInfo
    Code:
    USE [MuOnline]
    GO
    /****** Object:  StoredProcedure [dbo].[WZ_CS_GetSiegeGuildInfo]    Script Date: 04/11/2018 16:15:59 ******/
    SET ANSI_NULLS OFF
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    
    ALTER Procedure [dbo].[WZ_CS_GetSiegeGuildInfo]
    
    	@iMapSvrGroup		SMALLINT
    AS
    BEGIN
    	BEGIN TRANSACTION
    	
    	SET NOCOUNT ON
    
    	SELECT * 
    	FROM MuCastle_SIEGE_GUILDLIST  WITH (READUNCOMMITTED) 
    	WHERE MAP_SVR_GROUP = @iMapSvrGroup
    
    	IF(@@Error <> 0 )
    		ROLLBACK TRANSACTION
    	ELSE	
    		COMMIT TRANSACTION
    
    	SET NOCOUNT OFF	
    END
    WZ_CS_ModifyGuildGiveUp
    Code:
    USE [MuOnline]
    GO
    /****** Object:  StoredProcedure [dbo].[WZ_CS_ModifyGuildGiveUp]    Script Date: 04/11/2018 16:16:41 ******/
    SET ANSI_NULLS OFF
    GO
    SET QUOTED_IDENTIFIER OFF
    GO
    
    ALTER Procedure [dbo].[WZ_CS_ModifyGuildGiveUp]
    
    	@iMapSvrGroup		SMALLINT,
    	@szGuildName		VARCHAR(8),
     @iisGiveUp		INT
    AS
    BEGIN
    	BEGIN TRANSACTION
    	
    	SET NOCOUNT ON
    
    	IF EXISTS ( SELECT MAP_SVR_GROUP FROM MuCastle_REG_SIEGE  WITH (READUNCOMMITTED) 
    				WHERE MAP_SVR_GROUP = @iMapSvrGroup and REG_SIEGE_GUILD = @szGuildName)
    	BEGIN
    		DECLARE	@iMarkCount	INT
    		SELECT @iMarkCount = REG_MARKS FROM MuCastle_REG_SIEGE  WITH (READUNCOMMITTED) 
    				WHERE MAP_SVR_GROUP = @iMapSvrGroup and REG_SIEGE_GUILD = @szGuildName
    
    		UPDATE MuCastle_REG_SIEGE 
    		SET IS_GIVEUP = @iisGiveUp, REG_MARKS = 0
    		WHERE MAP_SVR_GROUP = @iMapSvrGroup and REG_SIEGE_GUILD = @szGuildName
    
    		SELECT 1 As QueryResult, @iMarkCount As DEL_MARKS
    	END
    	ELSE
    	BEGIN
    		SELECT 2 As QueryResult, 0 As DEL_MARKS
    	END
    
    	IF(@@Error <> 0 )
    		ROLLBACK TRANSACTION
    	ELSE	
    		COMMIT TRANSACTION
    
    	SET NOCOUNT OFF	
    END
    WZ_CS_ModifyGuildMarkRegCount
    Code:
    USE [MuOnline]
    GO
    /****** Object:  StoredProcedure [dbo].[WZ_CS_ModifyGuildMarkRegCount]    Script Date: 04/11/2018 16:16:51 ******/
    SET ANSI_NULLS OFF
    GO
    SET QUOTED_IDENTIFIER OFF
    GO
    
    ALTER Procedure [dbo].[WZ_CS_ModifyGuildMarkRegCount]
    
    	@iMapSvrGroup		SMALLINT,
    	@szGuildName		VARCHAR(8),
    	@iMarkCount		INT
    AS
    BEGIN
    	BEGIN TRANSACTION
    	
    	SET NOCOUNT ON
    
    	IF EXISTS ( SELECT MAP_SVR_GROUP FROM MuCastle_REG_SIEGE  WITH (READUNCOMMITTED) 
    				WHERE MAP_SVR_GROUP = @iMapSvrGroup and REG_SIEGE_GUILD = @szGuildName)
    	BEGIN
    		UPDATE MuCastle_REG_SIEGE 
    		SET REG_MARKS = @iMarkCount
    		WHERE MAP_SVR_GROUP = @iMapSvrGroup and REG_SIEGE_GUILD = @szGuildName
    
    		SELECT 1 As QueryResult
    	END
    	ELSE
    	BEGIN
    		SELECT 0 As QueryResult
    	END
    
    	IF(@@Error <> 0 )
    		ROLLBACK TRANSACTION
    	ELSE	
    		COMMIT TRANSACTION
    
    	SET NOCOUNT OFF	
    END
    WZ_CS_ModifyGuildMarkReset
    Code:
    USE [MuOnline]
    GO
    /****** Object:  StoredProcedure [dbo].[WZ_CS_ModifyGuildMarkReset]    Script Date: 04/11/2018 16:17:19 ******/
    SET ANSI_NULLS OFF
    GO
    SET QUOTED_IDENTIFIER OFF
    GO
    
    ALTER Procedure [dbo].[WZ_CS_ModifyGuildMarkReset]
    
    	@iMapSvrGroup		SMALLINT,
    	@szGuildName		VARCHAR(8)
    AS
    BEGIN
    	BEGIN TRANSACTION
    
    	DECLARE		@iMarkCount	INT
    	DECLARE		@bIsGiveUp	INT
    
    	SET NOCOUNT ON
    
    	IF EXISTS ( SELECT MAP_SVR_GROUP FROM MuCastle_REG_SIEGE  WITH (READUNCOMMITTED) 
    				WHERE MAP_SVR_GROUP = @iMapSvrGroup and REG_SIEGE_GUILD = @szGuildName)
    	BEGIN
    		SELECT @iMarkCount = REG_MARKS, @bIsGiveUp = IS_GIVEUP
    		FROM MuCastle_REG_SIEGE
    		WHERE MAP_SVR_GROUP = @iMapSvrGroup and REG_SIEGE_GUILD = @szGuildName
    
    		IF (@iMarkCount > 0)
    		BEGIN
    			IF (@bIsGiveUp = 0)
    			BEGIN
    				UPDATE MuCastle_REG_SIEGE 
    				SET REG_MARKS = 0
    				WHERE MAP_SVR_GROUP = @iMapSvrGroup and REG_SIEGE_GUILD = @szGuildName
    		
    				SELECT 1 As QueryResult, @iMarkCount As DEL_MARKS
    			END
    			ELSE
    			BEGIN
    				SELECT 2 As QueryResult, 0 As DEL_MARKS
    			END
    		END
    		ELSE
    		BEGIN
    			SELECT 1 As QueryResult, 0 As DEL_MARKS
    		END
    	END
    	ELSE
    	BEGIN
    		SELECT 0 As QueryResult, 0 As DEL_MARKS
    	END
    
    	IF(@@Error <> 0 )
    		ROLLBACK TRANSACTION
    	ELSE	
    		COMMIT TRANSACTION
    
    	SET NOCOUNT OFF	
    END
    WZ_CS_ReqRegGuildMark
    Code:
    USE [MuOnline]
    GO
    /****** Object:  StoredProcedure [dbo].[WZ_CS_ReqRegGuildMark]    Script Date: 04/11/2018 16:17:50 ******/
    SET ANSI_NULLS OFF
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    
    ALTER Procedure [dbo].[WZ_CS_ReqRegGuildMark]
    
    	@iMapSvrGroup		SMALLINT,
    	@szGuildName		VARCHAR(8)
    AS
    BEGIN
    	BEGIN TRANSACTION
    	
    	SET NOCOUNT ON
    
    	IF EXISTS ( SELECT MAP_SVR_GROUP FROM MuCastle_REG_SIEGE  WITH (READUNCOMMITTED) 
    				WHERE MAP_SVR_GROUP = @iMapSvrGroup and REG_SIEGE_GUILD = @szGuildName)
    	BEGIN
    		DECLARE	@bIS_GIVEUP	INT
    		SELECT @bIS_GIVEUP = IS_GIVEUP FROM MuCastle_REG_SIEGE  WITH (READUNCOMMITTED) 
    				WHERE MAP_SVR_GROUP = @iMapSvrGroup and REG_SIEGE_GUILD = @szGuildName
    
    		IF (@bIS_GIVEUP = 0)
    		BEGIN
    			UPDATE MuCastle_REG_SIEGE 
    			SET REG_MARKS = REG_MARKS + 1
    			WHERE MAP_SVR_GROUP = @iMapSvrGroup and REG_SIEGE_GUILD = @szGuildName
    	
    			SELECT 1 As QueryResult, REG_MARKS
    			FROM MuCastle_REG_SIEGE  WITH (READUNCOMMITTED)
    			WHERE MAP_SVR_GROUP = @iMapSvrGroup and REG_SIEGE_GUILD = @szGuildName
    		END
    		ELSE
    		BEGIN
    			SELECT 0 As QueryResult, 0 As REG_MARKS
    		END
    	END
    	ELSE
    	BEGIN
    		SELECT 0 As QueryResult, 0 As REG_MARKS
    	END
    
    	IF(@@Error <> 0 )
    		ROLLBACK TRANSACTION
    	ELSE	
    		COMMIT TRANSACTION
    
    	SET NOCOUNT OFF	
    END
    WZ_CS_SetSiegeGuildInfo
    Code:
    USE [MuOnline]
    GO
    /****** Object:  StoredProcedure [dbo].[WZ_CS_SetSiegeGuildInfo]    Script Date: 04/11/2018 16:18:35 ******/
    SET ANSI_NULLS OFF
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    
    ALTER Procedure [dbo].[WZ_CS_SetSiegeGuildInfo]
    
    	@iMapSvrGroup		SMALLINT,
    	@szGuildName		VARCHAR(8),
    	@iGuildID		INT,
    	@iGuildInvolved		INT
    AS
    BEGIN
    	BEGIN TRANSACTION
    	
    	SET NOCOUNT ON
    
    	INSERT INTO MuCastle_SIEGE_GUILDLIST
    	VALUES (@iMapSvrGroup, @szGuildName, @iGuildID, @iGuildInvolved)
    	
    	IF(@@Error <> 0 )
    		ROLLBACK TRANSACTION
    	ELSE	
    		COMMIT TRANSACTION
    
    	SET NOCOUNT OFF	
    END
    WZ_CS_SetSiegeGuildOK
    Code:
    USE [MuOnline]
    GO
    /****** Object:  StoredProcedure [dbo].[WZ_CS_SetSiegeGuildOK]    Script Date: 04/11/2018 16:19:03 ******/
    SET ANSI_NULLS OFF
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    
    ALTER Procedure [dbo].[WZ_CS_SetSiegeGuildOK]
    
    	@iMapSvrGroup		SMALLINT
    AS
    BEGIN
    	BEGIN TRANSACTION
    	
    	SET NOCOUNT ON
    
    	IF EXISTS ( SELECT MAP_SVR_GROUP FROM MuCastle_DATA  WITH (READUNCOMMITTED) 
    				WHERE MAP_SVR_GROUP = @iMapSvrGroup)
    	BEGIN
    		UPDATE MuCastle_DATA
    		SET SIEGE_GUILDLIST_SETTED = 1
    		WHERE MAP_SVR_GROUP = @iMapSvrGroup
    
    		SELECT 1 As QueryResult
    	END
    	ELSE
    	BEGIN
    		SELECT 0 As QueryResult
    	END
    	
    	IF(@@Error <> 0 )
    		ROLLBACK TRANSACTION
    	ELSE	
    		COMMIT TRANSACTION
    
    	SET NOCOUNT OFF	
    END
    If u dont have some of these tables ignore them then but replace the codes to all the tables u do and test!
    I edited my stored procedures and it's same, status "Failed"
    I will try to add guild to cs in cs tables and see this Saturday if it works

    P.S your WZ_CS_GetCalcRegGuildList and WZ_CS_GetAllGuildMarkRegInfo is the same

  13. #13

    Re: [Help] CastleSiege

    Quote Originally Posted by sk1zzo View Post
    I edited my stored procedures and it's same, status "Failed"
    I will try to add guild to cs in cs tables and see this Saturday if it works

    P.S your WZ_CS_GetCalcRegGuildList and WZ_CS_GetAllGuildMarkRegInfo is the same
    Ok do that.

    Ps: i.d suggest u try other gsCS from scmt same version of files other repack to just see if the issue is on u or the files 100%


    Sent from my Redmi 5 using Tapatalk



Advertisement