[REQUEST]Send coins for few players at once

01/24/2011 15:25 gedimazs#1
Hi,
As title says need query or php script to send some amount of coins to some players only.
For example I want to send for player xxx and player yyy and player zzz 999 coins at once.
Or maybe it is possible to make a job to do that every 2 days for example.

So anyone can help me with that? pieter can you? I know you are MSSQL master :D
01/24/2011 15:45 911Hacker#2
I have a query to send coins to all players, I could modify it to only send to a particular guild or something.

What selection of players? Just a few? Then you can just make a query to send it people with the user numbers or user IDs.

If you want it to run automatically, let's say every week, you can create a database job to run each week.
01/24/2011 16:44 pieter#3
create a table named SpecialChars
field charname VARCHAR(40)

in there just add the players u want to award the coins

then just add coins using the IN statement

update blablabla
set ammount=(ammount + 999)
where character_name in (select charactername from Specialusers)

dont have access to a dk db atm (cellphone) but if its char_no based use this in statement
where character_no in (select character_no from character..user_character where character_name in (SELECT charactername from Specialusers))
01/24/2011 16:57 gedimazs#4
Quote:
Originally Posted by pieter View Post
create a table named SpecialChars
field charname VARCHAR(40)

in there just add the players u want to award the coins

then just add coins using the IN statement

update blablabla
set ammount=(ammount + 999)
where character_name in (select charactername from Specialusers)

dont have access to a dk db atm (cellphone) but if its char_no based use this in statement
where character_no in (select character_no from character..user_character where character_name in (SELECT charactername from Specialusers))
It was hard to understand your wonderful thoughts :) I'm not so freaking MSSQL master like you are so it is a bit complicated for me.
Why create new table, why I can't just make script to find those charnames from user_character then take their user_no and with user_no add coins to cash.dbo user_cash?


Quote:
Originally Posted by 911Hacker View Post
I have a query to send coins to all players, I could modify it to only send to a particular guild or something.

What selection of players? Just a few? Then you can just make a query to send it people with the user numbers or user IDs.

If you want it to run automatically, let's say every week, you can create a database job to run each week.
I have script too to send coins to all players, but I need only to send coins for only few players, cause it sucks to add coins for each player (~15) manually.
01/24/2011 18:32 pieter#5
because then u can make a php file to add chars to that table without having to login to server again ;)
01/24/2011 21:12 gedimazs#6
pieter is it possible you to make everything with better explanation? cause how I mentioned I'm not so good with MSSQL commands
01/25/2011 02:51 caper#7
I believe it is by user_no, since all characters on that account have access to the D-shop coins.

So you could write a php script that allows you to type all the names separated by comma, use select statement to find their user_no, then add the coin amount to the cash table for each one.

I'm not home either so would hate to spit out an example that doesn't work right.
01/25/2011 18:43 gedimazs#8
#request to close.
Question solved
Thanks guys for answering