Fix for character HP bug

09/10/2009 09:09 twiggy345#1
Heres a little something that i made up. My GM character lvled up and hit the HP bug so i made this so that should anyone else hit this bug Wouldnt require u to have to go into the database and manually lower the stats and all. Just remeber that it is not perfect considering everything that u have equipped. the database tells u the base HP before equipment. So play with it just a little till u get it just right for ur server

UPDATE dbo.user_character
SET wCon = 2000, nHP = 58000
WHERE (byPCClass = 0) AND (nHP >= 65000) AND (wCon >= 2000);




Remember tho that u must set it as a job like the auto reborn and make sure that u set it for each of the character classes that u have in ur server. Have it run everyminute becuase u dont wanna make someone have to wait a full day or once a week if they get bugged. I hope that this helps u like it is me.
09/10/2009 11:15 Zombe#2
A little explanation on this:

Code:
UPDATE dbo.user_character
SET wCon = 2000, nHP = 58000
WHERE (byPCClass = 0) AND (nHP >= 65000) AND (wCon >= 2000);
1: Your script works on AK only, because of (byPCClass = 0).
2: You don't need to set the HP, because it automaticly adjusts itself according to the constitution, so changing it manually can actually bug ut char.
3: In your script, you use more or equal in (wCon >= 2000), and if that is true, you set it to 2000 ,and basicly that matches the wCon >= 2000 again, so it is like a never-ending procedure, thus it causes lag.

So I would use this:

Code:
UPDATE dbo.user_character 
SET wCon = 2000
WHERE (wCon > 2000);
Much simpler, and less bugged, I should say... Still, credits to you for the idea to fix the bug ^^
09/10/2009 15:15 ҉ THT ҉#3
you can have 64K HP b4 you get that bug,
09/10/2009 16:41 twiggy345#4
Quote:
Originally Posted by Zombe View Post
A little explanation on this:

Code:
UPDATE dbo.user_character
SET wCon = 2000, nHP = 58000
WHERE (byPCClass = 0) AND (nHP >= 65000) AND (wCon >= 2000);
1: Your script works on AK only, because of (byPCClass = 0).
2: You don't need to set the HP, because it automaticly adjusts itself according to the constitution, so changing it manually can actually bug ut char.
3: In your script, you use more or equal in (wCon >= 2000), and if that is true, you set it to 2000 ,and basicly that matches the wCon >= 2000 again, so it is like a never-ending procedure, thus it causes lag.

So I would use this:

Code:
UPDATE dbo.user_character 
SET wCon = 2000
WHERE (wCon > 2000);
Much simpler, and less bugged, I should say... Still, credits to you for the idea to fix the bug ^^

THis is the first script that i have ever made for the database so thank u for helping me point out the possible bugs (it was 2:00Am when i did it lol)

I will make the adjustments. but you have to set a step for every character in the job. there will be a total of 7 steps to this one job.
09/10/2009 17:18 theoners#5
you just need made a GM ring
with the 999999999 HP recovery and you done...
09/10/2009 18:04 Bigshow107#6
Quote:
Originally Posted by theoners View Post
you just need made a GM ring
with the 999999999 HP recovery and you done...
well these is not a solution
since there alot pserver with high stats (RB server )
so ppl can't get more then 2k heal cuz there will be a bug
but thanks to zombe and twiggy most fixed now ( i will check it then tell u what)
09/10/2009 21:59 xfactorbowler#7
yeah this makes someone having to rewrite the dekaron.exe obsolete.. unless tehre bored that is.