|
You last visited: Today at 07:28
Advertisement
AP Coin
Discussion on AP Coin within the Shaiya PServer Development forum part of the Shaiya Private Server category.
02/03/2012, 23:57
|
#1
|
elite*gold: 0
Join Date: Sep 2011
Posts: 129
Received Thanks: 12
|
AP Coin
Does Anybody Know How To Make The Ap Coin Work???
|
|
|
02/04/2012, 00:44
|
#2
|
elite*gold: 0
Join Date: Sep 2010
Posts: 520
Received Thanks: 1,289
|
There isn't a special item for "AP" as far as I know, and how to make a custom one is done in the SQL.
I can't really tell you the full way, I can tell you the partial and you figure out where to go from there, but that's about it. I've forgotten it over time.
PHP Code:
IF( @ActionType = 114 ) BEGIN IF( @Value2 = 100001 ) BEGIN UPDATE PS_UserData.dbo.Users_Master SET Point = Point + ( 100 * @Value4 ) WHERE UserUID = @UserUID END END
A little explanation is needed:
@ActionType = 114 - This means you are doing action 114 (Selling to an NPC)
@Value2 = 100001 - in action 114, Value2 = ItemID of the item being sold.
@Value4 - in action 114, Value4 is the amount sold, so I times it by 4, if more than one is sold.
Now to edit this for you, you'd need to change the 100 to your own custom amount.
Also, if you'd like to add more, you'd do it something like this
PHP Code:
IF( @ActionType = 114 ) BEGIN IF( @Value2 = 100001 ) BEGIN UPDATE ps_userdata.dbo.users_master SET point = point + ( 100 * @Value4 ) WHERE useruid = @UserUID END
IF( @Value2 = 100002 ) BEGIN UPDATE ps_userdata.dbo.users_master SET point = point + ( 100 * @Value4 ) WHERE useruid = @UserUID END END
Please note, this must be inserted in PS_GameLog.dbo.usp_Insert_Action_Log_E
|
|
|
02/04/2012, 01:42
|
#3
|
elite*gold: 0
Join Date: Sep 2011
Posts: 129
Received Thanks: 12
|
ok... so i make a query and put that in or sutin? lol
|
|
|
02/04/2012, 02:27
|
#4
|
elite*gold: 0
Join Date: Apr 2010
Posts: 148
Received Thanks: 171
|
Quote:
Originally Posted by RebeccaBlack
Please note, this must be inserted in PS_GameLog.dbo.usp_Insert_Action_Log_E
|
Please read what the user posted.
Tyler
|
|
|
02/04/2012, 02:56
|
#5
|
elite*gold: 0
Join Date: Sep 2011
Posts: 129
Received Thanks: 12
|
im blind
Msg 137, Level 15, State 2, Line 1
Must declare the scalar variable "@ActionType".
Msg 137, Level 15, State 2, Line 3
Must declare the scalar variable "@Value2".
Msg 137, Level 15, State 2, Line 6
Must declare the scalar variable "@Value4".
Msg 137, Level 15, State 2, Line 10
Must declare the scalar variable "@Value2".
Msg 137, Level 15, State 2, Line 13
Must declare the scalar variable "@Value4".
do i delete all and put that or jsut add that to what is alredy there
|
|
|
02/04/2012, 05:54
|
#6
|
elite*gold: 0
Join Date: Oct 2010
Posts: 74
Received Thanks: 77
|
Its amazing Foxyz there are probably over 20+ threads started by you asking people "where is this" when you can just as easily use the search function or look through all of the dev releases like everyone else has done in the past when creating a server. If you cant even copy and paste properly maybe you shouldn't be attempting to release a server.
Karma
|
|
|
02/04/2012, 06:16
|
#7
|
elite*gold: 0
Join Date: Sep 2010
Posts: 520
Received Thanks: 1,289
|
Foxyz, by reading the error I see you're trying to add it to the very top. I said insert it into, not append to. Use trial and error.
It doesn't work at the top, so look for the insert function and add it above that
|
|
|
02/05/2012, 00:55
|
#8
|
elite*gold: 0
Join Date: Sep 2011
Posts: 129
Received Thanks: 12
|
karma i have used the search ....
it doesnt work well the query does but didnt work lol
|
|
|
02/05/2012, 15:19
|
#9
|
elite*gold: 0
Join Date: Sep 2010
Posts: 520
Received Thanks: 1,289
|
What do you mean "it doesn't work"? You have to give me more than that so I can help you. Otherwise I could only give you a multitude of random answers that might not match your question.
I used that exact snippet of a script for my own server when I ran it, and I never had an issue. It just needs to be inserted into the stored procedure properly. I would post mine, but as mine is just a local, it doesn't have any of the "Dupe Fix" and I wouldn't want you to accidentally remove that if you had it in your database.
|
|
|
02/07/2012, 06:36
|
#10
|
elite*gold: 0
Join Date: Sep 2011
Posts: 129
Received Thanks: 12
|
wen i sell i dont get ap...
|
|
|
02/07/2012, 06:49
|
#11
|
elite*gold: 0
Join Date: Sep 2010
Posts: 520
Received Thanks: 1,289
|
Okay, how about this. Post the procedure I had you enter it into, and I'll look at it myself and fix it if something is wrong.
|
|
|
02/07/2012, 06:58
|
#12
|
elite*gold: 0
Join Date: Sep 2011
Posts: 129
Received Thanks: 12
|
USE [PS_GameLog]
GO
/****** Object: StoredProcedure [dbo].[usp_Insert_Action_Log_E] Script Date: 02/07/2012 00:46:25 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/****** Object: Stored Procedure dbo.usp_Insert_Action_Log_E Script Date: 2008-6-7 18:32:40 ******/
/****** Object: Stored Procedure dbo.usp_Insert_Action_Log_E Script Date: 2008/3/15 下午 05:16:53 ******/
ALTER Proc [dbo].[usp_Insert_Action_Log_E]
/*
Created by  , 2004-08-17 Modified by  , 2004-08-19
게임내 행동 로그 남기기 */
/*
*/
@UserID varchar(18),
@UserUID int,
@CharID int,
@CharName varchar(50),
@CharLevel tinyint,
@CharExp int,
@MapID smallint,
@PosX real,
@PosY real,
@PosZ real,
@ActionTime datetime,
@ActionType tinyint,
@Value1 bigint = null,
@Value2 int = null,
@Value3 int = null,
@Value4 bigint = null,
@Value5 int = null,
@Value6 int = null,
@Value7 int = null,
@Value8 int = null,
@Value9 int = null,
@Value10 int = null,
@Text1 varchar(100) = '',
@Text2 varchar(100) = '',
@Text3 varchar(100) = '',
@Text4 varchar(100) = '',
@Sql nvarchar(4000) = '',
@yyyy varchar(4) = '',
@mm varchar(2) = '',
@dd varchar(2) = '',
@Bucket smallint = -1
AS
SET @yyyy = datepart(yyyy, @ActionTime)
SET @mm = datepart(mm, @ActionTime)
SET @dd = datepart(dd, @ActionTime)
IF(LEN(@mm) = 1)
BEGIN
SET @mm = '0' + @mm
END
IF(LEN(@dd) = 1)
BEGIN
SET @dd = '0' + @dd
END
SET @Sql = N'
INSERT INTO PS_GameLog.dbo.ActionLog
(UserID, UserUID, CharID, CharName, CharLevel, CharExp, MapID, PosX, PosY, PosZ, ActionTime, ActionType,
Value1, Value2, Value3, Value4, Value5, Value6, Value7, Value8, Value9, Value10, Text1, Text2, Text3, Text4)
VALUES(@UserID, @UserUID, @CharID, @CharName, @CharLevel, @CharExp, @MapID, @PosX, @PosY, @PosZ, @ActionTime, @ActionType,
@Value1, @Value2, @Value3, @Value4, @Value5, @Value6, @Value7, @Value8, @Value9, @Value10, @Text1, @Text2, @Text3, @Text4)'
EXEC sp_executesql @Sql,
N'@UserID varchar(18), @UserUID int, @CharID int, @CharName varchar(50),
@CharLevel tinyint, @CharExp int, @MapID smallint, @PosX real, @PosY real, @PosZ real, @ActionTime datetime, @ActionType tinyint,
@Value1 bigint, @Value2 int, @Value3 int, @Value4 bigint, @Value5 int, @Value6 int, @Value7 int, @Value8 int,
@Value9 int, @Value10 int, @Text1 varchar(100), @Text2 varchar(100), @Text3 varchar(100), @Text4 varchar(100)',
@UserID, @UserUID, @CharID, @CharName, @CharLevel, @CharExp, @MapID, @PosX, @PosY, @PosZ, @ActionTime, @ActionType,
@Value1, @Value2, @Value3, @Value4, @Value5, @Value6, @Value7, @Value8, @Value9, @Value10, @Text1, @Text2, @Text3, @Text4
IF( @ActionType = 114 )
BEGIN
IF( @Value2 = 100001 )
BEGIN
UPDATE ps_userdata.dbo.users_master
SET point = point + ( 100 * @Value4 )
WHERE useruid = @UserUID
END
IF( @Value2 = 100002 )
BEGIN
UPDATE ps_userdata.dbo.users_master
SET point = point + ( 100 * @Value4 )
WHERE useruid = @UserUID
END
END
|
|
|
02/07/2012, 07:47
|
#13
|
elite*gold: 0
Join Date: Sep 2010
Posts: 520
Received Thanks: 1,289
|
PHP Code:
USE [PS_GameLog] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO
ALTER Proc [dbo].[usp_Insert_Action_Log_E]
@UserID varchar(18), @UserUID int, @CharID int, @CharName varchar(50), @CharLevel tinyint, @CharExp int, @MapID smallint, @PosX real, @PosY real, @PosZ real, @ActionTime datetime, @ActionType tinyint, @Value1 bigint = null, @Value2 int = null, @Value3 int = null, @Value4 bigint = null, @Value5 int = null, @Value6 int = null, @Value7 int = null, @Value8 int = null, @Value9 int = null, @Value10 int = null, @Text1 varchar(100) = '', @Text2 varchar(100) = '', @Text3 varchar(100) = '', @Text4 varchar(100) = '', @Sql nvarchar(4000) = '', @yyyy varchar(4) = '', @mm varchar(2) = '', @dd varchar(2) = '', @Bucket smallint = -1
AS
IF( @ActionType = 114 ) BEGIN IF( @Value2 = 100001 ) BEGIN UPDATE PS_UserData.dbo.Users_Master SET Point = Point + ( 100 * @Value4 ) WHERE UserUID = @UserUID END
IF( @Value2 = 100002 ) BEGIN UPDATE PS_UserData.dbo.Users_Master SET Point = Point + ( 100 * @Value4 ) WHERE UserUID = @UserUID END END
SET @Sql = N' INSERT INTO PS_GameLog.dbo.ActionLog (UserID, UserUID, CharID, CharName, CharLevel, CharExp, MapID, PosX, PosY, PosZ, ActionTime, ActionType, Value1, Value2, Value3, Value4, Value5, Value6, Value7, Value8, Value9, Value10, Text1, Text2, Text3, Text4) VALUES(@UserID, @UserUID, @CharID, @CharName, @CharLevel, @CharExp, @MapID, @PosX, @PosY, @PosZ, @ActionTime, @ActionType, @Value1, @Value2, @Value3, @Value4, @Value5, @Value6, @Value7, @Value8, @Value9, @Value10, @Text1, @Text2, @Text3, @Text4)'
EXEC sp_executesql @Sql, N'@UserID varchar(18), @UserUID int, @CharID int, @CharName varchar(50), @CharLevel tinyint, @CharExp int, @MapID smallint, @PosX real, @PosY real, @PosZ real, @ActionTime datetime, @ActionType tinyint, @Value1 bigint, @Value2 int, @Value3 int, @Value4 bigint, @Value5 int, @Value6 int, @Value7 int, @Value8 int, @Value9 int, @Value10 int, @Text1 varchar(100), @Text2 varchar(100), @Text3 varchar(100), @Text4 varchar(100)', @UserID, @UserUID, @CharID, @CharName, @CharLevel, @CharExp, @MapID, @PosX, @PosY, @PosZ, @ActionTime, @ActionType, @Value1, @Value2, @Value3, @Value4, @Value5, @Value6, @Value7, @Value8, @Value9, @Value10, @Text1, @Text2, @Text3, @Text4
|
|
|
02/07/2012, 08:04
|
#14
|
elite*gold: 0
Join Date: Sep 2011
Posts: 129
Received Thanks: 12
|
ty will check it out
does this have anything to do with item.sdata at all?
|
|
|
02/07/2012, 08:16
|
#15
|
elite*gold: 0
Join Date: Sep 2010
Posts: 520
Received Thanks: 1,289
|
No. I rely fully on the database for this. You, however, can edit your Item.SData to change the name and description (plus sell price, if you'd like).
|
|
|
Similar Threads
|
vk G Coin 20
08/17/2011 - elite*gold Trading - 0 Replies
hallo verkaufe 20 gold coins gegen e-gold
angebot bitte per pn
|
WTS G COIN
11/18/2010 - GunZ - 1 Replies
Want to sell G coin. If there is anyone interested or for more info just send a private message or something. Thanks.
|
WTS G COIN
11/16/2010 - Atlantica Online - 1 Replies
WTS G coins. Just ask how many u want and say a price. We can negociate it. To be easier you can always pm me and then we negociate. I dont need ur id or pw game to give you the Coins. Any question feel free to do. Thanks.
|
G Coin 50 ^^
08/01/2010 - WarRock Trading - 3 Replies
joa weiss nich was ich dafür bekommen kann vllt 3 euro per paypal
wäre cool :D
ich mein ja diese g1 oder wie die heissen
xD
hab die mal bekommen weiss aber nichts damit anzufangen
das ist doch nen 14 stelliger code oder?
wenn nich dann weiss ich nich was das ist :D
|
All times are GMT +1. The time now is 07:29.
|
|