[Query] Enable - Disable Safezone

Results 1 to 7 of 7
  1. #1
    Enthusiast geomangy011 is offline
    MemberRank
    Aug 2013 Join Date
    EgyptLocation
    44Posts

    [Query] Enable - Disable Safezone

    Hello Rz Members

    I Just Come To Make Disable And Enable The Safezone Easier For the newibes

    This Is A Simple Query Coded By Me

    Code:
    Use [SRO_VT_SHARD]
    Go
    
    Declare @Charname Varchar(max), @Issafezone varchar(max), @Legendknight1 int, @regionid int, @regionname varchar(max), @zonedes varchar(max), @OwNeR1 varchar(max), @OwNeR2 varchar(max), @OwNeR3 varchar(max), @OwNeR4 varchar(max), @OwNeR5 varchar(max)
    
    set @Charname = 'LegendKnight'    ----- Write here charname which at the region
    set @Issafezone = 'no'   ----- Write 'Yes' If You Want It A Safezone 'No' If You Want
    
    If @Issafezone = 'Yes'
    begin
    set @Legendknight1 = 0
    set @zonedes ='Safe Zone'
    end
    If @Issafezone = 'No'
    set @zonedes ='Battle Field'
    begin
    set @Legendknight1 = 1
    end
    If @Issafezone not in ('Yes','No')
    begin
    Print 'Error Set No Or Yes At @Issafezone'
    end
    If Not Exists (select * From _char where charname16 = @Charname)
    begin
    Print 'Error There is no charname with this name'
    end
    If Exists (select * From _char where charname16 = @Charname) and @Issafezone in ('Yes','No')
    begin
    set @regionid = ( select LatestRegion from _char where charname16 = @Charname ) set @regionname = ( select ContinentName from _RefRegion where wRegionID @regionid) set @OwNeR1 = 'Le'set @OwNeR2 = 'ge' set @OwNeR4 = 'Knig' set @OwNeR3 = 'nd' set @OwNeR5 = 'ht'
    update _RefRegion set IsBattleField @Legendknight1 where wRegionID @regionid
    print 'Region [' @regionname+ '] Is Now ' @zonedes+' .' print 'Just Restart Your Sr_Gameserver ... Credit Goes To ' @OwNeR1 @OwNeR2 @OwNeR3 @OwNeR4 @OwNeR5+' .'
    end
    Just Edit The Charname And
    Type Yes To Make The Region Which the Char In =Safezone
    Or No To Make It BattleZone

    Thx.


  2. #2
    Member ongamanext is offline
    MemberRank
    Dec 2012 Join Date
    VenezuelaLocation
    73Posts

    Re: [Query] Enable - Disable Safezone

    Mens. 102, Level 15, State 1, Line 27
    Incorrect syntax near 'regionid'.
    Mens. 102, Level 15, State 1, Line 28
    Incorrect syntax near '@ Legendknight1'.

  3. #3
    Valued Member DrugDealers is offline
    MemberRank
    Jan 2013 Join Date
    125Posts

    Re: [Query] Enable - Disable Safezone

    why to
    set @Legendknight1 = 0

    you can use case system example
    set @Issafezone = (select 'numberic' = case when @Issafezone = 'yes' then '0' when @Issafezone = ' no' then '1' end)

    and btw it's released before you just edit the query
    and you have patched edit with a noob edit (facepalm)

  4. #4
    Member abdo1020 is offline
    MemberRank
    Jan 2013 Join Date
    behind youLocation
    53Posts

    Re: [Query] Enable - Disable Safezone

    disable
    PHP Code:
    Update _RefRegionSet IsBattleField 1Where ContinentName CHINA 
    ENABLE SAFEZONE
    PHP Code:
    Update _RefRegionSet IsBattleField 0Where ContinentName Ur Region Name 

  5. #5
    Proficient Member Blackdiana is offline
    MemberRank
    Mar 2012 Join Date
    181Posts

    Re: [Query] Enable - Disable Safezone

    hi, you can make safezone to coordinate, not region?
    i want make some coordinate (x,y,z) safezone, not all region.. Can you make this?

  6. #6
    No avatar RenePunik is offline
    MemberRank
    Feb 2013 Join Date
    1,431Posts

    Re: [Query] Enable - Disable Safezone

    Code:
    USE [SRO_VT_SHARD]
    Update _RefRegion
    Set IsBattleField = 0 >>> 0 For Active Safe Zone | 1 For Disable Safe Zone
    Where ContinentName LIKE 'ARENA_OCCUPY'
    This query works fine.

  7. #7
    Proficient Member Blackdiana is offline
    MemberRank
    Mar 2012 Join Date
    181Posts

    Re: [Query] Enable - Disable Safezone

    yes, i know this, then i need only some cooridantes make safezone, not all region... can you help me this?



Advertisement