ASK system Multi Tools

NESTA3

V.I.P
SQL Developer
عضو
2 فبراير 2017
318
2
146
244
Egypt

المستوي:

بسم الله الرحمن الرحيم


السيستم دا عباره عن Auto Pm بمعنى ان مثلا لو حد كلم الكاركتر جى ام الا البرنامج Vsro Multi Tools
فاتحها هيرد علية اوتو ماتك
لازم تشغل برنامج Vsro multi tools علشان السيستم يشتغل

اعمل تابل دا


PHP:
USE [SRO_VT_SHARDLOG] 
GO 

/****** Object:  Table [dbo].[ASK_System]    Script Date: 4/28/2016 9:51:54 PM ******/ 
SET ANSI_NULLS ON 
GO 

SET QUOTED_IDENTIFIER ON 
GO 

SET ANSI_PADDING ON 
GO 

CREATE TABLE [dbo].[ASK_System]( 
    [ID] [int] IDENTITY(1,1) NOT NULL, 
    [Question] [varchar](max) NOT NULL, 
    [Answer] [varchar](max) NOT NULL, 
 CONSTRAINT [PK_ASK_System] PRIMARY KEY CLUSTERED  
( 
    [ID] ASC 
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] 

GO 

SET ANSI_PADDING OFF 
GO

اعمل دا برضو


PHP:
USE [SRO_VT_SHARDLOG] 
GO 
/****** Object:  Trigger [dbo].[ASK]    Script Date: 4/28/2016 9:53:08 PM ******/ 
SET ANSI_NULLS ON 
GO 
SET QUOTED_IDENTIFIER ON 
GO 


-- ============================================= 
-- Author:        Abdelrhman Elbattawy 
-- ============================================= 


Create TRIGGER [dbo].[ASK]  
ON  [dbo].[_IncomingPrivateChat] 
after  insert   
as 
---------------------------- Q1 ----------------------------------------------------------------- 
DECLARE @CharName varchar(60) , @Chat varchar(MAX) ,@Question nvarchar(MAX) 
BEGIN 
Select @CharName=CharName ,@Chat=Chat From _IncomingPrivateChat 
        Declare @Answer varchar(MAX) = case 
            When @Chat in (select Question from ASK_System) 
                then (select top 1 Answer from ASK_System where Question = @Chat ) 
         end 
Begin 
Insert Into iLegend_Tool (Service,Type,Target,Message,Date) Values (1,'Private',@CharName,''+@Answer+'',Getdate())   
END 
END
هتفتح تابل ASK_System هتلاقى فية تاب Question و تاب Answer
تاب question دا السؤال الا كاركتر العادى هيسالو لجى ام
اما تاب Answer دى الاجابة الا جى ام هيقولها و فى الفيديو هيوضح اكتر
Vedio

https://www.youtube.com/watch?v=__Ot_i72l8U
الموضوع منقول