.Revo 35 Posted September 29, 2012 Olá pessoal venho-vos mostrar o sistema de vouchers do metin2 oficial. Vem, vamos adicionar isto à vossa questlib [dirije-te ao final]: function give_dm(z)os.execute("mysql -u root --password='vossa password' account --execute='UPDATE account SET cash = cash + ".. z .." WHERE id = ".. pc.get_account_id() ..";'")os.execute("mysql -u root --password='vossa password' log --execute='INSERT INTO voucher_log (account_id, pocet, cas) VALUES (".. pc.get_account_id() ..", ".. z ..", NOW());'")endAdicionar o seguinte à vossa quest_functions [no final]: give_dmEm seguida, entrar no navicat, ir a base de dados log, e adicionar a seguinte query: CREATE TABLE `voucher_log` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `account_id` int(10) unsigned NOT NULL, `pocet` int(10) unsigned NOT NULL, `cas` datetime NOT NULL, PRIMARY KEY (`id`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;Agora têm aqui a quest: quest vouchers begin state start begin when 80014.use begin item.remove() give_dm(100) end when 80015.use begin item.remove() give_dm(500) end when 80016.use begin item.remove() give_dm(1000) endendendIcones anexados. Créditos: Epvp & .Revo Tópico original: http://www.elitepvpe...ial-server.html 9 Radamanthos, Rancoroso, p0w3r0ff and 6 others reacted to this Share this post Link to post Share on other sites
Cђ๏รєPєтภคร 865 Posted September 29, 2012 Bom tutorial. Obrigado por compartilhares :D Cumprimentos,ChosePetras Share this post Link to post Share on other sites
Maria Helena 368 Posted September 29, 2012 Muito bom tópicohttp://cyber-gamers.org/public/style_emoticons/default/451960.gif ^-^ Share this post Link to post Share on other sites
.Revo 35 Posted September 29, 2012 (edited) Thanks!## Corrigi ai umas pequenas falhas xDDAssim já não ipotese de aldravar. primeiro o item removido e depois as md's Edited September 29, 2012 by .Revo (see edit history) Share this post Link to post Share on other sites
Cryptic 22 Posted September 29, 2012 Isso, não funciona... Onde está o quest_functions? Share this post Link to post Share on other sites
ƤāƱŁѲ ƒēƦƦēƗƦā 1,220 Posted September 29, 2012 Adicionar o seguinte à vossa quest_functions [no final]: give_dm @LNT, tá aí. Cumprimentos. Share this post Link to post Share on other sites
Cryptic 22 Posted September 29, 2012 Sim eu sei que está aí, o que eu estou a querer dizer é que nas serverfiles isso não existe...E o questlib parece estar mal também. Share this post Link to post Share on other sites
ƤāƱŁѲ ƒēƦƦēƗƦā 1,220 Posted September 29, 2012 Sim eu sei que está aí, o que eu estou a querer dizer é que nas serverfiles isso não existe... E o questlib parece estar mal também. Téns é de adicionar isso xD não quer dizer que tenha... Espero que tenhas compreendido xD ... Cumprimentos. Share this post Link to post Share on other sites
Cryptic 22 Posted September 29, 2012 ya e o quest_functions guardamos como? Share this post Link to post Share on other sites
.Revo 35 Posted September 30, 2012 affffffffffffffffffffffffffffff isto dá, testado por mim!! não sabes editar o questlib?! O.o vais ao arquivo e adicionas function give_dm(z) os.execute("mysql -u root --password='vossa password' account --execute='UPDATE account SET cash = cash + ".. z .." WHERE id = ".. pc.get_account_id() ..";'") os.execute("mysql -u root --password='vossa password' log --execute='INSERT INTO voucher_log (account_id, pocet, cas) VALUES (".. pc.get_account_id() ..", ".. z ..", NOW());'") end Share this post Link to post Share on other sites
Cryptic 22 Posted October 7, 2012 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)Sim... estou a usar a password correta -.- Share this post Link to post Share on other sites
ƤāƱŁѲ ƒēƦƦēƗƦā 1,220 Posted October 7, 2012 LNT mete assim e testa.. Comigo funcionou. Cumprimentos. 1 Cryptic reacted to this Share this post Link to post Share on other sites
sysjo 14 Posted October 11, 2012 Hei, bom tutirial mas podiao por um download dos icon obgr ;)! http://cyber-gamers.org/public/style_emoticons/default/451960.gif Share this post Link to post Share on other sites
Guest Henrique Oliveira Posted October 11, 2012 Hei, bom tutirial mas podiao por um download dos icon obgr ;)! http://cyber-gamers.org/public/style_emoticons/default/451960.gifGuardas imagem como, depois convertes (como nao sei o photoshop deve dar ou o irframviwer) Share this post Link to post Share on other sites
sysjo 14 Posted October 11, 2012 ta feito saque as do elites obrg ;)mas tenho uma pergunta. na function do questlib - "root - e a senha ?" ah? eu meti mt2 e mt2@!# como senha e clico no item mas as moedas nao adicionao automaticamente na conta vao so pro log so? Share this post Link to post Share on other sites