Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Shaiya > Shaiya Private Server > Shaiya PServer Development
You last visited: Today at 06:50

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


[Help]Auto Unlock Ultimate Mode

Discussion on [Help]Auto Unlock Ultimate Mode within the Shaiya PServer Development forum part of the Shaiya Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Aug 2013
Posts: 244
Received Thanks: 54
[Help]Auto Unlock Ultimate Mode

Hey guys im trying to set auto unlock ultimate mode like when you select your faction and create a char ultimate mode is already unlocked and dont needa create a hard mode toon then relog for ultimate mode. just when you chose faction i want it to be unlocked. i searched and didnt find anything.. so yeah



[Admin]Slice is offline  
Old 08/24/2013, 21:38   #2
 
elite*gold: 576
Join Date: Mar 2011
Posts: 348
Received Thanks: 965
A trigger on the dbo.Users_Master table will do the job - Copy and paste the query below in a new query window and execute it.
Code:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		Euphoria Dev Team
-- =============================================
CREATE TRIGGER UnlockUM
   ON  PS_UserData.dbo.Users_Master
   AFTER INSERT
AS 
BEGIN
	
	SET NOCOUNT ON;

	DECALRE @UserUID INT = (SELECT UserUID FROM inserted)

	INSERT INTO [PS_GameData].[dbo].[UserMaxGrow]
	([ServerID],[UserUID],[Country],[MaxGrow],[Del])
	VALUES(1,@UserUID,2,3,0)

END
GO


Philipp_ is offline  
Thanks
9 Users
Old 08/24/2013, 21:44   #3
 
elite*gold: 0
Join Date: Aug 2013
Posts: 244
Received Thanks: 54
Quote:
Originally Posted by Philipp_ View Post
A trigger on the dbo.Users_Master table will do the job - Copy and paste the query below in a new query window and execute it.
Code:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		Euphoria Dev Team
-- =============================================
CREATE TRIGGER UnlockUM
   ON  PS_UserData.dbo.Users_Master
   AFTER INSERT
AS 
BEGIN
	
	SET NOCOUNT ON;

    INSERT INTO [PS_GameData].[dbo].[UserMaxGrow]
	([ServerID],[UserUID],[Country],[MaxGrow],[Del])
	VALUES(1,(SELECT UserUID FROM inserted),2,3,0)

END
GO
Thanks ^_^ I'll try it

Error :
Msg 1046, Level 15, State 1, Procedure UnlockUM, Line 14
Subqueries are not allowed in this context. Only scalar expressions are allowed.
[Admin]Slice is offline  
Old 08/24/2013, 22:55   #4
 
elite*gold: 10
Join Date: Jan 2012
Posts: 1,698
Received Thanks: 5,290
There shouldn't be any error with Philipp's query, are you sure you copied it right ?

Here's another one you could try, in case you can't get the one Philipp posted to work:



nubness is offline  
Thanks
7 Users
Old 08/24/2013, 23:01   #5
 
elite*gold: 0
Join Date: Aug 2013
Posts: 244
Received Thanks: 54
Quote:
Originally Posted by nubness View Post
There shouldn't be any error with Philipp's query, are you sure you copied it right ?

Here's another one you could try, in case you can't get the one Philipp posted to work:

yeah im sure i did it right, its still not working. this is stupid.. >_<
[Admin]Slice is offline  
Old 08/24/2013, 23:36   #6
 
elite*gold: 10
Join Date: Jan 2012
Posts: 1,698
Received Thanks: 5,290
I'm afraid this isn't our problem. We always test what we release, and we never post something that doesn't work.
nubness is offline  
Thanks
1 User
Old 08/25/2013, 00:42   #7
 
elite*gold: 0
Join Date: Aug 2013
Posts: 244
Received Thanks: 54
Quote:
Originally Posted by nubness View Post
I'm afraid this isn't our problem. We always test what we release, and we never post something that doesn't work.
i know, i didnt say it was. i just dont get why its not working. i really want UM when you chose faction :/

Fixed, Thanks To Nubness

Code:
-- ================================================
-- Template generated from Template Explorer using:
-- Create Trigger (New Menu).SQL
--
-- Use the Specify Values for Template Parameters 
-- command (Ctrl-Shift-M) to fill in the parameter 
-- values below.
--
-- See additional Create Trigger templates for more
-- examples of different Trigger statements.
--
-- This block of comments will not be included in
-- the definition of the function.
-- ================================================
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
CREATE TRIGGER Unlock_UM
ON PS_UserData.dbo.Users_Master
AFTER INSERT
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;
DECLARE @Sql NVARCHAR(1000)
 SET @Sql = N'INSERT INTO PS_GameData.dbo.UserMaxGrow VALUES(1,' + (SELECT UserUID FROM inserted) + ',2,3,0)'
 
 EXEC sp_executesql @Sql

    -- Insert statements for trigger here

END
GO
[Admin]Slice is offline  
Thanks
4 Users
Old 08/25/2013, 15:54   #8
 
elite*gold: 0
Join Date: Aug 2012
Posts: 454
Received Thanks: 107
Quote:
Originally Posted by [Admin]Slice View Post
i know, i didnt say it was. i just dont get why its not working. i really want UM when you chose faction :/

Fixed, Thanks To Nubness

need to have ultimate mod unlocked?
AxelMac is offline  
Old 08/25/2013, 16:58   #9
 
elite*gold: 10
Join Date: Jan 2012
Posts: 1,698
Received Thanks: 5,290
Quote:
Originally Posted by AxelMac View Post
need to have ultimate mod unlocked?
Could you please read the whole thread before asking questions that have been answered ? I've seen you asking stupid questions on too many threads now.
nubness is offline  
Thanks
3 Users
Old 08/25/2013, 18:22   #10
 
elite*gold: 0
Join Date: Aug 2012
Posts: 454
Received Thanks: 107
Quote:
Originally Posted by nubness View Post
Could you please read the whole thread before asking questions that have been answered ? I've seen you asking stupid questions on too many threads now.
I just asked if this does its job, saw that it was different from other post -.-''
AxelMac is offline  
Old 08/25/2013, 18:59   #11
 
elite*gold: 0
Join Date: Dec 2010
Posts: 665
Received Thanks: 3,078
well, I won't say "stupid" ones, when one really ignores a fact, it's not stupid to ask.
but, there (and indeed, in several posts) it is 100% meaningless.

Edit, to Alex:
"need to have ultimate mod unlocked?" is meaningless, since there is no subject.
"I just asked if this does its job" is meaningless, since only you know what "this" and "its" are.
castor4878 is offline  
Thanks
3 Users
Old 08/25/2013, 19:09   #12
 
elite*gold: 0
Join Date: Aug 2012
Posts: 454
Received Thanks: 107
Quote:
Originally Posted by castor4878 View Post
well, I won't say "stupid" ones, when one really ignores a fact, it's not stupid to ask.
but, there (and indeed, in several posts) it is 100% meaningless.

Edit, to Alex:
"need to have ultimate mod unlocked?" is meaningless, since there is no subject.
"I just asked if this does its job" is meaningless, since only you know what "this" and "its" are.
because I'm Italian and I try to translate it to better, translate some words hurt
AxelMac is offline  
Old 05/16/2014, 20:04   #13
 
elite*gold: 0
Join Date: Aug 2011
Posts: 55
Received Thanks: 14
Quote:
Originally Posted by Philipp_ View Post
A trigger on the dbo.Users_Master table will do the job - Copy and paste the query below in a new query window and execute it.
Code:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		Euphoria Dev Team
-- =============================================
CREATE TRIGGER UnlockUM
   ON  PS_UserData.dbo.Users_Master
   AFTER INSERT
AS 
BEGIN
	
	SET NOCOUNT ON;

	DECALRE @UserUID INT = (SELECT UserUID FROM inserted)

	INSERT INTO [PS_GameData].[dbo].[UserMaxGrow]
	([ServerID],[UserUID],[Country],[MaxGrow],[Del])
	VALUES(1,@UserUID,2,3,0)

END
GO
the problem is so simple in that query look where it is DECALRE should be DECLARE its a human error only
shoree is offline  
Thanks
2 Users
Old 05/19/2014, 01:49   #14



 
elite*gold: 40
Join Date: Dec 2010
Posts: 31,831
Received Thanks: 5,105
Arrow Shaiya Private Server -> Shaiya PServer Development

#moved
Autrux is offline  
Old 11/30/2014, 20:47   #15
 
elite*gold: 0
Join Date: May 2010
Posts: 340
Received Thanks: 84
Hello,

Not working method or missing.

Quote:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: Euphoria Dev Team
-- =============================================
CREATE TRIGGER UnlockUM
ON PS_UserData.dbo.Users_Master [COLOR="rgb(139, 0, 0)"]<-- trigger is working in the current database and should be attach to database correspondant PS_GameData.dbo.Users_Master BUT working when there is already the user in country, If new user arrive cant created new toon because of
Quote:
2014-11-30 20:39:50 err=-1, [Microsoft][ODBC SQL Server Driver][SQL Server]Violation of PRIMARY KEY constraint 'PK_UserMaxGrow'. Cannot insert duplicate key in object 'dbo.UserMaxGrow'. The duplicate key value is (1, 1006)., SQL STATE: 23000, NATIVE ERROR: 2627 (0xA43)

2014-11-30 20:39:50 ::SaveCountry 15 ret=0, qerr=-1, {?=call usp_Save_Char_Country_E(1,1006,1,1)}
[/COLOR]
AFTER INSERT
AS
BEGIN

SET NOCOUNT ON;

DECALRE @UserUID INT = (SELECT UserUID FROM inserted) <--Okey DeCLare as Shoree told,

INSERT INTO [PS_GameData].[dbo].[UserMaxGrow]
([ServerID],[UserUID],[Country],[MaxGrow],[Del])
VALUES(1,@UserUID,2,3,0)

END
GO


_Diavolino_ is offline  
Reply



« Shaiya Heineken | Deleted account »

Similar Threads
Ultimate mode
12/22/2012 - Shaiya Private Server - 9 Replies
Hello everyone, I can not find a topic in which it was written as open ultimate mode without creating hard mode character. Please tell me the link.
Automatically allow ultimate mode
12/16/2012 - Shaiya Private Server - 8 Replies
Hello, Im wondering where the location to set ultimate mode unlocked automatically, when you create an account, rather than needing to make HM then relogging. If its in the psgame or DB somewhere I just need to be pointed in the right direction, Although im pretty sure ive looked everywhere in the DB... Thanks :)
Change easy mode to ultimate mode in database
12/08/2012 - Shaiya Private Server - 3 Replies
Hello. Any1 knows where can i change the easy mode to ultimate mode in database of any Character? Greetings.
Restaurant City Ultimate Trick - Money + Cash + Unlock All Dishes + Experience
01/02/2011 - Facebook - 2 Replies
Restaurant City Ultimate Trick - Money + Cash + Unlock All Dishes + Experience Restaurant City Ultimate Trick - Money + Cash + Unlock All Dishes + Experience: Download Open Fiddler. In AutoResponder, Enable automatic respond & Permit Passthrough must be checked. Click Add. Paste this below the Rule Editor: EXACT: CLICK ME!!!
gunz The Ultimate God Mode
11/30/2010 - GunZ - 47 Replies
ok here goes this hack is very good for ppl who want to pretend they r god. with the ultimate god mode (u must wear certin items for the ultimate god mode). Highlights of the hack: -Renerd x2, Walcom S5 x2, and the Nico r2 ALL HAVE 1,800,000 BULLETS (no blanks) with the normal magizenes.they all also give you +25,000 HP and AP. -all medpacks and repair kits have 100/100 kits. -the Canox FG1 and FG2 both have 100/100 granades.



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


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

BTC: 3KeUpz52VCbhmLwuwydqxu6U1xsgbT8YT5
ETH: 0xc6ec801B7563A4376751F33b0573308aDa611E05

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