· 9 years ago · Jan 21, 2017, 02:22 AM
1/*
2 ___ ___ ___ ___ ___
3 /\ \ /\__\ /\ \ _____ /\__\ /\ \
4 _\:\ \ /:/ _/_ \:\ \ /::\ \ /:/ _/_ \:\ \
5 /\ \:\ \ /:/ /\__\ \:\ \ /:/\:\ \ /:/ /\__\ \:\ \
6 _\:\ \:\ \ /:/ /:/ _/_ _____\:\ \ /:/ \:\__\ /:/ /:/ _/_ _____\:\ \
7 /\ \:\ \:\__\ /:/_/:/ /\__\ /::::::::\__\ /:/__/ \:|__| /:/_/:/ /\__\ /::::::::\__\
8 \:\ \:\/:/ / \:\/:/ /:/ / \:\~~\~~\/__/ \:\ \ /:/ / \:\/:/ /:/ / \:\~~\~~\/__/
9 \:\ \::/ / \::/_/:/ / \:\ \ \:\ /:/ / \::/_/:/ / \:\ \
10 \:\/:/ / \:\/:/ / \:\ \ \:\/:/ / \:\/:/ / \:\ \
11 \::/ / \::/ / \:\__\ \::/ / \::/ / \:\__\
12 \/__/ \/__/ \/__/ \/__/ \/__/ \/__/
13
14*/
15/* TABELA SQL - ADICIONAR NO PM
16
17 CREATE TABLE IF NOT EXISTS `vote_point` (
18 `account_id` int(11) NOT NULL default '0',
19 `point` int(11) NOT NULL default '0',
20 `last_vote1` int(11) NOT NULL default '0',
21 `last_vote2` int(11) NOT NULL default '0',
22 `last_vote3` int(11) NOT NULL default '0',
23 `date` text NOT NULL,
24 PRIMARY KEY (`account_id`)
25 ) ENGINE=MyISAM;
26
27*/
28
29prontera,165,181,3 script Vote Points por VIP 87,{
30
31 set .vote,3; // Número de votes point para trocar por 1 dia(Conforme abaixo) de VIP.
32 set .vip,1; // Dias de VIP que serão trocados por 3 Vote Points(Conforme acima).
33 set .n$,"[^008000Vote por Pontos^000000]";
34
35
36 query_sql ("SELECT `point` FROM `vote_point` WHERE `account_id` = '"+getcharid(3)+"'", .@v);
37 mes .n$;
38 mes "Veio trocar seus Vote Points por VIP?";
39 mes " ";
40 mes "Você tem ^0000FF"+.@v+"^000000 Vote Points.";
41 next;
42 if(select("Sim:Não") == 2) close;
43
44 mes .n$;
45 mes "Vou lhe passar os valores:";
46 mes "^0000FF"+.vote+"^000000 Vote Points equivalem a";
47 if(.vip > 1) set .@a$,"s";
48 mes "^0000FF"+.vip+"^000000 dia"+.@a$+" de VIP.";
49 mes "Deseja confirmar a operação?";
50 next;
51 if(select("Sim:Não") == 2) close;
52
53 if(.@v < .vote){
54 mes .n$;
55 mes "Você precisa ter no mÃnimo ^0000FF"+.vote+"^000000 Vote Points para realizar a troca.";
56 close;
57 }
58
59 mes .n$;
60 mes "Muito bem, você acaba de adquirir ^0000FF"+.vip+"^000000 dias de VIP.";
61 close2;
62 set .@n,.@v-.vote;
63 query_sql ("UPDATE `vote_point` SET `point` = '"+.@n+"' WHERE `account_id`='"+getcharid(3)+"'");
64 query_sql ("UPDATE `login` SET `diasvip` = `diasvip` +'"+.vip+"' WHERE `account_id`='"+getcharid(3)+"'");
65 end;
66}