Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Shaiya > Shaiya Private Server > Shaiya PServer Guides & Releases
You last visited: Today at 11:30

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

Advertisement



[Euphoria Dev Team Tiny Release] Custom GM commands

Discussion on [Euphoria Dev Team Tiny Release] Custom GM commands within the Shaiya PServer Guides & Releases forum part of the Shaiya Private Server category.

Reply
 
Old   #1
 
nubness's Avatar
 
elite*gold: 10
Join Date: Jan 2012
Posts: 1,698
Received Thanks: 5,455
[Euphoria Dev Team Tiny Release] Custom GM commands

Hey folks,

I've seen a couple of releases and prototypes of custom GM commands released here, which some have been using, and which I personally consider terrible. Those aren't proper commands, in fact they are just random text that trigger the chat logs, and which also show up in the normal chat. This release contains a technique used by us, the Shaiya Euphoria administration team a while ago.

This isn't a perfect way to create your custom commands, it can certainly be done in a better way, but this will hopefully open people's eyes to what other things can be possibly done.

You're gonna have to insert the following code snippet into PS_GameLog.dbo.usp_Insert_Action_Log_E:
Code:
IF @ActionType = 180
BEGIN	
	IF @Text1 = 'NoticeTo' AND EXISTS (SELECT CharName FROM PS_GameData.dbo.Chars WHERE CharName = @Text2 AND Del = 0)
	BEGIN
		IF @Text3 LIKE '+% points.'
		BEGIN
			DECLARE @Text3var VARCHAR(100) = SUBSTRING(@Text3, 2, LEN(@Text3) - 9)
			DECLARE @Points INT = CAST(@Text3var AS INT)

			UPDATE PS_UserData.dbo.Users_Master
			SET Point += @Points
			WHERE UserUID IN (SELECT UserUID FROM PS_GameData.dbo.Chars WHERE CharName = @Text2 AND Del = 0)
		END

		ELSE IF @Text3 LIKE '%ban%'
		BEGIN
			UPDATE PS_UserData.dbo.Users_Master
			SET Status = -5
			WHERE UserUID IN (SELECT UserUID FROM PS_GameData.dbo.Chars WHERE CharName = @Text2 AND Del = 0)
		END
	END
END
This is just a sample of 2 commands, banning and adding donation points. As I assume most of you know, ActionType 180 stands for the commands used from in game. Text1 as 'NoticeTo' means it was a private notice, which is send from in game as /wnotice charname "notice text", for example /wnotice nubness "You suck, nubness.", which will make [Notice]You suck, nubness. appear on the screen of any character named nubness.
You can change the syntax of /wnotice to anything like /cstmcmd or anything else in the game.exe, by opening it in hex and searching for /wnotice.

Back to the SQL part, what does my code snippet do ? It checks for all commands used in game. If the command is a private notice and is addressed to an existing character, it proceeds to checking what the notice text is. The first case checks if the text contains '+% points.' To translate this from SQL to english, it will trigger if the text contains a +, followed by something, which should be a number, a space and the word points, ending with a full stop. An example would be "+100 points.". If the check fails, it moves to the next case of the IF block, which checks if the text contains the word ban. It could be anything from "ban" to "You have been banned, bitch !"

Again, if you want to award Mr.X 1000 donation points, you type:
/wnotice Mr.X "+1000 points."
or perhaps you want to ban Mr.X, you type:
/wnotice Mr.X "You have been banned."

I do believe this form is much more professional that what existed until now. One disadvantage could be the fact that it only works with online toons, but hey, let's turn on our imagination and make this accept map notices that were submitted from a map where only GMs can be, which would have a global power, and which nobody but people on that map would see.

Free your mind, people, development is easy !
nubness is offline  
Thanks
24 Users
Old 10/07/2013, 05:17   #2
 
erickreq's Avatar
 
elite*gold: 0
Join Date: Feb 2010
Posts: 98
Received Thanks: 100
gracias amigo xD
erickreq is offline  
Thanks
1 User
Old 10/07/2013, 09:28   #3
 
elite*gold: 0
Join Date: Oct 2013
Posts: 9
Received Thanks: 57
Nubness , im still learning SQL so yeah my script is not that great , but i tought it can be usefull for people that are not masters in sql like me . Thanks anyways to make it better for people and hopefully my next script will satisfy u more
Take care ,
SvHe
SvHe is offline  
Thanks
5 Users
Old 10/07/2013, 14:44   #4
 
elite*gold: 0
Join Date: Aug 2013
Posts: 2,066
Received Thanks: 796
Eh, Added to
Hep is offline  
Old 10/07/2013, 20:54   #5
 
Shànks♠'s Avatar
 
elite*gold: 0
Join Date: Jan 2012
Posts: 1,777
Received Thanks: 686
Nice release!
Shànks♠ is offline  
Old 10/08/2013, 17:42   #6
 
TeddyBear94's Avatar
 
elite*gold: 10
Join Date: May 2012
Posts: 1,857
Received Thanks: 2,632
Quote:
Originally Posted by RedDuty View Post
Nice release!
stop posting that under each release >_> u got a thanks button for that
TeddyBear94 is offline  
Thanks
8 Users
Old 10/11/2013, 15:39   #7
 
elite*gold: 0
Join Date: Oct 2012
Posts: 175
Received Thanks: 28
Wow, amazing nubness.Thank you. Can I just use this way to kick a player out of game via SQL?
nick4ever is offline  
Old 10/11/2013, 15:45   #8
 
nubness's Avatar
 
elite*gold: 10
Join Date: Jan 2012
Posts: 1,698
Received Thanks: 5,455
Quote:
Originally Posted by nick4ever View Post
Wow, amazing nubness.Thank you. Can I just use this way to kick a player out of game via SQL?
Thank you for the appreciation.

For kicking the player you can simply use the /kick command. So the best course of action for kick-banning someone would be using this ban command, followed by the kick command.
nubness is offline  
Old 10/12/2013, 06:15   #9
 
elite*gold: 0
Join Date: Oct 2012
Posts: 175
Received Thanks: 28
@nubness: Thank you, you have helped me a lot. However, I know that I can use kick command when I m in game with GM toon, the thing I need is use this your release to kick a player via SQL automatically. This problem I posted a topic before, then you and someone came help me, but it caused to SQL rollback. Finally, I gave up, and tried to build a server and client socket application to detect that a player use Cheat Engine or not. I could use my TCP Killer to kick that IP, but whole range IP, it meant if that IP had 5 players, they are all kicked. I m trying to work around kicking a specific a player through SQL but no roll back. hiz hiz

Anyway, thank you in advance nubness
nick4ever is offline  
Old 10/12/2013, 10:38   #10
 
nubness's Avatar
 
elite*gold: 10
Join Date: Jan 2012
Posts: 1,698
Received Thanks: 5,455
Well, I've created an auto kicker, but it requires RDC to be opened for working properly, so I won't release it, at least for now.
nubness is offline  
Old 10/12/2013, 11:15   #11
 
elite*gold: 0
Join Date: Oct 2012
Posts: 175
Received Thanks: 28
U meant something like autoIT, type /kickcid in PSM_Manager? I tried but failed. Anyway, thank you nubness :*
nick4ever is offline  
Old 10/12/2013, 14:10   #12
 
elite*gold: LOCKED
Join Date: Oct 2013
Posts: 3,414
Received Thanks: 1,844
#Added to Index.
Stureplan is offline  
Old 11/27/2016, 00:38   #13
 
elite*gold: 0
Join Date: Dec 2014
Posts: 32
Received Thanks: 2
Msg 139, Level 15, State 1, Procedure usp_Insert_Action_Log_E, Line 0
Cannot assign a default value to a local variable.
Msg 139, Level 15, State 1, Procedure usp_Insert_Action_Log_E, Line 0
Cannot assign a default value to a local variable.
Msg 137, Level 15, State 2, Procedure usp_Insert_Action_Log_E, Line 95
Must declare the scalar variable "@Points".


It does not work
evalbrito is offline  
Old 03/23/2017, 23:16   #14
 
elite*gold: 0
Join Date: Apr 2016
Posts: 16
Received Thanks: 1
I have the same problem as evalbrito has,can you please help us ?

I tryed to fix the problem
Quote:
DECLARE @ActionType BIGINT
SET @ActionType = ABS(CAST(HASHBYTES('SHA1',CAST(NewID() AS NVARCHAR(MAX))) AS BIGINT))
DECLARE @Text1 BIGINT
SET @Text1 = ABS(CAST(HASHBYTES('SHA1',CAST(NewID() AS NVARCHAR(MAX))) AS BIGINT))
DECLARE @Text3 BIGINT
SET @Text3 = ABS(CAST(HASHBYTES('SHA1',CAST(NewID() AS NVARCHAR(MAX))) AS BIGINT))
DECLARE @Text2 BIGINT
SET @Text2 = ABS(CAST(HASHBYTES('SHA1',CAST(NewID() AS NVARCHAR(MAX))) AS BIGINT))
DECLARE @Points BIGINT
SET @Points = ABS(CAST(HASHBYTES('SHA1',CAST(NewID() AS NVARCHAR(MAX))) AS BIGINT))
IF @ActionType = 180
BEGIN
IF @Text1 = 'NoticeTo' AND EXISTS (SELECT CharName FROM PS_GameData.dbo.Chars WHERE CharName = @Text2 AND Del = 0)
BEGIN
IF @Text3 LIKE '+% points.'
BEGIN
DECLARE @Text3var VARCHAR(100) = SUBSTRING(@Text3, 2, LEN(@Text3) - 9)
DECLARE @Points INT = CAST(@Text3var AS INT)

UPDATE PS_UserData.dbo.Users_Master
SET Point += @Points
WHERE UserUID IN (SELECT UserUID FROM PS_GameData.dbo.Chars WHERE CharName = @Text2 AND Del = 0)
END

ELSE IF @Text3 LIKE '%ban%'
BEGIN
UPDATE PS_UserData.dbo.Users_Master
SET Status = -5
WHERE UserUID IN (SELECT UserUID FROM PS_GameData.dbo.Chars WHERE CharName = @Text2 AND Del = 0)
END
END
END

Error :
Quote:
Msg 139, Level 15, State 1, Line 0
Cannot assign a default value to a local variable.
Msg 139, Level 15, State 1, Line 0
Cannot assign a default value to a local variable.
Msg 102, Level 15, State 1, Line 21
Incorrect syntax near '+'.
mambomambo1 is offline  
Old 03/24/2017, 01:51   #15

 
elite*gold: 150
Join Date: Apr 2007
Posts: 2,392
Received Thanks: 6,644
Nice release but i would never use unfiltered Text for querys. Trust is good, security is better :3
wurstbrot123 is online now  
Reply


Similar Threads Similar Threads
[Euphoria Dev Team Release] Starter Gears
02/02/2023 - Shaiya PServer Guides & Releases - 38 Replies
Hello community, I recently saw users asking for a way to let their characters start equipped, since this is not possible by using the existing BaseItemsDefs table. Today I am releasing a way of doing it, which can also replace the BaseItemsDefs table but having more possibilities to realize your ideas. If you are interested in this you might thought about a way of doing this before. The only problem I can imagine you could have had is the ItemUID. Since we want to insert one, or even...
[Euphoria Dev Team Release] Starter Skills
01/21/2020 - Shaiya PServer Guides & Releases - 13 Replies
Hello everybody, this release was created due to me being lazy during other development. I was testing something about skills on my local server and I had to upgrade the skills from 1 up to 9 each time. After some time I thought about avoiding this by adding some lines to the famous usp_Create_Char_R procedure. This release is only important for servers that have the instant leveling feature, and most of all, free or extremely easy servers. Let's say you create a character whose starting...
[Euphoria Dev Team Release] Illegal Transaction Detection
02/08/2014 - Shaiya PServer Guides & Releases - 8 Replies
Hello everybody, I am sure that not many people know about this, and I'm more than sure that it is not a problem for private servers, but transacting untradeable items isn't normally allowed, which is why items have the tradeable/untradeable property after all. Detecting such transactions is extremely easy, since the logs store all the information about most things that happen in game, instantly. First of all you need to create a new table, which will contain all the details about...
[tiny RELEASE] the most secret GM Commands
02/21/2013 - Cabal Hacks, Bots, Cheats, Exploits & Macros - 4 Replies
.



All times are GMT +1. The time now is 11:34.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.