Thats my procedure
declare @killer varchar(max) = (select CharName from SRO_VT_ACCOUNT..srZor_uniques where id=(select max (id) from SRO_VT_ACCOUNT..srZor_uniques))
declare @
ed varchar(max) = (select mobname from SRO_VT_ACCOUNT..srZor_uniques where id=(select max (id) from SRO_VT_ACCOUNT..srZor_uniques))declare @
arid int = (select charid from SRO_VT_SHARD.._char where charname16=@killer)declare @
id int = (select id from SRO_VT_SHARD.._refobjcommon where codename128 = @
ed and service =1 )DECLARE @
int int =(Select points From SRO_VT_SHARD.dbo._UniqueRanking Where CharID = @
arid )DECLARE @
ldid int =(Select GuildID From SRO_VT_SHARD.._char Where CharID = @
arid )DECLARE @
ldname varchar(max) =(Select Name From SRO_VT_SHARD.dbo._Guild Where ID = @
ldid )if @eventid in (4,6,9,11,10) AND (select count(*)from SRO_VT_ACCOUNT..srZor_uniques ) > 0
begin
declare @
Point int = 0-- this is unique points logger for pservercms by mixawy
if @
id = 14936 begin-- lvy ----normal uniquesSET @
Point = 5 ENDif @
id = 1954 begin --tigerSET @
Point = 5 ENDif @
id = 5871 begin --kerberosSET @
Point = 5 ENDif @
id = 2002 begin --isyutaruSET @
Point = 5 ENDif @
id = 1982 begin --uruchiSET @
Point = 6 ENDif @
id = 3875 begin --demonSET @
Point = 10 ENDif @
id = 3810 begin --lordSET @
Point = 8 ENDif @
id = 14995 begin-- snake SET @
Point = 10 ENDif @
id = 22891 begin --medusa --big uniquesSET @
Point = 20 ENDif @
id = 3877 begin --rocSET @
Point = 100 END/* insert */
if @
Point >0 and @
ldid >0 and (not exists (select charid from SRO_VT_SHARD.._UniqueRanking where CharID = @
arid) ) begininsert into SRO_VT_SHARD.._UniqueRanking (CharID,CodeName128,points) values @
arid @
ldname @
Point) end
else if @
Point >0 and @
ldid =0 and (not exists (select charid from SRO_VT_SHARD.._UniqueRanking where CharID = @
arid) ) begininsert into SRO_VT_SHARD.._UniqueRanking (CharID,CodeName128,points) values @
arid,0 @
Point) end
/* update */
else if @
ldid >0 and (exists (select charid from SRO_VT_SHARD.._UniqueRanking where CharID = @
arid)) beginUPDATE SRO_VT_SHARD.dbo._UniqueRanking SET CodeName128 = @
ldname Where CharID = @
arid end
else if @
Point >0 and (exists (select charid from SRO_VT_SHARD.._UniqueRanking where CharID = @
arid)) beginUPDATE SRO_VT_SHARD.dbo._UniqueRanking SET points = @
int @
Point Where CharID = @
arid end
/* uniquekilllist & clean */
insert into SRO_VT_SHARD.._UniqueKillList (CharID,CodeName128,time) VALUES @
arid @
ed,Getdate())delete from SRO_VT_ACCOUNT..srZor_uniques where id=(select max (id) from SRO_VT_ACCOUNT..srZor_uniques)
END






