|
You last visited: Today at 18:44
Advertisement
[Release] Daily Reward System
Discussion on [Release] Daily Reward System within the SRO PServer Guides & Releases forum part of the SRO Private Server category.
10/30/2014, 02:41
|
#1
|
elite*gold: 0
Join Date: Oct 2014
Posts: 93
Received Thanks: 22
|
[Release] Daily Reward System
Since i saw no server using this systems and i got it, i decided to release it , reading the procedure will explain it more !
before reading the procedure, some ppl asked me why ADD_ITEM_EXTERN_CHEST? i said : because the reward will go to storage not inventory , and not to work on 4 chars per 1 acc.
Add this to _AddLogChar at log db
Quote:
if (@EventID = 4)
begin
exec [dbo].[_DailyRew]
end
|
Create this procedure at LOG db
Quote:
USE [SRO_VT_SHARDLOG]
GO
Object StoredProcedure [dbo].[_DailyRew] Script Date 10282014 104519 PM
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[_DailyRew]
@CharID int,
@Eventid int
AS
if @EventID = '4'
BEGIN
DECLARE @CharN VARCHAR(52) = (SELECT CharName16 FROM SRO_VT_SHARD.dbo._Char WHERE CharID = @CharID)
DECLARE @Date Date = GETDATE() -1
DECLARE @JID int = (SELECT UserJID FROM SRO_VT_SHARD.dbo._User where CharID = @CharID)
DECLARE @AccountID varchar (25) = (SELECT AccountID FROM SRO_VT_SHARD.dbo._AccountJID As ID INNER JOIN SRO_VT_SHARD.dbo._User as JID ON Id.JID = JID.UserJID where CharID = @CharID)
DECLARE @RewardGiven varchar(52) = 'ITEM_ETC_SILK_250'
DECLARE @DayReward INT = (SELECT IsDay FROM _DailyReward WHERE JID = @JID and LoginDate = @Date)
DECLARE @RefObjID int
DECLARE @DATEN Date = GETDATE()
select @RefObjID = RefObjID from SRO_VT_SHARD.dbo._Char with (nolock) where CharName16 = 'UnDeath'
DECLARE @RealDate date = (Select [LoginDate] from _DailyReward where Jid = @JID)
UPDATE _DailyReward set IsLogin = 'ON' where JID = @JID
IF NOT EXISTS (SELECT FROM _DailyReward WHERE JID = @JID)
BEGIN
INSERT INTO _DailyReward (JID,IsLogin,LoginDate,IsMSent,IsRecivce,IsDay)
VALUES (@JID,'ON',GETDATE(),'NO','NO','1')
END
ELSE IF @DayReward BETWEEN '1' and '2'
BEGIN
UPDATE _DailyReward SET IsMSent = 'YES',IsRecivce = 'YES',IsDay += 1, LoginDate=GETDATE(),IsLogin = 'ON' WHERE JID = @JID
exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN_CHEST @AccountID, @RewardGiven, 1, 0
INSERT INTO SRO_VT_SHARD.dbo._Memo (CharID,FromCharName,[Message],[Date],[Status],RefObjID)
VALUES (@CharID,'DailyReward','Thank you for visiting us again, please check the storage you will find your gift and its not our problem if there is no place in the storage to add the gift, Collect them and exchange them for good gift.',GETDATE(),'0',@RefObjID)
END
ELSE IF @DayReward BETWEEN '3' and '4'
BEGIN
UPDATE _DailyReward SET IsMSent = 'YES',IsRecivce = 'YES',IsDay += 1, LoginDate=GETDATE(),IsLogin = 'ON' WHERE JID = @JID
exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN_CHEST @AccountID, @RewardGiven, 8, 0
INSERT INTO SRO_VT_SHARD.dbo._Memo (CharID,FromCharName,[Message],[Date],[Status],RefObjID)
VALUES (@CharID,'DailyReward','Thank you for visiting us again, please check the storage you will find your gift and its not our problem if there is no place in the storage to add the gift, Collect them and exchange them for good gift.',GETDATE(),'0',@RefObjID)
END
ELSE IF @DayReward BETWEEN '5' and '6'
BEGIN
UPDATE _DailyReward SET IsMSent = 'YES',IsRecivce = 'YES',IsDay += 1, LoginDate=GETDATE(),IsLogin = 'ON' WHERE JID = @JID
exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN_CHEST @AccountID, @RewardGiven, 12, 0
INSERT INTO SRO_VT_SHARD.dbo._Memo (CharID,FromCharName,[Message],[Date],[Status],RefObjID)
VALUES (@CharID,'DailyReward','Thank you for visiting us again, please check the storage you will find your gift and its not our problem if there is no place in the storage to add the gift, Collect them and exchange them for good gift.',GETDATE(),'0',@RefObjID)
END
ELSE IF @DayReward = '7' -- 2nd week
BEGIN
UPDATE _DailyReward SET IsMSent = 'YES',IsRecivce = 'YES',IsDay += 1, LoginDate=GETDATE(),IsLogin = 'ON' WHERE JID = @JID
exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN_CHEST @AccountID, @RewardGiven, 14, 0
INSERT INTO SRO_VT_SHARD.dbo._Memo (CharID,FromCharName,[Message],[Date],[Status],RefObjID)
VALUES (@CharID,'DailyReward','Thank you for visiting us again, please check the storage you will find your gift and its not our problem if there is no place in the storage to add the gift, Collect them and exchange them for good gift.',GETDATE(),'0',@RefObjID)
END
ELSE IF @DayReward BETWEEN '8' and '10'
BEGIN
UPDATE _DailyReward SET IsMSent = 'YES',IsRecivce = 'YES',IsDay += 1, LoginDate=GETDATE(),IsLogin = 'ON' WHERE JID = @JID
exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN_CHEST @AccountID, @RewardGiven, 18, 0
INSERT INTO SRO_VT_SHARD.dbo._Memo (CharID,FromCharName,[Message],[Date],[Status],RefObjID)
VALUES (@CharID,'DailyReward','Thank you for visiting us again, please check the storage you will find your gift and its not our problem if there is no place in the storage to add the gift, Collect them and exchange them for good gift.',GETDATE(),'0',@RefObjID)
END
ELSE IF @DayReward BETWEEN '11' and '12'
BEGIN
UPDATE _DailyReward SET IsMSent = 'YES',IsRecivce = 'YES',IsDay += 1, LoginDate=GETDATE(),IsLogin = 'ON' WHERE JID = @JID
exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN_CHEST @AccountID, @RewardGiven, 19, 0
INSERT INTO SRO_VT_SHARD.dbo._Memo (CharID,FromCharName,[Message],[Date],[Status],RefObjID)
VALUES (@CharID,'DailyReward','Thank you for visiting us again, please check the storage you will find your gift and its not our problem if there is no place in the storage to add the gift, Collect them and exchange them for good gift.',GETDATE(),'0',@RefObjID)
END
ELSE IF @DayReward = '15'
BEGIN
UPDATE _DailyReward SET IsMSent = 'YES',IsRecivce = 'YES',IsDay += 1, LoginDate=GETDATE(),IsLogin = 'ON' WHERE JID = @JID
exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN_CHEST @AccountID, @RewardGiven, 20, 0
INSERT INTO SRO_VT_SHARD.dbo._Memo (CharID,FromCharName,[Message],[Date],[Status],RefObjID)
VALUES (@CharID,'DailyReward','Thank you for visiting us again, please check the storage you will find your gift and its not our problem if there is no place in the storage to add the gift, Collect them and exchange them for good gift.',GETDATE(),'0',@RefObjID)
END
ELSE IF @RealDate != @DATEN
AND @RealDate != @Date
BEGIN
UPDATE _DailyReward SET LoginDate = GETDATE(),IsDay = '1' WHERE JID = 9
END
END
GO
|
Create this table at log db
Quote:
USE [SRO_VT_SHARDLOG]
GO
/****** Object: Table [dbo].[_DailyReward] Script Date: 10/28/2014 10:45:59 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[_DailyReward](
[ID] [int] IDENTITY(1,1) NOT NULL,
[JID] [int] NOT NULL,
[IsLogin] [varchar](16) NULL,
[LoginDate] [date] NULL,
[IsMSent] [varchar](16) NULL,
[IsRecivce] [varchar](16) NULL,
[IsDay] [int] NULL,
CONSTRAINT [PK__DailyReward] 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]
GO
SET ANSI_PADDING OFF
GO
|
finally, create this table at log db too.
Quote:
USE [SRO_VT_SHARDLOG]
GO
/****** Object: Table [dbo].[_DailyGift] Script Date: 10/28/2014 10:46:14 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[_DailyGift](
[ID] [int] IDENTITY(1,1) NOT NULL,
[CodeName] [varchar](50) NULL,
[Count] [int] NULL,
[Day] [int] NULL,
CONSTRAINT [PK__DailyGift] 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]
GO
SET ANSI_PADDING OFF
GO
|
i hope it works with everybody
|
|
|
11/20/2014, 19:08
|
#2
|
elite*gold: 0
Join Date: Oct 2014
Posts: 93
Received Thanks: 22
|
UP? NO ONE HAS SEEN IT?
|
|
|
11/20/2014, 22:31
|
#3
|
elite*gold: 41
Join Date: Oct 2012
Posts: 2,216
Received Thanks: 1,195
|
nothing special just copied from ortai database
|
|
|
11/20/2014, 22:33
|
#4
|
elite*gold: 85
Join Date: Feb 2014
Posts: 1,055
Received Thanks: 1,643
|
bahahahah this sucks so hard.
|
|
|
11/20/2014, 22:44
|
#5
|
elite*gold: 28
Join Date: Aug 2014
Posts: 4,096
Received Thanks: 2,649
|
Before reading what?
Haaaa, Like anyone is ever going to read this!
|
|
|
11/20/2014, 22:49
|
#6
|
elite*gold: 41
Join Date: Oct 2012
Posts: 2,216
Received Thanks: 1,195
|
Quote:
Originally Posted by xExorcist
Before reading what?
Haaaa, Like anyone is ever going to read this!
|
why not ?
|
|
|
11/20/2014, 22:59
|
#7
|
elite*gold: 0
Join Date: Oct 2014
Posts: 204
Received Thanks: 404
|
lol copied from ortai no thing new,try to release a new thing you did it by yourself
|
|
|
11/20/2014, 23:40
|
#8
|
elite*gold: 41
Join Date: Oct 2012
Posts: 2,216
Received Thanks: 1,195
|
Quote:
Originally Posted by Storxy_
lol copied from ortai no thing new,try to release a new thing you did it by yourself
|
really ? he took it from ortai ?
i wasn't know thanks for telling me
|
|
|
11/20/2014, 23:45
|
#9
|
elite*gold: 28
Join Date: Aug 2014
Posts: 4,096
Received Thanks: 2,649
|
Quote:
Originally Posted by Crue*
why not ?
|
Look at the number of lines, Isn't worth reading!!!
|
|
|
11/21/2014, 00:18
|
#10
|
elite*gold: 0
Join Date: Oct 2014
Posts: 93
Received Thanks: 22
|
i took it from rival db, so what? who cares? who likes it use it , who dislikes it ignore it.. xExorcist, Crue* should you both hate on any new thread? WTF
|
|
|
11/21/2014, 01:10
|
#11
|
elite*gold: 41
Join Date: Oct 2012
Posts: 2,216
Received Thanks: 1,195
|
Quote:
Originally Posted by Tyr*
i took it from rival db, so what? who cares? who likes it use it , who dislikes it ignore it.. xExorcist, Crue* should you both hate on any new thread? WTF
|
hate !
hate who ?
you !
wait a second
|
|
|
11/21/2014, 10:46
|
#12
|
elite*gold: 0
Join Date: Dec 2013
Posts: 422
Received Thanks: 54
|
Quote:
Originally Posted by Crue*
hate !
hate who ?
you !
wait a second
|
EGYPTIANS
|
|
|
11/21/2014, 15:54
|
#13
|
elite*gold: 0
Join Date: Oct 2014
Posts: 93
Received Thanks: 22
|
Quote:
Originally Posted by [NoReason]
EGYPTIANS
|
yea, iam egyptian. iam proud. why stupids hates egyptians?
Quote:
Originally Posted by Crue*
hate !
hate who ?
you !
wait a second
|
yea,why not?
|
|
|
11/21/2014, 17:17
|
#14
|
elite*gold: 28
Join Date: Aug 2014
Posts: 4,096
Received Thanks: 2,649
|
Quote:
Originally Posted by Tyr*
i took it from rival db, so what? who cares? who likes it use it , who dislikes it ignore it.. xExorcist, Crue* should you both hate on any new thread? WTF
|
Don't take this offensive but I'm just saying the truth!
|
|
|
11/21/2014, 17:57
|
#15
|
elite*gold: 0
Join Date: Dec 2013
Posts: 422
Received Thanks: 54
|
Quote:
Originally Posted by Tyr*
yea, iam egyptian. iam proud. why stupids hates egyptians?
yea,why not?
|
i quoted he's comment not yours i dont care about you :3
|
|
|
|
|
Similar Threads
|
[Release]Unique Slayer System ,, grant title + write notice + reward
12/10/2014 - SRO PServer Guides & Releases - 29 Replies
This system has never been released before .. and as i know , haters are going to hate , thats usual ..
explaining of this system :
When you kill a specific unique 10 times or however value you select ,, a notice will be written with your char name and which unique you killed and which title you have received .. It'll also reward u a title name .. And it'll reward you an item from your select .. as i know you should edit this and not reply with : 'error' or 'not working' .. and of course you...
|
Zone-SRO⇨Cap100⇨Old School Rates⇨Best Job System⇨Reward.Silk⇨Daily EVENTS!⇨Play2Win
02/09/2014 - SRO PServer Advertising - 30 Replies
http://i.epvpimg.com/13CTb.jpg
Welcome To ZoneSro Online Unique Every 15min
Links:
Home Page ZoneSro | Professional 100 Cap
Main Website Zonesro Network :: Online 24h/7
Facebook https://www.facebook.com/zonesro2013
Twitter https://twitter.com/zonesroonline
Download Link
|
[Release]Message System (create Your Own Automtic reply& reward )
12/04/2013 - SRO PServer Guides & Releases - 17 Replies
Well after Ludoworks showed their new krall server
i saw gr8 stuff they made in the server.
but i love to keep everything to public
so by the time I'll post every thing they made on their server .
starting with (Message system for getting titles or Even Giving gold or Silks for VIP members its based on your imagination)
i will post krall query's and scripts for making my tool much more better :-p
http://www4.0zz0.com/2013/01/16/09/154333083.png
http://i.imgur.com/FcGlN.png
|
[Release] Vote Reward System
02/07/2013 - CO2 PServer Guides & Releases - 12 Replies
Hello, i've been requesting & asking too much questions, and thought that because Epvp(members) helped me, i've to help back.
This vote system works on the 5672+ sources available these days, but it can work on any source if you know what you're doing.
How does it work : NPC that opens a vote link & adds a CPs amount, works every 12h
-----------Codes-------------
Open Dialogs.cs(or NPCS.cs, depends on your source):
Paste this with the other npcs
|
All times are GMT +2. The time now is 18:44.
|
|