قسم الشروحات و البرامج المستخدمة في عمل السيرفرات الخاصة[ قسم متخصص فى شروحات و البرامج في عمل السيرفرات الخاصة ] [ يرجى عدم وضع الأسئلة والاستفسارات في هذا القسم ]
اولا السيستيم عباره عن ان انتا هتكلم بوت عادي
وتقلو title start
هيديك تعليمات عن السيستيم ازاي تشغلو وكده
تاني حاجه هتقول للبوت title list هيديك ال titles اللي انتا هتحددها عادي
تالت حاجه هتخطار ال title وانتا المفرود توافق عليه او لا
نبتدي الشغل بقي
1
هتعمل ال trigger ده في _IncomingPrivateChat
كود PHP:
USE [DANGER_SYSTEMS]
GO
/****** Object: Trigger [dbo].[Title] Script Date: 10/03/2017 01:50:59 ص ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Dev.DANGER MoHaMeD AhmeD
-- =============================================
CREATE TRIGGER [dbo].[Title]
ON [dbo].[_IncomingPrivateChat]
after insert
as
-----------------------------------------------------------------------------------------------------
DECLARE @CharName varchar(60) , @Messege varchar(MAX) ,@DANGER_SYSTEMS_START_Service INT,@Price varchar(60),@Workon varchar(60),@level int,@CharID INT,@CharJID INT,@Silk_Own INT,@nametitle varchar(60)
set @DANGER_SYSTEMS_START_Service=(select Service from DANGER_SYSTEMS_START where SystemName='Title-System')
IF @DANGER_SYSTEMS_START_Service=1
BEGIN
Select @CharName=CharName ,@Messege=Chat From _IncomingPrivateChat
-----------------------------------------------------------------------------------------------------
---Start System
IF @Messege='Titles start'
BEGIN
Insert Into iLegend_Tool (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Hello And Welcome ,, First You must be have silk to buy A Title',Getdate())
Insert Into iLegend_Tool (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Second ,, Send to me [Title List] To Show Title to buy one ',Getdate())
Insert Into iLegend_Tool (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Third ,, Choose title You need Have Fun ^_^',Getdate())
End
IF(@Messege='Title List')
Begin
Insert Into iLegend_Tool (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'Baron/KING/QUEEN/TIGER/DANGER !',Getdate())
Insert Into iLegend_Tool (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'This All Titles Lisst And More Add SoOoN :)',Getdate())
End
---=================================================================================================================---
Set @Price=(select Price From [TitleSYSTEM] where Hwanname=@Messege)
Set @Workon=(select Workon from [TitleSYSTEM] where Hwanname=@Messege)
If @Messege in (Select Hwanname from [TitleSYSTEM])
BEGIN
Insert Into DANGER_SYSTEMS..iLegend_Tool (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,'['+@Messege+'] Price=['+@Price+']Silk IF you need send['+@Workon+'] ',Getdate())
End
---=================================================================================================================---
---======================================== Dev.DANGER MoHaMeD AhmeD =========================================================================---
---=================================================================================================================---
set @level =(select level_db from [TitleSYSTEM] where Workon=@Messege)
select @CharID=[CharID] from SRO_VT_SHARD.dbo._Char where CharName16 = @CharName
select @CharJID=[UserJID] from SRO_VT_SHARD.dbo._User where CharID = @CharID
select @Silk_Own=[silk_own] from SRO_VT_ACCOUNT.dbo.SK_Silk where JID = @CharJID
Set @Workon =(select Workon from [TitleSYSTEM] where Hwanname=@Messege)
Set @nametitle=(select Hwanname From [TitleSYSTEM] where Workon=@Messege)
If @Messege in (Select Workon from [TitleSYSTEM])
BEGIN
iF @Silk_Own >=100
BEGIN
Update SRO_VT_ACCOUNT.dbo.SK_Silk SET silk_own = @Silk_Own-150 where JID = @CharJID
insert into DANGER_SYSTEMS..iLegend_Tool (Service,Type,target,Message,Date)
values ('1','Private',@CharName,'congurtulation ,, You Received ['+@nametitle+'] Title...Please now teleport To Show New Title .. Enjoy :) ',GETDATE())
update [SRO_VT_SHARD].[dbo].[_Char] set HwanLevel=@level where CharName16=@CharName
End
--==================================================== Dev.DANGER MoHaMeD AhmeD ====================================================================--
/***************************************** No Enough Silk***************************************************************/
iF @Silk_Own <=100
BEGIN
insert into DANGER_SYSTEMS..iLegend_Tool (Service,Type,target,Message,Date) values ('1','Private',@CharName,'You canot Received ['+@nametitle+'] Title because you donot have enough Silk',GETDATE())
End
End
End
GO
ALTER TABLE [dbo].[_IncomingPrivateChat] ENABLE TRIGGER [Title]
GO
2
2
كود PHP:
USE [DANGER_SYSTEMS]
GO
/****** Object: Table [dbo].[TitleSYSTEM] Script Date: 10/03/2017 01:52:37 ص ******/
SET ANSI_NULLS ON
GO