-
Notifications
You must be signed in to change notification settings - Fork 0
/
damages
21 lines (17 loc) · 749 Bytes
/
damages
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{{ $args := parseArgs 2 "You have to add Masquerade Damage or SI Attention and then a number."
(carg "string" "type")
(carg "int" "damage") }}
{{ $damages := sdict ( dbGet 0 "damages" ).Value }}
{{ range $k,$v := $damages }}
{{- if and ( eq ( $args.Get 0 ) "Masquerade Damage" ) ( eq $k "Masquerade Damage" ) }}
{{- $masq := add $v ( $args.Get 1 ) }}
{{- $damages.Set $k $masq }}
{{- else if and ( eq ( $args.Get 0 ) "SI Attention" ) ( eq $k "SI Attention" ) }}
{{- $attention := add $v ( $args.Get 1 ) }}
{{- $damages.Set $k $attention }}
{{- end -}}
{{- end }}
{{ dbSet 0 "damages" $damages }}
{{ deleteTrigger 0 }}
{{ $x := sendMessageRetID nil "it has been done!" }}
{{ deleteMessage nil $x 3 }}