Cod:
quest monede_dragon_automat begin
state start begin
when login begin
local timp = 3600
local monede = mysql_query("SELECT coins from account.account WHERE id="..pc.get_account_id().." LIMIT 1;")[1][1]
syschat("|cff56ff00|H|h[Metin2A]|h|r : In momentul de fata ai |cffffa700|H|h" .. monede .. "|h|r monede dragon.")
loop_timer("incarcare_monede", timp)
end
when incarcare_monede.timer begin
local suma_monede = 1
local selectare_tabel = mysql_query("SELECT coins from account.account WHERE id="..pc.get_account_id().." LIMIT 1")
local incarcare_monede = mysql_query("UPDATE account.account SET coins ='"..(selectare_tabel.coins[1]+suma_monede).."' WHERE id="..pc.get_account_id().." LIMIT 1")
syschat("|cff56ff00|H|h[Metin2A]|h|r : A mai trecut o ora de cand esti online, contul tau a fost acreditat cu |cffffa700|H|h".. suma_monede .."|h|r monede dragon.")
local monede = mysql_query("SELECT coins from account.account WHERE id="..pc.get_account_id().." LIMIT 1;")[1][1]
syschat("|cff56ff00|H|h[Metin2A]|h|r : In momentul de fata ai |cffffa700|H|h" .. monede .. "|h|r monede dragon.")
end
end
end
local timp = 3600 - numărul de secunde.
local suma_monede = 1 - Valoarea monedelor
Trebuie să băgaţi funcţia mysql_query în questfunctions dacă nu o aveţi, altfel, nu o să vă funcţioneze.