Update powergamers.lua

This commit is contained in:
Atte 2014-09-10 01:13:04 +03:00
parent 050fb6edde
commit 38c0c00da6

View File

@ -1,7 +1,7 @@
function onThink(interval, lastExecution, thinkInterval) function onThink(interval, lastExecution, thinkInterval)
if (tonumber(os.date("%d")) ~= getGlobalStorageValue(23856)) then if (tonumber(os.date("%d")) ~= getGlobalStorageValue(23856)) then
setGlobalStorageValue(23856, (tonumber(os.date("%d")))) setGlobalStorageValue(23856, (tonumber(os.date("%d"))))
db.query("UPDATE `znote_players` `a` INNER JOIN `players` `b` ON `a`.`id`=`b`.`id` SET `a`.`exphist7`=`a`.`exphist6`, `a`.`exphist6`=`a`.`exphist5`, `a`.`exphist5`=`a`.`exphist4`, `a`.`exphist4`=`a`.`exphist3`, `a`.`exphist3`=`a`.`exphist2`, `a`.`exphist2`=`a`.`exphist1`, `a`.`exphist1`=`b`.`experience`-`a`.`exphist_lastexp`, `a`.`exphist_lastexp`=`b`.`experience`;") db.query("UPDATE `znote_players` `a` INNER JOIN `players` `b` ON `a`.`id`=`b`.`player_id` SET `a`.`exphist7`=`a`.`exphist6`, `a`.`exphist6`=`a`.`exphist5`, `a`.`exphist5`=`a`.`exphist4`, `a`.`exphist4`=`a`.`exphist3`, `a`.`exphist3`=`a`.`exphist2`, `a`.`exphist2`=`a`.`exphist1`, `a`.`exphist1`=`b`.`experience`-`a`.`exphist_lastexp`, `a`.`exphist_lastexp`=`b`.`experience`;")
end end
return true return true
end end