Semanal
Código PHP:
Use MuOnline

declare @AccountID varchar (10)
declare @
AccountID2 varchar (10)
declare @
AccountID3 varchar (10)

declare @
Name varchar(10)
declare @
Name2 varchar(10)
declare @
Name3 varchar(10)

Select top 1 @AccountID=AccountID,@Name=Name from character order by ResetsWeek descname desc
Select top 1 
@AccountID2=AccountID,@Name2=Name from character where Name<>@Name order by ResetsWeek descname desc
Select top 1 
@AccountID3=AccountID,@Name3=Name from character where Name<>@Name and Name<>@Name2 order by ResetsWeek descname desc

Update memb_info set gold
=gold+30 where memb___id=@AccountID
Update memb_info set gold
=gold+20 where memb___id=@AccountID2
Update memb_info set gold
=gold+20 where memb___id=@AccountID3

Update character set ResetsWeek
=

Mensal
Código PHP:
Use MuOnline

declare @AccountID varchar (10)
declare @
AccountID2 varchar (10)
declare @
AccountID3 varchar (10)

declare @
Name varchar(10)
declare @
Name2 varchar(10)
declare @
Name3 varchar(10)

Select top 1 @AccountID=AccountID,@Name=Name from character order by ResetsMonth descname desc
Select top 1 
@AccountID2=AccountID,@Name2=Name from character where Name<>@Name order by ResetsMonth descname desc
Select top 1 
@AccountID3=AccountID,@Name3=Name from character where Name<>@Name and Name<>@Name2 order by ResetsMonth descname desc

Update memb_info set gold
=gold+30 where memb___id=@AccountID
Update memb_info set gold
=gold+20 where memb___id=@AccountID2
Update memb_info set gold
=gold+20 where memb___id=@AccountID3

Update character set ResetsMonth
=
Só mudar o nome das colunas.