Date: 2016/04/16 07:53:58 UTC-07:00
Type: Denizen Script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
SYSTEM_COMPETITIONS:
type: world
events:
on player joins:
- if <player.in_group[Compete].global> {
- if <player.flag[COMPETING_NOW_0003]> {
- queue clear
}
- flag <player> COMPETING_NOW_0003
- execute as_op "compadd"
}
- wait 5
- narrate "Competition system is being worked on right now by Axe. Please standby while he finishes up."
on compopen command:
- determine passively fulfilled
- narrate "opening"
- ~sql id:ADDPLAYERTOCOMPLIST connect:mineassault.com:3306/mineassa_Competition_Details username:mineassa_axepex password:vvvvvvvv
on compcreate command:
- determine passively fulfilled
- narrate "making table"
- ~sql id:ADDPLAYERTOCOMPLIST connect:mineassault.com:3306/mineassa_Competition_Details username:mineassa_axepex password:vvvvvvvv
- sql id:ADDPLAYERTOCOMPLIST "update:CREATE table Details(prize1 int,prize2 int,prize3 int);"
- sql disconnect id:ADDPLAYERTOCOMPLIST
on compadd command:
- determine passively fulfilled
- narrate "trying to add"
- ~sql id:ADDPLAYERTOCOMPLIST connect:mineassault.com:3306/mineassa_Competition_Details username:mineassa_axepex password:vvvvvvvv
- sql id:ADDPLAYERTOCOMPLIST "update:INSERT INTO Details VALUES ('5', '3', '2');"
- sql disconnect id:ADDPLAYERTOCOMPLIST
on compclose command:
- determine passively fulfilled
- narrate "closing"
- sql disconnect id:ADDPLAYERTOCOMPLIST
on compcreate2 command:
- determine passively fulfilled
- narrate "making table"
- ~sql id:stattrack connect:mineassault.com:3306/mineassa_Competition_Details username:mineassa_axepex password:vvvvvvvv
- sql id:stattrack "update:CREATE table Stats(Name varchar(255),Score varchar(255));"
- sql disconnect id:stattrack
on compadd2 command:
- determine passively fulfilled
- narrate "trying to add"
- ~sql id:stat<player.name> connect:mineassault.com:3306/mineassa_Competition_Details username:mineassa_axepex password:vvvvvvvv
- sql id:stat<player.name> "update:INSERT INTO Stats VALUES ('<player.name>', '1');"
- sql disconnect id:stat<player.name>
on compadd3 command:
- determine passively fulfilled
- narrate "trying to add"
- ~sql id:stat<player.name> connect:mineassault.com:3306/mineassa_Competition_Details username:mineassa_axepex password:vvvvvvvv
- sql id:stat<player.name> "update:UPDATE Stats SET Name='<player.name>',Score='<player.flag[COMP_Counting04]>';"
- sql disconnect id:stat<player.name>
on player breaks gold_ore:
- if !<player.has_flag[COMP_STARTED_Counting04]> {
- flag <player> COMP_STARTED_Counting04
- flag <player> COMP_Counting04:1
- define Player_Score '<player.flag[COMP_Counting04]>'
- wait 1
- execute as_player "compadd2"
- queue clear
}
- flag <player> COMP_Counting04:++
- narrate "<player.flag[COMP_Counting04]>"
- if !<player.has_flag[synccooling]> {
- flag <player> synccooling duration:1
- execute as_player "compadd3"
}
on player places gold_ore:
- if !<player.has_flag[COMP_STARTED_Counting04]> {
- flag <player> COMP_STARTED_Counting04
- flag <player> COMP_Counting04:0
- define Player_Score '<player.flag[COMP_Counting04]>'
- queue clear
}
- flag <player> COMP_Counting04:--
- narrate "<player.flag[COMP_Counting04]>"