Register for your free account! | Forgot your password?


Go Back   elitepvpers > MMORPGs > Shaiya > Shaiya Private Server > Shaiya PServer Development
You last visited: Today at 05:10

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

Advertisement



[Release]Global Stat/Skill Reset

Discussion on [Release]Global Stat/Skill Reset within the Shaiya PServer Development forum part of the Shaiya Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2010
Posts: 520
Received Thanks: 1,275
[Release]Global Stat/Skill Reset

Does anyone happen to have the Global Stat/Reskill Script from ShaiyaDevTeam? >.< I used to have it, but it got erased when I switched computers.
RebeccaBlack is offline  
Thanks
1 User
Old 01/01/2011, 12:39   #2
 
elite*gold: 0
Join Date: Aug 2010
Posts: 241
Received Thanks: 253
Here it is, Tommo's global stat and skill reset.
Attached Files
File Type: txt Tommo's Global Stat - Skill Reset.txt (4.8 KB, 1111 views)
zargon05 is offline  
Thanks
3 Users
Old 01/02/2011, 06:49   #3
 
elite*gold: 0
Join Date: Sep 2010
Posts: 520
Received Thanks: 1,275
I just tried this, and most of it completed but I got this error

Msg 220, Level 16, State 1, Line 96
Arithmetic overflow error for data type smallint, value = 329989.
The statement has been terminated.

I didn't change anything o.O
RebeccaBlack is offline  
Old 01/02/2011, 09:53   #4
 
elite*gold: 0
Join Date: Aug 2010
Posts: 241
Received Thanks: 253
It just tried it out and it works perfectly for me, What value did you set for
Code:
Stat_NM, Stat_HM, Stat_UM, Skill_NM, Skill_HM, Skill_UM
zargon05 is offline  
Old 01/02/2011, 10:10   #5
 
elite*gold: 0
Join Date: Sep 2010
Posts: 520
Received Thanks: 1,275
Code:
-- set your custom Status Points gained per level here
SET @Stat_NM = 5;
SET @Stat_HM = 9;
SET @Stat_UM = 11;
    -- set your custom Skill Points gained per level here
SET @Skill_NM = 3;
SET @Skill_HM = 5;
SET @Skill_UM = 7;
RebeccaBlack is offline  
Old 01/02/2011, 12:52   #6
 
elite*gold: 0
Join Date: Aug 2010
Posts: 241
Received Thanks: 253
It seems your Level coloum has a value higher than 329990
zargon05 is offline  
Thanks
1 User
Old 01/02/2011, 12:58   #7
 
elite*gold: 0
Join Date: Oct 2009
Posts: 446
Received Thanks: 631
Did you change anything for GM's, like Level?
ProfNerwosol is offline  
Thanks
1 User
Old 01/02/2011, 13:07   #8
 
elite*gold: 0
Join Date: Sep 2010
Posts: 520
Received Thanks: 1,275
That. That was it. Thank you both so much. One of our Admins had a Char set to Level 30000

I'll go smack him when he wakes up, and thank you both again.
RebeccaBlack is offline  
Old 01/02/2011, 19:04   #9
 
elite*gold: 0
Join Date: Oct 2009
Posts: 446
Received Thanks: 631
I modified the script to include some of the problems encountered by users.

- GM's are no longer included in Reset, their modified characteristics can be problematic during procedure's execution,
- added descriptions, it should be easier to read the code,

I haven't tested it on my database, so I'm leaving it up to you. Post any problems or errors you encounter.


Code:
/*
Author:            ProfNerwosol
Date:            20-X-2010
Purpose:        Global server Status & Skill Point reset.
Info:            GM's are not included in Global Reset. Their status/skill points can be problematic during script execution.
*/

DECLARE @Stat_NM tinyint, @Stat_HM tinyint, @Stat_UM tinyint;
DECLARE @Skill_NM tinyint, @Skill_HM tinyint, @Skill_UM tinyint;

    -- set your custom Status Points gained per level here
SET @Stat_NM = 5;
SET @Stat_HM = 7;
SET @Stat_UM = 9;
    -- set your custom Skill Points gained per level here
SET @Skill_NM = 3;
SET @Skill_HM = 4;
SET @Skill_UM = 5;


/*************************************************
 *    reset status and skill points for AoL & UoF  *
 *************************************************/

    -- status/skill points are reset by Family (race); base status points are class and family specific
DECLARE @i tinyint;
SET @i=0;

WHILE @i<=3
begin
    if @i=0        -- Human
    begin
        exec sp_executesql N'UPDATE PS_GameData.dbo.Chars SET [Str]=14, Dex=12, Rec=9, [Int]=8, Wis=7, Luc=15 
                            FROM PS_GameData.dbo.Chars AS C INNER JOIN PS_UserData.dbo.Users_Master AS UM
                            ON C.UserUID = UM.UserUID AND UM.[Status] NOT IN (16,32,48,64,80) AND C.[Level]>1 AND C.Del=0
                            WHERE [email protected] AND C.Job=0',N'@i tinyint',@i
        exec sp_executesql N'UPDATE PS_GameData.dbo.Chars SET [Str]=10, Dex=9, Rec=12, [Int]=10, Wis=10, Luc=14 
                            FROM PS_GameData.dbo.Chars AS C INNER JOIN PS_UserData.dbo.Users_Master AS UM
                            ON C.UserUID = UM.UserUID AND UM.[Status] NOT IN (16,32,48,64,80) AND C.[Level]>1 AND C.Del=0
                            WHERE [email protected] AND C.Job=1',N'@i tinyint',@i
        exec sp_executesql N'UPDATE PS_GameData.dbo.Chars SET [Str]=8, Dex=9, Rec=10, [Int]=12, Wis=14, Luc=12 
                            FROM PS_GameData.dbo.Chars AS C INNER JOIN PS_UserData.dbo.Users_Master AS UM
                            ON C.UserUID = UM.UserUID AND UM.[Status] NOT IN (16,32,48,64,80) AND C.[Level]>1 AND C.Del=0
                            WHERE [email protected] AND C.Job=5',N'@i tinyint',@i
    end

    if @i=1        -- Elf
    begin
        exec sp_executesql N'UPDATE PS_GameData.dbo.Chars SET [Str]=10, Dex=19, Rec=9, [Int]=7, Wis=8, Luc=12 
                            FROM PS_GameData.dbo.Chars AS C INNER JOIN PS_UserData.dbo.Users_Master AS UM
                            ON C.UserUID = UM.UserUID AND UM.[Status] NOT IN (16,32,48,64,80) AND C.[Level]>1 AND C.Del=0
                            WHERE [email protected] AND C.Job=2',N'@i tinyint',@i
        exec sp_executesql N'UPDATE PS_GameData.dbo.Chars SET [Str]=11, Dex=14, Rec=10, [Int]=7, Wis=10, Luc=13 
                            FROM PS_GameData.dbo.Chars AS C INNER JOIN PS_UserData.dbo.Users_Master AS UM
                            ON C.UserUID = UM.UserUID AND UM.[Status] NOT IN (16,32,48,64,80) AND C.[Level]>1 AND C.Del=0
                            WHERE [email protected] AND C.Job=3',N'@i tinyint',@i
        exec sp_executesql N'UPDATE PS_GameData.dbo.Chars SET [Str]=7, Dex=13, Rec=9, [Int]=15, Wis=12, Luc=9 
                            FROM PS_GameData.dbo.Chars AS C INNER JOIN PS_UserData.dbo.Users_Master AS UM
                            ON C.UserUID = UM.UserUID AND UM.[Status] NOT IN (16,32,48,64,80) AND C.[Level]>1 AND C.Del=0
                            WHERE [email protected] AND C.Job=4',N'@i tinyint',@i
    end

    if @i=2        -- Vail
    begin
        exec sp_executesql N'UPDATE PS_GameData.dbo.Chars SET [Str]=10, Dex=15, Rec=9, [Int]=9, Wis=10, Luc=12 
                            FROM PS_GameData.dbo.Chars AS C INNER JOIN PS_UserData.dbo.Users_Master AS UM
                            ON C.UserUID = UM.UserUID AND UM.[Status] NOT IN (16,32,48,64,80) AND C.[Level]>1 AND C.Del=0
                            WHERE [email protected] AND C.Job=2',N'@i tinyint',@i
        exec sp_executesql N'UPDATE PS_GameData.dbo.Chars SET [Str]=7, Dex=9, Rec=9, [Int]=17, Wis=14, Luc=9 
                            FROM PS_GameData.dbo.Chars AS C INNER JOIN PS_UserData.dbo.Users_Master AS UM
                            ON C.UserUID = UM.UserUID AND UM.[Status] NOT IN (16,32,48,64,80) AND C.[Level]>1 AND C.Del=0
                            WHERE [email protected] AND C.Job=4',N'@i tinyint',@i
        exec sp_executesql N'UPDATE PS_GameData.dbo.Chars SET [Str]=8, Dex=9, Rec=10, [Int]=14, Wis=16, Luc=8 
                            FROM PS_GameData.dbo.Chars AS C INNER JOIN PS_UserData.dbo.Users_Master AS UM
                            ON C.UserUID = UM.UserUID AND UM.[Status] NOT IN (16,32,48,64,80) AND C.[Level]>1 AND C.Del=0
                            WHERE [email protected] AND C.Job=5',N'@i tinyint',@i
    end

    if @i=3        -- Nordein
    begin
        exec sp_executesql N'UPDATE PS_GameData.dbo.Chars SET [Str]=16, Dex=12, Rec=11, [Int]=8, Wis=7, Luc=11 
                            FROM PS_GameData.dbo.Chars AS C INNER JOIN PS_UserData.dbo.Users_Master AS UM
                            ON C.UserUID = UM.UserUID AND UM.[Status] NOT IN (16,32,48,64,80) AND C.[Level]>1 AND C.Del=0
                            WHERE [email protected] AND C.Job=0',N'@i tinyint',@i
        exec sp_executesql N'UPDATE PS_GameData.dbo.Chars SET [Str]=12, Dex=9, Rec=14, [Int]=10, Wis=10, Luc=10 
                            FROM PS_GameData.dbo.Chars AS C INNER JOIN PS_UserData.dbo.Users_Master AS UM
                            ON C.UserUID = UM.UserUID AND UM.[Status] NOT IN (16,32,48,64,80) AND C.[Level]>1 AND C.Del=0
                            WHERE [email protected] AND C.Job=1',N'@i tinyint',@i
        exec sp_executesql N'UPDATE PS_GameData.dbo.Chars SET [Str]=13, Dex=10, Rec=12, [Int]=7, Wis=10, Luc=13 
                            FROM PS_GameData.dbo.Chars AS C INNER JOIN PS_UserData.dbo.Users_Master AS UM
                            ON C.UserUID = UM.UserUID AND UM.[Status] NOT IN (16,32,48,64,80) AND C.[Level]>1 AND C.Del=0
                            WHERE [email protected] AND C.Job=3',N'@i tinyint',@i
    end
    
    SET @i = @i + 1;
end


/**************************************************************
 *  Add class specific bonus status points gained each level  *
 **************************************************************/

UPDATE PS_GameData.dbo.Chars SET [Str] = (
    CASE 
        WHEN Family=0 AND Job=0 THEN [STR] + ([Level]-1)
        WHEN Family=3 AND Job=0 THEN [STR] + ([Level]-1) ELSE [Str] END),
    Rec = (
    CASE
        WHEN Family=0 AND Job=1 THEN Rec + ([Level]-1)
        WHEN Family=3 AND Job=1 THEN Rec + ([Level]-1) ELSE Rec END),
    Dex = (
    CASE
        WHEN Family=1 AND Job=2 THEN Dex + ([Level]-1)
        WHEN Family=2 AND Job=2 THEN Dex + ([Level]-1) ELSE Dex END),
    Luc = (
    CASE
        WHEN Family=1 AND Job=3 THEN Luc + ([Level]-1)
        WHEN Family=3 AND Job=3 THEN Luc + ([Level]-1) ELSE Luc END),
    [Int] = (
    CASE
        WHEN Family=1 AND Job=4 THEN [Int] + ([Level]-1)
        WHEN Family=2 AND Job=4 THEN [Int] + ([Level]-1) ELSE [Int] END),
    Wis = (
    CASE
        WHEN Family=0 AND Job=5 THEN Wis + ([Level]-1)
        WHEN Family=2 AND Job=5 THEN Wis + ([Level]-1) ELSE Wis END)
FROM PS_GameData.dbo.Chars AS C INNER JOIN PS_UserData.dbo.Users_Master AS UM
ON C.UserUID = UM.UserUID AND UM.[Status] NOT IN (16,32,48,64,80) AND C.[Level]>1 AND C.Del=0


/***************************************************************
 *  Now, set Skill & Status Points according to players level  *
 ***************************************************************/

    -- these are set by multiplying skill/status points by (Level-1)
    -- (Level-1) is because you start at lv1 and gain 59 levels to reach lv60
UPDATE PS_GameData.dbo.Chars SET StatPoint=([Level]-1)*(
        CASE Grow
        WHEN 0 THEN @Stat_NM
        WHEN 1 THEN @Stat_NM
        WHEN 2 THEN @Stat_HM
        WHEN 3 THEN @Stat_UM END), 
    SkillPoint = ([Level]-1)*(
        CASE Grow
        WHEN 0 THEN @Skill_NM
        WHEN 1 THEN @Skill_NM
        WHEN 2 THEN @Skill_HM
        WHEN 3 THEN @Skill_UM END)
FROM PS_GameData.dbo.Chars AS C INNER JOIN PS_UserData.dbo.Users_Master AS UM
ON C.UserUID = UM.UserUID AND UM.[Status] NOT IN (16,32,48,64,80) AND C.[Level]>1 AND C.Del=0

/*
 * Finally, delete player's skills, quick slots and set PvP Kill & Death Level to 0
 */
    -- set Kill/Dead Level to zero; these reflect the bonus points you gain per Rank
UPDATE [PS_GameData].[dbo].[Chars] 
    SET [KillLevel]=0 ,[DeadLevel]=0
    FROM PS_GameData.dbo.Chars AS C INNER JOIN PS_UserData.dbo.Users_Master AS UM
    ON C.UserUID = UM.UserUID AND UM.[Status] NOT IN (16,32,48,64,80) AND C.Del=0;

    -- delete all skills
DELETE FROM [PS_GameData].[dbo].[CharSkills]
    FROM PS_GameData.dbo.Chars AS C INNER JOIN PS_UserData.dbo.Users_Master AS UM
    ON C.UserUID = UM.UserUID AND UM.[Status] NOT IN (16,32,48,64,80) AND C.Del=0;

    -- delete all Quick Slots
DELETE FROM [PS_GameData].[dbo].[CharQuickSlots]
    FROM PS_GameData.dbo.Chars AS C INNER JOIN PS_UserData.dbo.Users_Master AS UM
    ON C.UserUID = UM.UserUID AND UM.[Status] NOT IN (16,32,48,64,80) AND C.Del=0;
ProfNerwosol is offline  
Thanks
8 Users
Old 01/02/2011, 20:08   #10
 
elite*gold: 0
Join Date: Sep 2010
Posts: 520
Received Thanks: 1,275
You are simply amazing, Tommo.
Thank you yet again.


Also, is there a place I could message you at? I wanted to ask you something.
RebeccaBlack is offline  
Old 01/02/2011, 20:18   #11
 
elite*gold: 0
Join Date: Oct 2009
Posts: 446
Received Thanks: 631
If it isn't something you want to keep private you can do it here. If not, I'll enable PM's.
ProfNerwosol is offline  
Old 01/02/2011, 20:27   #12
 
elite*gold: 0
Join Date: Sep 2010
Posts: 520
Received Thanks: 1,275
Private for now, if you don't mind.
RebeccaBlack is offline  
Old 01/03/2011, 02:10   #13
 
elite*gold: 0
Join Date: Jan 2009
Posts: 348
Received Thanks: 257
Hey Tommo, nice script, but it gets confusing with the backpack upgrade for players, any chance you can manipulate it that it leaves that skill and not reset it?
Danco1990 is offline  
Old 01/03/2011, 02:53   #14
 
elite*gold: 20
Join Date: Jun 2009
Posts: 790
Received Thanks: 2,716
removed
lilprohacker is offline  
Thanks
3 Users
Old 01/03/2011, 15:18   #15
 
elite*gold: 0
Join Date: Jan 2009
Posts: 348
Received Thanks: 257
Hey LilPro, thank you for posting, fortunatly i added that little thing myself yday morning. Don't forget to detract 1 for bp lv1 3 for bp lv2 and 5 in total for bp lv3. Also, the original script was missing the 5 starter skillpoints. Had to add this all manually. Just a heads up.
Danco1990 is offline  
Reply


Similar Threads Similar Threads
nostale global stat hack
07/22/2011 - Nostale - 4 Replies
is there anyone here knows how to make that hack? i mean those fairy hack and card stat hack... someone post it on forum of nostale global and also i encountered one player w/ +9 wing but all his card stat are 100 step...
How to Skill/Stat Aloken(PVP)
01/09/2011 - Dekaron - 1 Replies
Hey I need help for my Aloken (50). I am seaching for an Guide for Stats and Skills. Can someone help me?
NosTale(Global) Stat Hack?
12/22/2010 - Nostale - 12 Replies
Hi, war heute mal Arena und voll viele lowies mit SP machen heftigst hohen dmg... gibt es evtl. sowas wie n stat hack? im speaker hat wer nach hack für alle stats auf 100 gefragt, gibt es sowas? Wenn ja kann den einer uppen?
Stat and Skill resets
07/15/2010 - Shaiya Private Server - 7 Replies
I'm stuck here, everytime I use a stat or skill reset it does not give me the correct number of stats/skills back. Anyone have a solution to this?



All times are GMT +2. The time now is 05:10.


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