Simple SQL to update Mana usage
#1

This UPDATE statement will change the a_needMP value in each row of the t_skilllevel table based on the specified conditions.

Simple but effective, feel free to use. Could be used in a similar way to adjust exp, gold and and and...

 

UPDATE t_skilllevel
SET a_needMP = CASE
WHEN a_needMP >= 500 AND a_needMP <= 750 THEN a_needMP * 0.70
WHEN a_needMP > 750 AND a_needMP <= 1000 THEN a_needMP * 0.50
WHEN a_needMP > 1000 AND a_needMP <= 1500 THEN a_needMP * 0.35
WHEN a_needMP > 1500 AND a_needMP <= 2000 THEN a_needMP * 0.25
WHEN a_needMP > 2000 AND a_needMP <= 3000 THEN a_needMP * 0.17
WHEN a_needMP > 3000 THEN a_needMP * 0.03
ELSE a_needMP
END;

 



Messages In This Thread
[No subject] - by Judgement - 11-20-2023, 02:15 AM
[No subject] - by RGT - 11-25-2023, 01:29 AM
[No subject] - by Scura - 11-29-2023, 09:34 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)