عرض مشاركة واحدة
قديم 11-09-2016, 04:30 AM   #5

elbattawy1st
عضو مميز



الصورة الرمزية elbattawy1st


• الانـتـسـاب » Mar 2014
• رقـم العـضـويـة » 116941
• المشـــاركـات » 769
• الـدولـة » TanTa
• الـهـوايـة » SilkRoaD
• اسـم الـسـيـرفـر » Pavo
• الـجـنـس » Male
• نقـاط التقييم » 88
elbattawy1st جـيـد

elbattawy1st غير متواجد حالياً


إرسال رسالة عبر Yahoo إلى elbattawy1st

افتراضي رد: Auto Event 'Ask And Questions' On Vsro Multi Tool



الناس الا عندها مشاكل و الايفنت مش شغال عندهم اعمل البروسيدور الاتنين دول و هيشتغل معاكم من غير مشاكل
كود PHP:
USE [DANGERSS
GO 

/****** Object:  StoredProcedure [dbo].[_AutomaticTriviaEvent_1]    Script Date: 7/4/2016 10:20:24 PM ******/ 
SET ANSI_NULLS ON 
GO 

SET QUOTED_IDENTIFIER ON 
GO 
/***************************************** Start System ***************************************************************/  
--=================================================================== 
--------------------------------------/
CREATE By Danger/------------- 
--=================================================================== 

CREATE Procedure [dbo].[_AutomaticTriviaEvent_1]  
as 
BEGIN 
DECLARE @Question Varchar (max
select Top 1 @Question=[Questionfrom _AutomaticTrivia_Questions order by newid() 
update _AutomaticTrivia_Questions set [service]=1 where Question=@Question 
insert into  DANGERSS
..iLegend_Tool (Service,Type,Message,Datevalues ('1','Notice','Automatic trivia event has started.[To answer PM [BOT] with Trivia:Answer]',GETDATE()) 
insert into  DANGERSS..iLegend_Tool (Service,Type,Message,Datevalues ('1','Notice',@Question,GETDATE()) 
IF (
SELECT SERVICE FROM _AutomaticTrivia_Questions where question=@Question) = 
BEGIN 
insert into DANGERSS
..iLegend_Tool (Service,Type,Message,Datevalues ('1','Notice','Automatic trivia event has started without winners',GETDATE()) 
END 
END 
GO 

************************************************** *********

كود PHP:
USE [DANGERSS
GO 

/****** Object:  StoredProcedure [dbo].[_AutomaticTriviaEvent_2]    Script Date: 7/4/2016 10:21:08 PM ******/ 
SET ANSI_NULLS ON 
GO 

SET QUOTED_IDENTIFIER ON 
GO 

/***************************************** Start System ***************************************************************/  
--=================================================================== 
--------------------------------------/
CREATE By Danger/------------- 
--=================================================================== 


CREATE Procedure [dbo].[_AutomaticTriviaEvent_2]  
@
SenderName VARCHAR(255), 
@
Message VARCHAR(255
as 
BEGIN 
DECLARE @Answer Varchar(max) = (Select Answer from DANGERSS.dbo._AutomaticTrivia_Questions where [Service]='1'
DECLARE @
CharID INT,@WinnerJID INT,@WinnerID INT,@Silk_Own INT,@Reward INT ,@RewardType int,@RewardCodeName int,@CharName int,@RewardCount int,@Reward2 Varchar(Max)  
select @CharID=[CharIDfrom SRO_VT_SHARD.dbo._Char where CharName16 = @SenderNAme 
select 
@WinnerJID=[UserJIDfrom SRO_VT_SHARD.dbo._User where CharID = @CharID 
select 
@Silk_Own=[silk_ownfrom SRO_VT_ACCOUNT.dbo.SK_Silk where JID = @WinnerJID 
  
   select 
@Reward210 
select 
@Reward10 

If (@Message=@Answer
BEGIN 
insert into DANGERSS
..iLegend_Tool (Service,Type,Message,Datevalues ('1','Notice',''+@SenderName+' has written '+@Answer+' and won this round.',GETDATE()) 
Update SRO_VT_ACCOUNT.dbo.SK_Silk SET silk_own = @Silk_Own + @Reward where JID = @WinnerJID 
insert into DANGERSS
..iLegend_Tool (Service,Type,Message,Datevalues ('1','Notice','Automatic Trivia Event has ended.',GETDATE()) 
insert into DANGERSS..iLegend_Tool (Service,Type,target,Message,Datevalues ('1','Private',@SenderName,'Congratulations, you won in the event and received '+@Reward2+' silks as reward.',GETDATE()) 
update _AutomaticTrivia_Questions set [Service]=0 where [Service]=
     
    Exec 
[SRO_VT_SHARD].[dbo].[_ADD_ITEM_EXTERN] @CharName,'ITEM_ETC_ARENA_COIN',@RewardCount,'100' 
   
End 

   
END 

GO 


توقيع elbattawy1st :


رد مع اقتباس