Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Help Question]

Joined
Jan 26, 2007
Messages
739
Reaction score
24
if someone wont mind, what control panel is fit for RAN GS EPX (Grayback's share)? the character has its own premium point whereas most of the rancp is account-based premium point, i want to bind them together, whereas if your character has 100 premium point it will show on control panel but almost here are account not character premium point

example : some rancp's are have this configuration on php's

[db4]dbo.UserInfo whereas Points=Points where username=user ( just an example ) <--this binds to account
but Ran GS has
[db2]dbo.ChaInfo whereas ChaPremiumPoint <--- this binds to only 1 character
 
Chinese Developer
Banned
Joined
Apr 6, 2019
Messages
358
Reaction score
53
if someone wont mind, what control panel is fit for RAN GS EPX (Grayback's share)? the character has its own premium point whereas most of the rancp is account-based premium point, i want to bind them together, whereas if your character has 100 premium point it will show on control panel but almost here are account not character premium point

example : some rancp's are have this configuration on php's

[db4]dbo.UserInfo whereas Points=Points where username=user ( just an example ) <--this binds to account
but Ran GS has
[db2]dbo.ChaInfo whereas ChaPremiumPoint <--- this binds to only 1 character

you can make a list of character with point
example : [db2]select chaname,chapremiumpoint from chainfo where usernum=(select usernum from db4.dbo.userinfo where userid='testid') and CHADELETED <> 1
or get a sum of that
 
Upvote 0
Joined
Sep 11, 2008
Messages
719
Reaction score
122
is that the real php code?

Hello ! :)

they use another dbase to bind to an account through web only but no points on Dbo.Ranuser its called Userpoint if you want update it you need to code :

::CODE
UPDATE UserPoint SET UserPoint='$points' WHERE username='$usernane' and userpass='$userpass' md5 hashed..

and try to see parameters how they worked it out....





THIS PARAMETER BELOW BELONGS TO THE CUSTOM DBASE OF THERE CP...
GO
/****** Object: StoredProcedure [dbo].[sp_doEP2VP] Script Date: 04/27/2019 12:36:14 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[sp_doEP2VP]
username char(20),
Get_vp int,
vps int,
retval int OUTPUT

AS
DECLARE
@currentEP int,
@currentVP int

SET NOCOUNT ON

SET retval = 0
SET @currentEP = 0
SET @currentVP = 0

SELECT @currentEP = Points FROM Points WHERE UserName username
SELECT @currentVP = VPoints FROM Points WHERE UserName username


-----------------------------------------------------------------
BEGIN
IF vps > @currentEP)
BEGIN
SET retval = 0 -- 0 = Not enough points
SELECT retval
RETURN retval
END
ELSE
BEGIN
UPDATE Points SET Points = Points - vps,VPoints = VPoints + Get_vp WHERE UserName = username
SET retval = 1 -- 1 = Success convert
SELECT retval
RETURN retval
END
END

SET NOCOUNT OFF
SELECT retval
RETURN retval



This code worked the points ....
 
Last edited:
Upvote 0
Joined
Jan 26, 2007
Messages
739
Reaction score
24
Hello ! :)

they use another dbase to bind to an account through web only but no points on Dbo.Ranuser its called Userpoint if you want update it you need to code :

::CODE
UPDATE UserPoint SET UserPoint='$points' WHERE username='$usernane' and userpass='$userpass' md5 hashed..

and try to see parameters how they worked it out....





THIS PARAMETER BELOW BELONGS TO THE CUSTOM DBASE OF THERE CP...
GO
/****** Object: StoredProcedure [dbo].[sp_doEP2VP] Script Date: 04/27/2019 12:36:14 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[sp_doEP2VP]
@username char(20),
@Get_vp int,
@vps int,
@retval int OUTPUT

AS
DECLARE
@currentEP int,
@currentVP int

SET NOCOUNT ON

SET @retval = 0
SET @currentEP = 0
SET @currentVP = 0

SELECT @currentEP = Points FROM Points WHERE UserName @username
SELECT @currentVP = VPoints FROM Points WHERE UserName @username


-----------------------------------------------------------------
BEGIN
IF @vps > @currentEP)
BEGIN
SET @retval = 0 -- 0 = Not enough points
SELECT @retval
RETURN @retval
END
ELSE
BEGIN
UPDATE Points SET Points = Points - @vps,VPoints = VPoints + @Get_vp WHERE UserName = @username
SET @retval = 1 -- 1 = Success convert
SELECT @retval
RETURN @retval
END
END

SET NOCOUNT OFF
SELECT @retval
RETURN @retval



This code worked the points ....

no what i mean is the premium point is binded to every character not to the whole account which has the characters.
 
Upvote 0
Joined
Sep 11, 2008
Messages
719
Reaction score
122
Google is youre friend....
This code...
----------------------------------------------------

need to select sql :

select * from RanGame1.dbo.ChaInfo inner join RanUser.dbo.UserInfo on RanGame1.dbo.ChaInfo.UserNum = RanUser.dbo.UserInfo.UserNum
where RanUser.dbo.UserInfo.UserNum = '257' and RanGame1.dbo.ChaInfo.ChaDeleted <> 1


then use the update :

UPDATE
ChaInfo
SET
ChaInfo.ChaPremiumPoint = '1'
FROM
RanUser.dbo.UserInfo AS Table_A
INNER JOIN RanGame1.dbo.ChaInfo AS Table_B
ON Table_B.UserNum = Table_A.UserNum
WHERE
Table_A.ChaName = 'name'
 
Upvote 0
Chinese Developer
Banned
Joined
Apr 6, 2019
Messages
358
Reaction score
53
where do i have to look in source to change the premiumpoint from rangame1 to ranuser?

you can try to search it on source
something like chapremiumpoint for all the details
and try read on it..
i not really pro in source , for me i have to try many times just can done modify it...
 
Upvote 0
Skilled Illusionist
Joined
Mar 17, 2018
Messages
323
Reaction score
30
use mssql_num_rows? or I am wrong? I forgot it already, once I find my old website, I will share it to you, for you to extract such code.
 
Last edited:
Upvote 0
Back
Top