|
You last visited: Today at 16:29
Advertisement
Help with Job Reward
Discussion on Help with Job Reward within the SRO Private Server forum part of the Silkroad Online category.
10/15/2015, 04:16
|
#1
|
elite*gold: 29
Join Date: Apr 2011
Posts: 481
Received Thanks: 223
|
Help with Job Reward
Hello Guys,
I tried to use this Job Reward
Quote:
IF @EventID = 97 or EventID =91 and Data1=2 or EventID =91 and Data1=3
begin
DECLARE @TradeDifficulty INT,
@REWARDCOUNT INT,
@REQLEVEL TINYINT,
@Contribution int,
@RewardCode varchar(max),
@CharName varchar(max)
set @rewardcode = 'REWARD_ITEM_CODE'
set @charname = (select charname16 from shard.._char where charid = @charid)
Set @Contribution = (select contribution from shard.._chartrijob where charid = @charid)
set @RewardCount = '20' /* coin or silk amount */
set @reqLevel = (select curlevel from shard.._char where charid = @charid)
set @difficulty = case
When @contribution between 'lowest 5 star contribution' and 'highest 5 star contribution'
then 5
else 1
end
if @difficulty = 5 and @reqlevel = 100 /* 5 star and cur level = 100 */
begin
update shard.._charcos set ownercharid = 0,refcharid = 0 where ownercharid = @charid and refcharid in (select id from _refobjcommon where codename128 like '%COS_T%')
exec shard.._add_item_extern @charname,@rewardcode,@Rewardcount,1
end
end
|
From Lenius
My Problem is, that I get this error:
Quote:
Must declare the scalar variable "@EventID".
Msg 137, Level 15, State 2, Line 10
Must declare the scalar variable "@charid".
Msg 137, Level Msg 137, Level 15, State 2, Line 1
15, State 2, Line 11
Must declare the scalar variable "@charid".
Msg 137, Level 15, State 2, Line 13
Must declare the scalar variable "@charid".
Msg 137, Level 15, State 1, Line 14
Must declare the scalar variable "@difficulty".
Msg 137, Level 15, State 2, Line 19
Must declare the scalar variable "@difficulty".
Msg 137, Level 15, State 2, Line 21
Must declare the scalar variable "@charid".
|
I hope any1 can help me :/
Thanks
|
|
|
10/15/2015, 06:55
|
#2
|
elite*gold: 0
Join Date: May 2012
Posts: 179
Received Thanks: 56
|
under DECLARE put in :
@charid int,
@EventID int,
@difficulty int
and you should be good to go
however you might wanna change all the 'charid' to 'CharID' for easy system recall for any stored procedures you may run with this script , good luck
|
|
|
10/15/2015, 12:12
|
#3
|
elite*gold: 28
Join Date: Aug 2014
Posts: 4,096
Received Thanks: 2,653
|
PS:- the procedure is ****
I'd not recommend using it.
|
|
|
10/15/2015, 13:56
|
#4
|
elite*gold: 29
Join Date: Apr 2011
Posts: 481
Received Thanks: 223
|
Now i get only this error
Quote:
IF @EventID = 97 or EventID = 91 and Data1=2 or EventID = 91 and Data1=3
begin
DECLARE @TradeDifficulty INT,
@REWARDCOUNT INT,
@REQLEVEL TINYINT,
@Contribution int,
@CharID int,
@EventID int,
@difficulty int,
@RewardCode varchar(max),
@CharName varchar(max)
set @rewardcode = 'ITEM_ETC_ARENA_COIN'
set @charname = (select charname16 from shard.._char where CharID = @CharID)
Set @Contribution = (select contribution from shard.._chartrijob where CharID = @CharID)
set @RewardCount = '20' /* coin or silk amount */
set @reqLevel = (select curlevel from shard.._char where CharID = @CharID)
set @difficulty = case
When @contribution between 'lowest 5 star contribution' and 'highest 5 star contribution'
then 5
else 1
end
if @difficulty = 5 and @reqlevel = 100 /* 5 star and cur level = 100 */
begin
update shard.._charcos set ownercharid = 0,refcharid = 0 where ownercharid = @CharID and refcharid in (select id from _refobjcommon where codename128 like '%COS_T%')
exec shard.._add_item_extern @charname,@rewardcode,@Rewardcount,1
end
end
|
Error :
Quote:
Msg 137, Level 15, State 2, Line 1
Must declare the scalar variable "@EventID".
|
|
|
|
10/16/2015, 11:12
|
#5
|
elite*gold: 0
Join Date: Apr 2015
Posts: 1,444
Received Thanks: 1,373
|
And people asking why their Database/files lagging while using ****** queries...
|
|
|
10/20/2015, 15:27
|
#6
|
elite*gold: 0
Join Date: May 2013
Posts: 1,447
Received Thanks: 1,046
|
Code:
IF @EventID = 97 or EventID = 91 and Data1=2 or EventID = 91 and Data1=3
Make that line above to be the same as the one below.
Code:
IF @EventID = 97 or @EventID = 91 and @Data1=2 or @EventID = 91 and @Data1=3
Don't use this! It's crappy coded.
|
|
|
 |
Similar Threads
|
CTF reward
07/28/2015 - SRO Private Server - 0 Replies
Any idea about changing CTF reward from 1 coin per kill to a reward for the last winner only
|
Help please, for a reward..
10/18/2012 - Atlantica Online - 2 Replies
So my paypal acc got limited after trying to withdraw money to my cc. I need to provide more information about payments, Photo ID, Credit Card Statement, Proof of Address, Provide Invoices, Supplier Contact Info, Provide proof of delivery
I can provide Photo ID, cc statement, proof of adress. But how the f*** i can provide invoice? Supplier contact info? Proof of delivery? Since i am just a gold seller that sells virtual goods. Please help me to get my acc unlimited, i will reward you.
|
Lv up reward
03/22/2010 - Archlord - 32 Replies
hi i have a question 2 you all
some1 have any idea how to get more then 1 time the lv up reward ?
i saw a vid on x fire where the char have like 10 event shuta and much cc xD
shutaa+wc items:D - Xfire Video
so some1 have any idea how 2 do this bug ?
|
[Help]If you help me i will reward you
01/09/2010 - CO2 Private Server - 5 Replies
DONE ,lol
|
All times are GMT +1. The time now is 16:33.
|
|