|
• الانـتـسـاب » Jul 2017
|
• رقـم العـضـويـة » 133179
|
• المشـــاركـات » 472
|
• الـدولـة » Daquhlia - Mansoura
|
• الـهـوايـة »
|
• اسـم الـسـيـرفـر » Private Server
|
• الـجـنـس » Male
|
• نقـاط التقييم » 10
|
|
|
[HB]Mastery Level Up by message [System#]
من الأول كده انا معرفش الموضوع دا منشور قبل كدا ولا لا بس انا عملتوا بي ال vsro multi tool 1.8 وشغال 100% وانا ال عاملوا بي ايدي وخد مني 4 ساعات فا يا ريت لو حد هينقلوا يقول الأصل .. الموضوع سهل جدا جدا جدا هتعمل كويري واحده بس!
:create trigger
كود:
USE [SRO_VT_SHARDLOG]
GO
/****** Object: Trigger [dbo].[Mastery_Level_UP] Script Date: 10/4/2016 11:48:53 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: #HB
-- =============================================
CREATE TRIGGER [dbo].[Mastery_Level_UP]
ON [dbo].[_IncomingPrivateChat]
after insert
as
declare @CharName varchar(60)
declare @Chat varchar(max)
declare @LvlUpMasterySystem varchar(max)
declare @systeminfochina varchar(max)
declare @systeminfoeuro varchar(max)
declare @CharType int
declare @CharID int
declare @masterycheck int
Select @CharName=CharName ,@Chat=Chat From _IncomingPrivateChat
---Chinese declare & set
declare @upbicheon varchar(max) , @upheuksal varchar(max) , @uppacheon varchar(max) , @upcold varchar(max)
declare @upfire varchar(max) , @uplight varchar(max) , @upforce varchar(max)
set @upbicheon = '/upbicheon'
set @upheuksal = '/upheuksal'
set @uppacheon = '/uppacheon'
set @upcold = '/upcold'
set @upfire = '/upfire'
set @uplight = '/uplight'
set @upforce = '/upforce'
---European declare & set
declare @upwarrior varchar(max) , @uprouge varchar(max) , @upwizard varchar(max) , @upwarlock varchar(max)
declare @upbard varchar(max) , @upcleric varchar(max)
set @upwarrior = '/upwarrior'
set @uprouge = '/uprouge'
set @upwizard = '/upwizard'
set @upwarlock = '/upwarlock'
set @upbard = '/upbard'
set @upcleric = '/upcleric'
----------- # Sets
set @LvlUpMasterySystem = 'Mastery System'
set @systeminfochina = '/masterylvlupchina'
set @systeminfoeuro = '/masterylvlupeuro'
Set @CharType = (Select Top 1 RefObjID From [SRO_VT_SHARD].[dbo].[_Char] where CharName16 = @CharName)
set @CharID = (select TOP 1 CharID from [SRO_VT_SHARD].dbo._Char where CharName16 = @CharName)
Set @masterycheck = (select TOP 1 sum(Level) from [SRO_VT_SHARD].dbo._CharSkillMastery where CharID = @CharID)
----- Talking to chinese players
IF (@Chat = @LvlUpMasterySystem and (@CharType>=1907 AND @CharType<=1932))
Begin
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'If you want to level up your skills mastery level , pm me with this : /masterylvlupchina',Getdate())
End
----- Talking to european players
IF (@Chat = @LvlUpMasterySystem and (@CharType>=14875 AND @CharType<=14900))
Begin
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'If you want to level up your skills mastery level , pm me with this : /masterylvlupeuro',Getdate())
End
----- European failing to get info about lvl up chinese
IF (@Chat = @systeminfochina AND (@CharType>=14875 AND @CharType<=14900))
begin
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'You are European, you cannot get information about Chinese mastery lvl up!',Getdate())
end
----- Chinese getting his info about lvl up
IF (@Chat = @systeminfochina AND (@CharType>=1907 AND @CharType<=1932))
begin
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Use the commands to lvl up : /upbicheon , /upheuksal , /uppacheon , /upcold , /upfire , /uplight , /upforce .',Getdate())
end
----- Chinese failing to get info about lvl up european
IF (@Chat = @systeminfoeuro AND (@CharType>=1907 AND @CharType<=1932))
begin
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'You are Chinese, you cannot get information about European mastery lvl up!',Getdate())
end
----- European getting his info about lvl up
IF (@Chat = @systeminfoeuro AND (@CharType>=14875 AND @CharType<=14900))
begin
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Use the commands to lvl up : /upwarrior , /uprouge , /upwizard , /upwarlock , /upbard , /upcleric .',Getdate())
end
----- European failing to lvl up chinese
IF (@Chat = @upbicheon AND (@CharType>=14875 AND @CharType<=14900))
begin
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'You are European, you cannot lvl up Chinese masteries!',Getdate())
end
IF (@Chat = @upheuksal AND (@CharType>=14875 AND @CharType<=14900))
begin
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'You are European, you cannot lvl up Chinese masteries!',Getdate())
end
IF (@Chat = @uppacheon AND (@CharType>=14875 AND @CharType<=14900))
begin
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'You are European, you cannot lvl up Chinese masteries!',Getdate())
end
IF (@Chat = @upcold AND (@CharType>=14875 AND @CharType<=14900))
begin
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'You are European, you cannot lvl up Chinese masteries!',Getdate())
end
IF (@Chat = @upfire AND (@CharType>=14875 AND @CharType<=14900))
begin
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'You are European, you cannot lvl up Chinese masteries!',Getdate())
end
IF (@Chat = @uplight AND (@CharType>=14875 AND @CharType<=14900))
begin
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'You are European, you cannot lvl up Chinese masteries!',Getdate())
end
IF (@Chat = @upforce AND (@CharType>=14875 AND @CharType<=14900))
begin
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'You are European, you cannot lvl up Chinese masteries!',Getdate())
end
----Chinese lvling up his masteries
---Weapon side
IF (@Chat = @upbicheon AND (@CharType>=1907 AND @CharType<=1932) and (@masterycheck>=0 AND @masterycheck<=220))
begin
update [SRO_VT_SHARD].dbo._CharSkillMastery set Level = '110' where CharID = @CharID AND MasteryID = '257'
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Leveling Bicheon up succeed!',Getdate())
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Date) Values (1,'Totown',@CharName,Getdate())
END
IF (@Chat = @upbicheon AND (@CharType>=1907 AND @CharType<=1932) and (@masterycheck>=221 AND @masterycheck<=330))
begin
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Leveling Bicheon up failed because you dont have enough mastery levels to lvl up!',Getdate())
END
IF (@Chat = @upheuksal AND (@CharType>=1907 AND @CharType<=1932) and (@masterycheck>=0 AND @masterycheck<=220))
begin
update [SRO_VT_SHARD].dbo._CharSkillMastery set Level = '110' where CharID = @CharID AND MasteryID = '258'
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Leveling Heuksal up succeed!',Getdate())
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Date) Values (1,'Totown',@CharName,Getdate())
END
IF (@Chat = @upheuksal AND (@CharType>=1907 AND @CharType<=1932) and (@masterycheck>=221 AND @masterycheck<=330))
begin
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Leveling Heuksal up failed because you dont have enough mastery levels to lvl up!',Getdate())
END
IF (@Chat = @uppacheon AND (@CharType>=1907 AND @CharType<=1932) and (@masterycheck>=0 AND @masterycheck<=220))
begin
update [SRO_VT_SHARD].dbo._CharSkillMastery set Level = '110' where CharID = @CharID AND MasteryID = '259'
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Leveling Pacheon up succeed!',Getdate())
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Date) Values (1,'Totown',@CharName,Getdate())
END
IF (@Chat = @uppacheon AND (@CharType>=1907 AND @CharType<=1932) and (@masterycheck>=221 AND @masterycheck<=330))
begin
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Leveling Pacheon up failed because you dont have enough mastery levels to lvl up!',Getdate())
END
---Force side
IF (@Chat = @upcold AND (@CharType>=1907 AND @CharType<=1932) and (@masterycheck>=0 AND @masterycheck<=220))
begin
update [SRO_VT_SHARD].dbo._CharSkillMastery set Level = '110' where CharID = @CharID AND MasteryID = '273'
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Leveling Cold up succeed!',Getdate())
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Date) Values (1,'Totown',@CharName,Getdate())
END
IF (@Chat = @upcold AND (@CharType>=1907 AND @CharType<=1932) and (@masterycheck>=221 AND @masterycheck<=330))
begin
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Leveling Cold up failed because you dont have enough mastery levels to lvl up!',Getdate())
END
IF (@Chat = @upfire AND (@CharType>=1907 AND @CharType<=1932) and (@masterycheck>=0 AND @masterycheck<=220))
begin
update [SRO_VT_SHARD].dbo._CharSkillMastery set Level = '110' where CharID = @CharID AND MasteryID = '275'
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Leveling Fire up succeed!',Getdate())
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Date) Values (1,'Totown',@CharName,Getdate())
END
IF (@Chat = @upfire AND (@CharType>=1907 AND @CharType<=1932) and (@masterycheck>=221 AND @masterycheck<=330))
begin
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Leveling Fire up failed because you dont have enough mastery levels to lvl up!',Getdate())
END
IF (@Chat = @uplight AND (@CharType>=1907 AND @CharType<=1932) and (@masterycheck>=0 AND @masterycheck<=220))
begin
update [SRO_VT_SHARD].dbo._CharSkillMastery set Level = '110' where CharID = @CharID AND MasteryID = '274'
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Leveling Lighting up succeed!',Getdate())
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Date) Values (1,'Totown',@CharName,Getdate())
END
IF (@Chat = @uplight AND (@CharType>=1907 AND @CharType<=1932) and (@masterycheck>=221 AND @masterycheck<=330))
begin
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Leveling Lighting up failed because you dont have enough mastery levels to lvl up!',Getdate())
END
IF (@Chat = @upforce AND (@CharType>=1907 AND @CharType<=1932) and (@masterycheck>=0 AND @masterycheck<=220))
begin
update [SRO_VT_SHARD].dbo._CharSkillMastery set Level = '110' where CharID = @CharID AND MasteryID = '276'
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Leveling Force up succeed!',Getdate())
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Date) Values (1,'Totown',@CharName,Getdate())
END
IF (@Chat = @upforce AND (@CharType>=1907 AND @CharType<=1932) and (@masterycheck>=221 AND @masterycheck<=330))
begin
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Leveling Force up failed because you dont have enough mastery levels to lvl up!',Getdate())
END
----- Chinese failing to lvl up european
IF (@Chat = @upwarrior AND (@CharType>=1907 AND @CharType<=1932))
begin
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'You are Chinese, you cannot lvl up European masteries!',Getdate())
end
IF (@Chat = @uprouge AND (@CharType>=1907 AND @CharType<=1932))
begin
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'You are Chinese, you cannot lvl up European masteries!',Getdate())
end
IF (@Chat = @upwizard AND (@CharType>=1907 AND @CharType<=1932))
begin
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'You are Chinese, you cannot lvl up European masteries!',Getdate())
end
IF (@Chat = @upwarlock AND (@CharType>=1907 AND @CharType<=1932))
begin
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'You are Chinese, you cannot lvl up European masteries!',Getdate())
end
IF (@Chat = @upbard AND (@CharType>=1907 AND @CharType<=1932))
begin
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'You are Chinese, you cannot lvl up European masteries!',Getdate())
end
IF (@Chat = @upcleric AND (@CharType>=1907 AND @CharType<=1932))
begin
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'You are Chinese, you cannot lvl up European masteries!',Getdate())
end
----European lvling up his masteries
IF (@Chat = @upwarrior AND (@CharType>=14875 AND @CharType<=14900) and (@masterycheck>=0 AND @masterycheck<=110))
begin
update [SRO_VT_SHARD].dbo._CharSkillMastery set Level = '110' where CharID = @CharID AND MasteryID = '513'
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Leveling Warrior up succeed!',Getdate())
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Date) Values (1,'Totown',@CharName,Getdate())
END
IF (@Chat = @upwarrior AND (@CharType>=14875 AND @CharType<=14900) and (@masterycheck>=111 AND @masterycheck<=220))
begin
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Leveling Warrior up failed because you dont have enough mastery levels to lvl up!',Getdate())
END
IF (@Chat = @uprouge AND (@CharType>=14875 AND @CharType<=14900) and (@masterycheck>=0 AND @masterycheck<=110))
begin
update [SRO_VT_SHARD].dbo._CharSkillMastery set Level = '110' where CharID = @CharID AND MasteryID = '515'
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Leveling Rouge up succeed!',Getdate())
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Date) Values (1,'Totown',@CharName,Getdate())
END
IF (@Chat = @uprouge AND (@CharType>=14875 AND @CharType<=14900) and (@masterycheck>=111 AND @masterycheck<=220))
begin
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Leveling Rouge up failed because you dont have enough mastery levels to lvl up!',Getdate())
END
IF (@Chat = @upwizard AND (@CharType>=14875 AND @CharType<=14900) and (@masterycheck>=0 AND @masterycheck<=110))
begin
update [SRO_VT_SHARD].dbo._CharSkillMastery set Level = '110' where CharID = @CharID AND MasteryID = '514'
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Leveling Wizard up succeed!',Getdate())
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Date) Values (1,'Totown',@CharName,Getdate())
END
IF (@Chat = @upwizard AND (@CharType>=14875 AND @CharType<=14900) and (@masterycheck>=111 AND @masterycheck<=220))
begin
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Leveling Wizard up failed because you dont have enough mastery levels to lvl up!',Getdate())
END
IF (@Chat = @upwarlock AND (@CharType>=14875 AND @CharType<=14900) and (@masterycheck>=0 AND @masterycheck<=110))
begin
update [SRO_VT_SHARD].dbo._CharSkillMastery set Level = '110' where CharID = @CharID AND MasteryID = '516'
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Leveling Warlock up succeed!',Getdate())
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Date) Values (1,'Totown',@CharName,Getdate())
END
IF (@Chat = @upwarlock AND (@CharType>=14875 AND @CharType<=14900) and (@masterycheck>=111 AND @masterycheck<=220))
begin
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Leveling Warlock up failed because you dont have enough mastery levels to lvl up!',Getdate())
END
IF (@Chat = @upbard AND (@CharType>=14875 AND @CharType<=14900) and (@masterycheck>=0 AND @masterycheck<=110))
begin
update [SRO_VT_SHARD].dbo._CharSkillMastery set Level = '110' where CharID = @CharID AND MasteryID = '517'
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Leveling Bard up succeed!',Getdate())
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Date) Values (1,'Totown',@CharName,Getdate())
END
IF (@Chat = @upbard AND (@CharType>=14875 AND @CharType<=14900) and (@masterycheck>=111 AND @masterycheck<=220))
begin
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Leveling Bard up failed because you dont have enough mastery levels to lvl up!',Getdate())
END
IF (@Chat = @upcleric AND (@CharType>=14875 AND @CharType<=14900) and (@masterycheck>=0 AND @masterycheck<=110))
begin
update [SRO_VT_SHARD].dbo._CharSkillMastery set Level = '110' where CharID = @CharID AND MasteryID = '518'
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Leveling Cleric up succeed!',Getdate())
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Date) Values (1,'Totown',@CharName,Getdate())
END
IF (@Chat = @upcleric AND (@CharType>=14875 AND @CharType<=14900) and (@masterycheck>=111 AND @masterycheck<=220))
begin
Insert Into [dbo].[iLegend_Tool] (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Leveling Cleric up failed because you dont have enough mastery levels to lvl up!',Getdate())
END
GO
---- All of this trigger credits goes to #HB , don't copy it for yourself!
ودا فيديو رفع مني للـتأكيد انو شغال 100% ومجرب وأسف ان الفيديو بيقطع عشان جهازي كان مهنج 
[YOUTUBE]عفوا ,,, لايمكنك مشاهده الروابط لانك غير مسجل لدينا [ للتسجيل اضغط هنا ][/YOURUBE]
|