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 07:07

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

Advertisement



[RELEASE]Call PSMagent Commands via sql

Discussion on [RELEASE]Call PSMagent Commands via sql within the Shaiya PServer Guides & Releases forum part of the Shaiya Private Server category.

Reply
 
Old 06/06/2015, 21:39   #16
 
elite*gold: 0
Join Date: Oct 2005
Posts: 184
Received Thanks: 84
can anyone tell me how to use this with other commands like the chat commands? because this is not letting me use other variables like @charname even if I declare them. like I wanted to do @cmmd = '/kickcn ' +@charname
Psycnosis is offline  
Thanks
1 User
Old 12/22/2016, 05:28   #17
 
Velocity.'s Avatar
 
elite*gold: 0
Join Date: Jul 2016
Posts: 237
Received Thanks: 323
nvm.
Velocity. is offline  
Old 04/12/2017, 22:45   #18
 
admin_lewis's Avatar
 
elite*gold: 195
Join Date: Jul 2014
Posts: 63
Received Thanks: 88
Quote:
Originally Posted by betalfa View Post

5-
Code:
USE [OMG_GameWEB]
GO
--lets create the procedure, run this:
CREATE PROCEDURE [dbo].[Command]
@serviceName NVARCHAR (4000), @cmmd NVARCHAR (4000)
AS EXTERNAL NAME [PSMagent].[StoredProcedures].[Command]

I get this Error:

Msg 325, Level 15, State 1, Procedure Command, Line 4
Incorrect syntax near 'EXTERNAL'. You may need to set the compatibility level of the current database to a higher value to enable this feature. See help for the SET COMPATIBILITY_LEVEL option of ALTER DATABASE.


Any solution?!
admin_lewis is offline  
Old 04/13/2017, 02:01   #19
 
elite*gold: 0
Join Date: Aug 2013
Posts: 244
Received Thanks: 56
Quote:
Originally Posted by admin_lewis View Post
I get this Error:

Msg 325, Level 15, State 1, Procedure Command, Line 4
Incorrect syntax near 'EXTERNAL'. You may need to set the compatibility level of the current database to a higher value to enable this feature. See help for the SET COMPATIBILITY_LEVEL option of ALTER DATABASE.


Any solution?!
you might want to use that little tool called brain.exe or if that doesn't work google is always there to help.
[Admin]Slice is offline  
Old 05/18/2017, 14:11   #20
 
SkuulCandy's Avatar
 
elite*gold: 0
Join Date: Apr 2015
Posts: 424
Received Thanks: 113
Quote:
Originally Posted by admin_lewis View Post
I get this Error:

Msg 325, Level 15, State 1, Procedure Command, Line 4
Incorrect syntax near 'EXTERNAL'. You may need to set the compatibility level of the current database to a higher value to enable this feature. See help for the SET COMPATIBILITY_LEVEL option of ALTER DATABASE.


Any solution?!
Execute this :
Code:
EXEC sp_dbcmptlevel 'OMG_GameWEB', 100
SkuulCandy is offline  
Thanks
2 Users
Old 06/21/2017, 22:57   #21
 
darknessio's Avatar
 
elite*gold: 0
Join Date: Nov 2013
Posts: 30
Received Thanks: 3
But this not supported russian language.....you can change language?
darknessio is offline  
Old 06/22/2017, 10:39   #22
 
Trayne01's Avatar
 
elite*gold: 0
Join Date: Feb 2015
Posts: 473
Received Thanks: 1,093
Quote:
Originally Posted by darknessio View Post
But this not supported russian language.....you can change language?
It does... All you have to do is to use the nvarchar strings on your database. Plus you have the source of this tool if needed. Stop asking other people to do your job.
Trayne01 is offline  
Old 06/22/2017, 22:26   #23
 
darknessio's Avatar
 
elite*gold: 0
Join Date: Nov 2013
Posts: 30
Received Thanks: 3
Both options are enabled but it writes anyway with ?????????????????????????
darknessio is offline  
Old 08/18/2018, 18:31   #24
 
arjulie's Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 232
Received Thanks: 215
This script not working on sql 2008 r2 this will work on sql 2012 r2, tell me if i am wrong.
arjulie is offline  
Old 08/18/2018, 19:19   #25
 
[GM]-RazoR-*'s Avatar
 
elite*gold: 0
Join Date: Aug 2015
Posts: 241
Received Thanks: 474
Exclamation

Quote:
Originally Posted by arjulie View Post
This script not working on sql 2008 r2 this will work on sql 2012 r2, tell me if i am wrong.

It took some time to run this script.
Use this

SQL Server 2008 R2 fix

Code:
USE [PS_GameDefs]
GO

/****** Object:  SqlAssembly [PSMagent]    Script Date: 08/16/2018 10:34:57 ******/
CREATE ASSEMBLY [PSMagent]
AUTHORIZATION [dbo]
FROM 'C:\ShaiyaServer\SERVER\PSM_Client\PSMagent.dll'
WITH PERMISSION_SET = SAFE

GO
[GM]-RazoR-* is offline  
Thanks
3 Users
Old 08/18/2018, 20:08   #26
 
arjulie's Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 232
Received Thanks: 215
Quote:
Originally Posted by [GM]-RazoR-* View Post
It took some time to run this script.
Use this

SQL Server 2008 R2 fix

Code:
USE [PS_GameDefs]
GO

/****** Object:  SqlAssembly [PSMagent]    Script Date: 08/16/2018 10:34:57 ******/
CREATE ASSEMBLY [PSMagent]
AUTHORIZATION [dbo]
FROM 'C:\ShaiyaServer\SERVER\PSM_Client\PSMagent.dll'
WITH PERMISSION_SET = SAFE

GO

SQL 2008 r2 is not allow to create SQL ASSEMBLY?

i try this code

USE [PS_GameDefs]
GO

/****** Object: SqlAssembly [PSMagent] Script Date: 08/16/2018 10:34:57 ******/
CREATE ASSEMBLY [PSMagent]
AUTHORIZATION [dbo]
FROM 'C:\ShaiyaServer\PSM_Client\PSMagent.dll' ( instead C:\ShaiyaServer\SERVER\PSM_Client\PSMagent.dll )
WITH PERMISSION_SET = SAFE

GO

this command not working ( C:\ShaiyaServer\PSM_Client\PSMagent.dll )

Msg 6257, Level 16, State 1, Line 3
CREATE ASSEMBLY for assembly 'PSMagent' failed because the assembly is built for an unsupported version of the Common Language Runtime.


i check all include SQL 2008 r2 version on this PSMagent


10.50.2500.0 - this version working on this PSMagent.dll

10.50.4000.0 - this version Not working on this PSMagent.dll

10.50.6000.34 - this version Not yet try on this PSMagent.dll
arjulie is offline  
Old 08/19/2018, 19:43   #27
 
[GM]-RazoR-*'s Avatar
 
elite*gold: 0
Join Date: Aug 2015
Posts: 241
Received Thanks: 474
Quote:
Originally Posted by arjulie View Post
SQL 2008 r2 is not allow to create SQL ASSEMBLY?

i try this code

USE [PS_GameDefs]
GO

/****** Object: SqlAssembly [PSMagent] Script Date: 08/16/2018 10:34:57 ******/
CREATE ASSEMBLY [PSMagent]
AUTHORIZATION [dbo]
FROM 'C:\ShaiyaServer\PSM_Client\PSMagent.dll' ( instead C:\ShaiyaServer\SERVER\PSM_Client\PSMagent.dll )
WITH PERMISSION_SET = SAFE

GO

this command not working ( C:\ShaiyaServer\PSM_Client\PSMagent.dll )

Msg 6257, Level 16, State 1, Line 3
CREATE ASSEMBLY for assembly 'PSMagent' failed because the assembly is built for an unsupported version of the Common Language Runtime.


i check all include SQL 2008 r2 version on this PSMagent


10.50.2500.0 - this version working on this PSMagent.dll

10.50.4000.0 - this version Not working on this PSMagent.dll

10.50.6000.34 - this version Not yet try on this PSMagent.dll

PSMagent.dll Download;

VirüsTotal;

Check

C:\ShaiyaServer\PSM_Client\PSMagent.dll



If you still can't do this, add me to Skype.

Skype; razor.efsane
[GM]-RazoR-* is offline  
Thanks
4 Users
Old 08/05/2019, 20:51   #28
 
erickreq's Avatar
 
elite*gold: 0
Join Date: Feb 2010
Posts: 97
Received Thanks: 100
Quote:
Originally Posted by admin_lewis View Post
I get this Error:

Msg 325, Level 15, State 1, Procedure Command, Line 4
Incorrect syntax near 'EXTERNAL'. You may need to set the compatibility level of the current database to a higher value to enable this feature. See help for the SET COMPATIBILITY_LEVEL option of ALTER DATABASE.


Any solution?!
How to change the database compatibility level?
To view or change the compatibility level of a database
Right-click the database, and then click Properties.
In the Select a page pane, click Options. The current compatibility level is displayed in the Compatibility level list box.
To change the compatibility level,
select a different option from the list


Iniciado por arjulie Ver publicacion
Este script no funciona en sql 2008 r2, esto funcionará en sql 2012 r2, dime si estoy equivocado.

This problem can arise when a database restored from a backup and the SID of the database owner does not match the owners SID listed in the master database. Here is a solution that uses the "ALTER AUTHORIZATION" statement recommended in the error message:

127



DECLARE @ VARCHAR(MAX) = 'ALTER AUTHORIZATION ON DATABASE::[<<DatabaseName>>] TO
[<<LoginName>>]'

SELECT @ = REPLACE(REPLACE @
, '<<DatabaseName>>', SD.Name)
, '<<LoginName>>', SL.Name)
FROM master..sysdatabases SD
JOIN master..syslogins SL ON SD.SID = SL.SID
WHERE SD.Name = DB_NAME()

PRINT @
EXEC @)
erickreq is offline  
Old 06/06/2020, 19:42   #29
 
elite*gold: 0
Join Date: Jun 2014
Posts: 7
Received Thanks: 0
I'm having this error when trying to create the assembly:

Msg 6257, level 16, state 1, line 2
CREATE ASSEMBLY for assembly 'PSMagent' failed because the assembly was created for an unsupported version of the Common Language Runtime.
nonofeitosa is offline  
Old 05/09/2021, 05:48   #30
 
elite*gold: 0
Join Date: Apr 2020
Posts: 6
Received Thanks: 0
Problem

After executing this command on SQL Server 2017
Code:
USE [OMG_GameWEB]
GO

DECLARE [MENTION=3807069]ReTuRn_[/MENTION]value int

EXEC [MENTION=3807069]ReTuRn_[/MENTION]value = [dbo].[Command]
	 [MENTION=1485710]service[/MENTION]Name = N'ps_game',
	 [MENTION=693895]cmm[/MENTION]d = N'/hello'

SELECT	'Return Value' = [MENTION=3807069]ReTuRn_[/MENTION]value

GO
then Error is this

Code:
Msg 10314, Level 16, State 11, Line 6
An error occurred in the Microsoft .NET Framework while trying to load assembly id 65537. The server may be running out of resources, or the assembly may not be trusted. Run the query again, or check documentation to see how to solve the assembly trust issues. For more information about this error: 
System.IO.FileLoadException: Could not load file or assembly 'psmagent, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Exception from HRESULT: 0x80FC80F1
System.IO.FileLoadException: 
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
   at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.Load(String assemblyString)
defproject is offline  
Reply


Similar Threads Similar Threads
[Release]GM Commands
01/21/2013 - Metin2 PServer Guides & Strategies - 6 Replies
Hello, a list with all gm commands with the gm level and the pointer to the function of command: command: who, command_pointer: 0x080CD080, gm_level: 5 command: warp, command_pointer: 0x080D4990, gm_level: 1 command: user, command_pointer: 0x080CCFA0, gm_level: 3 command: notice, command_pointer: 0x080CCCF0, gm_level: 3 command: notice_map, command_pointer: 0x080CC8F0, gm_level: 1 command: big_notice, command_pointer: 0x080CA600, gm_level: 3
[Release] My Commands
02/17/2010 - CO2 PServer Guides & Releases - 2 Replies
#request close
[Release] hp/mp commands
06/01/2009 - CO2 PServer Guides & Releases - 1 Replies
I found it useful to have some command that will let you pot 1kk hp in one line :) Btw. Revive only works in Talk or Team (couldnt figure out how to make it work in other chats :() place this code into chat.cs among the cases #region hp/mp related case "hp": //Refill HP { if (CSocket.Client.isPM || CSocket.Client.isGM) { if...
[RELEASE] A FEW COMMANDS
02/13/2009 - CO2 PServer Guides & Releases - 14 Replies
hi im pete, before flaming me please read all the way at the bottom =] /restart command , to make this command you have to just do /restart and add General.ServerRestart(); if (Splitter == "/restart") // restarts the server from ingame (exa. /restart ) { World.SendMsgToAll("Server Restarting!", "SYSTEM", 2011);



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


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.