Register for your free account! | Forgot your password?

You last visited: Today at 14:03

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Release] Auto GM Tag

Discussion on [Release] Auto GM Tag within the Shaiya PServer Guides & Releases forum part of the Shaiya Private Server category.

Reply
 
Old   #1
 
HoaX.'s Avatar
 
elite*gold: 0
Join Date: Aug 2011
Posts: 48
Received Thanks: 263
[Release] Auto GM Tag

Adding [GM] or [A] Tag by default.

You hate it to add always [GM] / [A] Tag on Database for every created Character? That should help you out!



Insert the -- Auto [GM] Tag part -- below in your PS_GameData.usp_Create_Char_R procedure:
Code:
USE [PS_GameData]
GO
/****** Object:  StoredProcedure [dbo].[usp_Create_Char_R]    Script Date: 10/17/2011 22:05:57 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO

/****** 개체: 저장 프로시저 dbo.usp_Create_Char_R    스크립트 날짜: 2006-05-30 오후 12:53:23 ******/

ALTER  Proc [dbo].[usp_Create_Char_R]

@ServerID tinyint,
@UserID varchar(12),
@UserUID int,
@CharName varchar(50) ,

@Slot Tinyint,
@Family Tinyint,
@Grow Tinyint,
@Hair Tinyint,
@Face Tinyint,
@Size Tinyint,
@Job Tinyint,
@Sex Tinyint,
@Level Smallint,
@Statpoint Smallint,
@Skillpoint Smallint,
@Str Smallint,
@Dex Smallint,
@Rec Smallint,
@Int Smallint,
@Luc Smallint,
@Wis Smallint,
@Hp Smallint,
@Mp Smallint,
@Sp Smallint,
@Map Smallint,
@Dir Smallint,
@Exp Int,
@Money Int,
@Posx Real,
@Posy Real,
@Posz Real,
@Hg Smallint,
@Vg Smallint,
@Cg Tinyint,
@Og Tinyint,
@Ig Tinyint,


/* 여기까지 인자값 주어져야 함 */

/* SP 내부 참조용 변수 */

@CharID int = 0,
@NameCnt tinyint = 0

AS

SET NOCOUNT ON

DECLARE @Ret int

SET @CharName = LTRIM(RTRIM(@CharName))
SET @SkillPoint = 5
SET @Ret = 0



SET @NameCnt = (SELECT ISNULL(COUNT(*),0) FROM Chars WHERE CharName=@CharName AND Del=0)


-- Auto [GM] Tag part --
DECLARE @Status int, @Admin bit

SET @Status = (SELECT [Status] FROM PS_UserData.dbo.Users_Master WHERE UserUID = @UserUID)
SET @Admin = (SELECT [Admin] FROM PS_UserData.dbo.Users_Master WHERE UserUID = @UserUID)

IF ((@Status >= 16) AND (@Status <= 80))
BEGIN
	IF (@Admin = 1) SET @CharName ='[A]'+@CharName
	ELSE SET @CharName ='[GM]'+@CharName
END
-- ----------------------


IF(@NameCnt <> 0)
BEGIN
    RETURN -2
END
ELSE
BEGIN
    IF EXISTS ( SELECT CharID FROM Chars WHERE CharName=@CharName AND Del = 1 AND [Level] >10 AND DeleteDate > DATEADD(dd, -7, GETDATE()) )
    BEGIN
        RETURN -2
    END
    
    BEGIN TRANSACTION


    INSERT INTO Chars(ServerID,UserID, UserUID, CharName, Slot, Family, Grow, 
    Hair, Face, [Size], Job, Sex, [Level], StatPoint, SkillPoint, 
    [Str], Dex, Rec, [Int], Luc, Wis, HP, MP, SP, Map, Dir, [Exp], [Money], 
    PosX, PosY, Posz, Hg, Vg, Cg, Og, Ig, RenameCnt, RemainTime)

    VALUES(@ServerID,@UserID, @UserUID, @CharName, @Slot, @Family, @Grow, 
    @Hair, @Face, @Size, @Job, @Sex, @Level, @StatPoint, @SkillPoint, 
    @Str, @Dex, @Rec, @Int, @Luc, @Wis, @HP, @MP, @SP, @Map, @Dir, @Exp, @Money, 
    @PosX, @PosY, @Posz, @Hg, @Vg, @Cg, @Og, @Ig, 0, 0)

    IF( @@ERROR=0 )
    BEGIN
        COMMIT TRANSACTION
    END
    ELSE
    BEGIN
        ROLLBACK TRANSACTION
        RETURN -1
    END

    SET @CharID = IDENT_CURRENT('Chars')
END

RETURN @CharID

SET NOCOUNT OFF
If your Admin is setted to 1 (True) and you have Status 16 - 80 in dbo.Users_Masters, you will get Tag [A]

or else [Status] 16 - 80 will get [GM] Tag only.




If you change your name in game you will lose your Tag
To avoid that you need to add this to your usp_Update_Char_Rename procedure in your PS_GameData:

You need to find this line:
SET @NewCharName = LTRIM(RTRIM(@NewCharName))

Insert this below this line:
Code:
-- Auto [GM] Tag part --
DECLARE @Status int, @Admin bit, @AdminLevel tinyint

SET @Status = (SELECT [Status] FROM PS_UserData.dbo.Users_Master WHERE UserUID = @UserUID)
SET @Admin = (SELECT [Admin] FROM PS_UserData.dbo.Users_Master WHERE UserUID = @UserUID)
SET @AdminLevel = (SELECT [AdminLevel] FROM PS_UserData.dbo.Users_Master WHERE UserUID = @UserUID)

IF ((@Status >= 16) AND (@Status <= 80))
BEGIN
	IF (@Admin = 1) SET @NewCharName ='[A]'+@NewCharName
	ELSE SET @NewCharName ='[GM]'+@NewCharName
END
-- ----------------------



You can also give a Tag by AdminLevel

Example for sp_Create_Char_R procedure:
Code:
-- Auto [GM] Tag part --
DECLARE @Status int, @Admin bit, @AdminLevel tinyint

SET @Status = (SELECT [Status] FROM PS_UserData.dbo.Users_Master WHERE UserUID = @UserUID)
SET @Admin = (SELECT [Admin] FROM PS_UserData.dbo.Users_Master WHERE UserUID = @UserUID)
SET @AdminLevel = (SELECT [AdminLevel] FROM PS_UserData.dbo.Users_Master WHERE UserUID = @UserUID)

IF ((@Status >= 16) AND (@Status <= 80))
BEGIN
	IF (@Admin = 1 AND @AdminLevel = 255) SET @CharName ='[A]'+@CharName
	IF (@Admin = 1 AND @AdminLevel = 200) SET @CharName ='[Dev]'+@CharName
	IF (@Admin = 1 AND @AdminLevel = 100) SET @CharName ='[GML]'+@CharName
	ELSE SET @CharName ='[GM]'+@CharName
END
-- ----------------------
HoaX. is offline  
Thanks
30 Users
Old 10/18/2011, 16:07   #2
 
elite*gold: 0
Join Date: Jan 2011
Posts: 197
Received Thanks: 75
jetz müsstest nur noch die GM commands vereinfachen, dann wärs echt nice

ich benutz nie GM tags, geht einfach nur aufe nerven, immer
/set *Alt+8*GM*Alt+9*Charname
etc etc zu schreiben
DotG is offline  
Old 12/25/2013, 16:45   #3
 
HoaX.'s Avatar
 
elite*gold: 0
Join Date: Aug 2011
Posts: 48
Received Thanks: 263
*Updated
- Added Name change reTag
- Some examples
- removed error
HoaX. is offline  
Thanks
5 Users
Old 12/29/2013, 22:29   #4
 
st.jimmy998's Avatar
 
elite*gold: 0
Join Date: Jan 2013
Posts: 343
Received Thanks: 137
Thanks hoax
st.jimmy998 is offline  
Reply


Similar Threads Similar Threads
[Release] Updated wallhack + Auto aim/ Auto fire SF PH only 9-25-11 working bypass
09/28/2011 - Soldier Front Philippines - 5 Replies
#removed
[Release]King7 Hack//Auto Medic//Auto Ammo!
05/07/2011 - WarRock Hacks, Bots, Cheats & Exploits - 6 Replies
Hallo Community, Ich Release heute King7 Hack! http://img6.imagebanana.com/img/dhwini80/screensh ot_007.jpg Virustotal! Virustotal!



All times are GMT +2. The time now is 14:03.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.