Cαllмєσfficiαl 21 Posted January 25, 2014 Hey guys, eu trago dois recursos para mini-quest, você precisa colocar a busca mysql, mas agora quase todos são assim eu não acho problema. As funções são os seguintes:pc.change_coins(x) function pc.change_coins(x) mysql_query("UPDATE account.account SET coins=coins+'"..x.."' WHERE id='"..pc.get_account_id().."' LIMIT 1")end Ele permite que você remova moedas ao usuário, por exemplo:quest cupon_md_1000 begin state start begin when idcupon.use begin pc.change_coins(1000) end endend Para subtrair basta adicionar - antes do número pc.change_coins(-100)pc.get_coins()function pc.get_coins() local a = mysql_query("select * from account.account where id ='"..pc.get_account_id().."' LIMIT 1") return a.coins[1] end Permite de ver quantas moedas vc temquest consulta_coins begin state start begin when login begin if pc.get_coins() < 100 then say("Tens menos de 100 coins") else say("Tens mais de 100 Coins") end end endend Créditos : Rafa Share this post Link to post Share on other sites
kimameixede 70 Posted January 25, 2014 mas os coins sao yang ou moedas do site? Share this post Link to post Share on other sites
Cαllмєσfficiαl 21 Posted January 25, 2014 quest consulta_coins begin state start begin when login begin if pc.get_coins() < 100 then say("Tens menos de 100 coins") else say("Tens mais de 100 Coins") end end endend Share this post Link to post Share on other sites
RickyM2 122 Posted February 4, 2014 É possível meteres aqui a Query ou um Tutorial qualquer dos vouchers. Share this post Link to post Share on other sites