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
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
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
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)
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
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.
[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 ??