quest gold_expire_update begin
state start begin
when 40004.use begin --- vnum item used for update gold_expire
local c,query = mysql_direct_query("SELECT * FROM account.account WHERE id = '"..pc.get_account_id().."' LIMIT 1;")
if query[1].gold_expire == '0000-00-00 00:00:00' then
mysql_direct_query("UPDATE account.account SET gold_expire = ADDDATE(NOW(), 7) WHERE id = '"..pc.get_account_id().."';")
else
mysql_direct_query("UPDATE account.account SET gold_expire = ADDDATE(gold_expire, 7) WHERE id = '"..pc.get_account_id().."';")
end
pc.remove_item(40004, 1)
end
end
end