-- =============================================
-- Reset acumulativo Free + VIP + sVIP
-- Sistema sVIP programado by h4ii0w33n
-- Codigo modificado by h4ii0w33n
-- =============================================
--
-- Definindo as variaveis (Não mexer)
declare @MaxLevel int,
@PontosReset int,
@ZenReq int,
@MaxLevelVIP int,
@ZenReqVIP int,
@MaxLevelsVIP int,
@ZenReqsVIP int
-- Definindo valor das variaveis (Configure com caútela par ao seu servidor)
--
-- Contas não VIP
set @MaxLevel = 349 -- Level ao qual poderá resetar
set @ZenReq = 50000000 -- Zen requerido para resetar
-- Contas VIP
set @MaxLevelVIP = 299 -- Level ao qual poderá resetar
set @ZenReqVIP = 20000000 -- Zen requerido para resetar
-- Contas sVIP
set @MaxLevelsVIP = 249 -- Level ao qual poderá resetar
set @ZenReqsVIP = 10000000 -- Zen requerido para resetar
-- Execução do comando SQL (Não mexer)
--
-- Contas não VIP
UPDATE Character
SET cLevel = 1,
Experience = 0,
Money = Money - @ZenReq,
Resets = Resets + 1
FROM Character
JOIN MEMB_STAT ON Character.AccountID=MEMB_STAT.memb___id COLLATE Latin1_General_CS_AS
JOIN MEMB_INFO ON Character.AccountID=MEMB_INFO.memb___id COLLATE Latin1_General_CS_AS
WHERE cLevel > (@MaxLevel - 1)
AND Money > (@ZenReq - 1)
AND MEMB_STAT.ConnectStat = 0
AND MEMB_INFO.vip = 0
AND Resets <= 150
-- Contas VIP
UPDATE Character
SET cLevel = 1,
Experience = 0,
Money = Money - @ZenReqVIP,
Resets = Resets + 1
FROM Character
JOIN MEMB_STAT ON Character.AccountID=MEMB_STAT.memb___id COLLATE Latin1_General_CS_AS
JOIN MEMB_INFO ON Character.AccountID=MEMB_INFO.memb___id COLLATE Latin1_General_CS_AS
WHERE cLevel > (@MaxLevelVIP - 1)
AND Money > (@ZenReqVIP - 1)
AND MEMB_STAT.ConnectStat = 0
AND MEMB_INFO.vip = 1
AND Resets <= 1000
-- Contas sVIP
UPDATE Character
SET cLevel = 1,
Experience = 0,
Money = Money - @ZenReqsVIP,
Resets = Resets + 1
FROM Character
JOIN MEMB_STAT ON Character.AccountID=MEMB_STAT.memb___id COLLATE Latin1_General_CS_AS
JOIN MEMB_INFO ON Character.AccountID=MEMB_INFO.memb___id COLLATE Latin1_General_CS_AS
WHERE cLevel > (@MaxLevelsVIP - 1)
AND Money > (@ZenReqsVIP - 1)
AND MEMB_STAT.ConnectStat = 0
AND MEMB_INFO.vip = 2
AND Resets <= 2000