Quote:
Originally Posted by thund22222
you cannot do this because the server can not bring a player's account name
you can apply what you said, but you must enter the account name the player manually
in this case would be 500 + Player how you can enter in a short time?
I'll explain you ---->the example I'm going to change the value of the gold via the sql command look at this
update Character set gold = 50 where account_id = 1 ---> this will change all the values in all the characters that have account id 1 ,but if you want to bring the account id of the account that automatically use, value must be the account id = variable
like this in lua script
account_id=gv("account_id")
update Character set gold = 50 where account_id = .. account_id .. ---> now the value of account id variable depending on use
but in sql with lua ?? how can doit? like smp account there is a variable name @IN_ACCOUNT_ID this variable is the value automatically
if this variable is really in smp global variables was solved the problem !!
|
you will never understand what is critical thinking.
you want a ready piece of cake to eat, just like anyone else here in this forum who don't use their minds, so take it :
global flag insert smp :
Code:
if @IN_KEY like '%_change_fucking_gold'
begin
exec ('update telecatser.dbo.Character set gold = 50 where account_id in (select account_id from Character where name = N''' + @IN_VALUE + '''' )
end
lua:
Code:
function change_fucking_gold_using_logic()
name = gv("name")
if get_global_variable("queries_count") == "" then
set_global_variable("queries_count", 0)
end
set_global_variable("queries_count", get_global_variable("queries_count") + 1)
set_global_variable(get_global_variable("queries_count") .. "_change_fucking_gold", name)
end
edit 1 :you can workout this and make another stored procedure to do the stuff in the executing command, but I think it will make brain overload that's why I gave you what you really familiar with like any fake *devs* around here so that you can use your imagination well.
edit 2 : you can rewrite what is included above and make a more efficient script that satisfies all your needs.