Pentru cine cauta asta :
quest premium_item begin
state start begin
function update_14zile(x)
mysql_direct_query("UPDATE account.account SET silver_expire = '"..x.."' WHERE id = "..pc.get_account_id().."")
mysql_direct_query("UPDATE account.account SET gold_expire = '"..x.."' WHERE id = "..pc.get_account_id().."")
end
when 30181.use begin
local new_date = os.date("%Y-%m-%d %H:%M:%S", get_global_time() + (60 * 60 * 24 * 14))
if get_time() > pc.getqf("premium_item_used") then
if false == pc.can_warp() or pc.count_item(item.get_vnum()) == 0 then
syschat("<Securitate> Asteapta 10 secunde sau posibil sa nu ai "..item.get_name().." in inventar!")
return
end
say_title(item_name(30181))
say("")
say("Ai activat cu succes pachetul X,")
say("Pentru ca bonusurile sa se aplice este")
say("necesara relogarea.")
say("")
pc.remove_item(30181, 1)
premium_item.update_14zile(new_date)
pc.setqf("premium_item_used", get_time() + 60 * 60 * 24 * 14)
else
say_title(item_name(30181))
say("")
say(string.format("Mai trebuie sa astepti %s pentru a putea folosi acest obiect!", get_time_remaining(pc.getqf("premium_item_used") - get_time())))
return
end
end
end
end
P.S. Schimbati voi codul la acel obiect ,eu am pus unul la intamplare , stiti voi ce aveti de facut
Mersi Silviu pt. resursa
