AP Script

08/31/2013 21:50 accuface35#1
hi,

i serching a script to add all accounts ap, not single, have anyone it? thank you
08/31/2013 22:45 tracker62#2
PS_GameLog ==> Programmability ==> usp_Insert_Action_Log_E

END
IF( @ActionType = 114 )
BEGIN
IF( @Value2 = 28110 <== Items)
BEGIN
UPDATE PS_UserData.dbo.Users_Master
SET Point = Point + ( 25 <== AP* @Value4 )
WHERE UserUID = @UserUID
END
END


below to begin transaction
08/31/2013 23:02 nubness#3
Quote:
Originally Posted by tracker62 View Post
PS_GameLog ==> Programmability ==> usp_Insert_Action_Log_E

END
IF( @ActionType = 114 )
BEGIN
IF( @Value2 = 28110 <== Items)
BEGIN
UPDATE PS_UserData.dbo.Users_Master
SET Point = Point + ( 25 <== AP* @Value4 )
WHERE UserUID = @UserUID
END
END


below to begin transaction
You included 2 things that aren't related to each other, and none of them are even related to the answer to the question.

Here's the answer:
Code:
USE PS_UserData
UPDATE Users_Master
SET Point += 1
Replace 1 with anything you want, and every account will get that amount of AP.
08/31/2013 23:20 accuface35#4
PS_GameLog ==> Programmability ==> usp_Insert_Action_Log_E

END
IF( @ActionType = 114 )
BEGIN
IF( @Value2 = 28110 <== Items)
USE PS_UserData
UPDATE Users_Master
SET Point += 1
WHERE UserUID = @UserUID
END
END


is this so right?
08/31/2013 23:27 nubness#5
Quote:
Originally Posted by accuface35 View Post
PS_GameLog ==> Programmability ==> usp_Insert_Action_Log_E

END
IF( @ActionType = 114 )
BEGIN
IF( @Value2 = 28110 <== Items)
USE PS_UserData
UPDATE Users_Master
SET Point += 1
WHERE UserUID = @UserUID
END
END


is this so right?
Is my post so invisible ? I clearly stated that it is NOT right. The answer to your question is in my post above too.
08/31/2013 23:36 tracker62#6
for me the server market but now
08/31/2013 23:40 accuface35#7
sry nubness, im stupid and tired :) thank you for your answer nubness and trackers

USE PS_UserData
UPDATE Users_Master
SET Point += 1


Sry this script is error by me, when i =+ 1 to make, all ap are 1, but the exists ap are not there, let me explain: my char has 20000 AP, after the Script i have 2 AP, whats wrong?
09/01/2013 07:09 sominus#8
May be you did some mistake, 'cause the script is simple and works fine. Every time you run the script all accounts should have +1 point.

Try this:

USE PS_UserData
UPDATE Users_Master
SET Point += 1000
WHERE UserUID=put_your_useruid_here

(use UserUID so you only modify your own account in case of errors)
09/01/2013 08:03 tracker62#9
UPDATE PS_UserData.dbo.Users_Master SET Point = (Point + 10) WHERE Point < (2147483647 - 10);
09/01/2013 08:54 {Skrillex}#10
#
Quote:
UPDATE [PS_UserData].[dbo].[Users_Master] SET Point = (Point + howmutch)
09/01/2013 09:24 nubness#11
I'm disgusted to see that there's people who cannot write even such simple queries on their own. I bet you're planning to start a private server soon, just like anyone else. In an emergency situation, not knowing how to write a simple query, you will hate yourself. SQL is the easiest language I've ever seen, yet some people seem to have a problem with understanding its syntax. Why don't you take some [Only registered and activated users can see links. Click Here To Register...] before proceeding with Shaiya development ?
09/07/2013 01:52 Autrux#12
#moved