Register for your free account! | Forgot your password?

You last visited: Today at 04:14

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Lottery System by che

Discussion on Lottery System by che within the SRO PServer Guides & Releases forum part of the SRO Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Mar 2014
Posts: 10
Received Thanks: 2
Lottery System by che

Code:
                     --- Lottery system ---              if( @ItemRefID ='46089' and @Operation = '41') begin -- Gold Lottery !    
              DECLARE @Upper_Gold INT = '150000000', @Lower_Gold INT = '30000000'
              DECLARE @random_Gold INT = ROUND(( @Upper_GOLD - @Lower_GOLD -1) * RAND() + @Lower_GOLD), 0);
       	       Update SRO_VT_SHARD.dbo._Char set RemainGold = RemainGold + @random_Gold  where CharID = @CharID end      
       	       
       	       DECLARE @CharName varchar(65) = (Select CharName16 from SRO_VT_SHARD.dbo._Char where CharID = @CharID) 
       	       if( @ItemRefID ='46091' and @Operation = '41') begin -- Lottery stone    
       	  DECLARE @Item_Code1 Varchar(256) = (Select top 1 CodeName from SRO_VT_FT.dbo._SilkStone_Lot where ID between '1' and '30' 
       	  order by  NEWID())
       	       if @CharName not like '$%^GM$%^'
       	       begin 
       	       exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN @CharName,@Item_Code1,50,0       end  end
       	       
       	       if( @ItemRefID ='46088' and @Operation = '41') begin -- Lottery Acc    
       	  DECLARE @Item_Code Varchar(256) = (Select top 1 CodeName from SRO_VT_FT.dbo._LegandAcc where ID between '1' and '12' 
       	  order by  NEWID())
       	        if @CharName not like '$%^GM$%^' 
       	       begin 
       	       exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN @CharName,@Item_Code,1,0       end  end
       	       
       	       if( @ItemRefID ='46087' and @Operation = '41') begin --Lottery Set    
       	  DECLARE @Item_Code2 Varchar(256) = (Select top 1 CodeName from SRO_VT_FT.dbo._LegandSet where ID between '1' and '108' 
       	  order by  NEWID())
       	       if @CharName not like '$%^GM$%^' 
       	       begin 
       	       exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN @CharName,@Item_Code2,1,0       end  end
       	       
       	       if( @ItemRefID ='46086' and @Operation = '41') begin --Lottery Weapon    
       	  DECLARE @Item_Code3 Varchar(256) = (Select top 1 CodeName from SRO_VT_FT.dbo._LegandWeapon where ID between '1' and '32' 
       	  order by  NEWID())
       	       if @CharName not like '$%^GM$%^'  
       	       begin 
       	       exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN @CharName,@Item_Code3,1,0       end  end
       	       
       	       if( @ItemRefID ='46092' and @Operation = '41') begin -- Lottery Gift    
       	  DECLARE @Item_Code6 Varchar(256) = (Select top 1 CodeName from SRO_VT_FT.dbo._FIRYGIFT where ID between '1' and '20' 
       	  order by  NEWID())
       	       if @CharName not like '$%^GM$%^'  
       	       begin 
       	       exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN @CharName,@Item_Code6,1,0       end  end
                DECLARE @Upper_SILK INT = '60', @Lower_SILK INT = '1'
              DECLARE @random_SILK INT = ROUND(( @Upper_SILK - @Lower_SILK -1) * RAND() + @Lower_SILK), 0);
               DECLARE @userID_14 INT
               if( @ItemRefID ='46090' and @Operation = '41') begin -- Lottery Acc    
       	       begin
               --7--
               EXEC [SRO_VT_ACCOUNT].[CGI].[CGI_WebPurchaseSilk] @OrderID = NULL, @userID = @userID_14, @PkgID = NULL, @NumSilk = @random_Gold, @price = 500
               END
               END
                if( @ItemRefID ='46098' and @Operation = '41') begin --Lottery Mob,s 1   
       	  DECLARE @MOB_Code15 Varchar(256) = (Select top 1 CodeName from SRO_VT_FT.dbo._MOB1 where ID between '1' and '14' 
       	  order by  NEWID())
       	       if @CharName not like '$%^GM$%^' 
       	       begin 
       	       exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN @CharName @MOB_Code15,1,0       end  end
 if( @ItemRefID ='46099' and @Operation = '41') begin --Lottery Mob,s 2   
       	  DECLARE @MOB_Code16 Varchar(256) = (Select top 1 CodeName from SRO_VT_FT.dbo._MOB2 where ID between '1' and '14' 
       	  order by  NEWID())
       	       if @CharName not like '$%^GM$%^' 
       	       begin 
       	       exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN @CharName @MOB_Code16,1,0       end  end


 if( @ItemRefID ='46100' and @Operation = '41') begin --Lottery Mob,s 3   
       	  DECLARE @MOB_Code17 Varchar(256) = (Select top 1 CodeName from SRO_VT_FT.dbo._MOB3 where ID between '1' and '14' 
       	  order by  NEWID())
       	       if @CharName not like '$%^GM$%^' 
       	       begin 
       	       exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN @CharName @MOB_Code17,1,0       end  end


 if( @ItemRefID ='46101' and @Operation = '41') begin --Lottery Mob,s 4   
       	  DECLARE @MOB_Code18 Varchar(256) = (Select top 1 CodeName from SRO_VT_FT.dbo._MOB4 where ID between '1' and '14' 
       	  order by  NEWID())
       	       if @CharName not like '$%^GM$%^' 
       	       begin 
       	       exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN @CharName @MOB_Code18,1,0       end  end


 if( @ItemRefID ='46102' and @Operation = '41') begin --Lottery Mob,s 5   
       	  DECLARE @MOB_Code19 Varchar(256) = (Select top 1 CodeName from SRO_VT_FT.dbo._MOB5 where ID between '1' and '14' 
       	  order by  NEWID())
       	       if @CharName not like '$%^GM$%^' 
       	       begin 
       	       exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN @CharName @MOB_Code19,1,0       end  end


 if( @ItemRefID ='46103' and @Operation = '41') begin --Lottery Mob,s 6   
       	  DECLARE @MOB_Code20 Varchar(256) = (Select top 1 CodeName from SRO_VT_FT.dbo._MOB6 where ID between '1' and '17' 
       	  order by  NEWID())
       	       if @CharName not like '$%^GM$%^' 
       	       begin 
       	       exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN @CharName @MOB_Code20,1,0       end  end


 if( @ItemRefID ='46104' and @Operation = '41') begin --Lottery Mob,s7    
       	  DECLARE @MOB_Code21 Varchar(256) = (Select top 1 CodeName from SRO_VT_FT.dbo._MOB7 where ID between '1' and '17' 
       	  order by  NEWID())
       	       if @CharName not like '$%^GM$%^' 
       	       begin 
       	       exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN @CharName @MOB_Code21,1,0       end  end


 if( @ItemRefID ='46105' and @Operation = '41') begin --Lottery Mob,s 8   
       	  DECLARE @MOB_Code22 Varchar(256) = (Select top 1 CodeName from SRO_VT_FT.dbo._MOB8 where ID between '1' and '15' 
       	  order by  NEWID())
       	       if @CharName not like '$%^GM$%^' 
       	       begin 
       	       exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN @CharName @MOB_Code22,1,0       end  end
 
 if( @ItemRefID ='46106' and @Operation = '41') begin --Lottery Mob,s 9    
       	  DECLARE @MOB_Code23 Varchar(256) = (Select top 1 CodeName from SRO_VT_FT.dbo._MOB9 where ID between '1' and '23' 
       	  order by  NEWID())
       	       if @CharName not like '$%^GM$%^' 
       	       begin 
       	       exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN @CharName @MOB_Code23,1,0       end  end
che_9299 is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
Re-Open X-Gaming »Cap120 » Skills120» Job System » Lottery » Advanced Gameplay » More
10/11/2013 - SRO PServer Advertising - 25 Replies
http://i.epvpimg.com/QVwLf.png Server Information: ● Homepage: Click here ● Facebook: Click here ● Download: Click here
X-Gaming » Cap120 » Skills120 » Job System » Lottery » Advanced Gameplay » More
09/30/2013 - SRO PServer Advertising - 28 Replies
http://i.epvpimg.com/QVwLf.png Server Information: ● Homepage: Click here ● Facebook: Click here ● Download: Click here
X-Gaming » Cap120 » Skills120 » Job System » Lottery » Advanced Gameplay » More
09/28/2013 - SRO PServer Advertising - 220 Replies
#Request to remove please
[NEW] XGSro - Normal | Item Forge/ Starter Pack/Lottery System/110 CAP/11D/Job Based/
05/31/2013 - SRO PServer Advertising - 67 Replies
asdasd
[Release] New lottery system (CoEmu 5095)
02/02/2010 - CO2 PServer Guides & Releases - 4 Replies
Hi hi.... many of you will just say: "another lotto system" but that isn't the same as the others... try... and after you flame me :P public class MainLottery { public int CharID; public int Times = 0;



All times are GMT +2. The time now is 04:14.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.