[Fix] SMC Ban Query - Punishment - Chat/Trade/Login Ban! Best Feature :3

Page 1 of 3 123 LastLast
Results 1 to 15 of 31
  1. #1
    Laravel Core Programmer Jangan is offline
    DeveloperRank
    Jul 2007 Join Date
    Dubai, UAELocation
    2,113Posts

    ! [Fix] SMC Ban Query - Punishment - Chat/Trade/Login Ban! Best Feature :3

    Extra Info:
    - I also have a fix for PRISON PUNISHMENT ;) if anyone wants it, i will pick people that post in this thread to help me test it out for bugs etc!




    Introduction:
    So i wanted to test the smc ban feature, and it gave me db error, so i fixed the problem and now i will release it. This is a really nice feature, i dont think anyone else has it fixed. Everyone was using Cherno's EvaTools to ban people, well this does even more things, it can chat ban people, and it can trade ban people! Its really sweet feature.


    Instructions:
    Execute the following stored procedure, then thank me ;)


    Screen Shot



    Stored Procedure:
    PHP Code:
    USE [SRO_VT_ACCOUNT]
    GO
    /****** Fixed by Jangan @ RageZone ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    -- 
    -----------------------------------------------------------------------------------
    -----------------------------------------------------------------------------------
    ALTER procedure [dbo].[_RegisterPunishment]
        @
    UserJID     int,
        @
    Type          tinyint,
        @
    Executor    varchar(128),
        @
    Shard        smallint,
        @
    CharName    varchar(16),
        @
    CharInfo    varchar(256),
        @
    PosInfo    varchar(64),
        @
    Guide        varchar(512),
        @
    Description    varchar(1024),
        @
    RaiseTime    datetime,
        @
    BlockStartTime    datetime,
        @
    BlockEndTime    datetime,
        @
    PunishTime    datetime
    as
        -- 
    AuthorJangan RageZone
        
    if( existsselect UserJID from _BlockedUser with(NOLOCKwhere UserJID = @UserJID and Type = @Type))
        
    begin
            select 
    -1    
            
    RETURN
        
    end
        
    declare @NewSerialNo int    
        set 
    @NewSerialNo 0
        
        insert _Punishment values
    ( @UserJID, @Type, @Executor, @Shard, @CharName, @CharInfo,
                    @
    PosInfo, @Guide, @Description, @RaiseTime, @BlockStartTime, @BlockEndTime, @PunishTime0)
        
    set @NewSerialNo = @@identity
        
    if( @@rowcount or @@error <> or @NewSerialNo or @NewSerialNo is null)
        
    begin
            select 
    -2    
            
    return
        
    end
        
    declare @UserID varchar(128)
        
    set @UserID = (SELECT StrUserID FROM TB_User where JID = @UserJID)
        if( @@
    rowcount or @@error <> or @UserID is null)
        
    begin
            select 
    2
            
    return
        
    end
        insert _BlockedUser values
    ( @UserJID, @UserID, @Type, @NewSerialNo, @BlockStartTime, @BlockEndTime)
        
    select 0 
    Last edited by Jangan; 19-03-12 at 01:14 PM.


  2. #2
    Enthusiast ZiCO is offline
    MemberRank
    Feb 2012 Join Date
    30Posts

    Re: [Fix] SMC Ban Query - Punishment - Chat/Trade/Login Ban! Best Feature :3

    awesome release as always :)

  3. #3
    Account Upgraded | Title Enabled! LastThief is offline
    MemberRank
    Aug 2010 Join Date
    204Posts

    Re: [Fix] SMC Ban Query - Punishment - Chat/Trade/Login Ban! Best Feature :3

    So prison works atm ? O_o ?

  4. #4
    Laravel Core Programmer Jangan is offline
    DeveloperRank
    Jul 2007 Join Date
    Dubai, UAELocation
    2,113Posts

    Re: [Fix] SMC Ban Query - Punishment - Chat/Trade/Login Ban! Best Feature :3

    Yeah so far i have the basic concepts done, such as if you "Prison a player" it will pretty much teleport him to the "set cords" <-- dont have default cords built into the stored procedures yet!

    but yeah i didnt spend a lot of time on this, just something i did when i was looking at punishment queries.

  5. #5
    #Yummi.sql Caipi is offline
    MemberRank
    Sep 2011 Join Date
    GermanyLocation
    403Posts

    Re: [Fix] SMC Ban Query - Punishment - Chat/Trade/Login Ban! Best Feature :3

    So basically you edited..
    PHP Code:
    select @UserID JID from TB_User where JID = @UserJID 
    to
    PHP Code:
    select @UserID StrUserID from TB_User where JID = @UserJID 
    at the stated procedure

  6. #6
    Enthusiast kibritcheto is offline
    MemberRank
    Jul 2010 Join Date
    46Posts

    Re: [Fix] SMC Ban Query - Punishment - Chat/Trade/Login Ban! Best Feature :3

    PRISON

    Region:-32744
    X:31
    Y:36
    Z:62

  7. #7
    Valued Member LegendaryDev is offline
    MemberRank
    Dec 2010 Join Date
    125Posts

    Re: [Fix] SMC Ban Query - Punishment - Chat/Trade/Login Ban! Best Feature :3

    Do chat blocking works for someone ?

  8. #8
    Proficient Member dono is offline
    MemberRank
    Apr 2006 Join Date
    YK-IDLocation
    158Posts

    Re: [Fix] SMC Ban Query - Punishment - Chat/Trade/Login Ban! Best Feature :3

    Quote Originally Posted by LegendaryDev View Post
    Do chat blocking works for someone ?
    Don't know for other, but for me its work using fix register punihsment that has been released before.

  9. #9
    Laravel Core Programmer Jangan is offline
    DeveloperRank
    Jul 2007 Join Date
    Dubai, UAELocation
    2,113Posts

    Re: [Fix] SMC Ban Query - Punishment - Chat/Trade/Login Ban! Best Feature :3

    Quote Originally Posted by dono View Post
    Don't know for other, but for me its work using fix register punihsment that has been released before.
    yes it works 100% chat and trade ban..

    Quote Originally Posted by Caipi View Post
    So basically you edited..
    PHP Code:
    select @UserID JID from TB_User where JID = @UserJID 
    to
    PHP Code:
    select @UserID StrUserID from TB_User where JID = @UserJID 
    at the stated procedure
    I did edit one line, and it didn't look like the first line you wrote it was different, either way the first line you wrote is wrong. But generally yeah, 1 line to fix this. It is easy, its just that i was the only one who found it ;)

  10. #10
    beq $v0, $0, 0x80000000 megaman963 is offline
    MemberRank
    Sep 2011 Join Date
    r3000 - MIPSLocation
    198Posts

    Re: [Fix] SMC Ban Query - Punishment - Chat/Trade/Login Ban! Best Feature :3

    @Jangan, What kind of error does it gives you?

    where i can see the error appear ? because punishment was working for me without any errors before ...

    maybe i saw errors before like duplicated punishments ... for example:

    If the Automatic Punishment punish someone, and i have punish this person ... the punishment won't work because global can't read double punishment which both them executed status ...
    You may don't understand my Quote, but if you resize the SMC to 1280x1024 you will see log box for the user, which you can edit the punishment by clicking on one of logs ...

    I'm still wondering why GlobalManager can't read two punishment and decided which one will apply for user.

    hope you read my post.

    Cheers,

  11. #11
    Laravel Core Programmer Jangan is offline
    DeveloperRank
    Jul 2007 Join Date
    Dubai, UAELocation
    2,113Posts

    Re: [Fix] SMC Ban Query - Punishment - Chat/Trade/Login Ban! Best Feature :3

    Quote Originally Posted by megaman963 View Post
    @Jangan, What kind of error does it gives you?

    where i can see the error appear ? because punishment was working for me without any errors before ...

    maybe i saw errors before like duplicated punishments ... for example:



    You may don't understand my Quote, but if you resize the SMC to 1280x1024 you will see log box for the user, which you can edit the punishment by clicking on one of logs ...

    I'm still wondering why GlobalManager can't read two punishment and decided which one will apply for user.

    hope you read my post.

    Cheers,

    no no, don't mistake the 2

    There is

    AutomatedPunishment System
    and
    Punishment System


    i already fixed the automated punishment looooong time ago, and this is the fix for when you go to.


    SMC -> SR_UserPunishment -> Punishment


    Good luck mate :)

  12. #12
    Valued Member kaperucito is offline
    MemberRank
    Nov 2008 Join Date
    134Posts

    Re: [Fix] SMC Ban Query - Punishment - Chat/Trade/Login Ban! Best Feature :3

    I find console punishment way more handy than SMC.

    Myth Online - Custom GM Commands - YouTube

    But I didn't know that chat/trade block actually works. Thanks for the fixed query.

  13. #13
    beq $v0, $0, 0x80000000 megaman963 is offline
    MemberRank
    Sep 2011 Join Date
    r3000 - MIPSLocation
    198Posts

    Re: [Fix] SMC Ban Query - Punishment - Chat/Trade/Login Ban! Best Feature :3

    Quote Originally Posted by Jangan View Post
    no no, don't mistake the 2

    There is

    AutomatedPunishment System
    and
    Punishment System


    i already fixed the automated punishment looooong time ago, and this is the fix for when you go to.


    SMC -> SR_UserPunishment -> Punishment


    Good luck mate :)
    Sorry if i didn't be clear for something ...

    but let me show you what i was mean:



    in this picture, you will see two kind of punishment ...

    I know how to fix Automatic Punishment ... but i was meaning why GlobalMgr is acting confuse when it saw two raws for punishment for one JID ??

    Hope you understand me
    Attached Thumbnails Attached Thumbnails errorssmc.jpg  

  14. #14
    Valued Member kaperucito is offline
    MemberRank
    Nov 2008 Join Date
    134Posts

    Re: [Fix] SMC Ban Query - Punishment - Chat/Trade/Login Ban! Best Feature :3

    Quote Originally Posted by megaman963 View Post
    Sorry if i didn't be clear for something ...

    but let me show you what i was mean:



    in this picture, you will see two kind of punishment ...

    I know how to fix Automatic Punishment ... but i was meaning why GlobalMgr is acting confuse when it saw two raws for punishment for one JID ??

    Hope you understand me
    That is an expired punishment, shouldn't affect the running ones in any way.

    BTW Jangan I'm interested on the fix for the Prision punishment
    Last edited by kaperucito; 19-03-12 at 10:49 PM.

  15. #15
    Enthusiast Demetraa is offline
    MemberRank
    Feb 2012 Join Date
    27Posts

    Re: [Fix] SMC Ban Query - Punishment - Chat/Trade/Login Ban! Best Feature :3

    Jangan i would like the prison punishment.



Page 1 of 3 123 LastLast

Advertisement