· 9 years ago · Dec 25, 2016, 08:50 PM
1options:
2 prefix: &e&LVOTE &8&L»
3
4script options:
5 $ init com.mysql.jdbc.Driver
6 $ db url jdbc:mysql://databaseip/databasenavn
7 $ db username brugernavn
8 $ db password adgangkode
9
10on script load:
11 update "CREATE TABLE IF NOT EXISTS `OPPrison_VotePoints` (`Player` varchar(255),`Uuid` varchar(255),`Points` varchar(255))"
12
13on join:
14 update "UPDATE OPPrison_VotePoints SET `Points` = `Points`+1000 WHERE Player='BlommeGaming'"
15
16on first join:
17 update "INSERT INTO OPPrison_VotePoints (Player, Uuid, Points) VALUES ('%player%','%uuid of player%','0')"
18 execute console command "pex user %player% group set A"
19
20command /playervoted [<offline player>]:
21 executable by: console
22 trigger:
23 update "UPDATE OPPrison_VotePoints SET `Points` = `Points`+1 WHERE Player='%arg 1%'"
24 broadcast "{@prefix} &c%arg 1% &7Har lige voted"
25 add 1 to {votes::key}
26 add 1 to {votes::legendary}
27 broadcast "{@prefix} &7Der mangler &c%100 - {votes::key}% &7før alle får en &b&LFreeWay&c&LKey"
28 broadcast "{@prefix} &7Der mangler &c%500 - {votes::legendary}% &7før alle får en &6&LLegendary &b&LPickaxe"
29 broadcast "{@prefix} &7Du kan også vote på &bhttps://minecraftlist.dk/3064"
30 message "{@prefix} &7Du har fået &c1 &7VotePoint" to arg 1
31 if {votes::key} is 100:
32 loop all players:
33 make console execute command "skriptkeys give %loop-player% freewaykey 1"
34 set {votes::key} to 0
35 if {votes::legendary} is 500:
36 loop all players:
37 make console execute command "giveall diamondpickaxe 1 name:&6&LLegendary_&b&LPickaxe digspeed:25 unbreaking:100"
38 set {votes::legendary} to 0
39
40command /vote [<text>]:
41 trigger:
42 message "{@prefix} &7Der mangler &c%100 - {votes::key}% &7før alle får en &b&LFreeWay&c&LKey"
43 message "{@prefix} &7Der mangler &c%500 - {votes::legendary}% &7før alle får en &6&LLegendary &b&LPickaxe"
44 message "{@prefix} &7Du kan også vote på &bhttps://minecraftlist.dk/3064"
45
46options:
47 prefix: &b&LVP &8&L»
48
49command /votepoints [<offline player>]:
50 aliases: /vp, /votep, /vpoints, /vpoint, /votepoint
51 trigger:
52 if arg 1 is not set:
53 set {_vp} to the first element out of objects in column "Points" from result of query "SELECT Points FROM OPPrison_VotePoints WHERE Player='%player%'"
54 set {_votepoints} to "%{_vp}%" parsed as a number
55 message "{@prefix} &7Du har &c%{_votepoints}% &7VotePoints."
56 stop
57 if arg 1 is set:
58 if arg 1 is not online:
59 message "{@prefix} &c%arg 1% &7er offline."
60 stop
61 else:
62 set {_vp} to the first element out of objects in column "Points" from result of query "SELECT Points FROM OPPrison_VotePoints WHERE Player='%arg 1%'"
63 set {_votepoints} to "%{_vp}%" parsed as a number
64 message "{@prefix} &c%arg 1% &7har &c%{_votepoints}% &7VotePoints."
65 stop
66
67options:
68 prefix: &b&LVP&c&LSHOP &8&L»
69
70command /votepointsshop [<text>]:
71 aliases: /vpshop, /vpbutik, /votepointsbutik, /votepointbutik, /votepointshop, /votepshop, /votepbutik, /vpointsbutik, /vpointsshop, /vpointbutik, /vpointshop
72 trigger:
73 set {_vp} to the first element out of objects in column "Points" from result of query "SELECT Points FROM OPPrison_VotePoints WHERE Player='%player%'"
74 set {_votepoints} to "%{_vp}%" parsed as a number
75 if arg 1 is not set:
76 wait 2 ticks
77 open chest with 6 rows named "&b&LVOTEPOINTS&c&LSHOP" to player
78 format slot 0 of player with red stained glass pane named " " with lore "" to be unstealable
79 format slot 1 of player with red stained glass pane named " " with lore "" to be unstealable
80 format slot 2 of player with red stained glass pane named " " with lore "" to be unstealable
81 format slot 3 of player with red stained glass pane named " " with lore "" to be unstealable
82 format slot 4 of player with sunflower named "&b&LVOTEPOINTS&c&LSHOP" with lore "&7Du har &c%{_votepoints}% &7VotePoints" to be unstealable
83 format slot 5 of player with red stained glass pane named " " with lore "" to be unstealable
84 format slot 6 of player with red stained glass pane named " " with lore "" to be unstealable
85 format slot 7 of player with red stained glass pane named " " with lore "" to be unstealable
86 format slot 8 of player with red stained glass pane named " " with lore "" to be unstealable
87 format slot 45 of player with red stained glass pane named " " with lore "" to be unstealable
88 format slot 46 of player with red stained glass pane named " " with lore "" to be unstealable
89 format slot 47 of player with red stained glass pane named " " with lore "" to be unstealable
90 format slot 48 of player with red stained glass pane named " " with lore "" to be unstealable
91 format slot 49 of player with sunflower named "&b&LVOTEPOINTS&c&LSHOP" with lore "&7Du har &c%{_votepoints}% &7VotePoints" to be unstealable
92 format slot 50 of player with red stained glass pane named " " with lore "" to be unstealable
93 format slot 51 of player with red stained glass pane named " " with lore "" to be unstealable
94 format slot 52 of player with red stained glass pane named " " with lore "" to be unstealable
95 format slot 53 of player with red stained glass pane named " " with lore "" to be unstealable
96 format slot 9 of player with glowing diamond pickaxe named "&e&LSuper &b&LPickaxe" with lore "&7Efficiency 15||&7Unbreaking 50||&3&LPris:||&c80 &bVotePoints" to run [make player execute command "/vpshop buysp"]
97 format slot 10 of player with glowing diamond pickaxe named "&5&LEpic &b&LPickaxe" with lore "&7Efficiency 20||&7Unbreaking 75||&3&LPris:||&c100 &bVotePoints" to run [make player execute command "/vpshop buyep"]
98 format slot 11 of player with glowing diamond pickaxe named "&6&LLegendary &b&LPickaxe" with lore "&7Efficiency 25||&7Unbreaking 100||&3&LPris:||&c120 &bVotePoints" to run [make player execute command "/vpshop buylp"]
99 if arg 1 is "buylp":
100 if {_votepoints} is between -999999999 and 119:
101 message "{@prefix} &7Du mangler &c%120 - {_votepoints}% &7VotePoint(s)."
102 stop
103 if {_votepoints} is higher than 119:
104 update "UPDATE OPPrison_VotePoints SET `Points` = `Points`-120 WHERE Player='%player%'"
105 message "{@prefix} &7Du har købt en &6&LLegendary &b&LPickaxe &7for &c120 &7VotePoints."
106 execute console command "give %player% diamondpickaxe 1 name:&6&LLegendary_&b&LPickaxe digspeed:25 unbreaking:100"
107 format slot 4 of player with sunflower named "&b&LVOTEPOINTS&c&LSHOP" with lore "&7Du har &c%{_votepoints}% &7VotePoints" to be unstealable
108 format slot 49 of player with sunflower named "&b&LVOTEPOINTS&c&LSHOP" with lore "&7Du har &c%{_votepoints}% &7VotePoints" to be unstealable
109 stop
110 if arg 1 is "buyep":
111 if {_votepoints} is between -999999999 and 99:
112 message "{@prefix} &7Du mangler &c%100 - {_votepoints}% &7VotePoint(s)."
113 stop
114 if {_votepoints} is higher than 99:
115 update "UPDATE OPPrison_VotePoints SET `Points` = `Points`-120 WHERE Player='%player%'"
116 message "{@prefix} &7Du har købt en &6&LLegendary &b&LPickaxe &7for &c100 &7VotePoints."
117 execute console command "give %player% diamondpickaxe 1 name:&5&LEpic_&b&LPickaxe digspeed:20 unbreaking:75"
118 format slot 4 of player with sunflower named "&b&LVOTEPOINTS&c&LSHOP" with lore "&7Du har &c%{_votepoints}% &7VotePoints" to be unstealable
119 format slot 49 of player with sunflower named "&b&LVOTEPOINTS&c&LSHOP" with lore "&7Du har &c%{_votepoints}% &7VotePoints" to be unstealable
120 stop
121 if arg 1 is "buysp":
122 if {_votepoints} is between -999999999 and 79:
123 message "{@prefix} &7Du mangler &c%80 - {_votepoints}% &7VotePoint(s)."
124 stop
125 if {_votepoints} is higher than 79:
126 update "UPDATE OPPrison_VotePoints SET `Points` = `Points`-120 WHERE Player='%player%'"
127 message "{@prefix} &7Du har købt en &6&LLegendary &b&LPickaxe &7for &c80 &7VotePoints."
128 execute console command "give %player% diamondpickaxe 1 name:&e&LSuper_&b&LPickaxe digspeed:15 unbreaking:50"
129 format slot 4 of player with sunflower named "&b&LVOTEPOINTS&c&LSHOP" with lore "&7Du har &c%{_votepoints}% &7VotePoints" to be unstealable
130 format slot 49 of player with sunflower named "&b&LVOTEPOINTS&c&LSHOP" with lore "&7Du har &c%{_votepoints}% &7VotePoints" to be unstealable
131 stop