Register for your free account! | Forgot your password?

You last visited: Today at 06:55

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

Advertisement



Reset Stat point Bug

Discussion on Reset Stat point Bug within the SRO PServer Questions & Answers forum part of the SRO Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2019
Posts: 97
Received Thanks: 35
Reset Stat point Bug

Hello Guys
i'm use query to Reset Stat and all good
this query It works fine, but there is a problem
when use it will see ur Stat point back - but still have phy or mag attack and def don't change
clarification
if you play Str and make reset stat u will have ur phy attack and def and u can get more def and attack when use stat point
I want to reset for that too
zoalalove is offline  
Old 03/26/2023, 23:45   #2
 
leiwis's Avatar
 
elite*gold: 0
Join Date: Sep 2009
Posts: 45
Received Thanks: 24
If it fails to reset, it means that something is wrong.

so

_AddLogItem in SRO_VT_LOG oR SHARDLOG

if(@Operation = 41 and @To = 255 and (@ItemRefID = 465562)) --Stat Reset Scroll--
begin
WAITFOR DELAY '00:00:03';
declare @ smallint
declare @ smallint
declare @ tinyint
declare @tatPoint smallint
select @ = MaxLevel from SRO_VT_SHARD.._Char where CharID = @CharID
set @tatPoint = @*3)-3
set @ = @+19
UPDATE SRO_VT_SHARD.._Char SET Strength @, Intellect @, RemainStatPoint @tatPoint WHERE CharID=@CharID
end
leiwis is offline  
Old 03/27/2023, 09:32   #3
 
elite*gold: 0
Join Date: Sep 2019
Posts: 97
Received Thanks: 35
Gallery 1
zoalalove is offline  
Old 03/27/2023, 23:15   #4
 
painmaker_'s Avatar
 
elite*gold: 0
Join Date: Dec 2021
Posts: 85
Received Thanks: 74
In case it's a PvP server, you don't need to reset any character's stats. You just have to adjust the character's stats to INT or STR as required.
Quote:
-- STR / INT
IF (@Operation = 41) and (@ItemRefID = 123123)-- STR -- By Developer Gamer
Begin
Update [SRO_VT_SHARD].[dbo].[_Char] Set Strength=456, Intellect=129, RemainStatPoint=0 WHERE CharID=@CharID
END
--END STR
--INT STAT SCROLL
IF (@Operation = 41) and (@ItemRefID = 123123) -- INT
Begin
Update [SRO_VT_SHARD].[dbo].[_Char] Set Strength=129, Intellect=456, RemainStatPoint=0 WHERE CharID=@CharID
End
--END INT STAT
painmaker_ is offline  
Old 03/28/2023, 17:19   #5
 
JellyBitz's Avatar
 
elite*gold: 0
Join Date: Sep 2018
Posts: 419
Received Thanks: 943
Quote:
Originally Posted by painmaker_ View Post
You just have to adjust the character's stats to INT or STR as required.
I think you're getting the wrong approach leaving more space to bugs.

You all are navigating into bugs since you're not really setting the default values. Let me introduce you the maths.
Quote:
-- Check for Reset Scroll being used
IF (@Operation = 41) AND (@ItemRefID = YOUR_ITEM_ID)
BEGIN
-- Your server settings
DECLARE @StatsByLevel INTEGER = 3
DECLARE @BaseSTR INTEGER = 20
DECLARE @BaseINT INTEGER = 20
-- Reset character stat points
UPDATE [SRO_VT_SHARD].[dbo].[_Char]
SET Strength=@BaseSTR+(MaxLevel-1), Intellect=@BaseINT+(MaxLevel-1), RemainStatPoint=(MaxLevel-1)*@StatsByLevel
WHERE CharID=@CharID
END
JellyBitz is offline  
Thanks
2 Users
Old 03/28/2023, 18:47   #6
 
painmaker_'s Avatar
 
elite*gold: 0
Join Date: Dec 2021
Posts: 85
Received Thanks: 74
Quote:
Originally Posted by JellyBitz View Post
I think you're getting the wrong approach leaving more space to bugs.

You all are navigating into bugs since you're not really setting the default values. Let me introduce you the maths.
i am not sharing reset stat scroll. However i respect your feedback.
painmaker_ is offline  
Old 03/30/2023, 00:36   #7
 
elite*gold: 0
Join Date: Jan 2009
Posts: 972
Received Thanks: 453
Quote:
Originally Posted by zoalalove View Post
Gallery 1
Your problem is not coming from the reset stats query
That's phy / mag defense

You cannot reset that through a query, in this picture you might have had wearing a full set and holding a weapon. If you want to "reset" that, you simply have to wear a default set, _BASIC D1 items. D11, D12, D13, D14, D15, their minimum required level to wear them it's 101, so their defense/attack pwr. gets applied , even if your stats are reset.

About reset stats query, I would go for JelliyBitz's query, it's safer but to make it even more safer, I would put it in a try and add a rollback transaction if any error happens, because you never know...
USE SRO_VT_SHARD
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo]._ResetPlayerStats
@D INT,
@CodeName VARCHAR(250)
AS
SET NOCOUNT ON;
SET XACT_ABORT ON;
DECLARE @Value int
IF XACT_STATE() = -1
BEGIN
SET @Value = -1;
GOTO ErrorHandler;
END
BEGIN TRY
DECLARE @ByLevel INTEGER = 3
DECLARE @TR INTEGER = 20
DECLARE @T INTEGER = 20
DECLARE @16 VARCHAR(50) = (SELECT CharName16 FROM [SRO_VT_SHARD].[dbo]._Char WHERE CharID = @D)
/* Checks if any of the variables returns NULL OR nothing gets updated */
IF @D IS NULL OR @CodeName IS NULL OR @@ROWCOUNT = 0)
BEGIN
SET @Value = -2;
GOTO ErrorHandler;
END
BEGIN TRANSACTION;
UPDATE [SRO_VT_SHARD].[dbo].[_Char]
SET Strength @TR+(MaxLevel-1)
, Intellect @T+(MaxLevel-1)
, RemainStatPoint=(MaxLevel-1) @ByLevel
WHERE CharID @D
COMMIT TRANSACTION;
END TRY
BEGIN CATCH
GOTO ErrorHandler;
END CATCH;
RETURN 0;
/*_# Give back the scroll in case of any error */
ErrorHandler:
IF XACT_STATE() <> 0
ROLLBACK TRANSACTION;
EXEC _ADD_ITEM_EXTERN @16, @CodeName, 1, 0
RETURN @Value

and on item usage, just execute the query

IF (@Operation = 41) AND (@ItemRefID = YOUR_ITEM_ID)
BEGIN
DECLARE @CodeName VARCHAR(250) = 'YOUR_SCROLL_CODENAME'
EXEC [SRO_VT_SHARD].dbo._ResetPlayerStats @D, @CodeName
END

This query can be used in any of the cases, you just change the variables, the selections, and in case of anything goes wrong , you will get your scroll back
leo2111 is offline  
Reply


Similar Threads Similar Threads
Any way to reset STAT points? (not using a stat reset scroll)
02/12/2016 - SRO Coding Corner - 5 Replies
Hey folks i tryed with item scroll reset stat, it works allmost perfect but those dc is rly sux... I saw at some private server that they have some like coded procedure starting to be active when you write something in your for example private chat(and it give nice reset stat without DC) chat: $Reset Reset_stats thats only example.
[Buying] [H] Paypal [S] AK-47 Fire Serpent Stat, AWP Asiimov Stat, AWP Man-O-War Stat
03/09/2015 - Counter-Strike Trading - 3 Replies
Paypal AK-47 Fire Serpent Stat, AWP Asiimov Stat, AWP Man-O-War Stat offer me here or in skype
[Selling] [Store] Stat AWP ASI, STAT M4 ASI, STAT FN Orion and Serpent FT
01/10/2015 - Counter-Strike Trading - 2 Replies
StatTrak™ AWP Asiimov FT StatTrak™ M4A4 Asiimov FT StatTrak™ USP-S Orion FN StatTrak™ USP-S Orion FN Sticker: Headhunter (Foil) AK-47 Fire Serpent FT AK-47 Fire Serpent FT Everything being sold for 80% of steam market price. I am only willing to sell to reputable people so if you barely have any rep I'm not trading with you even if you're going first. Payment option: PayPal
Reset all point stat
04/23/2013 - Shaiya Private Server - 3 Replies
Hello I address you today Because I have a question And will it be possible to reset the stat point of every player from my server? Thank you for your help
Stat-point reset?
06/24/2011 - Silkroad Online - 5 Replies
hi i have one question can i use the stat-points reset scroll when i dlvling to lvl 50 ??



All times are GMT +1. The time now is 06:56.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.