[Release] Random Gold

03/01/2014 02:16 bestprem#1
Random Gold Lottery!!


#*Media Section*

#itemdata_50000.txt
HTML Code:
1	180295	ITEM_KIRO_RANDOM_GOLD	???? ???? ??? (???)	xxx	SN_ITEM_KIRO_RANDOM_GOLD	SN_ITEM_KIRO_RANDOM_GOLD_TT_DESC	1	0	3	3	3	1	180000	3	2	0	1	0	3	0	1	0	0	129	0	0	0	0	0	0	0	1	1	-1	0	-1	0	-1	0	-1	0	0	0	0	0	0	0	100	0	0	0	xxx	item\etc\drop_mall_scroll.bsr	comatose\uniq_point_scroll.ddj	xxx	xxx	1	2	0	0	3	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	1500	????	1	??????                                                                                                                           	-1	RESURRECT	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	0	0	0
#textdata_object.txt
HTML Code:
1	SN_ITEM_KIRO_RANDOM_GOLD								Gold Lottery(Kiro)
1	SN_ITEM_KIRO_RANDOM_GOLD_TT_DESC								Gold Lottery(Kiro)

#*Database Section*


#Tables
#_RefObjCommon
HTML Code:
1	180295	ITEM_KIRO_RANDOM_GOLD	???? ???? ??? (???)	xxx	SN_ITEM_KIRO_RANDOM_GOLD	SN_ITEM_KIRO_RANDOM_GOLD_TT_DESC	1	0	3	3	3	1	180000	3	2	0	1	0	3	0	1	0	0	129	0	0	0	0	0	0	0	1	1	-1	0	-1	0	-1	0	-1	0	0	0	0	0	0	0	100	0	0	0	xxx	item\etc\drop_mall_scroll.bsr	comatose\uniq_point_scroll.ddj	xxx	xxx 99999
#_RefObjItem
HTML Code:
99999	1	2	0	0	3	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	1500	????	1	??????                                                                                                                           	-1	RESURRECT	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	-1	xxx	0	0	0
#Procedures
SRO_VT_SHARDLOG >>>> [_AddLogItem]

Notice:add that query at addlogitem
HTML Code:
IF (@Operation = 41) -- If item used!
BEGIN
    IF (@ItemRefID = 180295) -- RefObjCommon ID (Scroll) (By Kiro)
    BEGIN
    declare @Charname varchar(128)
declare @upper_kiro int = '100000000' declare @lower_kiro int = '10000000'
 declare @random_kiro int = ROUND(((@upper_kiro - @lower_kiro -1) * RAND() + @lower_kiro), 0)
 set @charname = (select CharName16  from sro_vt_shard.dbo._Char where CharID=@CharID)
Update SRO_VT_SHARD.dbo._Char set RemainGold = RemainGold + @random_kiro  where CharName16 = @charname      
end
end
03/01/2014 04:22 PortalDark#2
#Approved
03/01/2014 06:01 Crue*#3
thanks !
03/01/2014 06:40 menamoners#4
N!Ce keep going :)
03/01/2014 10:25 Scheffi#5
Old but thank you
03/01/2014 14:17 Wolf Internet Attacker#6
Nice :3
03/01/2014 16:35 asanoftw#7
ok nice =D
03/01/2014 20:25 Justin1337*#8
Thanks, btw fix your sig [Only registered and activated users can see links. Click Here To Register...] :P
03/02/2014 00:48 nourayman#9
Too easy + Too old

anyway thank's .
03/23/2014 08:12 bestprem#10
i know it it's easy
for beginners :3
03/24/2014 02:11 lewy1000#11
I try it but after TP gold not added :O
Code:
 IF (@ItemRefID = 180295) -- RefObjCommon ID (Scroll) (By Kiro)
BEGIN
declare @Charname varchar(128)
declare @upper_kiro int 
SET @upper_kiro = '100000000' 
declare @lower_kiro int 
SET @lower_kiro = '1000000'
declare @random_kiro int 
SET @random_kiro = ROUND(((@upper_kiro - @lower_kiro -1) * RAND() + @lower_kiro), 0)
set @charname = (select CharName16  from sro_vt_shard_init.dbo._Char where CharID = @CharID)
Update SRO_VT_SHARD_INIT.dbo._Char set RemainGold = RemainGold + @random_kiro  where CharName16 = @charname      
end
No errors in server modules.
03/24/2014 02:59 bestprem#12
Quote:
Originally Posted by lewy1000 View Post
I try it but after TP gold not added :O
Code:
 IF (@ItemRefID = 180295) -- RefObjCommon ID (Scroll) (By Kiro)
BEGIN
declare @Charname varchar(128)
declare @upper_kiro int 
SET @upper_kiro = '100000000' 
declare @lower_kiro int 
SET @lower_kiro = '1000000'
declare @random_kiro int 
SET @random_kiro = ROUND(((@upper_kiro - @lower_kiro -1) * RAND() + @lower_kiro), 0)
set @charname = (select CharName16  from sro_vt_shard_init.dbo._Char where CharID = @CharID)
Update SRO_VT_SHARD_INIT.dbo._Char set RemainGold = RemainGold + @random_kiro  where CharName16 = @charname      
end
No errors in server modules.
Skype:Kerolosmoner
05/12/2018 10:02 silkflo#13
Maybe late to answer you , but i've got the same problem. So for other who might have no gold added, change the @operation number, i changed for 16 and works