Automatic Coins Only For Players Online.

04/24/2016 21:33 SuperKick#1
Anyone have script for automatic coins only for players online?...


Example: 200 Coins every 2 hours only for players online..



I had it but I lost it and is in elitepvpers not only for online users.
04/24/2016 22:21 guesswho-.-#2
eh, I'll make a quick one for you coz I'm bored anyways

DECLARE @[Only registered and activated users can see links. Click Here To Register...]no varchar(36)

DECLARE kur SCROLL cursor FOR select user_no from Account.dbo.USER_PROFILE where login_flag <> 0
OPEN kur FETCH NEXT FROM kur INTO @[Only registered and activated users can see links. Click Here To Register...]no
WHILE @@FETCH_STATUS = 0
BEGIN
update Cash.dbo.user_cash set amount = amount+200 where user_no = @[Only registered and activated users can see links. Click Here To Register...]no
FETCH NEXT FROM kur INTO @[Only registered and activated users can see links. Click Here To Register...]no
END
CLOSE kur
DEALLOCATE kur

keep in mind I did not test it at all, it might require some tinkering with :p
04/25/2016 15:06 [DEV]Dekaron#3
Nice work Paul
12/16/2020 16:46 noeblanco#4
Quote:
Originally Posted by guesswho-.- View Post
eh, I'll make a quick one for you coz I'm bored anyways

DECLARE @[Only registered and activated users can see links. Click Here To Register...]no varchar(36)

DECLARE kur SCROLL cursor FOR select user_no from Account.dbo.USER_PROFILE where login_flag <> 0
OPEN kur FETCH NEXT FROM kur INTO @[Only registered and activated users can see links. Click Here To Register...]no
WHILE @@FETCH_STATUS = 0
BEGIN
update Cash.dbo.user_cash set amount = amount+200 where user_no = @[Only registered and activated users can see links. Click Here To Register...]no
FETCH NEXT FROM kur INTO @[Only registered and activated users can see links. Click Here To Register...]no
END
CLOSE kur
DEALLOCATE kur

keep in mind I did not test it at all, it might require some tinkering with :p
how to make it automatic send every hour?
12/16/2020 19:27 guesswho-.-#5
Make a job in sql agent that executes this script every hour
12/18/2020 15:00 noeblanco#6
Quote:
Originally Posted by guesswho-.- View Post
Make a job in sql agent that executes this script every hour
i tried this in job but it won't work, it works only if i will execute a query in cash, can you give me specific ideas on how to work this automatic dshop coins for online players?
12/18/2020 15:15 guesswho-.-#7
you probably didnt start the job :p
12/18/2020 16:54 [DEV]Dekaron#8
or the SQL Server Agent is turn off

1) Make sure the SQL Server Agent is ON
2) to get working properly you can setup Schedules

there is a lots of option and possibility to make more like only give coins to player.
all depends how much your creative.
01/07/2022 06:34 emdee29#9
gib guide for automatic send every hour
01/07/2022 14:24 nager2013#10
DECLARE @[Only registered and activated users can see links. Click Here To Register...]no varchar(36)

DECLARE kur SCROLL cursor FOR select user_no from Account.dbo.USER_PROFILE where login_flag <> 0
OPEN kur FETCH NEXT FROM kur INTO @[Only registered and activated users can see links. Click Here To Register...]no
WHILE @@FETCH_STATUS = 0
BEGIN
update Cash.dbo.user_cash set amount = amount+200 where user_no = @[Only registered and activated users can see links. Click Here To Register...]no
FETCH NEXT FROM kur INTO @[Only registered and activated users can see links. Click Here To Register...]no
END
CLOSE kur
DEALLOCATE kur

use this > credit: guesswho-.- and [DEV]Dekaron