قسم الاسئلة و الاستفسارات لعمل السيرفرات الخاصة [ قسم خاص لأسئلة واستفسارات عمل السيرفرات الخاصة ] [ يرجى الالتزام بقوانين قسم الأسئلة والاستفسارات ] |
|
أدوات الموضوع | انواع عرض الموضوع |
|
26-08-2020, 10:17 PM | #1 | ||||||||||
|
شباب محتاج سيستم trader يكون ب ال point . كل هنا الموجودين بيدوك gold coin و sliver كده وشكرااا |
||||||||||
|
28-08-2020, 02:41 PM | #2 | ||||||||||
|
اتفضل حضرتك الsystem دا بيديلك Job Points وكمان لية Limits طبعا انت بتقدر تغيرها لاي حاجة انت عايزها يلا نبدا كود:
USE [SRO_VT_ACCOUNT] GO /****** Object: StoredProcedure [dbo].[_AddCoinUnique] Script Date: 03/25/2017 22:43:26 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[_AddCoinUnique] @Char varchar(30), @Point int as Declare @JID int; SET @JID = ( SELECT usert.UserJID FROM SRO_VT_SHARD.dbo._User as usert JOIN SRO_VT_SHARD.dbo._Char as chart on usert.CharID = chart.CharID WHERE chart.CharName16 = @Char ); IF not exists (SELECT JID FROM SK_Silk WHERE JID = @JID) BEGIN INSERT INTO SK_Silk SELECT @JID, 0, 0, 0 END UPDATE SK_Silk SET silk_gift = silk_gift + (@Point) WHERE JID = @JID كود:
USE [SRO_VT_SHARDLOG] GO /****** Object: Table [dbo].[JobLog] Script Date: 03/25/2017 22:59:00 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [dbo].[JobLog]( [CharName] [varchar](50) NOT NULL, [Amount] [int] NULL, [Limited] [int] NULL, [Date] [datetime] NULL, [TotalAmount] [int] NULL, CONSTRAINT [PK_JobLog] PRIMARY KEY CLUSTERED ( [CharName] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO SET ANSI_PADDING OFF GO كود:
declare @contribution int; declare @coinWinfortra int; declare @coinWinforthi int; declare @coinWinforhun int; declare @dividerfortra int; declare @dividerforthi int; declare @dividerforhun int; declare @charname16 varchar(16); declare @JobType int; declare @total int; set @dividerfortra = 2700000; set @dividerforthi = 9000000; set @dividerforhun = 3000000; if(@EventID = 9 or @EventID = 4 or @EventID = 6 or @EventID = 11) --Teleport or log out/in begin set @charname16 = (SELECT CharName16 FROM [SRO_VT_SHARD].[dbo].[_Char] where CharID = @CharID); set @contribution = (SELECT Contribution FROM [SRO_VT_SHARD].[dbo].[_CharTriJob] WHERE CharID = @CharID); set @coinWinfortra = ROUND( @contribution / @dividerfortra,0); set @coinWinforthi = ROUND (@contribution / @dividerforthi,0); set @coinWinforhun = ROUND (@contribution / @dividerforhun,0); set @JobType = (SELECT JobType FROM [SRO_VT_SHARD].[dbo].[_CharTrijob] Where CharID = @CharID); set @total = (select TotalAmount from JobLog where CharName = @charname16) + (select Amount from JobLog where CharName = @charname16); if(@coinWinfortra != 0 and @JobType = 1) begin if (@coinWinfortra > 5) begin set @coinWinfortra = 5 end if exists (select @charname16 from [SRO_VT_SHARDLOG].[dbo].[JobLog]) begin if ((select Amount from JobLog where CharName = @charname16) >= 200) begin UPDATE JobLog SET Limited = 1 WHERE CharName = @charname16 end else begin UPDATE [SRO_VT_SHARDLOG].[dbo].[JobLog] SET Amount = Amount + @coinWinfortra, Date = GETDATE(), TotalAmount = @total where CharName = @charname16 exec [SRO_VT_ACCOUNT].[dbo].[_AddCoin] @CharID, @coinWinfortra; end end else begin INSERT INTO [SRO_VT_SHARDLOG].[dbo].[JobLog] VALUES (@charname16, @coinWinfortra, 0, GETDATE(), @total) exec [SRO_VT_ACCOUNT].[dbo].[_AddCoin] @CharID, @coinWinfortra; end end --end trader coin if(@coinWinforthi != 0 and @JobType = 2) begin if (@coinWinforthi > 5) begin set @coinWinforthi = 5 end if exists (select @charname16 from [SRO_VT_SHARDLOG].[dbo].[JobLog]) begin if ((select Amount from JobLog where CharName = @charname16) >= 200) begin UPDATE JobLog SET Limited = 1 WHERE CharName = @charname16 end else begin UPDATE [SRO_VT_SHARDLOG].[dbo].[JobLog] SET Amount = Amount + @coinWinforthi, Date = GETDATE(), TotalAmount = @total where CharName = @charname16 exec [SRO_VT_ACCOUNT].[dbo].[_AddCoin] @CharID, @coinWinforthi; end end else begin INSERT INTO [SRO_VT_SHARDLOG].[dbo].[JobLog] VALUES (@charname16, @coinWinforthi, 0, GETDATE(), @total) exec [SRO_VT_ACCOUNT].[dbo].[_AddCoin] @CharID, @coinWinforthi; end end --end thief coin if(@coinWinforhun != 0 and @JobType = 3) begin if (@coinWinforhun > 5) begin set @coinWinforhun = 5 end if exists (select @charname16 from [SRO_VT_SHARDLOG].[dbo].[JobLog]) begin if ((select Amount from JobLog where CharName = @charname16) >= 200) begin UPDATE JobLog SET Limited = 1 WHERE CharName = @charname16 end else begin UPDATE [SRO_VT_SHARDLOG].[dbo].[JobLog] SET Amount = Amount + @coinWinforhun, Date = GETDATE(), TotalAmount = @total where CharName = @charname16 exec [SRO_VT_ACCOUNT].[dbo].[_AddCoin] @CharID, @coinWinforhun; end end else begin INSERT INTO [SRO_VT_SHARDLOG].[dbo].[JobLog] VALUES (@charname16, @coinWinforhun, 0, GETDATE(), @total) exec [SRO_VT_ACCOUNT].[dbo].[_AddCoin] @CharID, @coinWinforhun; end end --end hunter coin if (@JobType != 0) begin UPDATE [SRO_VT_SHARD].[dbo].[_CharTriJob] set Contribution = 0 WHERE CharID = @CharID; end end --end coin reward if (@EventID = 4) BEGIN if not exists (select CharName from JobLog where CharName = @charname16) BEGIN INSERT INTO JobLog VALUES(@charname16, 0, 0, GETDATE(), 0) END ELSE BEGIN UPDATE JobLog SET Date = GETDATE() where CharName = @charname16 END END كود:
USE [SRO_VT_SHARDLOG] GO /****** Object: Trigger [dbo].[TR_COINREWARD_JOB] Script Date: 03/25/2017 23:06:44 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TRIGGER [dbo].[TR_COINREWARD_JOB] ON [dbo].[JobLog] AFTER UPDATE AS BEGIN declare @cleared int if ((SELECT DATENAME(dw,GETDATE())) = 'Sunday' and @cleared = NULL or @cleared = 0) begin TRUNCATE TABLE JobLog set @cleared = 1 end if ((SELECT DATENAME(dw,GETDATE())) = 'Monday' AND @cleared = 1) begin set @cleared = 0 end end هتلاقية في السطر دا كود:
if ((select Amount from JobLog where CharName = @charname16) >= 200) begin UPDATE JobLog SET Limited = 1 WHERE CharName = @charname16 end بالمناسبة هو هنا معمول 5 فقط كود:
set @coinWinforhun = 5 |
||||||||||
|
28-08-2020, 06:37 PM | #3 | ||||||||||
|
## |
||||||||||
|
يتصفح الموضوع حالياً : 1 (0 عضو و 1 زائر) | |
|
|
المواضيع المتشابهه | ||||
الموضوع | كاتب الموضوع | المنتدى | الردود | آخر مشاركة |
Change Silk system from Normal silk to Silk Gift or Silk Point | Yui | قسم الشروحات و البرامج المستخدمة في عمل السيرفرات الخاصة | 13 | 13-07-2014 02:49 PM |