Register for your free account! | Forgot your password?

You last visited: Today at 12:33

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

Advertisement



[Release] Job Reward system

Discussion on [Release] Job Reward system within the SRO PServer Guides & Releases forum part of the SRO Private Server category.

Reply
 
Old   #1
 
Apollo*'s Avatar
 
elite*gold: 0
Join Date: Dec 2014
Posts: 371
Received Thanks: 538
[Release] Job Reward system

'Hello again epvperz'

First : Create proc
Code:
USE [SRO_VT_LOG]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE procedure [dbo].[_RoyalAutoCoinGranting] 
@CharID INT
as

	Declare @JobType tinyint = 
	(Select JobType from SRO_VT_SHARD.dbo._Chartrijob where CharID = @CharID)
	, @amount int
	, @elixiramount int
	, @dividerhunter bigint = 18500000
	, @dividertrader bigint = 8000000
	, @Dividercontrthiefs bigint = 60500000
	, @dividerthiefs bigint = 30000000
	, @dividerhunterex bigint = 8000000
	, @dividertraderex bigint = 3000000
	, @dividerthiefsex tinyint = 8000000
	, @Charname varchar(30) = (select CharName16 from SRO_VT_SHARD.dbo._Char where CharID = @CharID)
	, @contribution int = (select Contribution from SRO_VT_SHARD.dbo._CharTrijob where CharID = @CharID)
	, @kills int;


If (@JobType = 1 )
 begin 
		set @contribution =
			(select Contribution from SRO_VT_SHARD.dbo._CharTrijob where CharID = @CharID)
		set @Charname =
			(select CharName16 from SRO_VT_SHARD.dbo._CharNameList where CharID = @CharID)
		Set @Amount =
			(select ROUND(@contribution/@Dividertrader,0))

	if @amount >=1
	 begin
		Exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN @Charname,'ITEM_ETC_SD_TOKEN_04', 5,0
		Insert Into SRO_VT_LOG.dbo.RoyalCoinLogHunters (CharID,Amount,EventTime)
		Values (@CharID,@amount,GETDATE())
		
	
	 End 
 end
 -- Hunter
If (@JobType = 3 )
 begin 
		set @contribution =
			(select Contribution from SRO_VT_SHARD.dbo._CharTrijob where CharID = @CharID)
		set @Charname =
			(select CharName16 from SRO_VT_SHARD.dbo._CharNameList where CharID = @CharID)
		Set @Amount =
			(select ROUND(@contribution/@Dividerhunter,0))

			
	if @amount >=1
	 begin
		Exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN @Charname,'ITEM_ETC_SD_TOKEN_04', 5,0
		Insert Into SRO_VT_LOG.dbo.RoyalCoinLogHunters (CharID,Amount,EventTime)
		Values (@CharID,@amount,GETDATE())
		
		
	 End 
 end


 --Now for thiefs

If (@JobType = 2 )
 begin 
		set @contribution =
			(select Contribution from SRO_VT_SHARD.dbo._CharTrijob where CharID = @CharID)
		set @Charname =
			(select CharName16 from SRO_VT_SHARD.dbo._CharNameList where CharID = @CharID)
		Set @Amount =
			(select ROUND(@contribution/@Dividerthiefs,0))

			
	if @amount >=1
	 begin
		Exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN @Charname,'ITEM_ETC_SD_TOKEN_04', 5,0
		Insert Into SRO_VT_LOG.dbo.RoyalCoinLogHunters (CharID,Amount,EventTime)
		Values (@CharID,@amount,GETDATE())
		
	 End 
 end
Add to _AddLogChar

Code:
     if (@EventID = 6) -- Auto Coin Granting and Contribution resetting logout
		Begin
			Exec SRO_VT_LOG.dbo._RoyalAutoCoinGranting @CharID
		end
Create table

Code:
USE [SRO_VT_LOG]
GO

/****** Object:  Table [dbo].[RoyalCoinLogHunters]    Script Date: 8.5.2015 14:47:55 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[RoyalCoinLogHunters](
	[CharID] [int] NULL,
	[Amount] [int] NULL,
	[EventTime] [smalldatetime] NULL
) ON [PRIMARY]

GO


ps: Copyed from old velestia db (system credits by Akasch)
Apollo* is offline  
Thanks
8 Users
Old 05/08/2015, 14:58   #2
 
Dracula Untold's Avatar
 
elite*gold: 247
Join Date: Feb 2014
Posts: 1,815
Received Thanks: 495
some anti cheat for this Job rewards u got there?

and what abouth when i whanna add only gold coins as reward ...

this are the rewards ?

it is ok if i whanna add only Gold coins ?
Dracula Untold is offline  
Old 05/08/2015, 15:29   #3
 
ILowe's Avatar
 
elite*gold: 0
Join Date: Mar 2012
Posts: 677
Received Thanks: 29
good

How to identify a specific NPC?
ILowe is offline  
Thanks
1 User
Old 05/08/2015, 15:33   #4
 
Syloxx's Avatar
 
elite*gold: 56
Join Date: Oct 2013
Posts: 1,165
Received Thanks: 762
what if amount = 5 for example

there is a while loop missing
Syloxx is offline  
Old 05/08/2015, 15:39   #5
 
elite*gold: 0
Join Date: Aug 2013
Posts: 32
Received Thanks: 2
The module '_RoyalAutoCoinGranting' depends on the missing object 'SRO_VT_SHARDLOG.dbo._RoyalContributionUnlimiter'. The module will still be created; however, it cannot run successfully until the object exists.
The module '_RoyalAutoCoinGranting' depends on the missing object 'SRO_VT_SHARDLOG.dbo._RoyalContributionUnlimiter'. The module will still be created; however, it cannot run successfully until the object exists.
thebate1 is offline  
Old 05/08/2015, 15:39   #6
 
Dracula Untold's Avatar
 
elite*gold: 247
Join Date: Feb 2014
Posts: 1,815
Received Thanks: 495
same error here
Dracula Untold is offline  
Old 05/08/2015, 15:47   #7


 
​Exo's Avatar
 
elite*gold: 28
Join Date: Aug 2014
Posts: 4,096
Received Thanks: 2,649
Quote:
Originally Posted by Count Dracula View Post
some anti cheat for this Job rewards u got there?

and what abouth when i whanna add only gold coins as reward ...

this are the rewards ?

it is ok if i whanna add only Gold coins ?
Ye, add whatever you want there, shouldn't be a problem.
​Exo is offline  
Old 05/08/2015, 15:50   #8
 
Apollo*'s Avatar
 
elite*gold: 0
Join Date: Dec 2014
Posts: 371
Received Thanks: 538
Quote:
Originally Posted by Count Dracula View Post
some anti cheat for this Job rewards u got there?

and what abouth when i whanna add only gold coins as reward ...

this are the rewards ?

it is ok if i whanna add only Gold coins ?



Code:
USE [SRO_VT_LOG]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE procedure [dbo].[_RoyalAutoCoinGranting] 
@CharID INT
as

	Declare @JobType tinyint = 
	(Select JobType from SRO_VT_SHARD.dbo._Chartrijob where CharID = @CharID)
	, @amount int
	, @elixiramount int
	, @dividerhunter bigint = 18500000
	, @dividertrader bigint = 8000000
	, @Dividercontrthiefs bigint = 60500000
	, @dividerthiefs bigint = 30000000
	, @dividerhunterex bigint = 8000000
	, @dividertraderex bigint = 3000000
	, @dividerthiefsex tinyint = 8000000
	, @Charname varchar(30) = (select CharName16 from SRO_VT_SHARD.dbo._Char where CharID = @CharID)
	, @contribution int = (select Contribution from SRO_VT_SHARD.dbo._CharTrijob where CharID = @CharID)
	, @kills int;


If (@JobType = 1 )
 begin 
		set @contribution =
			(select Contribution from SRO_VT_SHARD.dbo._CharTrijob where CharID = @CharID)
		set @Charname =
			(select CharName16 from SRO_VT_SHARD.dbo._CharNameList where CharID = @CharID)
		Set @Amount =
			(select ROUND(@contribution/@Dividertrader,0))

	if @amount >=1
	 begin
		Exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN @Charname,'ITEM_ETC_SD_TOKEN_04', 5,0
		Insert Into SRO_VT_LOG.dbo.RoyalCoinLogHunters (CharID,Amount,EventTime)
		Values (@CharID,@amount,GETDATE())
		
	
	 End 
 end
 -- Hunter
If (@JobType = 3 )
 begin 
		set @contribution =
			(select Contribution from SRO_VT_SHARD.dbo._CharTrijob where CharID = @CharID)
		set @Charname =
			(select CharName16 from SRO_VT_SHARD.dbo._CharNameList where CharID = @CharID)
		Set @Amount =
			(select ROUND(@contribution/@Dividerhunter,0))

			
	if @amount >=1
	 begin
		Exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN @Charname,'ITEM_ETC_SD_TOKEN_04', 5,0
		Insert Into SRO_VT_LOG.dbo.RoyalCoinLogHunters (CharID,Amount,EventTime)
		Values (@CharID,@amount,GETDATE())
		
		
	 End 
 end


 --Now for thiefs

If (@JobType = 2 )
 begin 
		set @contribution =
			(select Contribution from SRO_VT_SHARD.dbo._CharTrijob where CharID = @CharID)
		set @Charname =
			(select CharName16 from SRO_VT_SHARD.dbo._CharNameList where CharID = @CharID)
		Set @Amount =
			(select ROUND(@contribution/@Dividerthiefs,0))

			
	if @amount >=1
	 begin
		Exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN @Charname,'ITEM_ETC_SD_TOKEN_04', 5,0
		Insert Into SRO_VT_LOG.dbo.RoyalCoinLogHunters (CharID,Amount,EventTime)
		Values (@CharID,@amount,GETDATE())
		
	 End 
 end
Apollo* is offline  
Thanks
3 Users
Old 05/08/2015, 15:52   #9


 
​Exo's Avatar
 
elite*gold: 28
Join Date: Aug 2014
Posts: 4,096
Received Thanks: 2,649
Also, I don't see the contribution being deleted after granting the rewards for thieves/hunters.

Replace that Unlimiter thing with something like
PHP Code:
UPDATE _CharTriJob SET Contribution 0 WHERE CharID = @CharID and add it to Hunter/Thief blocks
​Exo is offline  
Thanks
2 Users
Old 05/08/2015, 15:52   #10
 
Dracula Untold's Avatar
 
elite*gold: 247
Join Date: Feb 2014
Posts: 1,815
Received Thanks: 495

What abouth this Error ?? how could we fixx it ?

Quote:
Originally Posted by ​Exo View Post
Also, I don't see the contribution being deleted after granting the rewards for thieves/hunters.

Replace that Unlimiter thing with something like
PHP Code:
UPDATE _CharTriJob SET Contribution 0 WHERE CharID = @CharID and add it to Hunter/Thief blocks
i dont even see what u mean ... could u just replace it ? so i can see.?

This ?
, @contribution int = (select Contribution from SRO_VT_SHARD.dbo._CharTrijob where CharID = @CharID)
Dracula Untold is offline  
Old 05/08/2015, 15:58   #11


 
​Exo's Avatar
 
elite*gold: 28
Join Date: Aug 2014
Posts: 4,096
Received Thanks: 2,649
Quote:
Originally Posted by Count Dracula View Post
What abouth this Error ?? how could we fixx it ?



i dont even see what u mean ... could u just replace it ? so i can see.?

This ?
, @contribution int = (select Contribution from SRO_VT_SHARD.dbo._CharTrijob where CharID = @CharID)
Something like this
​Exo is offline  
Thanks
2 Users
Old 05/08/2015, 15:59   #12
 
Dracula Untold's Avatar
 
elite*gold: 247
Join Date: Feb 2014
Posts: 1,815
Received Thanks: 495
Apollo ? whay don'tu fix it first and then release it full fixed.
Dracula Untold is offline  
Old 05/08/2015, 16:00   #13


 
​Exo's Avatar
 
elite*gold: 28
Join Date: Aug 2014
Posts: 4,096
Received Thanks: 2,649
Also why the heck is the contribution set each time?

CharName too
​Exo is offline  
Thanks
2 Users
Old 05/08/2015, 16:01   #14
 
Dracula Untold's Avatar
 
elite*gold: 247
Join Date: Feb 2014
Posts: 1,815
Received Thanks: 495
Exo
u know that error that i post it ? how to fix it ?
Dracula Untold is offline  
Old 05/08/2015, 16:05   #15


 
​Exo's Avatar
 
elite*gold: 28
Join Date: Aug 2014
Posts: 4,096
Received Thanks: 2,649
Quote:
Originally Posted by Count Dracula View Post
Exo
u know that error that i post it ? how to fix it ?
Dude, just try the thing I posted above, probably it will do the job. To fix that thing you need that procedure it's just missing.
​Exo is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
[Release] PHP Vote Reward System
07/13/2016 - Shaiya PServer Guides & Releases - 20 Replies
!important Alright guys I've fixed all the issues that i know of please let me know if you find any more. Well here is an epic release for elitepvpers I've spent a few hours coding this so I really hope you guys enjoy it. So what does this PHP Vote Reward System do well if you know Shaiya Invasions Shaiya Vote Reward system well this is almost a complete copy players don't get the points until they click the link back to the website from the vote site. Also FYI this script can't be...
[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...
[Release] Daily Reward System
11/24/2014 - SRO PServer Guides & Releases - 17 Replies
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 Create this procedure at LOG db Create this table at log db
[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 12:33.


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.