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!

sql trigger Auto_Reborn juver database

Elite Diviner
Joined
Sep 7, 2020
Messages
482
Reaction score
87
sql for re login you level will reset
in pic said level 10 for reborn then reset you level to 1 max to 80 times

but level character still same not reset to 1 form 10

(in source not have any keyword about reborn)

dbo.charinfo > ChaReborn int (0)

1691675023290 - sql trigger Auto_Reborn juver database - RaGEZONE Forums
 

Attachments

You must be registered for see attachments list
Experienced Elementalist
Joined
Mar 10, 2011
Messages
230
Reaction score
51
ChaGPT Response
SQL:
CREATE TRIGGER ResetLevelAndIncrementReborn
ON RanGame1.dbo.ChaInfo
AFTER UPDATE
AS
BEGIN
    IF UPDATE(ChaLevel) AND UPDATE(ChaReborn)
    BEGIN
        UPDATE c
        SET c.ChaLevel = 1,
            c.ChaReborn = c.ChaReborn + 1,
        FROM RanGame1.dbo.ChaInfo c
        JOIN inserted i ON c.ChaID = i.ChaID
        WHERE i.ChaLevel = 10 AND i.ChaReborn < 80;
    END
END;

Maybe try this?
 
Upvote 0
Elite Diviner
Joined
Sep 7, 2020
Messages
482
Reaction score
87
ChaGPT Response
SQL:
CREATE TRIGGER ResetLevelAndIncrementReborn
ON RanGame1.dbo.ChaInfo
AFTER UPDATE
AS
BEGIN
    IF UPDATE(ChaLevel) AND UPDATE(ChaReborn)
    BEGIN
        UPDATE c
        SET c.ChaLevel = 1,
            c.ChaReborn = c.ChaReborn + 1,
        FROM RanGame1.dbo.ChaInfo c
        JOIN inserted i ON c.ChaID = i.ChaID
        WHERE i.ChaLevel = 10 AND i.ChaReborn < 80;
    END
END;

Maybe try this?
1691846968877 - sql trigger Auto_Reborn juver database - RaGEZONE Forums
error
 

Attachments

You must be registered for see attachments list
Upvote 0
Chinese Developer
Banned
Joined
Apr 6, 2019
Messages
358
Reaction score
53
Maybe you can try my trigger.

in my scripts, there was some setting which can be configure by yourself.

SET @RebornMax = 50; This is max reborn setting


SQL:
SET @RebornNeedLevel =
        CASE
            WHEN @TempReborn < 10 THEN 150
            WHEN @TempReborn >= 10 AND @TempReborn < 20 THEN 200
            WHEN @TempReborn >= 20 AND @TempReborn < @RebornMax THEN 300
        END;

SQL:
    SET @newChaStRemain = 
        CASE
            WHEN @TempReborn < 10 THEN @TempReborn * 100
            WHEN @TempReborn >= 10 AND @TempReborn < 20 THEN @TempReborn * 200
            WHEN @TempReborn >= 20 AND @TempReborn < @RebornMax THEN @TempReborn * 300
        END;

SQL:
    SET @newChaSkillPoint = 
        CASE
            WHEN @TempReborn < 10 THEN @TempReborn * 50
            WHEN @TempReborn >= 10 AND @TempReborn < 20 THEN @TempReborn * 100
            WHEN @TempReborn >= 20 AND @TempReborn < @RebornMax THEN @TempReborn * 200
        END;

this 3 parts is ,
when reborn below 10, every reborn will increase 100stats, 50skillpoint. and the level is needed over 150level for reborn
when reborn is over 10 and below 20, every reborn will increase 200stats, 100skillpoint. and the level is needed over 200level for reborn
when reborn is over 20 and below max reborn, every reborn will increase 300stats, 200skillpoint. and the level is needed over 300level for reborn

just enjoy it.
 

Attachments

You must be registered for see attachments list
Upvote 0
Back
Top